Merge "Remove the legacy refs/for fallback for direct merge pushes"
diff --git a/.aspect/rules/external_repository_action_cache/npm_translate_lock_LTE4Nzc1MDcwNjU= b/.aspect/rules/external_repository_action_cache/npm_translate_lock_LTE4Nzc1MDcwNjU=
index b1e9051..7379059 100755
--- a/.aspect/rules/external_repository_action_cache/npm_translate_lock_LTE4Nzc1MDcwNjU=
+++ b/.aspect/rules/external_repository_action_cache/npm_translate_lock_LTE4Nzc1MDcwNjU=
@@ -1,7 +1,7 @@
 # @generated
 # Input hashes for repository rule npm_translate_lock(name = "npm", pnpm_lock = "@@//:pnpm-lock.yaml").
 # This file should be checked into version control along with the pnpm-lock.yaml file.
-package.json=259674664
-pnpm-lock.yaml=640391753
-pnpm-workspace.yaml=-408937369
-yarn.lock=742513459
+package.json=97599848
+pnpm-lock.yaml=-32785548
+pnpm-workspace.yaml=752663611
+yarn.lock=1747965188
diff --git a/.aspect/rules/external_repository_action_cache/npm_translate_lock_NDEzOTg2ODE= b/.aspect/rules/external_repository_action_cache/npm_translate_lock_NDEzOTg2ODE=
index 51238c9..45735db 100755
--- a/.aspect/rules/external_repository_action_cache/npm_translate_lock_NDEzOTg2ODE=
+++ b/.aspect/rules/external_repository_action_cache/npm_translate_lock_NDEzOTg2ODE=
@@ -1,7 +1,7 @@
 # @generated
 # Input hashes for repository rule npm_translate_lock(name = "tools_npm", pnpm_lock = "@@//tools/node_tools:pnpm-lock.yaml").
 # This file should be checked into version control along with the pnpm-lock.yaml file.
-tools/node_tools/package.json=899646160
-tools/node_tools/pnpm-lock.yaml=-1121876554
+tools/node_tools/package.json=-192272573
+tools/node_tools/pnpm-lock.yaml=327282532
 tools/node_tools/pnpm-workspace.yaml=-408937369
-tools/node_tools/yarn.lock=1865795164
+tools/node_tools/yarn.lock=887968474
diff --git a/.aspect/rules/external_repository_action_cache/npm_translate_lock_ODE4NDE3MDEy b/.aspect/rules/external_repository_action_cache/npm_translate_lock_ODE4NDE3MDEy
index d87d7e1..55cd4ca 100755
--- a/.aspect/rules/external_repository_action_cache/npm_translate_lock_ODE4NDE3MDEy
+++ b/.aspect/rules/external_repository_action_cache/npm_translate_lock_ODE4NDE3MDEy
@@ -1,7 +1,7 @@
 # @generated
 # Input hashes for repository rule npm_translate_lock(name = "ui_npm", pnpm_lock = "@@//polygerrit-ui/app:pnpm-lock.yaml").
 # This file should be checked into version control along with the pnpm-lock.yaml file.
-polygerrit-ui/app/package.json=-1741511240
-polygerrit-ui/app/pnpm-lock.yaml=-429438957
+polygerrit-ui/app/package.json=2017700223
+polygerrit-ui/app/pnpm-lock.yaml=-1219863170
 polygerrit-ui/app/pnpm-workspace.yaml=1396467527
-polygerrit-ui/app/yarn.lock=1946148636
+polygerrit-ui/app/yarn.lock=1888599650
diff --git a/.aspect/rules/external_repository_action_cache/npm_translate_lock_ODE4OTg1MjQ0 b/.aspect/rules/external_repository_action_cache/npm_translate_lock_ODE4OTg1MjQ0
index 33edcc5..411efb2 100755
--- a/.aspect/rules/external_repository_action_cache/npm_translate_lock_ODE4OTg1MjQ0
+++ b/.aspect/rules/external_repository_action_cache/npm_translate_lock_ODE4OTg1MjQ0
@@ -1,7 +1,7 @@
 # @generated
 # Input hashes for repository rule npm_translate_lock(name = "ui_dev_npm", pnpm_lock = "@@//polygerrit-ui:pnpm-lock.yaml").
 # This file should be checked into version control along with the pnpm-lock.yaml file.
-polygerrit-ui/package.json=-860495337
-polygerrit-ui/pnpm-lock.yaml=201412925
+polygerrit-ui/package.json=-474238893
+polygerrit-ui/pnpm-lock.yaml=-1801706443
 polygerrit-ui/pnpm-workspace.yaml=-408937369
-polygerrit-ui/yarn.lock=1276229348
+polygerrit-ui/yarn.lock=968727487
diff --git a/.aspect/rules/external_repository_action_cache/npm_translate_lock_ODUwOTM3NTg= b/.aspect/rules/external_repository_action_cache/npm_translate_lock_ODUwOTM3NTg=
index c9237ac..0e31d0c 100755
--- a/.aspect/rules/external_repository_action_cache/npm_translate_lock_ODUwOTM3NTg=
+++ b/.aspect/rules/external_repository_action_cache/npm_translate_lock_ODUwOTM3NTg=
@@ -1,7 +1,7 @@
 # @generated
 # Input hashes for repository rule npm_translate_lock(name = "plugins_npm", pnpm_lock = "@@//plugins:pnpm-lock.yaml").
 # This file should be checked into version control along with the pnpm-lock.yaml file.
-plugins/package.json=-603960899
-plugins/pnpm-lock.yaml=-1898375944
+plugins/package.json=-510731120
+plugins/pnpm-lock.yaml=710731686
 plugins/pnpm-workspace.yaml=-408937369
-plugins/yarn.lock=-1311799368
+plugins/yarn.lock=-1197622408
diff --git a/.bazelignore b/.bazelignore
index aca15c1..706d1bd 100644
--- a/.bazelignore
+++ b/.bazelignore
@@ -1,5 +1,6 @@
 eclipse-out
 modules/gitiles
+modules/java-prettify
 modules/jgit
 node_modules
 polygerrit-ui/node_modules
diff --git a/.bazelrc b/.bazelrc
index 6d294e2..6822c02 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -56,8 +56,10 @@
 
 common --announce_rc
 
+# On `common` (not `test`): --jvmopt is part of the analysis cache key, so a
+# test-only value discards the cache on every `build`<->`test` switch.
 # TODO(davido): Remove after upgrade to JDK 27 (on by default).
-test --jvmopt=-XX:+UseCompactObjectHeaders
+common --jvmopt=-XX:+UseCompactObjectHeaders
 test --build_tests_only
 test --test_output=errors
 
diff --git a/.bazelversion b/.bazelversion
index deeb3d6..b13d146 100644
--- a/.bazelversion
+++ b/.bazelversion
@@ -1 +1 @@
-9.2.0
+9.3.0
diff --git a/.mailmap b/.mailmap
index 805ff41..332f98c 100644
--- a/.mailmap
+++ b/.mailmap
@@ -37,6 +37,7 @@
 Gustaf Lundh <gustaflh@axis.com>                                                            <gustaf.lundh@sonymobile.com>
 Han-Wen Nienhuys <hanwen@google.com>                                                        <hanwen@google.com>
 Hector Oswaldo Caballero <hector.caballero@ericsson.com>                                    <hector.caballero@ericsson.com>
+Hitesh Chaudhari <hitesh.chaudhari@sap.com>                                                 <hitesh.chaudhari@sap.com>
 Hugo Arès <hugo.ares@ericsson.com>                                                          Hugo Ares <hugo.ares@ericsson.com>
 Hugo Arès <hugo.ares@ericsson.com>                                                          <hugares@gmail.com>
 Jacek Centkowski <jcentkowski@collab.net>                                                   <gemincia.programs@gmail.com>
@@ -96,6 +97,7 @@
 Ulrik Sjölin <ulrik.sjolin@sonyericsson.com>                                                Ulrik Sjölin <ulrik.sjolin@sonyericsson.com>
 Ulrik Sjölin <ulrik.sjolin@sonyericsson.com>                                                Ulrik Sjolin <ulrik.sjolin@sonyericsson.com>
 Viktar Donich <viktard@google.com>                                                          viktard
+Wendy Wang <wendy.wang10@sap.com>                                                           <wendy.wang10@sap.com>
 Yuxuan 'fishy' Wang <fishywang@google.com>                                                  Yuxuan Wang <fishywang@google.com>
 Zalán Blénessy <zalanb@axis.com>                                                            Zalan Blenessy <zalanb@axis.com>
 飞 李 <lifei@7v1.net>                                                                       lifei <lifei@7v1.net>
diff --git a/.nvmrc b/.nvmrc
index ca5c350..1dda03d 100644
--- a/.nvmrc
+++ b/.nvmrc
@@ -1 +1 @@
-24.18.0
+26.13.0
diff --git a/Documentation/access-control.txt b/Documentation/access-control.txt
index 8fcbc93..12bdaef 100644
--- a/Documentation/access-control.txt
+++ b/Documentation/access-control.txt
@@ -903,7 +903,9 @@
 Note, removing votes is generally disallowed for merged changes as this could
 remove approvals that were necessary for the submission and it's confusing to
 see a merged change which doesn't have the necessary approvals to fulfill the
-submit requirements.
+submit requirements. As an exception, users with the
+link:#capability_administrateServer[Administrate Server] global capability may
+remove votes from merged changes.
 
 [[category_remove_reviewer]]
 === Remove Reviewer
@@ -923,8 +925,9 @@
 Note, removing reviewers with non-zero votes is generally disallowed for merged
 changes as this could remove approvals that were necessary for the submission
 and it's confusing to see a merged change which doesn't have the necessary
-approvals to fulfill the submit requirements.
-
+approvals to fulfill the submit requirements. As an exception, users with the
+link:#capability_administrateServer[Administrate Server] global capability may
+remove reviewers with non-zero votes from merged changes.
 
 [[category_review_labels]]
 === Review Labels
@@ -1023,6 +1026,29 @@
 
 Administrators may always delete changes without having this permission.
 
+
+[[category_delete_comment]]
+=== Delete Comment
+
+This category permits users to delete (redact) published comments and
+change messages on any change in the project.
+
+Deleting a comment replaces its content with a placeholder message that
+records who performed the deletion and the optional reason supplied by
+the caller. The original text is permanently removed from NoteDb.
+
+Site administrators can always delete comments without having this
+permission explicitly granted.
+
+[NOTE]
+This permission controls a destructive, irreversible operation.
+It should be granted only to trusted groups (e.g. a dedicated moderation
+group), and not to `Registered Users` at large.
+
+Must be assigned on the target branch ref (i.e. on `refs/heads/*` or a
+more specific pattern).
+
+
 [[category_edit_topic_name]]
 === Edit Topic Name
 
@@ -1068,44 +1094,50 @@
 This category controls who is able to use AI-assisted review features,
 such as the "Review Agent" and "Create AI Review Prompt" buttons.
 
-[NOTE]
-Unlike all other Gerrit permissions which use a default-deny model
-(access is denied unless an explicit 'ALLOW' rule grants it), the
-`aiReview` permission uses a *default-allow* model during the experiment
-phase. This means:
+This permission follows the standard default-deny model: access is
+granted only to users matching an `ALLOW` rule (and not blocked by a
+`DENY` or `BLOCK` rule). To match the previous opt-out behavior,
+`All-Projects` ships with an explicit grant for `Registered Users` on
+`refs/heads/*`. Sites upgrading from an earlier release receive the same
+grant automatically via schema migration when an `aiReview` rule does
+not already exist on `refs/heads/*`. Admins can revoke, scope, or
+restrict the grant like any other change-scoped permission.
 
-* When no `aiReview` rules are configured, all users have access.
-* 'DENY' and 'BLOCK' rules can be used on their own to restrict specific
-  groups, without needing to first grant 'ALLOW' to everyone else.
-* When 'ALLOW' rules are present, the permission switches to the standard
-  model: only users matching an 'ALLOW' rule have access.
-* Site administrators are subject to the same rules as other users.
-
-This non-standard behavior will be removed when the experiment ends, at
-which point `aiReview` will follow the standard default-deny model like
-all other permissions.
-
-To restrict AI review to a specific group on all branches:
+To restrict AI review to a specific group on all branches, replace the
+default grant:
 
 ----
   [access "refs/heads/*"]
     aiReview = group AI Reviewers
 ----
 
-To deny a specific group while keeping access for everyone else:
+Because the default grant is a broad `allow` for `Registered Users`, a
+`DENY` or `BLOCK` rule in the same section does not carve a subgroup out
+of it. Within one access section an `ALLOW` overrides a `BLOCK`, and a
+broad `ALLOW` still grants a user who is also matched by a narrower
+`DENY`. Every member of a subgroup such as `Restricted Users` is also a
+`Registered User`, so the following does *not* remove their access:
 
 ----
   [access "refs/heads/*"]
+    aiReview = group Registered Users
     aiReview = deny group Restricted Users
 ----
 
-To block a group across all child projects (cannot be overridden):
+To exclude a subgroup, either grant `aiReview` only to the groups that
+should have it (replacing the broad grant, as shown above), or add a
+`BLOCK` for the subgroup in a child project or another access section,
+where the inherited `ALLOW` does not override it:
 
 ----
+  child-project: project.config
   [access "refs/heads/*"]
     aiReview = block group Restricted Users
 ----
 
+A `DENY` only revokes the grant for the same group, so it cannot exclude
+a subgroup while the broad grant stands.
+
 
 [[example_roles]]
 == Examples of typical roles in a project
diff --git a/Documentation/backend_licenses.txt b/Documentation/backend_licenses.txt
index dbea391..471fadd 100755
--- a/Documentation/backend_licenses.txt
+++ b/Documentation/backend_licenses.txt
@@ -84,6 +84,7 @@
 * lucene:lucene-queryparser
 * mime4j:core
 * mime4j:dom
+* mina:contrib
 * mina:core
 * mina:sshd
 * mina:sshd-sftp
@@ -886,6 +887,8 @@
 
 ----
 
+----
+
 Eclipse Public License, Version 1.0 (EPL-1.0)
 
 THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
@@ -1104,7 +1107,6 @@
 jury trial in any resulting litigation.
 ----
 
-----
 Export Control Classification Number (ECCN)
 
 As far as we know, the U.S. Export Control Classification Number
diff --git a/Documentation/cmd-convert-ref-storage.txt b/Documentation/cmd-convert-ref-storage.txt
index aae385f..75b444b 100644
--- a/Documentation/cmd-convert-ref-storage.txt
+++ b/Documentation/cmd-convert-ref-storage.txt
@@ -1,7 +1,7 @@
 = gerrit convert-ref-storage
 
 == NAME
-gerrit convert-ref-storage - Convert ref storage to reftable (experimental).
+gerrit convert-ref-storage - Convert ref storage to reftable.
 
 A reftable file is a portable binary file format customized for reference storage.
 References are sorted, enabling linear scans, binary search lookup, and range scans.
@@ -21,6 +21,12 @@
 == DESCRIPTION
 Convert ref storage to reftable.
 
+[NOTE]
+The conversion does not lock the repository. Concurrent writes during the
+conversion can leave the ref storage in an inconsistent state, so ensure the
+repository is quiescent. The REST `convert-ref-storage` endpoint and git's own
+`git refs migrate` have the same limitation.
+
 == ACCESS
 Administrators
 
@@ -47,7 +53,7 @@
 
 Convert ref format for project "core" to reftable:
 ----
-$ ssh -p 29418 review.example.com gerrit convert-ref-format -p core
+$ ssh -p 29418 review.example.com gerrit convert-ref-storage -p core
 ----
 
 GERRIT
diff --git a/Documentation/cmd-create-project.txt b/Documentation/cmd-create-project.txt
index 87f3851..25133ac 100644
--- a/Documentation/cmd-create-project.txt
+++ b/Documentation/cmd-create-project.txt
@@ -13,6 +13,7 @@
   [--permissions-only]
   [--description <DESC> | -d <DESC>]
   [--submit-type <TYPE> | -t <TYPE>]
+  [--ref-storage <FILES | REFTABLE>]
   [--use-contributor-agreements | --ca]
   [--use-signed-off-by | --so]
   [--use-content-merge]
@@ -123,6 +124,12 @@
 For more details see link:config-project-config.html#submit-type[
 Submit Types].
 
+--ref-storage::
+	Ref storage format for the new project's repository: `FILES` (loose
+	and packed refs) or `REFTABLE`.
+	If omitted, the repository manager selects the format. Local disk
+	storage uses JGit's init defaults, falling back to `FILES`.
+
 --use-content-merge::
 	If enabled, Gerrit will try to perform a 3-way merge of text
 	file content when a file has been modified by both the
@@ -197,6 +204,12 @@
 are passed through SSH as-is to the remote Gerrit server, which uses
 the single quotes to delimit the value.
 
+Create a new project with reftable ref storage:
+
+----
+$ ssh -p 29418 review.example.com gerrit create-project --ref-storage REFTABLE tools/gerrit
+----
+
 == REPLICATION
 If the replication plugin is installed, the plugin will attempt to
 perform remote repository creation by a Bourne shell script:
diff --git a/Documentation/cmd-index.txt b/Documentation/cmd-index.txt
index e07ac6f..043e65b 100644
--- a/Documentation/cmd-index.txt
+++ b/Documentation/cmd-index.txt
@@ -125,7 +125,7 @@
 	Close the specified SSH connection.
 
 link:cmd-convert-ref-storage.html[gerrit convert-ref-storage]::
-	Convert ref storage to reftable (experimental).
+	Convert ref storage to reftable.
 
 link:cmd-create-account.html[gerrit create-account]::
 	Create a new user account.
diff --git a/Documentation/cmd-query.txt b/Documentation/cmd-query.txt
index d0419d7..9420e1e 100644
--- a/Documentation/cmd-query.txt
+++ b/Documentation/cmd-query.txt
@@ -80,7 +80,8 @@
 --comments::
 	Include comments for all changes. If combined with the
 	--patch-sets flag then all inline/file comments are included for
-	each patch set that is visible to the caller.
+	each patch set that is visible to the caller. Each inline comment
+	includes its UUID in the `id` field.
 
 --commit-message::
 	Include the full commit message in the change description.
diff --git a/Documentation/cmd-set-account.txt b/Documentation/cmd-set-account.txt
index def35ca..9ef8574 100644
--- a/Documentation/cmd-set-account.txt
+++ b/Documentation/cmd-set-account.txt
@@ -11,6 +11,7 @@
   [--add-email <EMAIL>] [--delete-email <EMAIL> | ALL]
   [--preferred-email <EMAIL>]
   [--add-ssh-key - | <KEY>]
+  [--ssh-key-lifetime <LIFETIME>]
   [--delete-ssh-key - | <KEY> | ALL]
   [--generate-http-password]
   [--http-password <PASSWORD>]
@@ -90,6 +91,12 @@
     May be supplied more than once to add multiple SSH keys
     in a single command execution.
 
+--ssh-key-lifetime::
+    How long the SSH keys added with `--add-ssh-key` can be used,
+    for example `30d`. The value is a number followed by a unit
+    (`s`, `m`, `h`, `d`, `w`, `mon` or `y`). Without it the keys
+    do not expire. Requires `--add-ssh-key`.
+
 --delete-ssh-key::
     Content of the public SSH key to remove from the account's
     keyring or the comment associated with this key.
diff --git a/Documentation/cmd-stream-events.txt b/Documentation/cmd-stream-events.txt
index e34ba6a..0f600bd 100644
--- a/Documentation/cmd-stream-events.txt
+++ b/Documentation/cmd-stream-events.txt
@@ -173,7 +173,10 @@
 
 projectName:: The created project name
 
-projectHead:: The created project head name
+headName:: The created project head name
+
+gitConfig:: The repository Git configuration in Git config file format.
+This field is omitted if the configuration is not available.
 
 eventCreatedOn:: Time in seconds since the UNIX epoch when this event was
 created.
diff --git a/Documentation/config-gerrit.txt b/Documentation/config-gerrit.txt
index 51e1cd5..a72221f 100644
--- a/Documentation/config-gerrit.txt
+++ b/Documentation/config-gerrit.txt
@@ -44,6 +44,20 @@
 +
 Default is to create H2 database in the db folder of the site path.
 +
+To configure an H2 database explicitly, use the `async:` file system:
++
+----
+[accountPatchReviewDb]
+  url = jdbc:h2:async:/path/to/db
+----
++
+For legacy configurations, Gerrit also accepts the previous
+`jdbc:h2:file:/path/to/db` form as an alias for `jdbc:h2:async:/path/to/db`.
+H2 documents the `async:` file system as a workaround for applications that
+may interrupt embedded H2 operations, but not as a complete safety guarantee.
+Use a client/server database for the strongest isolation from interrupted
+request threads.
++
 Changing this parameter requires to migrate database using the
 link:pgm-MigrateAccountPatchReviewDb.html[MigrateAccountPatchReviewDb] program.
 Migration cannot be done while the server is running.
@@ -60,8 +74,15 @@
 
 ---
 [accountPatchReviewDb]
-  url = jdbc:h2:file:/path/to/db
+  url = jdbc:h2:async:/path/to/db
 ---
++
+For legacy configurations, Gerrit also accepts the previous
+`jdbc:h2:file:/path/to/db` form as an alias for `jdbc:h2:async:/path/to/db`.
+H2 documents the `async:` file system as a workaround for applications that
+may interrupt embedded H2 operations, but not as a complete safety guarantee.
+Use a client/server database for the strongest isolation from interrupted
+request threads.
 
 
 [[accountPatchReviewDb.poolLimit]]accountPatchReviewDb.poolLimit::
@@ -118,6 +139,18 @@
 connection, holds the lock for the duration of that operation, and closes the
 connection immediately on completion.
 +
+All Gerrit primaries sharing the database must use the same lock type. Gerrit
+checks this at startup and fails to start if lock types conflict, preventing
+database corruption.
++
+The lock type is recorded by the first primary to start in a marker directory
+next to the database file (`<site>/db/account_patch_reviews.locktype` by
+default, or `<db file>.locktype` if `accountPatchReviewDb.url` is customised).
+The marker is never removed automatically. To change the lock type, stop all
+primaries, delete the marker directory, update `accountPatchReviewDb.h2LockType`
+on every primary and start them again. The first primary to start records the
+new lock type.
++
 Supported values:
 +
 --
@@ -996,7 +1029,7 @@
 +
 If not absolute, the path is resolved relative to `$site_path`.
 +
-Default is unset, no disk cache.
+Default is `cache`. To disable the disk cache, set this to an empty string.
 
 [[cache.enableDiskStatMetrics]]cache.enableDiskStatMetrics::
 +
@@ -2056,8 +2089,23 @@
 
 [[change.submitWholeTopic]]change.submitWholeTopic::
 +
-Determines if the submit button submits the whole topic instead of
-just the current change.
+Deprecated in favor of link:#change.enforceWholeTopicSubmit[enforceWholeTopicSubmit].
++
+Determines if the submit button enforces submitting the whole topic
+instead of just the current change. If disabled, the option to submit
+the whole topic still exists.
++
+Default is `false`.
+
+[[change.enforceWholeTopicSubmit]]change.enforceWholeTopicSubmit::
++
+Determines if the submit button enforces submitting the whole topic
+instead of just the current change. If disabled, the option to submit
+the whole topic still exists.
++
+Replaces link:#change.submitWholeTopic[submitWholeTopic] to provide
+a clear naming. If one of these options is `true`, submitting the
+whole topic will be enforced.
 +
 Default is `false`.
 
@@ -2670,6 +2718,10 @@
 (lazily) if needed. This helps reduce the overhead of checking if
 the packed-refs file is outdated.
 +
+Reftable repositories skip this cache automatically, because reftable
+reads are already atomic. The cache stays active for the files backend,
+so both formats can be served together without changing this option.
++
 Default is `true`.
 
 [[core.useFileKeyByProjectCache]]core.useFileKeyByProjectCache::
@@ -3641,7 +3693,8 @@
 `X-Forwarded-Server`.  These headers are typically set by Apache's
 link:https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#x-headers[mod_proxy,role=external,window=_blank].
 +
-[NOTE]
+[[httpd.listenUrl.proxyHttpSecurity]]
+[WARNING]
 --
 For security reasons, make sure to only allow connections from a
 trusted reverse proxy in your network, as clients could otherwise
@@ -3714,6 +3767,27 @@
 By default, `\http://*:8080`.
 --
 
+[[httpd.enableProxyProtocol]]httpd.enableProxyProtocol::
++
+If `true`, enables parsing PROXY protocol headers on incoming HTTP connections
+configured with `proxy-http://` or `proxy-https://`. This allows Gerrit to
+access the original client address and port instead of the reverse proxy
+address. A PROXY protocol header is optional; connections without one are
+handled normally.
+If both a PROXY protocol header and `X-Forwarded-For` are present, the
+`X-Forwarded-For` header takes precedence for the client address.
++
+[WARNING]
+This should only be enabled when *all* HTTP traffic on the listener comes
+from trusted proxies. A client that can connect directly to the HTTP
+listener can send a forged PROXY protocol header and spoof its source
+address.
+
+See also <<httpd.listenUrl.proxyHttpSecurity, the proxy-http security warning>>
+for related reverse-proxy security considerations.
++
+By default, `false`.
+
 [[httpd.reuseAddress]]httpd.reuseAddress::
 +
 If `true`, permits the daemon to bind to the port even if the port
@@ -4010,14 +4084,6 @@
 using the link:pgm-reindex.html[reindex program] before restarting the
 Gerrit server.
 
-[[index.directory]]index.directory::
-+
-Path to the directory where Gerrit stores its index.
-+
-If not absolute, the path is resolved relative to `$site_path`.
-+
-Default is `$site_path/index`.
-
 [[index.type]]index.type::
 +
 *(DEPRECATED)* The only supported value is `LUCENE`, which is the default,
@@ -4027,6 +4093,14 @@
 For using other indexing backends (e.g. ElasticSearch), refer to
 `gerrit.installIndexModule` setting.
 +
+[[index.directory]]index.directory::
++
+Path to the directory where Gerrit stores its secondary index files.
++
+If not absolute, the path is resolved relative to `$site_path`.
++
+Default is `$site_path/index`.
++
 [[index.threads]]index.threads::
 +
 Number of threads to use for indexing in normal interactive operations. Setting
@@ -4425,24 +4499,6 @@
 
 The following settings are only used when the index type is `LUCENE`.
 
-[[index.lockFactory]]index.lockFactory::
-+
-The lock implementation that Lucene uses to prevent concurrent writers from
-corrupting an index directory. Can be either `NATIVE`, which uses
-link:https://lucene.apache.org/core/api/core/org/apache/lucene/store/NativeFSLockFactory.html[
-NativeFSLockFactory,role=external,window=_blank], or `SIMPLE`, which uses
-link:https://lucene.apache.org/core/api/core/org/apache/lucene/store/SimpleFSLockFactory.html[
-SimpleFSLockFactory,role=external,window=_blank]. Lucene recommends `SIMPLE`
-for indexes on filesystems where OS-level locking is unreliable, such as NFS.
-+
-> **NOTE**: Before changing this setting, stop all processes writing to the
-> index and delete the leftover `write.lock` file of every index directory
-> under `<site_dir>/index`, including the `open` and `closed` subdirectories
-> of the changes index. Processes configured with different lock factories do
-> not lock against each other and can corrupt the index.
-+
-Defaults to `NATIVE`.
-
 [[index.name.ramBufferSize]]index.name.ramBufferSize::
 +
 Determines the amount of RAM that may be used for buffering added documents
@@ -4480,6 +4536,9 @@
 the in-memory buffer fills, but only committed and guaranteed to be synced
 to disk when the process finishes.
 +
+Ignored by the offline link:pgm-reindex.html[reindex] program, which always
+behaves as if `commitWithin` is negative.
++
 Defaults to 5 minutes.
 
 
@@ -4645,6 +4704,23 @@
 [experiments]
   enabled = ExperimentKey
 ----
++
+For example, `GerritBackendFeature__allow_ai_review_for_registered_users`
+grants the `aiReview` change permission to all registered users even when
+no explicit `aiReview` rule is configured, letting a site enable AI Review
+before the permission is added to `project.config`:
++
+----
+[experiments]
+  enabled = GerritBackendFeature__allow_ai_review_for_registered_users
+----
++
+NOTE: While this experiment is enabled, any identified user can use AI
+Review regardless of `project.config`. The experiment is an unconditional
+override that ignores ACLs: an explicit `block aiReview` rule has no
+effect, so AI Review can no longer be disabled or restricted by ACL.
+Disable the experiment and grant `aiReview` explicitly if you need
+per-ref or per-group control.
 
 [[experiments.disabled]]experiments.disabled::
 +
@@ -6372,6 +6448,20 @@
 +
 By default, `NIO2`.
 
+[[sshd.enableProxyProtocol]]sshd.enableProxyProtocol::
++
+If `true`, enables parsing PROXY protocol headers on incoming SSH
+connections, so Gerrit can see the original client address instead of
+the proxy/load balancer address. A PROXY protocol header is optional;
+connections without one are handled normally.
++
+[WARNING]
+This should only be enabled when *all* SSH traffic comes from trusted
+proxies. A client that can connect directly to the SSH listener can send
+a forged PROXY protocol header and spoof its source address.
++
+By default, `false`.
+
 [[sshd.listenAddress]]sshd.listenAddress::
 +
 Specifies the local addresses the internal SSHD should listen
@@ -6414,6 +6504,14 @@
 By default uses the value of `sshd.listenAddress`.
 --
 
+[[sshd.generateHostKeys]]sshd.generateHostKeys::
++
+Whether link:pgm-init.html[init] generates missing SSH host keys in
+`'$site_path'/etc`. Set to `false` if host keys are provisioned
+externally, so that only those keys are offered to clients.
++
+By default, `true`.
+
 [[sshd.tcpKeepAlive]]sshd.tcpKeepAlive::
 +
 If `true`, enables TCP keepalive messages to the other side, so
@@ -6436,6 +6534,18 @@
 When SSH daemon is enabled then this setting also defines the max number of
 concurrent Git requests for interactive users over SSH and HTTP together.
 
+[[sshd.nioWorkers]]sshd.nioWorkers::
++
+Number of threads to use for I/O completion callbacks when the SSH daemon
+uses the NIO2 backend. These callbacks decode packets and update session
+state before handing work off to the SSH command thread pools.
++
+By default, `min(availableProcessors() + 1, max(4, sshd.threads / 4))`.
++
+When `sshd.nioWorkers` is not set, the
+`org.apache.sshd.config.nio-workers` JVM system property is honored. If
+neither setting is configured, the default above is applied.
+
 [[sshd.batchThreads]]sshd.batchThreads::
 +
 Number of threads to allocate for SSH command requests from
diff --git a/Documentation/dev-bazel.txt b/Documentation/dev-bazel.txt
index 29af750..16fd325 100644
--- a/Documentation/dev-bazel.txt
+++ b/Documentation/dev-bazel.txt
@@ -663,7 +663,7 @@
 EOF
 
 repo='@@rules_jvm_external++maven+'
-repo="${repo}com_google_guava_guava_33_5_0_jre"
+repo="${repo}com_google_guava_guava_33_8_0_jre"
 target="${repo}//file:file"
 
 bazelisk --batch --output_user_root=/tmp/gerrit-mirror-fetch \
@@ -920,8 +920,8 @@
 bazelisk test --config=remote_bb //javatests/com/google/gerrit/git:small_tests
 ```
 
-`remote_bb` and `remote25_bb` use Java 25; use `remote21_bb` for Java 21.
-Local reporting and cache-only builds can add `--config=java21`.
+`remote_bb` and `remote25_bb` use Java 25. Local reporting and cache-only
+builds also use Java 25 by default.
 
 Remote builds keep output downloads minimal by default. To download requested
 outputs, such as `bazel-bin/gerrit.war`, add `--config=remote_toplevel` after
diff --git a/Documentation/dev-release.txt b/Documentation/dev-release.txt
index b3f001a..01a87fc 100644
--- a/Documentation/dev-release.txt
+++ b/Documentation/dev-release.txt
@@ -276,7 +276,7 @@
 ** Select `com.google.gerrit` as `Project`.
 
 [[push-stable]]
-==== Push the Stable Branch
+=== Push the Stable Branch
 
 * Create the stable branch `stable-$version` in the `gerrit` project via the
 link:https://gerrit-review.googlesource.com/admin/repos/gerrit,branches[
@@ -289,7 +289,7 @@
 to match the branch name created.
 
 [[publish-typescript-plugin-api]]
-==== Publish TypeScript Plugin API
+=== Publish TypeScript Plugin API
 
 Only applies to major and minor releases! Not required for patch releases.
 
@@ -324,7 +324,7 @@
 for new release tags.
 
 [[announce]]
-==== Announce on Mailing List
+=== Announce on Mailing List
 
 Send an email to the mailing list to announce the release. The content of the
 announcement email is generated with the `release-announcement.py` script from
diff --git a/Documentation/externalid-case-insensitivity.txt b/Documentation/externalid-case-insensitivity.txt
index 57f492c..124890c 100644
--- a/Documentation/externalid-case-insensitivity.txt
+++ b/Documentation/externalid-case-insensitivity.txt
@@ -6,7 +6,7 @@
 the usernames were case sensitive, e.g. `johndoe` and `JohnDoe` can both exist
 as separate accounts. This could lead to issues when migrating an account
 from LDAP to an internal account, if
-xref:config-gerrit.txt#ldap.localUsernameToLowerCase[ldap.localUsernameToLowerCase]
+link:config-gerrit.html#ldap.localUsernameToLowerCase[ldap.localUsernameToLowerCase]
 was set. Such usernames can also be rather confusing for users, if they try to
 identify authors of comments or changes.
 
diff --git a/Documentation/install.txt b/Documentation/install.txt
index 4a6a900..5bb443a 100644
--- a/Documentation/install.txt
+++ b/Documentation/install.txt
@@ -6,7 +6,7 @@
 
 To run the Gerrit service, the following requirement must be met on the host:
 
-* JRE, version 21 https://www.oracle.com/java/technologies/downloads/?er=221886[Download,role=external,window=_blank]
+* JRE, version 25 https://www.oracle.com/java/technologies/downloads/?er=221886[Download,role=external,window=_blank]
 
 [[download]]
 == Download Gerrit
diff --git a/Documentation/licenses.txt b/Documentation/licenses.txt
index 3509413..2af1f30c 100644
--- a/Documentation/licenses.txt
+++ b/Documentation/licenses.txt
@@ -86,6 +86,7 @@
 * lucene:lucene-queryparser
 * mime4j:core
 * mime4j:dom
+* mina:contrib
 * mina:core
 * mina:sshd
 * mina:sshd-sftp
@@ -1101,6 +1102,8 @@
 
 ----
 
+----
+
 Eclipse Public License, Version 1.0 (EPL-1.0)
 
 THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
@@ -1319,7 +1322,6 @@
 jury trial in any resulting litigation.
 ----
 
-----
 Export Control Classification Number (ECCN)
 
 As far as we know, the U.S. Export Control Classification Number
diff --git a/Documentation/pg-plugin-endpoints.txt b/Documentation/pg-plugin-endpoints.txt
index ed63caa..70b4cc0 100644
--- a/Documentation/pg-plugin-endpoints.txt
+++ b/Documentation/pg-plugin-endpoints.txt
@@ -82,6 +82,21 @@
 current revision displayed, an instance of
 link:rest-api-changes.html#revision-info[RevisionInfo]
 
+=== chat-panel
+The `chat-panel` extension point wraps the `<chat-panel>` component in the
+change view's and diff view's right-hand sidebar. Plugins can decorate or
+replace the default chat panel.
+
+* `change`
++
+current change displayed, an instance of
+link:rest-api-changes.html#change-info[ChangeInfo]
+
+* `revision`
++
+current revision displayed, an instance of
+link:rest-api-changes.html#revision-info[RevisionInfo]
+
 === change-metadata-item
 The `change-metadata-item` extension point is located on the change view
 left panel, below the `Submit Requirements` and `Links` sections by default.
diff --git a/Documentation/release_war_jars.txt b/Documentation/release_war_jars.txt
index 87f09e0..58442cf 100644
--- a/Documentation/release_war_jars.txt
+++ b/Documentation/release_war_jars.txt
@@ -32,7 +32,7 @@
 flogger-system-backend
 google-extensions
 gson
-guava-33.5.0-jre
+guava-33.8.0-jre
 guava-retrying
 guice-6.0.0-classes
 guice-assistedinject
@@ -85,7 +85,8 @@
 shims
 slf4j-api
 slf4j-reload4j
-soy-2024-01
+soy-2024-02
+sshd-contrib
 sshd-mina
 sshd-osgi
 sshd-sftp
diff --git a/Documentation/rest-api-accounts.txt b/Documentation/rest-api-accounts.txt
index 5d43a02..aa1962c 100644
--- a/Documentation/rest-api-accounts.txt
+++ b/Documentation/rest-api-accounts.txt
@@ -1052,6 +1052,15 @@
       "algorithm": "ssh-rsa",
       "comment": "john.doe@example.com",
       "valid": true
+    },
+    {
+      "seq": 2,
+      "ssh_public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw== john.doe@example.com",
+      "encoded_key": "AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw==",
+      "algorithm": "ssh-rsa",
+      "comment": "john.doe@example.com",
+      "valid": true,
+      "expiration": "2026-02-14 15:00:00.000000000"
     }
   ]
 ----
@@ -1100,11 +1109,16 @@
 The SSH public key must be provided as raw content in the request body.
 
 Trying to add an SSH key that already exists succeeds, but no new SSH
-key is persisted.
+key is persisted and the existing SSH key is not changed.
+
+The SSH key does not expire by default. The optional `lifetime` query
+parameter limits how long the SSH key can be used, for example
+`lifetime=30d`. The value is a number followed by a unit (`s`, `m`, `h`,
+`d`, `w`, `mon` or `y`) and must be positive.
 
 .Request
 ----
-  POST /accounts/self/sshkeys HTTP/1.0
+  POST /accounts/self/sshkeys?lifetime=30d HTTP/1.0
   Content-Type: text/plain
 
   ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw== john.doe@example.com
@@ -1126,7 +1140,8 @@
     "encoded_key": "AAAAB3NzaC1yc2EAAAABIwAAAQEA0T...YImydZAw==",
     "algorithm": "ssh-rsa",
     "comment": "john.doe@example.com",
-    "valid": true
+    "valid": true,
+    "expiration": "2026-02-14 15:00:00.000000000"
   }
 ----
 
@@ -3198,6 +3213,7 @@
 |`algorithm`     ||The algorithm of the SSH key.
 |`comment`       |optional|The comment of the SSH key.
 |`valid`         ||Whether the SSH key is valid.
+|`expiration`    |optional|The timestamp at which the SSH key will expire
 |=============================
 
 [[username-input]]
diff --git a/Documentation/rest-api-changes.txt b/Documentation/rest-api-changes.txt
index cb217fb..b907e5c 100644
--- a/Documentation/rest-api-changes.txt
+++ b/Documentation/rest-api-changes.txt
@@ -2026,9 +2026,11 @@
 part of the response.
 
 Changes that will also be submitted:
-1. All changes of the same topic if
-link:config-gerrit.html#change.submitWholeTopic[`change.submitWholeTopic`]
-configuration is set to true.
+1. All changes of the same topic if one of
+link:config-gerrit.html#change.submitWholeTopic[`change.submitWholeTopic`] or
+link:config-gerrit.html#change.enforceWholeTopicSubmit[`change.enforceWholeTopicSubmit`]
+is set to `true`, or if `submit_whole_topic` is set to `true` in the
+request body.
 2. All dependent changes.
 3. The closure of the above (e.g if a dependent change has a topic, all changes
 of *that* topic will also be submitted).
@@ -3045,6 +3047,79 @@
   }
 ----
 
+[[get-change-permissions]]
+=== Get Change Permissions
+--
+'GET /changes/link:#change-id[\{change-id\}]/permissions'
+--
+
+Retrieves the change-scoped permissions the calling user has on the
+change, for permissions that are not exposed through the change's
+link:#change-info[`actions`] map.
+
+By default this endpoint exposes only the change-scoped permissions that
+are currently required and have no other channel. The default set grows
+additively as a concrete need appears, so new permissions are added
+without breaking clients. A caller that wants the full set can use the
+`o=ALL` option below.
+
+[NOTE]
+Most change-scoped permissions (e.g. `abandon`, `delete`, `revert`,
+`rebase`, `submit`, `topic`, `hashtags`, ...) reach the client today
+via the link:#change-info[`actions`] field on `ChangeInfo` or the
+link:#revision-info[`actions`] field on `RevisionInfo`. Those entries
+are produced by REST handlers that implement `UiAction<ChangeResource>`
+and carry richer information than a boolean permission bit (label,
+title, HTTP method, conditional `enabled` state). They remain the
+canonical source for those permissions and are NOT duplicated here.
+
+This endpoint surfaces change-scoped permissions whose REST handlers
+do not naturally fit the `UiAction` pattern -- for example because the
+action is purely client-side and has no server handler at all.
+Currently it exposes the link:access-control.html#category_ai_review[
+`aiReview`] permission. Additional permissions that share this shape
+may be added in the future; the response is extensible.
+
+The `o=ALL` option returns every change permission the calling user is
+granted, not only the default set above. The names come from
+`DefaultPermissionMappings`, so not every returned name has a matching
+`Permission` constant. It is intended for introspection and is best
+effort rather than a stability contract.
+
+The `account` option reports the permissions of another user instead of
+the caller. The calling user must hold the global
+link:access-control.html#capability_runAs[Run As] capability to use it,
+and it composes with `o=ALL`. Administrators must also be explicitly granted
+this capability. The reported account need not be able to see the change.
+
+.Request
+----
+  GET /changes/myProject~123/permissions HTTP/1.0
+----
+
+As response a link:#change-permissions-info[ChangePermissionsInfo] entity is
+returned. Its `permissions` field lists the change-scoped permissions in this
+endpoint's scope that the calling user is granted. The scope is the set
+described in the note above. A name is present if and only if the caller is
+granted it within that scope. Permissions outside the scope (for example
+those carried by the `actions` map or by `removable_labels`) are not
+repeated here, so an absent name makes no statement about whether such a
+permission is granted.
+
+.Response
+----
+  HTTP/1.1 200 OK
+  Content-Disposition: attachment
+  Content-Type: application/json; charset=UTF-8
+
+  )]}'
+  {
+    "permissions": [
+      "aiReview"
+    ]
+  }
+----
+
 [[list-change-messages]]
 === List Change Messages
 --
@@ -3139,9 +3214,11 @@
 reason why it was deleted. The reason can be provided in the request body as a
 link:#delete-change-message-input[DeleteChangeMessageInput] entity.
 
-Note that only users with the
+Permitted for users with the change-scoped
+link:access-control.html#category_delete_comment[Delete Comment] permission
+on the change's destination branch, or for users with the
 link:access-control.html#capability_administrateServer[Administrate Server]
-global capability are permitted to delete a change message.
+global capability.
 
 To delete a change message, send a DELETE request:
 
@@ -4487,7 +4564,9 @@
 Note, removing votes is generally disallowed for merged changes as this could
 remove approvals that were necessary for the submission and it's confusing to
 see a merged change which doesn't have the necessary approvals to fulfill the
-submit requirements.
+submit requirements. Users with the
+link:access-control.html#capability_administrateServer[Administrate Server]
+global capability may delete votes from merged changes.
 
 See the description of the link:access-control.html#category_remove_label[
 Remove Label] permission for when users are allowed to remove votes.
@@ -4496,8 +4575,8 @@
 
  * '204 No Content' if the vote is deleted successfully;
  * '404 Not Found' when the vote to be deleted is zero or not present.
- * '409 Conflict' when the change is merged and hence deleting votes is not
-   allowed
+ * '409 Conflict' when the change is merged and the caller does not have the
+   Administrate Server capability.
 
 .Request
 ----
@@ -4858,26 +4937,12 @@
 }
 ----
 
-The response includes an `aiReview` entry only when the caller's `aiReview`
-permission is denied for the change. The entry is omitted when the permission
-is allowed (default) or when the permission backend errors; absence is treated
-by the UI as "allowed", preserving backwards compatibility with servers that
-do not emit the entry.
-
-Example:
-----
-{
-  "aiReview": {
-    "label": "AI Review",
-    "title": "Run AI Review on this change",
-    "enabled": false
-  }
-}
-----
-
 The response is a flat map of possible revision REST endpoint names
 mapped to their link:#action-info[ActionInfo].
 
+To check the `aiReview` permission, use
+link:#get-change-permissions[Get Change Permissions].
+
 [[get-review]]
 === Get Review
 --
@@ -5477,9 +5542,11 @@
 part of the response.
 
 Changes that will also be submitted:
-1. All changes of the same topic if
-link:config-gerrit.html#change.submitWholeTopic[`change.submitWholeTopic`]
-configuration is set to true.
+1. All changes of the same topic if one of
+link:config-gerrit.html#change.submitWholeTopic[`change.submitWholeTopic`] or
+link:config-gerrit.html#change.enforceWholeTopicSubmit[`change.enforceWholeTopicSubmit`]
+is set to `true`, or if `submit_whole_topic` is set to `true` in the
+request body.
 2. All dependent changes.
 3. The closure of the above (e.g if a dependent change has a topic, all changes
 of *that* topic will also be submitted).
@@ -5522,6 +5589,97 @@
   "revision 674ac754f91e64a0efb8087e59a176484bd534d1 is not current revision"
 ----
 
+[[submit-whole-topic-guarantees]]
+=== Submit Whole Topic: Guarantees and Limitations
+
+This section documents what Gerrit guarantees when
+the `submit_whole_topic` field in link:#submit-input[SubmitInput] is
+set to `true`, and what it explicitly cannot guarantee.
+
+==== What is guaranteed
+
+[[submit-whole-topic-guarantee-permission]]
+Permissions::
+The caller must have submit permission on every change in the topic
+closure before any ref is written. If any permission check fails the
+entire operation is rejected with `403 Forbidden` or `409 Conflict`
+(depending on which change lacks permission) and no changes are merged.
+
+[[submit-whole-topic-guarantee-submit-rules]]
+Submit rules::
+Every change in the topic closure is checked against its project's
+submit rules before any ref is written. If any change is not ready the
+entire operation is rejected with `409 Conflict` and no changes are
+merged.
+
+[[submit-whole-topic-guarantee-single-project]]
+Atomicity within a single project::
+When all changes in the topic closure belong to the *same* project,
+their refs are updated in a single
+link:https://git-scm.com/docs/git-push[atomic batch ref update]. Either
+all refs are written or none are.
+
+[[submit-whole-topic-guarantee-retry]]
+Retry on concurrent modification::
+If a concurrent submit causes a ref-lock conflict during the operation,
+Gerrit retries the whole submission automatically. On retry, changes
+that were already merged by the concurrent submit are silently skipped
+(`allowMerged=true`), and only the remaining open changes are
+completed. This means a temporary race does not cause the operation to
+fail permanently.
+
+[[submit-whole-topic-guarantee-ancestors]]
+Unmerged ancestors::
+For each change in the topic whose submit strategy is not
+`CHERRY_PICK`, all unmerged ancestor changes targeting the same branch
+are also included in the submission, exactly as for a regular submit.
+
+[[submit-whole-topic-guarantee-open-only]]
+Only open changes are submitted::
+The topic closure is computed from open changes only. Changes in the
+topic that are already merged at the time the operation starts are
+ignored and do not cause the operation to fail.
+
+==== What cannot be guaranteed
+
+[[submit-whole-topic-no-guarantee-cross-project]]
+No atomicity across projects::
+When the topic closure spans *multiple* projects, each project's refs
+are written in a *separate* batch ref update. These per-project updates
+are applied sequentially and are not coordinated with each other.
+If project A succeeds but project B subsequently fails (for example
+after retries are exhausted), the changes in project A remain merged
+and the changes in project B remain open. There is no automatic
+rollback.
++
+This is an inherent limitation of Git's ref-locking model: a single
+atomic transaction cannot span multiple repositories.
+
+[[submit-whole-topic-no-guarantee-new-changes]]
+Changes added to the topic after submission starts::
+The topic closure is computed once when the request is received. Any
+change whose topic is set to the same value after that point is not
+included in the current operation. There is no mechanism to wait for or
+retry with an extended closure.
+
+[[submit-whole-topic-no-guarantee-concurrent-single-submit]]
+Isolation from concurrent single-change submits::
+Nothing prevents another user from submitting individual changes from
+the same topic concurrently. Such concurrent submits are not
+blocked or rolled back. If the triggering change itself is merged by a
+concurrent submit before this operation runs, the operation returns
+`409 Conflict`.
+
+[[submit-whole-topic-no-guarantee-response-change]]
+The response change may not be the only one submitted::
+The `200 OK` response body contains the
+link:#change-info[ChangeInfo] for the triggering change only. Other
+changes in the topic closure are submitted in the same operation but
+are not individually enumerated in the response. Use
+link:#submitted-together[Changes Submitted Together] (with
+`o=TOPIC_CLOSURE`) before calling this endpoint to enumerate the full
+set of changes that will be included.
+
 [[get-patch]]
 === Get Patch
 --
@@ -6155,9 +6313,11 @@
 This endpoint also marks the comment as resolved since deleted comments are not
 actionable.
 
-Note that only users with the
+Permitted for users with the change-scoped
+link:access-control.html#category_delete_comment[Delete Comment] permission
+on the change's destination branch, or for users with the
 link:access-control.html#capability_administrateServer[Administrate Server]
-global capability are permitted to delete a comment.
+global capability.
 
 Deletion reason can be provided in the request body as a
 link:#delete-comment-input[DeleteCommentInput] entity.
@@ -7047,6 +7207,10 @@
 The `base` parameter can be specified to control the base patch set from which
 the blame should be generated.
 
+If a `.git-blame-ignore-revs` file is present at the root of the repository in
+the revision being blamed, the revisions listed in it are ignored when computing
+the blame.
+
 [[set-reviewed]]
 === Set Reviewed
 --
@@ -7681,6 +7845,8 @@
 invocations of the REST call are required.
 |`post_submit` |not set if `false`|
 If true, this vote was made after the change was submitted.
+|`is_ai`       |not set if `false`|
+If true, this vote was created by an AI agent.
 |===========================
 
 [[attention-set-info]]
@@ -8199,6 +8365,28 @@
 A message from the plugin.
 |============================
 
+[[change-permissions-info]]
+=== ChangePermissionsInfo
+The `ChangePermissionsInfo` entity describes the change-scoped permissions
+the calling user has on a change.
+
+For permissions that are exposed through the change or revision
+link:#change-info[`actions`] map (e.g. `abandon`, `delete`, `revert`,
+`rebase`, `submit`), this entity is not the canonical source -- see
+link:#get-change-permissions[Get Change Permissions] for the scope of
+this endpoint.
+
+[options="header",cols="1,^1,5"]
+|===========================
+|Field Name    ||Description
+|`permissions` ||
+The names of the change-scoped permissions the calling user has on the
+change (e.g. `aiReview`). Only permissions within the requested scope are
+reported. Within that scope a name is present if and only if it is
+granted. Absence of a permission outside the scope makes no statement
+about whether it is granted.
+|===========================
+
 [[comment-info]]
 === CommentInfo
 The `CommentInfo` entity contains information about an inline comment.
@@ -9003,7 +9191,7 @@
 flow expression defines an action that should be triggered when a condition
 becomes satisfied.
 
-[options="header",cols="1,6"]
+[options="header",cols="1,^1,5"]
 |========================
 |Field Name  ||Description
 |`condition` ||The condition which must be satisfied for the action to be
@@ -9723,6 +9911,8 @@
 |`labels`                               |optional|
 The votes that should be added to the revision as a map that maps the
 label names to the voting values.
+|`is_ai`                                |optional|
+Whether the votes in `labels` were created by an AI agent.
 |`comments`                             |optional|
 The comments that should be added as a map that maps a file path to a
 list of link:#comment-input[CommentInput] entities.
@@ -10040,6 +10230,9 @@
 link:#notify-info[NotifyInfo] entity.
 |`wait_for_merge`|optional|
 Deprecated and no longer used. Kept for backwards compatibility.
+|`submit_whole_topic`|optional|
+If `true`, all open changes that share the topic of the submitted change
+are also submitted together in a single operation. Defaults to `false`.
 |=============================
 
 [[submit-record]]
diff --git a/Documentation/rest-api-config.txt b/Documentation/rest-api-config.txt
index 4d1a6b4..68fee14 100644
--- a/Documentation/rest-api-config.txt
+++ b/Documentation/rest-api-config.txt
@@ -941,7 +941,7 @@
     "GerritBackendFeature__allow_fix_suggestions_in_comments": {
       "enabled": false
     },
-    "GerritBackendFeature__attach_nonce_to_documentation": {
+    "GerritBackendFeature__skip_submit_records_without_submit_requirements": {
       "enabled": true
     }
   }
@@ -2119,7 +2119,7 @@
 
 .Request
 ----
-  GET /config/server/experiments/mGerritBackendFeature__attach_nonce_to_documentation HTTP/1.0
+  GET /config/server/experiments/GerritBackendFeature__allow_fix_suggestions_in_comments HTTP/1.0
 ----
 
 As response an link:#experiment-info[Experiment] entity is returned that
@@ -2184,6 +2184,8 @@
 |`default_display_name`|The default strategy for choosing the display
 name in the UI, see also
 link:config-gerrit.html#accounts.defaultDisplayName[gerrit.config].
+|`enable_delete`       |Whether deleting accounts is enabled, see
+link:config-gerrit.html#accounts.enableDelete[accounts.enableDelete].
 |=============================
 
 [[auth-info]]
@@ -2320,8 +2322,11 @@
 link:config-gerrit.html#change.updateDelay[How often in seconds the web
 interface should poll for updates to the currently open change].
 |`submit_whole_topic` |not set if `false`|
-link:config-gerrit.html#change.submitWholeTopic[A configuration if
-the whole topic is submitted].
+link:config-gerrit.html#change.submitWholeTopic[Configuration that enforces
+the whole topic to be submitted]. Deprecated; use `enforce_whole_topic_submit`.
+|`enforce_whole_topic_submit` |not set if `false`|
+link:config-gerrit.html#change.enforceWholeTopicSubmit[Configuration that enforces
+the whole topic to be submitted].
 |`disable_private_changes` |not set if `false`|
 Returns true if private changes are disabled.
 |`mergeability_computation_behavior` ||
@@ -2616,6 +2621,9 @@
 link:config-gerrit.html#gerrit.instanceId[Short identifier for this Gerrit installation].
 |`default_branch`       |optional|
 link:config-gerrit.html#gerrit.defaultBranch[Name of the default branch to use on the project creation].
+|`submit_commit_url`    |optional|
+link:config-gerrit.html#gerrit.submitCommitUrl[URL used to link commit hashes in
+submit messages].
 |`all_projects`         ||
 The name of the `All-Projects` root project.
 |`all_users`            ||
diff --git a/Documentation/rest-api-groups.txt b/Documentation/rest-api-groups.txt
index b4505f1..9f69d71 100644
--- a/Documentation/rest-api-groups.txt
+++ b/Documentation/rest-api-groups.txt
@@ -60,7 +60,7 @@
       "id": "834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7",
       "url": "#/admin/groups/uuid-834ec36dd5e0ed21a2ff5d7e2255da082d63bbd7",
       "options": {
-        "visible_to_all": true,
+        "visible_to_all": true
       },
       "group_id": 6,
       "owner": "MyProject_Committers",
diff --git a/Documentation/rest-api-projects.txt b/Documentation/rest-api-projects.txt
index a8cabe5..ccbac1c 100644
--- a/Documentation/rest-api-projects.txt
+++ b/Documentation/rest-api-projects.txt
@@ -1049,6 +1049,63 @@
   }
 ----
 
+[[convert-ref-storage]]
+=== Convert Ref Storage
+--
+'POST /projects/link:#project-name[\{project-name\}]/convert-ref-storage'
+--
+
+Converts the ref storage of a project's repository between `FILES`
+and `REFTABLE`.
+
+Conversion is supported in both directions, but only for a local repository
+that is not already in the requested format. A request is rejected with
+`409 Conflict` when it cannot be satisfied: the repository is already in the
+requested format, is not a local repository, or a backup from a previous
+conversion is still present and must be removed before converting again. A
+missing or unrecognized `ref_storage` is rejected with `400 Bad Request`, and
+`404 Not Found` is returned if the repository cannot be opened.
+
+When `backup` is kept, the previous ref storage is retained on the server and
+is not removed automatically: converting from `FILES` renames the old files
+(`refs.old`, `packed-refs.old`, `logs.old`), while converting from `REFTABLE`
+leaves the old `reftable` directory in place. A leftover backup blocks a later
+conversion back until it is removed.
+
+Caller must be a member of a group that is granted the
+link:access-control.html#capability_administrateServer[Administrate Server]
+capability.
+
+[NOTE]
+The conversion does not lock the repository. Concurrent writes during the
+conversion can leave the ref storage in an inconsistent state, so ensure the
+repository is quiescent. The SSH `convert-ref-storage` command and git's own
+`git refs migrate` have the same limitation.
+
+The conversion is described in the request body as a
+link:#ref-storage-input[RefStorageInput] entity. As a shorthand, the body
+may be just the target format as a bare string, e.g. `"REFTABLE"`.
+
+.Request
+----
+  POST /projects/myproject/convert-ref-storage HTTP/1.0
+  Content-Type: application/json; charset=UTF-8
+
+  {
+    "ref_storage": "REFTABLE",
+    "backup": false
+  }
+----
+
+.Response
+----
+  HTTP/1.1 200 OK
+  Content-Type: application/json; charset=UTF-8
+
+  )]}'
+  "REFTABLE"
+----
+
 [[run-gc]]
 === Run GC
 --
@@ -1696,12 +1753,15 @@
 visible to the caller.
 Private changes that the caller cannot access will result in a 404 error.
 
+The `name-only` option is also required; requests without it are rejected
+with `400 Bad Request`.
+
 The response format is identical to the
 link:rest-api-changes.html#list-files[List Files] endpoint for changes.
 
 .Request
 ----
-  GET /projects/my-project/commits/6d2a3adb10e844c33617fc948dbeb88e868d396e/diff?base=a8a477efffbbf3b44169bb9a1d3a334cbbd9aa96 HTTP/1.0
+  GET /projects/my-project/commits/6d2a3adb10e844c33617fc948dbeb88e868d396e/diff?base=a8a477efffbbf3b44169bb9a1d3a334cbbd9aa96&name-only HTTP/1.0
 ----
 
 .Response
@@ -4810,6 +4870,9 @@
 |`state`                     |optional|
 The state of the project, can be `ACTIVE`, `READ_ONLY` or `HIDDEN`. +
 Not set if the project state is `ACTIVE`.
+|`ref_storage`               ||
+The ref storage format of the project's repository (`FILES` or
+`REFTABLE`). The request fails if the repository cannot be opened.
 |`commentlinks`              ||
 Map with the comment link configurations of the project. The name of
 the comment link configuration is mapped to a link:#commentlink-info[
@@ -5542,6 +5605,26 @@
 override any existing project configuration. If a conflicting configuration
 already exists the request is rejected with `409 Conflict`. The default is
 `false`.
+|`ref_storage`               |optional|
+The ref storage format for the project's repository (`FILES`,
+`REFTABLE`). +
+If not set, the repository manager selects the format. Local disk storage
+uses JGit's init defaults, falling back to `FILES`.
+|=========================================
+
+[[ref-storage-input]]
+=== RefStorageInput
+The `RefStorageInput` entity contains information for converting the ref
+storage of a project's repository.
+
+[options="header",cols="1,^2,4"]
+|=========================================
+|Field Name     ||Description
+|`ref_storage`  ||
+The target ref storage format (`REFTABLE` or `FILES`). This is the default
+field, so the request body may also be this value as a bare string.
+|`backup`       |`true` if not set|
+Whether a backup of the old ref storage should be kept.
 |=========================================
 
 [[project-parent-input]]
diff --git a/Documentation/user-request-cancellation-and-deadlines.txt b/Documentation/user-request-cancellation-and-deadlines.txt
index 8726564..bdf2560 100644
--- a/Documentation/user-request-cancellation-and-deadlines.txt
+++ b/Documentation/user-request-cancellation-and-deadlines.txt
@@ -167,7 +167,7 @@
 |git push       |Client Disconnected|The error status is 'Client Closed Request'.
 |               |Server-side deadline exceeded|The error status is 'Server Deadline Exceeded'.
 |               |Client-provided deadline exceeded|The error status is 'Client Provided Deadline Exceeded'.
-|git clone/fetch|Not supported.
+|git clone/fetch 2+|Not supported.
 |=======================
 
 This means clients always get a proper error message telling the user why the
diff --git a/Documentation/user-search.txt b/Documentation/user-search.txt
index 6270db0..dbe43d1 100644
--- a/Documentation/user-search.txt
+++ b/Documentation/user-search.txt
@@ -444,7 +444,7 @@
 True if the number of files touched by the latest patchset of a
 change satisfies the given relation for the given number of files.
 +
-For example, files:>2 will be true for any change which touches at least
+For example, filecount:>2 will be true for any change which touches at least
 3 files.
 +
 Valid relations are >=, >, \<=, <, or no relation, which will match if the
diff --git a/MODULE.bazel b/MODULE.bazel
index 04e95b1..18eff51 100644
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -4,17 +4,17 @@
 bazel_dep(name = "bazel_features", version = "1.51.0")
 bazel_dep(name = "bazel_lib", version = "3.7.2")
 bazel_dep(name = "platforms", version = "1.1.0")
-bazel_dep(name = "rules_jvm_external", version = "7.1")
+bazel_dep(name = "rules_jvm_external", version = "7.2")
 
 # Language rules.
-bazel_dep(name = "aspect_rules_js", version = "3.4.1")
+bazel_dep(name = "aspect_rules_js", version = "3.5.1")
 bazel_dep(name = "aspect_rules_rollup", version = "2.0.1")
 bazel_dep(name = "aspect_rules_ts", version = "3.10.1")
 bazel_dep(name = "rules_android", version = "0.7.3")
 bazel_dep(name = "rules_go", version = "0.63.0")
 bazel_dep(name = "rules_java", version = "9.9.0")
 bazel_dep(name = "rules_nodejs", version = "6.7.6")
-bazel_dep(name = "rules_python", version = "2.3.4")
+bazel_dep(name = "rules_python", version = "2.4.5")
 bazel_dep(name = "rules_shell", version = "0.8.0")
 
 # Pin rules_java to Gerrit's chosen version. Transitive bzlmod modules can
@@ -29,11 +29,14 @@
 # Libraries / toolchains.
 bazel_dep(name = "protobuf", version = "36.2")
 
-# In-tree modules.
-bazel_dep(name = "jgit")
-local_path_override(
-    module_name = "jgit",
-    path = "./modules/jgit",
+# TODO(davido): Gerrit uses Java protobufs only. Disable Protobuf's transitive
+# Rust setup until upstream avoids resolving Cargo/Rust tools for non-Rust consumers.
+# https://github.com/protocolbuffers/protobuf/issues/30684
+single_version_override(
+    module_name = "protobuf",
+    patch_strip = 1,
+    patches = ["//tools/patches:protobuf-36.2-no-rust.patch"],
+    version = "36.2",
 )
 
 # Toolchain setup.
diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock
index 0bfdc41..8608435 100644
--- a/MODULE.bazel.lock
+++ b/MODULE.bazel.lock
@@ -2,28 +2,20 @@
   "lockFileVersion": 28,
   "registryFileHashes": {
     "https://bcr.bazel.build/bazel_registry.json": "8a28e4aff06ee60aed2a8c281907fb8bcbf3b753c91fb5a5c57da3215d5b3497",
-    "https://bcr.bazel.build/modules/abseil-cpp/20210324.2/MODULE.bazel": "7cd0312e064fde87c8d1cd79ba06c876bd23630c83466e9500321be55c96ace2",
-    "https://bcr.bazel.build/modules/abseil-cpp/20211102.0/MODULE.bazel": "70390338f7a5106231d20620712f7cccb659cd0e9d073d1991c038eb9fc57589",
     "https://bcr.bazel.build/modules/abseil-cpp/20230125.1/MODULE.bazel": "89047429cb0207707b2dface14ba7f8df85273d484c2572755be4bab7ce9c3a0",
-    "https://bcr.bazel.build/modules/abseil-cpp/20230802.0.bcr.1/MODULE.bazel": "1c8cec495288dccd14fdae6e3f95f772c1c91857047a098fad772034264cc8cb",
     "https://bcr.bazel.build/modules/abseil-cpp/20230802.0/MODULE.bazel": "d253ae36a8bd9ee3c5955384096ccb6baf16a1b1e93e858370da0a3b94f77c16",
-    "https://bcr.bazel.build/modules/abseil-cpp/20240116.1/MODULE.bazel": "37bcdb4440fbb61df6a1c296ae01b327f19e9bb521f9b8e26ec854b6f97309ed",
     "https://bcr.bazel.build/modules/abseil-cpp/20240116.2/MODULE.bazel": "73939767a4686cd9a520d16af5ab440071ed75cec1a876bf2fcfaf1f71987a16",
-    "https://bcr.bazel.build/modules/abseil-cpp/20250127.0/MODULE.bazel": "d1086e248cda6576862b4b3fe9ad76a214e08c189af5b42557a6e1888812c5d5",
     "https://bcr.bazel.build/modules/abseil-cpp/20250127.1/MODULE.bazel": "c4a89e7ceb9bf1e25cf84a9f830ff6b817b72874088bf5141b314726e46a57c1",
     "https://bcr.bazel.build/modules/abseil-cpp/20250512.1/MODULE.bazel": "d209fdb6f36ffaf61c509fcc81b19e81b411a999a934a032e10cd009a0226215",
     "https://bcr.bazel.build/modules/abseil-cpp/20250814.1/MODULE.bazel": "51f2312901470cdab0dbdf3b88c40cd21c62a7ed58a3de45b365ddc5b11bcab2",
     "https://bcr.bazel.build/modules/abseil-cpp/20250814.1/source.json": "cea3901d7e299da7320700abbaafe57a65d039f10d0d7ea601c4a66938ea4b0c",
     "https://bcr.bazel.build/modules/abseil-py/2.1.0/MODULE.bazel": "5ebe5bf853769c65707e5c28f216798f7a4b1042015e6a36e6d03094d94bec8a",
     "https://bcr.bazel.build/modules/abseil-py/2.1.0/source.json": "0e8fc4f088ce07099c1cd6594c20c7ddbb48b4b3c0849b7d94ba94be88ff042b",
-    "https://bcr.bazel.build/modules/apple_support/1.11.1/MODULE.bazel": "1843d7cd8a58369a444fc6000e7304425fba600ff641592161d9f15b179fb896",
     "https://bcr.bazel.build/modules/apple_support/1.15.1/MODULE.bazel": "a0556fefca0b1bb2de8567b8827518f94db6a6e7e7d632b4c48dc5f865bc7c85",
-    "https://bcr.bazel.build/modules/apple_support/1.21.0/MODULE.bazel": "ac1824ed5edf17dee2fdd4927ada30c9f8c3b520be1b5fd02a5da15bc10bff3e",
-    "https://bcr.bazel.build/modules/apple_support/1.21.1/MODULE.bazel": "5809fa3efab15d1f3c3c635af6974044bac8a4919c62238cce06acee8a8c11f1",
-    "https://bcr.bazel.build/modules/apple_support/1.24.1/MODULE.bazel": "f46e8ddad60aef170ee92b2f3d00ef66c147ceafea68b6877cb45bd91737f5f8",
     "https://bcr.bazel.build/modules/apple_support/1.24.2/MODULE.bazel": "0e62471818affb9f0b26f128831d5c40b074d32e6dda5a0d3852847215a41ca4",
     "https://bcr.bazel.build/modules/apple_support/2.3.0/MODULE.bazel": "d48f824ae8eeea5f837eb3038cef3615075d996d3e82eb9187192c2820605a81",
-    "https://bcr.bazel.build/modules/apple_support/2.3.0/source.json": "d99b0a50918c4484856d773026b2fd60a694668c70fc0e19d592786dc7e5e469",
+    "https://bcr.bazel.build/modules/apple_support/2.5.2/MODULE.bazel": "bb1b7081e390a8d3885f642cb0073dfcf8e7a36525e079fa8f5835af7079c0fe",
+    "https://bcr.bazel.build/modules/apple_support/2.5.2/source.json": "dd51ee925a550e92b55eb41c4c809a967da311a2d2520241252a238a48b39c4c",
     "https://bcr.bazel.build/modules/aspect_bazel_lib/2.11.0/MODULE.bazel": "cb1ba9f9999ed0bc08600c221f532c1ddd8d217686b32ba7d45b0713b5131452",
     "https://bcr.bazel.build/modules/aspect_bazel_lib/2.14.0/MODULE.bazel": "2b31ffcc9bdc8295b2167e07a757dbbc9ac8906e7028e5170a3708cecaac119f",
     "https://bcr.bazel.build/modules/aspect_bazel_lib/2.19.2/MODULE.bazel": "30dfabbfae0139b1f0036e01c201dd4c0167da3017f0b7ef3820d78e07622989",
@@ -33,17 +25,17 @@
     "https://bcr.bazel.build/modules/aspect_bazel_lib/2.7.7/MODULE.bazel": "491f8681205e31bb57892d67442ce448cda4f472a8e6b3dc062865e29a64f89c",
     "https://bcr.bazel.build/modules/aspect_bazel_lib/2.8.1/MODULE.bazel": "812d2dd42f65dca362152101fbec418029cc8fd34cbad1a2fde905383d705838",
     "https://bcr.bazel.build/modules/aspect_rules_js/2.0.0/MODULE.bazel": "b45b507574aa60a92796e3e13c195cd5744b3b8aff516a9c0cb5ae6a048161c5",
-    "https://bcr.bazel.build/modules/aspect_rules_js/3.4.1/MODULE.bazel": "e46853c134b48bc84c9bb5c4a4c8ae792dcfd5277acac9d90c444d65fa43dd19",
-    "https://bcr.bazel.build/modules/aspect_rules_js/3.4.1/source.json": "b11f550b53d451800ebd0b4f38a048aea33fbfbd78fb5c77dca847f6b9b47a3b",
+    "https://bcr.bazel.build/modules/aspect_rules_js/3.5.1/MODULE.bazel": "f01b4f1bf26713e875ec0fbe9d9c2146d2b173d6194850a7cb63b579c557aab1",
+    "https://bcr.bazel.build/modules/aspect_rules_js/3.5.1/source.json": "f2dc028f9110d8aaf262a23267484f1c9d310f8ecf5f832e2a740d192a97756f",
     "https://bcr.bazel.build/modules/aspect_rules_rollup/2.0.1/MODULE.bazel": "296e3a053658c2af989ba9bd62a205e6d1fa84bdd6dd5249196546e6b84770ec",
     "https://bcr.bazel.build/modules/aspect_rules_rollup/2.0.1/source.json": "2fe8ac1ccb4de74bf884761e070010280b272d94e3997205b361b91c75409726",
     "https://bcr.bazel.build/modules/aspect_rules_ts/3.10.1/MODULE.bazel": "035205a7834b0ed9724ed3c4790e12d1c779ef2520d72496ab234e6307715e6c",
     "https://bcr.bazel.build/modules/aspect_rules_ts/3.10.1/source.json": "d42b6560206adb5524caad2abc40ae0b5b34478dd38184a9f6ea4a5fed848cd6",
     "https://bcr.bazel.build/modules/aspect_tools_telemetry/0.5.1/MODULE.bazel": "9d94e5c22c0019995c0a3216a6abb1717dc3f35acccf4e6267a55d6df38367aa",
-    "https://bcr.bazel.build/modules/aspect_tools_telemetry/0.5.1/source.json": "dbe0a75bf1f741b18c7b72dd4d205fa5a45c8c135fee15f7fdd1a2b50ba0fdde",
+    "https://bcr.bazel.build/modules/aspect_tools_telemetry/0.5.2/MODULE.bazel": "c715a5fb6b13a0086c061618f00d033a4ab6d76cbd1083e38d7ca953b5e547f4",
+    "https://bcr.bazel.build/modules/aspect_tools_telemetry/0.5.2/source.json": "4dd300d44767ad4860098b006dda614e67ab0409ae6ec6e133faad303fe9ede8",
     "https://bcr.bazel.build/modules/bazel_features/1.1.0/MODULE.bazel": "cfd42ff3b815a5f39554d97182657f8c4b9719568eb7fded2b9135f084bf760b",
     "https://bcr.bazel.build/modules/bazel_features/1.1.1/MODULE.bazel": "27b8c79ef57efe08efccbd9dd6ef70d61b4798320b8d3c134fd571f78963dbcd",
-    "https://bcr.bazel.build/modules/bazel_features/1.10.0/MODULE.bazel": "f75e8807570484a99be90abcd52b5e1f390362c258bcb73106f4544957a48101",
     "https://bcr.bazel.build/modules/bazel_features/1.11.0/MODULE.bazel": "f9382337dd5a474c3b7d334c2f83e50b6eaedc284253334cf823044a26de03e8",
     "https://bcr.bazel.build/modules/bazel_features/1.13.0/MODULE.bazel": "c14c33c7c3c730612bdbe14ebbb5e61936b6f11322ea95a6e91cd1ba962f94df",
     "https://bcr.bazel.build/modules/bazel_features/1.15.0/MODULE.bazel": "d38ff6e517149dc509406aca0db3ad1efdd890a85e049585b7234d04238e2a4d",
@@ -51,13 +43,10 @@
     "https://bcr.bazel.build/modules/bazel_features/1.18.0/MODULE.bazel": "1be0ae2557ab3a72a57aeb31b29be347bcdc5d2b1eb1e70f39e3851a7e97041a",
     "https://bcr.bazel.build/modules/bazel_features/1.19.0/MODULE.bazel": "59adcdf28230d220f0067b1f435b8537dd033bfff8db21335ef9217919c7fb58",
     "https://bcr.bazel.build/modules/bazel_features/1.21.0/MODULE.bazel": "675642261665d8eea09989aa3b8afb5c37627f1be178382c320d1b46afba5e3b",
-    "https://bcr.bazel.build/modules/bazel_features/1.23.0/MODULE.bazel": "fd1ac84bc4e97a5a0816b7fd7d4d4f6d837b0047cf4cbd81652d616af3a6591a",
     "https://bcr.bazel.build/modules/bazel_features/1.25.0/MODULE.bazel": "e2e60a10a6da64bbf533f15ca652bf61a033e41c2ed734d79a9a08ba87f68c1a",
     "https://bcr.bazel.build/modules/bazel_features/1.27.0/MODULE.bazel": "621eeee06c4458a9121d1f104efb80f39d34deff4984e778359c60eaf1a8cb65",
     "https://bcr.bazel.build/modules/bazel_features/1.28.0/MODULE.bazel": "4b4200e6cbf8fa335b2c3f43e1d6ef3e240319c33d43d60cc0fbd4b87ece299d",
-    "https://bcr.bazel.build/modules/bazel_features/1.3.0/MODULE.bazel": "cdcafe83ec318cda34e02948e81d790aab8df7a929cec6f6969f13a489ccecd9",
     "https://bcr.bazel.build/modules/bazel_features/1.30.0/MODULE.bazel": "a14b62d05969a293b80257e72e597c2da7f717e1e69fa8b339703ed6731bec87",
-    "https://bcr.bazel.build/modules/bazel_features/1.32.0/MODULE.bazel": "095d67022a58cb20f7e20e1aefecfa65257a222c18a938e2914fd257b5f1ccdc",
     "https://bcr.bazel.build/modules/bazel_features/1.33.0/MODULE.bazel": "8b8dc9d2a4c88609409c3191165bccec0e4cb044cd7a72ccbe826583303459f6",
     "https://bcr.bazel.build/modules/bazel_features/1.34.0/MODULE.bazel": "e8475ad7c8965542e0c7aac8af68eb48c4af904be3d614b6aa6274c092c2ea1e",
     "https://bcr.bazel.build/modules/bazel_features/1.36.0/MODULE.bazel": "596cb62090b039caf1cad1d52a8bc35cf188ca9a4e279a828005e7ee49a1bec3",
@@ -85,7 +74,6 @@
     "https://bcr.bazel.build/modules/bazel_skylib/1.4.2/MODULE.bazel": "3bd40978e7a1fac911d5989e6b09d8f64921865a45822d8b09e815eaa726a651",
     "https://bcr.bazel.build/modules/bazel_skylib/1.5.0/MODULE.bazel": "32880f5e2945ce6a03d1fbd588e9198c0a959bb42297b2cfaf1685b7bc32e138",
     "https://bcr.bazel.build/modules/bazel_skylib/1.6.1/MODULE.bazel": "8fdee2dbaace6c252131c00e1de4b165dc65af02ea278476187765e1a617b917",
-    "https://bcr.bazel.build/modules/bazel_skylib/1.7.0/MODULE.bazel": "0db596f4563de7938de764cc8deeabec291f55e8ec15299718b93c4423e9796d",
     "https://bcr.bazel.build/modules/bazel_skylib/1.7.1/MODULE.bazel": "3120d80c5861aa616222ec015332e5f8d3171e062e3e804a2a0253e1be26e59b",
     "https://bcr.bazel.build/modules/bazel_skylib/1.8.0/MODULE.bazel": "2fb3fb53675f6adfc1ca5bfbd5cfb655ae350fba4706d924a8ec7e3ba945671c",
     "https://bcr.bazel.build/modules/bazel_skylib/1.8.1/MODULE.bazel": "88ade7293becda963e0e3ea33e7d54d3425127e0a326e0d17da085a5f1f03ff6",
@@ -115,21 +103,19 @@
     "https://bcr.bazel.build/modules/gazelle/0.51.3/MODULE.bazel": "618a729142f66de1e2cb776d026413763be5b80d5e3d29ffb9d3d90c5defde90",
     "https://bcr.bazel.build/modules/gazelle/0.51.3/source.json": "fbe5312a01fb4a2a58caff4a0d40dcf384b6f0bda75e85546663360da1d7538a",
     "https://bcr.bazel.build/modules/google_benchmark/1.8.2/MODULE.bazel": "a70cf1bba851000ba93b58ae2f6d76490a9feb74192e57ab8e8ff13c34ec50cb",
-    "https://bcr.bazel.build/modules/googletest/1.11.0/MODULE.bazel": "3a83f095183f66345ca86aa13c58b59f9f94a2f81999c093d4eeaa2d262d12f4",
     "https://bcr.bazel.build/modules/googletest/1.14.0.bcr.1/MODULE.bazel": "22c31a561553727960057361aa33bf20fb2e98584bc4fec007906e27053f80c6",
     "https://bcr.bazel.build/modules/googletest/1.14.0/MODULE.bazel": "cfbcbf3e6eac06ef9d85900f64424708cc08687d1b527f0ef65aa7517af8118f",
     "https://bcr.bazel.build/modules/googletest/1.15.2/MODULE.bazel": "6de1edc1d26cafb0ea1a6ab3f4d4192d91a312fd2d360b63adaa213cd00b2108",
     "https://bcr.bazel.build/modules/googletest/1.17.0/MODULE.bazel": "dbec758171594a705933a29fcf69293d2468c49ec1f2ebca65c36f504d72df46",
     "https://bcr.bazel.build/modules/googletest/1.17.0/source.json": "38e4454b25fc30f15439c0378e57909ab1fd0a443158aa35aec685da727cd713",
+    "https://bcr.bazel.build/modules/hermetic_launcher/0.0.15/MODULE.bazel": "1a04856a10bd6a3d23bad08673bceb59b061c4bf9b76d335e30386832acc1b33",
+    "https://bcr.bazel.build/modules/hermetic_launcher/0.0.15/source.json": "aceb903a3bda5131b0a3132ccf77f36f32b96dcb70864049ec8cfdf9c0b0f068",
     "https://bcr.bazel.build/modules/jq.bzl/0.1.0/MODULE.bazel": "2ce69b1af49952cd4121a9c3055faa679e748ce774c7f1fda9657f936cae902f",
     "https://bcr.bazel.build/modules/jq.bzl/0.4.0/MODULE.bazel": "a7b39b37589f2b0dad53fd6c1ccaabbdb290330caa920d7ef3e6aad068cd4ab2",
     "https://bcr.bazel.build/modules/jq.bzl/0.4.0/source.json": "52ec7530c4618e03f634b30ff719814a68d7d39c235938b7aa2abbfe1eb1c52c",
-    "https://bcr.bazel.build/modules/jsoncpp/1.9.5/MODULE.bazel": "31271aedc59e815656f5736f282bb7509a97c7ecb43e927ac1a37966e0578075",
     "https://bcr.bazel.build/modules/jsoncpp/1.9.6.bcr.2/MODULE.bazel": "64f508885f907ac2518039b3d0c5c1703a8f6137d9f5d635067ba93d33c2670a",
     "https://bcr.bazel.build/modules/jsoncpp/1.9.6.bcr.2/source.json": "13199fa0a267ca46814e9e6ab313a71890c8f1822e57376fdc23a2d2cd384051",
-    "https://bcr.bazel.build/modules/jsoncpp/1.9.6/MODULE.bazel": "2f8d20d3b7d54143213c4dfc3d98225c42de7d666011528dc8fe91591e2e17b0",
     "https://bcr.bazel.build/modules/libpfm/4.11.0/MODULE.bazel": "45061ff025b301940f1e30d2c16bea596c25b176c8b6b3087e92615adbd52902",
-    "https://bcr.bazel.build/modules/nlohmann_json/3.6.1/MODULE.bazel": "6f7b417dcc794d9add9e556673ad25cb3ba835224290f4f848f8e2db1e1fca74",
     "https://bcr.bazel.build/modules/package_metadata/0.0.2/MODULE.bazel": "fb8d25550742674d63d7b250063d4580ca530499f045d70748b1b142081ebb92",
     "https://bcr.bazel.build/modules/package_metadata/0.0.3/MODULE.bazel": "77890552ecea9e284b5424c9de827a58099348763a4359e975c359a83d4faa83",
     "https://bcr.bazel.build/modules/package_metadata/0.0.5/MODULE.bazel": "ef4f9439e3270fdd6b9fd4dbc3d2f29d13888e44c529a1b243f7a31dfbc2e8e4",
@@ -146,25 +132,6 @@
     "https://bcr.bazel.build/modules/platforms/1.0.0/MODULE.bazel": "f05feb42b48f1b3c225e4ccf351f367be0371411a803198ec34a389fb22aa580",
     "https://bcr.bazel.build/modules/platforms/1.1.0/MODULE.bazel": "1c0c09f5bdcf4b3f924720d2478a3711cb39f4977019ca5988685e5b7e18b3d2",
     "https://bcr.bazel.build/modules/platforms/1.1.0/source.json": "fcf351c47596c939140ab0d333dfdd08ed1ea6ce33c2fe70c12493a301cf1344",
-    "https://bcr.bazel.build/modules/protobuf/21.7/MODULE.bazel": "a5a29bb89544f9b97edce05642fac225a808b5b7be74038ea3640fae2f8e66a7",
-    "https://bcr.bazel.build/modules/protobuf/23.1/MODULE.bazel": "88b393b3eb4101d18129e5db51847cd40a5517a53e81216144a8c32dfeeca52a",
-    "https://bcr.bazel.build/modules/protobuf/24.4/MODULE.bazel": "7bc7ce5f2abf36b3b7b7c8218d3acdebb9426aeb35c2257c96445756f970eb12",
-    "https://bcr.bazel.build/modules/protobuf/27.0/MODULE.bazel": "7873b60be88844a0a1d8f80b9d5d20cfbd8495a689b8763e76c6372998d3f64c",
-    "https://bcr.bazel.build/modules/protobuf/27.1/MODULE.bazel": "703a7b614728bb06647f965264967a8ef1c39e09e8f167b3ca0bb1fd80449c0d",
-    "https://bcr.bazel.build/modules/protobuf/27.2/MODULE.bazel": "32450b50673882e4c8c3d10a83f3bc82161b213ed2f80d17e38bece8f165c295",
-    "https://bcr.bazel.build/modules/protobuf/29.0-rc2.bcr.1/MODULE.bazel": "52f4126f63a2f0bbf36b99c2a87648f08467a4eaf92ba726bc7d6a500bbf770c",
-    "https://bcr.bazel.build/modules/protobuf/29.0-rc2/MODULE.bazel": "6241d35983510143049943fc0d57937937122baf1b287862f9dc8590fc4c37df",
-    "https://bcr.bazel.build/modules/protobuf/29.0-rc3/MODULE.bazel": "33c2dfa286578573afc55a7acaea3cada4122b9631007c594bf0729f41c8de92",
-    "https://bcr.bazel.build/modules/protobuf/29.0/MODULE.bazel": "319dc8bf4c679ff87e71b1ccfb5a6e90a6dbc4693501d471f48662ac46d04e4e",
-    "https://bcr.bazel.build/modules/protobuf/29.1/MODULE.bazel": "557c3457560ff49e122ed76c0bc3397a64af9574691cb8201b4e46d4ab2ecb95",
-    "https://bcr.bazel.build/modules/protobuf/29.3/MODULE.bazel": "77480eea5fb5541903e49683f24dc3e09f4a79e0eea247414887bb9fc0066e94",
-    "https://bcr.bazel.build/modules/protobuf/3.19.0/MODULE.bazel": "6b5fbb433f760a99a22b18b6850ed5784ef0e9928a72668b66e4d7ccd47db9b0",
-    "https://bcr.bazel.build/modules/protobuf/3.19.2/MODULE.bazel": "532ffe5f2186b69fdde039efe6df13ba726ff338c6bc82275ad433013fa10573",
-    "https://bcr.bazel.build/modules/protobuf/3.19.6/MODULE.bazel": "9233edc5e1f2ee276a60de3eaa47ac4132302ef9643238f23128fea53ea12858",
-    "https://bcr.bazel.build/modules/protobuf/31.1/MODULE.bazel": "379a389bb330b7b8c1cdf331cc90bf3e13de5614799b3b52cdb7c6f389f6b38e",
-    "https://bcr.bazel.build/modules/protobuf/32.1/MODULE.bazel": "89cd2866a9cb07fee9ff74c41ceace11554f32e0d849de4e23ac55515cfada4d",
-    "https://bcr.bazel.build/modules/protobuf/33.1/MODULE.bazel": "982c8a0cceab4d790076f72b7677faf836b0dfadc2b66a34aab7232116c4ae39",
-    "https://bcr.bazel.build/modules/protobuf/33.4/MODULE.bazel": "114775b816b38b6d0ca620450d6b02550c60ceedfdc8d9a229833b34a223dc42",
     "https://bcr.bazel.build/modules/protobuf/36.2/MODULE.bazel": "7c2b9060f7770778a606e2147e69a17465e2a08c61bfb337eaf2da61aaf62b5f",
     "https://bcr.bazel.build/modules/protobuf/36.2/source.json": "f9167721eeaa0f65b255aa30f1eb7d7655617d8d63823c3c48521159cf67672f",
     "https://bcr.bazel.build/modules/pybind11_bazel/2.11.1/MODULE.bazel": "88af1c246226d87e65be78ed49ecd1e6f5e98648558c14ce99176da041dc378e",
@@ -182,19 +149,14 @@
     "https://bcr.bazel.build/modules/rules_android/0.7.1/MODULE.bazel": "a806fc382a774252f228a40e3b11b9fcc6276f8778c7fb33e9f72937c6258363",
     "https://bcr.bazel.build/modules/rules_android/0.7.3/MODULE.bazel": "1fbc49fb397d31d74be83fe63eb0a5dc1a79df172ca90772166c35ab4cd67e7b",
     "https://bcr.bazel.build/modules/rules_android/0.7.3/source.json": "80ffccd224a7f9b665f32360a64ba4228ba85c75fd0f6af43e290660147bb151",
-    "https://bcr.bazel.build/modules/rules_apple/3.16.0/MODULE.bazel": "0d1caf0b8375942ce98ea944be754a18874041e4e0459401d925577624d3a54a",
-    "https://bcr.bazel.build/modules/rules_apple/4.1.0/MODULE.bazel": "76e10fd4a48038d3fc7c5dc6e63b7063bbf5304a2e3bd42edda6ec660eebea68",
     "https://bcr.bazel.build/modules/rules_cc/0.0.1/MODULE.bazel": "cb2aa0747f84c6c3a78dad4e2049c154f08ab9d166b1273835a8174940365647",
-    "https://bcr.bazel.build/modules/rules_cc/0.0.13/MODULE.bazel": "0e8529ed7b323dad0775ff924d2ae5af7640b23553dfcd4d34344c7e7a867191",
     "https://bcr.bazel.build/modules/rules_cc/0.0.15/MODULE.bazel": "6704c35f7b4a72502ee81f61bf88706b54f06b3cbe5558ac17e2e14666cd5dcc",
     "https://bcr.bazel.build/modules/rules_cc/0.0.16/MODULE.bazel": "7661303b8fc1b4d7f532e54e9d6565771fea666fbdf839e0a86affcd02defe87",
     "https://bcr.bazel.build/modules/rules_cc/0.0.17/MODULE.bazel": "2ae1d8f4238ec67d7185d8861cb0a2cdf4bc608697c331b95bf990e69b62e64a",
-    "https://bcr.bazel.build/modules/rules_cc/0.0.2/MODULE.bazel": "6915987c90970493ab97393024c156ea8fb9f3bea953b2f3ec05c34f19b5695c",
     "https://bcr.bazel.build/modules/rules_cc/0.0.6/MODULE.bazel": "abf360251023dfe3efcef65ab9d56beefa8394d4176dd29529750e1c57eaa33f",
     "https://bcr.bazel.build/modules/rules_cc/0.0.8/MODULE.bazel": "964c85c82cfeb6f3855e6a07054fdb159aced38e99a5eecf7bce9d53990afa3e",
     "https://bcr.bazel.build/modules/rules_cc/0.0.9/MODULE.bazel": "836e76439f354b89afe6a911a7adf59a6b2518fafb174483ad78a2a2fde7b1c5",
     "https://bcr.bazel.build/modules/rules_cc/0.1.1/MODULE.bazel": "2f0222a6f229f0bf44cd711dc13c858dad98c62d52bd51d8fc3a764a83125513",
-    "https://bcr.bazel.build/modules/rules_cc/0.1.2/MODULE.bazel": "557ddc3a96858ec0d465a87c0a931054d7dcfd6583af2c7ed3baf494407fd8d0",
     "https://bcr.bazel.build/modules/rules_cc/0.1.5/MODULE.bazel": "88dfc9361e8b5ae1008ac38f7cdfd45ad738e4fa676a3ad67d19204f045a1fd8",
     "https://bcr.bazel.build/modules/rules_cc/0.2.0/MODULE.bazel": "b5c17f90458caae90d2ccd114c81970062946f49f355610ed89bebf954f5783c",
     "https://bcr.bazel.build/modules/rules_cc/0.2.14/MODULE.bazel": "353c99ed148887ee89c54a17d4100ae7e7e436593d104b668476019023b58df8",
@@ -207,7 +169,6 @@
     "https://bcr.bazel.build/modules/rules_cc/0.2.8/MODULE.bazel": "f1df20f0bf22c28192a794f29b501ee2018fa37a3862a1a2132ae2940a23a642",
     "https://bcr.bazel.build/modules/rules_cc/0.2.9/MODULE.bazel": "34263f1dca62ea664265438cef714d7db124c03e1ed55ebb4f1dc860164308d1",
     "https://bcr.bazel.build/modules/rules_foreign_cc/0.9.0/MODULE.bazel": "c9e8c682bf75b0e7c704166d79b599f93b72cfca5ad7477df596947891feeef6",
-    "https://bcr.bazel.build/modules/rules_fuzzing/0.5.2/MODULE.bazel": "40c97d1144356f52905566c55811f13b299453a14ac7769dfba2ac38192337a8",
     "https://bcr.bazel.build/modules/rules_go/0.41.0/MODULE.bazel": "55861d8e8bb0e62cbd2896f60ff303f62ffcb0eddb74ecb0e5c0cbe36fc292c8",
     "https://bcr.bazel.build/modules/rules_go/0.42.0/MODULE.bazel": "8cfa875b9aa8c6fce2b2e5925e73c1388173ea3c32a0db4d2b4804b453c14270",
     "https://bcr.bazel.build/modules/rules_go/0.46.0/MODULE.bazel": "3477df8bdcc49e698b9d25f734c4f3a9f5931ff34ee48a2c662be168f5f2d3fd",
@@ -220,8 +181,6 @@
     "https://bcr.bazel.build/modules/rules_go/0.63.0/source.json": "5bf37b45c440ac03abad0cbfa8b8b8dd89cc4e82bc8305f468b8436fa58bae78",
     "https://bcr.bazel.build/modules/rules_java/9.9.0/MODULE.bazel": "6b2092957b4849ffcbb84d5c7fe0d5a4582f5e3062bc84d607122ac4ef832e55",
     "https://bcr.bazel.build/modules/rules_java/9.9.0/source.json": "9c4e694db18812d19b5c1e279ba9dffc1adc3fcac163896829f374a7c426fe12",
-    "https://bcr.bazel.build/modules/rules_jvm_external/4.4.2/MODULE.bazel": "a56b85e418c83eb1839819f0b515c431010160383306d13ec21959ac412d2fe7",
-    "https://bcr.bazel.build/modules/rules_jvm_external/5.1/MODULE.bazel": "33f6f999e03183f7d088c9be518a63467dfd0be94a11d0055fe2d210f89aa909",
     "https://bcr.bazel.build/modules/rules_jvm_external/5.2/MODULE.bazel": "d9351ba35217ad0de03816ef3ed63f89d411349353077348a45348b096615036",
     "https://bcr.bazel.build/modules/rules_jvm_external/5.3/MODULE.bazel": "bf93870767689637164657731849fb887ad086739bd5d360d90007a581d5527d",
     "https://bcr.bazel.build/modules/rules_jvm_external/6.1/MODULE.bazel": "75b5fec090dbd46cf9b7d8ea08cf84a0472d92ba3585b476f44c326eda8059c4",
@@ -233,20 +192,23 @@
     "https://bcr.bazel.build/modules/rules_jvm_external/6.9/MODULE.bazel": "07c5db05527db7744a54fcffd653e1550d40e0540207a7f7e6d0a4de5bef8274",
     "https://bcr.bazel.build/modules/rules_jvm_external/7.0/MODULE.bazel": "421482bdbcf05709f933c96b867a599deb517f2804ceb3e74511880610cfbf71",
     "https://bcr.bazel.build/modules/rules_jvm_external/7.1/MODULE.bazel": "e151b1beaa45bfc9e5de4df637d980e27039eb2b1092a95972bf2adbf99ac1a0",
-    "https://bcr.bazel.build/modules/rules_jvm_external/7.1/source.json": "8cb571a9631c39bf29c1842958542f14bba1c704fe2bcde4fa54679b2a6b3d6f",
+    "https://bcr.bazel.build/modules/rules_jvm_external/7.2/MODULE.bazel": "e4f60a972780ca22128d5377d6131b4f9c000854e8bc89e212202676e41e78ce",
+    "https://bcr.bazel.build/modules/rules_jvm_external/7.2/source.json": "b0e87d55b9c5dd01852ad75641e62f16e5bcbaedd40cb43fc2a2738840e678ff",
     "https://bcr.bazel.build/modules/rules_kotlin/1.9.0/MODULE.bazel": "ef85697305025e5a61f395d4eaede272a5393cee479ace6686dba707de804d59",
     "https://bcr.bazel.build/modules/rules_kotlin/1.9.5/MODULE.bazel": "043a16a572f610558ec2030db3ff0c9938574e7dd9f58bded1bb07c0192ef025",
     "https://bcr.bazel.build/modules/rules_kotlin/1.9.6/MODULE.bazel": "d269a01a18ee74d0335450b10f62c9ed81f2321d7958a2934e44272fe82dcef3",
     "https://bcr.bazel.build/modules/rules_kotlin/2.1.3/MODULE.bazel": "ce7def6d576aa8d3a9c6d10e13b4d157296229674371f67dbf788dae0afae3d5",
     "https://bcr.bazel.build/modules/rules_kotlin/2.2.2/MODULE.bazel": "00d39c5e0fa78cd86193946265bb849e7878c24e44260f9525108428852b315c",
     "https://bcr.bazel.build/modules/rules_kotlin/2.3.20/MODULE.bazel": "3443d53d275e14fecfebd0b491f01d06ea3883c04a1b3336e7ae9d5ec9066bef",
-    "https://bcr.bazel.build/modules/rules_kotlin/2.3.20/source.json": "5a5553cffea43f2c5156c8ad0de4a14ad95413ceb39cd4d08f50e2aea86927e8",
+    "https://bcr.bazel.build/modules/rules_kotlin/2.4.0/MODULE.bazel": "38dac18bb76c0a47ff60dfcd95c666985cbc46374f28ea4eeb868bdbc58c5bec",
+    "https://bcr.bazel.build/modules/rules_kotlin/2.4.0/source.json": "07b6a307448817c071c4ba90dcb03f801e008959f8dfd8b152a241cc0ee01a23",
     "https://bcr.bazel.build/modules/rules_license/0.0.3/MODULE.bazel": "627e9ab0247f7d1e05736b59dbb1b6871373de5ad31c3011880b4133cafd4bd0",
     "https://bcr.bazel.build/modules/rules_license/0.0.7/MODULE.bazel": "088fbeb0b6a419005b89cf93fe62d9517c0a2b8bb56af3244af65ecfe37e7d5d",
     "https://bcr.bazel.build/modules/rules_license/1.0.0/MODULE.bazel": "a7fda60eefdf3d8c827262ba499957e4df06f659330bbe6cdbdb975b768bb65c",
     "https://bcr.bazel.build/modules/rules_license/1.0.0/source.json": "a52c89e54cc311196e478f8382df91c15f7a2bfdf4c6cd0e2675cc2ff0b56efb",
     "https://bcr.bazel.build/modules/rules_nodejs/6.2.0/MODULE.bazel": "ec27907f55eb34705adb4e8257952162a2d4c3ed0f0b3b4c3c1aad1fac7be35e",
     "https://bcr.bazel.build/modules/rules_nodejs/6.7.3/MODULE.bazel": "c22a48b2a0dbf05a9dc5f83837bbc24c226c1f6e618de3c3a610044c9f336056",
+    "https://bcr.bazel.build/modules/rules_nodejs/6.7.5/MODULE.bazel": "97e6794043821d23c013baa4a50fd1c599f2e6ae92b06e2c5f1cd7074fd83e7c",
     "https://bcr.bazel.build/modules/rules_nodejs/6.7.6/MODULE.bazel": "45f203b9c0d721bcb1a5932815f218091fa2169cede2af3d88a8a17a4fb7676a",
     "https://bcr.bazel.build/modules/rules_nodejs/6.7.6/source.json": "ad9987b7979be1ce93d10ffee9b6af4f84f8835cbc7def27937d632da2e4750e",
     "https://bcr.bazel.build/modules/rules_pkg/0.7.0/MODULE.bazel": "df99f03fc7934a4737122518bb87e667e62d780b610910f0447665a7e2be62dc",
@@ -260,7 +222,6 @@
     "https://bcr.bazel.build/modules/rules_proto/7.0.2/MODULE.bazel": "bf81793bd6d2ad89a37a40693e56c61b0ee30f7a7fdbaf3eabbf5f39de47dea2",
     "https://bcr.bazel.build/modules/rules_proto/7.1.0/MODULE.bazel": "002d62d9108f75bb807cd56245d45648f38275cb3a99dcd45dfb864c5d74cb96",
     "https://bcr.bazel.build/modules/rules_proto/7.1.0/source.json": "39f89066c12c24097854e8f57ab8558929f9c8d474d34b2c00ac04630ad8940e",
-    "https://bcr.bazel.build/modules/rules_python/0.10.2/MODULE.bazel": "cc82bc96f2997baa545ab3ce73f196d040ffb8756fd2d66125a530031cd90e5f",
     "https://bcr.bazel.build/modules/rules_python/0.23.1/MODULE.bazel": "49ffccf0511cb8414de28321f5fcf2a31312b47c40cc21577144b7447f2bf300",
     "https://bcr.bazel.build/modules/rules_python/0.25.0/MODULE.bazel": "72f1506841c920a1afec76975b35312410eea3aa7b63267436bfb1dd91d2d382",
     "https://bcr.bazel.build/modules/rules_python/0.28.0/MODULE.bazel": "cba2573d870babc976664a912539b320cbaa7114cd3e8f053c720171cde331ed",
@@ -269,19 +230,15 @@
     "https://bcr.bazel.build/modules/rules_python/0.37.1/MODULE.bazel": "3faeb2d9fa0a81f8980643ee33f212308f4d93eea4b9ce6f36d0b742e71e9500",
     "https://bcr.bazel.build/modules/rules_python/0.37.2/MODULE.bazel": "b5ffde91410745750b6c13be1c5dc4555ef5bc50562af4a89fd77807fdde626a",
     "https://bcr.bazel.build/modules/rules_python/0.4.0/MODULE.bazel": "9208ee05fd48bf09ac60ed269791cf17fb343db56c8226a720fbb1cdf467166c",
-    "https://bcr.bazel.build/modules/rules_python/1.0.0/MODULE.bazel": "898a3d999c22caa585eb062b600f88654bf92efb204fa346fb55f6f8edffca43",
-    "https://bcr.bazel.build/modules/rules_python/1.3.0/MODULE.bazel": "8361d57eafb67c09b75bf4bbe6be360e1b8f4f18118ab48037f2bd50aa2ccb13",
-    "https://bcr.bazel.build/modules/rules_python/1.4.1/MODULE.bazel": "8991ad45bdc25018301d6b7e1d3626afc3c8af8aaf4bc04f23d0b99c938b73a6",
     "https://bcr.bazel.build/modules/rules_python/1.6.0/MODULE.bazel": "7e04ad8f8d5bea40451cf80b1bd8262552aa73f841415d20db96b7241bd027d8",
     "https://bcr.bazel.build/modules/rules_python/1.6.3/MODULE.bazel": "a7b80c42cb3de5ee2a5fa1abc119684593704fcd2fec83165ebe615dec76574f",
     "https://bcr.bazel.build/modules/rules_python/1.7.0/MODULE.bazel": "d01f995ecd137abf30238ad9ce97f8fc3ac57289c8b24bd0bf53324d937a14f8",
     "https://bcr.bazel.build/modules/rules_python/2.0.2/MODULE.bazel": "9d26ecb43f248c2663fb29f3c9b833aa86c31e736096e58c7077f80038f8d32f",
-    "https://bcr.bazel.build/modules/rules_python/2.3.4/MODULE.bazel": "7b2ae21fd2755fe3ba017cdbedfe35ec8e37a24636b974cc48f19d03d0e3cefb",
-    "https://bcr.bazel.build/modules/rules_python/2.3.4/source.json": "2111a341186d0bbe9e325a1321ad86928eab0aa6d4c3a915e8c7f53e280479ae",
+    "https://bcr.bazel.build/modules/rules_python/2.2.0/MODULE.bazel": "9ce85518b14625a3abec3c95e3fa739ab0578e58240ef829af20efebcdebc41a",
+    "https://bcr.bazel.build/modules/rules_python/2.4.5/MODULE.bazel": "5a070795714c70d9841c2c19897ebd1177d46d74961193425521da006942d321",
+    "https://bcr.bazel.build/modules/rules_python/2.4.5/source.json": "04cc90b07e4f0abba225743fa138e12a3dee6f04a92ec3741112e83fbf100dc1",
     "https://bcr.bazel.build/modules/rules_robolectric/4.14.1.2/MODULE.bazel": "d44fec647d0aeb67b9f3b980cf68ba634976f3ae7ccd6c07d790b59b87a4f251",
     "https://bcr.bazel.build/modules/rules_robolectric/4.14.1.2/source.json": "37c10335f2361c337c5c1f34ed36d2da70534c23088062b33a8bdaab68aa9dea",
-    "https://bcr.bazel.build/modules/rules_rust/0.69.0/MODULE.bazel": "4326fec48f2fef0d514de46346f7f77e200c82936dd08b91c9ef039fbdad5c10",
-    "https://bcr.bazel.build/modules/rules_rust/0.69.0/source.json": "0d094307d690cc18b3ab003998697be8070a206f65592c5c8476999796f11c4b",
     "https://bcr.bazel.build/modules/rules_shell/0.1.2/MODULE.bazel": "66e4ca3ce084b04af0b9ff05ff14cab4e5df7503973818bb91cbc6cda08d32fc",
     "https://bcr.bazel.build/modules/rules_shell/0.2.0/MODULE.bazel": "fda8a652ab3c7d8fee214de05e7a9916d8b28082234e8d2c0094505c5268ed3c",
     "https://bcr.bazel.build/modules/rules_shell/0.3.0/MODULE.bazel": "de4402cd12f4cc8fda2354fce179fdb068c0b9ca1ec2d2b17b3e21b24c1a937b",
@@ -289,11 +246,6 @@
     "https://bcr.bazel.build/modules/rules_shell/0.6.1/MODULE.bazel": "72e76b0eea4e81611ef5452aa82b3da34caca0c8b7b5c0c9584338aa93bae26b",
     "https://bcr.bazel.build/modules/rules_shell/0.8.0/MODULE.bazel": "f6a89f1d6a669a26f28fe814503857055d76306b79cfc11d12399af08d0b80ae",
     "https://bcr.bazel.build/modules/rules_shell/0.8.0/source.json": "eb53cc815bc503c6683c5fe12d943f98883f81fc22f51403ec8a95610cba4195",
-    "https://bcr.bazel.build/modules/rules_swift/1.16.0/MODULE.bazel": "4a09f199545a60d09895e8281362b1ff3bb08bbde69c6fc87aff5b92fcc916ca",
-    "https://bcr.bazel.build/modules/rules_swift/2.1.1/MODULE.bazel": "494900a80f944fc7aa61500c2073d9729dff0b764f0e89b824eb746959bc1046",
-    "https://bcr.bazel.build/modules/rules_swift/2.4.0/MODULE.bazel": "1639617eb1ede28d774d967a738b4a68b0accb40650beadb57c21846beab5efd",
-    "https://bcr.bazel.build/modules/rules_swift/3.1.2/MODULE.bazel": "72c8f5cf9d26427cee6c76c8e3853eb46ce6b0412a081b2b6db6e8ad56267400",
-    "https://bcr.bazel.build/modules/stardoc/0.5.1/MODULE.bazel": "1a05d92974d0c122f5ccf09291442580317cdd859f07a8655f1db9a60374f9f8",
     "https://bcr.bazel.build/modules/stardoc/0.5.3/MODULE.bazel": "c7f6948dae6999bf0db32c1858ae345f112cacf98f174c7a8bb707e41b974f1c",
     "https://bcr.bazel.build/modules/stardoc/0.5.4/MODULE.bazel": "6569966df04610b8520957cb8e97cf2e9faac2c0309657c537ab51c16c18a2a4",
     "https://bcr.bazel.build/modules/stardoc/0.5.6/MODULE.bazel": "c43dabc564990eeab55e25ed61c07a1aadafe9ece96a4efabb3f8bf9063b71ef",
@@ -302,8 +254,6 @@
     "https://bcr.bazel.build/modules/stardoc/0.7.1/MODULE.bazel": "3548faea4ee5dda5580f9af150e79d0f6aea934fc60c1cc50f4efdd9420759e7",
     "https://bcr.bazel.build/modules/stardoc/0.7.2/MODULE.bazel": "fc152419aa2ea0f51c29583fab1e8c99ddefd5b3778421845606ee628629e0e5",
     "https://bcr.bazel.build/modules/stardoc/0.7.2/source.json": "58b029e5e901d6802967754adf0a9056747e8176f017cfe3607c0851f4d42216",
-    "https://bcr.bazel.build/modules/swift_argument_parser/1.3.1.1/MODULE.bazel": "5e463fbfba7b1701d957555ed45097d7f984211330106ccd1352c6e0af0dcf91",
-    "https://bcr.bazel.build/modules/swift_argument_parser/1.3.1.2/MODULE.bazel": "75aab2373a4bbe2a1260b9bf2a1ebbdbf872d3bd36f80bff058dccd82e89422f",
     "https://bcr.bazel.build/modules/tar.bzl/0.10.4/MODULE.bazel": "e8f9ff79199e8d9eaad7f1b0a77ad74b30bb82d794b87d8ca942bead5de83ae9",
     "https://bcr.bazel.build/modules/tar.bzl/0.10.4/source.json": "20143442376c03426f6135292ba02d825cb75308aa47e6bf42dd4cc5a435c2ff",
     "https://bcr.bazel.build/modules/tar.bzl/0.2.1/MODULE.bazel": "52d1c00a80a8cc67acbd01649e83d8dd6a9dc426a6c0b754a04fe8c219c76468",
@@ -311,23 +261,18 @@
     "https://bcr.bazel.build/modules/toml.bzl/0.3.0/MODULE.bazel": "5016e5dd1ad2200e119a4b28b2b3935e276c4b480f2fe3e952bea7eeba88f578",
     "https://bcr.bazel.build/modules/toml.bzl/0.4.1/MODULE.bazel": "6bc0b938f03ade8d58c2fca0ad5c3fa12b4764e1e1927ad50b0c860286db2167",
     "https://bcr.bazel.build/modules/toml.bzl/0.4.1/source.json": "86a90afd8b43c9b69ad31f5c03998c3adcf4b08175e621addb93e3a38eec538b",
-    "https://bcr.bazel.build/modules/upb/0.0.0-20220923-a547704/MODULE.bazel": "7298990c00040a0e2f121f6c32544bab27d4452f80d9ce51349b1a28f3005c43",
-    "https://bcr.bazel.build/modules/upb/0.0.0-20230516-61a97ef/MODULE.bazel": "c0df5e35ad55e264160417fd0875932ee3c9dda63d9fccace35ac62f45e1b6f9",
     "https://bcr.bazel.build/modules/yq.bzl/0.1.1/MODULE.bazel": "9039681f9bcb8958ee2c87ffc74bdafba9f4369096a2b5634b88abc0eaefa072",
     "https://bcr.bazel.build/modules/yq.bzl/0.3.4/MODULE.bazel": "d3a270662f5d766cd7229732d65a5a5bc485240c3007343dd279edfb60c9ae27",
     "https://bcr.bazel.build/modules/yq.bzl/0.3.4/source.json": "786dafdc2843722da3416e4343ee1a05237227f068590779a6e8496a2064c0f9",
-    "https://bcr.bazel.build/modules/zlib/1.2.11/MODULE.bazel": "07b389abc85fdbca459b69e2ec656ae5622873af3f845e1c9d80fe179f3effa0",
-    "https://bcr.bazel.build/modules/zlib/1.2.12/MODULE.bazel": "3b1a8834ada2a883674be8cbd36ede1b6ec481477ada359cd2d3ddc562340b27",
     "https://bcr.bazel.build/modules/zlib/1.3.1.bcr.5/MODULE.bazel": "eec517b5bbe5492629466e11dae908d043364302283de25581e3eb944326c4ca",
-    "https://bcr.bazel.build/modules/zlib/1.3.1.bcr.5/source.json": "22bc55c47af97246cfc093d0acf683a7869377de362b5d1c552c2c2e16b7a806",
-    "https://bcr.bazel.build/modules/zlib/1.3.1/MODULE.bazel": "751c9940dcfe869f5f7274e1295422a34623555916eb98c174c1e945594bf198"
+    "https://bcr.bazel.build/modules/zlib/1.3.1.bcr.5/source.json": "22bc55c47af97246cfc093d0acf683a7869377de362b5d1c552c2c2e16b7a806"
   },
   "selectedYankedVersions": {},
   "moduleExtensions": {
     "@@aspect_tools_telemetry+//:extension.bzl%telemetry": {
       "general": {
-        "bzlTransitiveDigest": "zFgbaCUuPzH6bIE7CBHBVCqjWSJ78/WNXisdzXaKSnU=",
-        "usagesDigest": "ByRmdzBb5dO2sTSQBffLdbS0z+QsjX5+v9kgpDdGXzo=",
+        "bzlTransitiveDigest": "ihzLOoAnQP6Y5iSYOhEjvb6uxEbA6ZgH8Qikau2lGRU=",
+        "usagesDigest": "volr0ZHn2VAADxanzsqMFz4xRhpWZ2j6EgKK3zYnWQo=",
         "recordedInputs": [
           "REPO_MAPPING:aspect_tools_telemetry+,bazel_lib bazel_lib+",
           "REPO_MAPPING:aspect_tools_telemetry+,bazel_skylib bazel_skylib+",
@@ -338,11 +283,11 @@
             "repoRuleId": "@@aspect_tools_telemetry+//:extension.bzl%tel_repository",
             "attributes": {
               "deps": {
-                "aspect_rules_js": "3.4.1",
+                "aspect_rules_js": "3.5.1",
                 "aspect_rules_ts": "3.10.1",
-                "aspect_tools_telemetry": "0.5.1"
+                "aspect_tools_telemetry": "0.5.2"
               },
-              "last_notice": 1
+              "last_notice": 2
             }
           }
         },
@@ -369,7 +314,7 @@
     },
     "@@rules_android+//bzlmod_extensions:apksig.bzl%apksig_extension": {
       "general": {
-        "bzlTransitiveDigest": "xNW2vYQ2NGvweMnSxue40Bhfp5A3ogJIS/tkg7qjKIs=",
+        "bzlTransitiveDigest": "ZESI1GTm8zRsdU/InVvmpbo66PIBj41/6gPM33RrIns=",
         "usagesDigest": "wLrLUdBOQnztFcFQraEsWu+M4xtuF82/ZGmnhyxO5/Q=",
         "recordedInputs": [
           "REPO_MAPPING:rules_android+,bazel_tools bazel_tools"
@@ -390,7 +335,7 @@
     },
     "@@rules_android+//bzlmod_extensions:com_android_dex.bzl%com_android_dex_extension": {
       "general": {
-        "bzlTransitiveDigest": "HYWmRJkl/Bm5qA5Q7vRI52ZfSoxubYxiwbnAS+8ozAU=",
+        "bzlTransitiveDigest": "GjEt0MG4OPUpryd5nPbl/GTi4ihSBLXao0q+3Mmqv8E=",
         "usagesDigest": "QffKrRLRrfyxMU5u/o3mDLJNoWRk/D5i2SIumoSgm3M=",
         "recordedInputs": [
           "REPO_MAPPING:rules_android+,bazel_tools bazel_tools"
@@ -424,8 +369,8 @@
     },
     "@@rules_python+//python/uv:uv.bzl%uv": {
       "general": {
-        "bzlTransitiveDigest": "DafUArm1CsjJZcemT0FvUq9rUch+pq38+JqfOBJCpm8=",
-        "usagesDigest": "V+iNLdnOiiGgW0iq4irFt01I2357trR3Bo420RwUXO0=",
+        "bzlTransitiveDigest": "RH0xYDM+3D/BJrY901xKB9oHbAVDI7DBo6UhvEjliCw=",
+        "usagesDigest": "edpKmFBkQ4I0qOntMCa4FelwVLSs/wYE4iWPeEspAxg=",
         "recordedInputs": [
           "REPO_MAPPING:rules_python+,bazel_tools bazel_tools",
           "REPO_MAPPING:rules_python+,platforms platforms"
@@ -452,384 +397,10 @@
         }
       }
     },
-    "@@rules_rust+//crate_universe:extension.bzl%crate": {
-      "general": {
-        "bzlTransitiveDigest": "tvVZnh8L5EmEr+F2dHIK6I1xjPQA+Ybw/b/wHKJn2qA=",
-        "usagesDigest": "x0vrCWeHpY81Qjj7vEW+k03YwVf1a+fL0Y9237dy0E4=",
-        "recordedInputs": [
-          "ENV:CARGO_BAZEL_DEBUG \\0",
-          "ENV:CARGO_BAZEL_GENERATOR_SHA256 \\0",
-          "ENV:CARGO_BAZEL_GENERATOR_URL \\0",
-          "ENV:CARGO_BAZEL_ISOLATED \\0",
-          "ENV:CARGO_BAZEL_REPIN \\0",
-          "ENV:CARGO_BAZEL_REPIN_ONLY \\0",
-          "ENV:CARGO_BAZEL_TIMEOUT \\0",
-          "ENV:REPIN \\0",
-          "REPO_MAPPING:bazel_features+,bazel_features_globals bazel_features++version_extension+bazel_features_globals",
-          "REPO_MAPPING:bazel_features+,bazel_features_version bazel_features++version_extension+bazel_features_version",
-          "REPO_MAPPING:rules_cc+,bazel_skylib bazel_skylib+",
-          "REPO_MAPPING:rules_cc+,bazel_tools bazel_tools",
-          "REPO_MAPPING:rules_cc+,cc_compatibility_proxy rules_cc++compatibility_proxy+cc_compatibility_proxy",
-          "REPO_MAPPING:rules_cc+,platforms platforms",
-          "REPO_MAPPING:rules_cc+,rules_cc rules_cc+",
-          "REPO_MAPPING:rules_cc++compatibility_proxy+cc_compatibility_proxy,rules_cc rules_cc+",
-          "REPO_MAPPING:rules_rust+,bazel_features bazel_features+",
-          "REPO_MAPPING:rules_rust+,bazel_skylib bazel_skylib+",
-          "REPO_MAPPING:rules_rust+,bazel_tools bazel_tools",
-          "REPO_MAPPING:rules_rust+,rules_cc rules_cc+",
-          "REPO_MAPPING:rules_rust+,rules_rust rules_rust+"
-        ],
-        "generatedRepoSpecs": {
-          "crates": {
-            "repoRuleId": "@@rules_rust+//crate_universe:extensions.bzl%_generate_repo",
-            "attributes": {
-              "contents": {
-                "BUILD.bazel": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To \n# regenerate this file, run the following:\n#\n#     bazel mod show_repo 'protobuf'\n###############################################################################\n\npackage(default_visibility = [\"//visibility:public\"])\n\nexports_files(\n    [\n        \"cargo-bazel.json\",\n        \"crates.bzl\",\n        \"defs.bzl\",\n    ] + glob(\n        allow_empty = True,\n        include = [\"*.bazel\"],\n    ),\n)\n\nfilegroup(\n    name = \"srcs\",\n    srcs = glob(\n        allow_empty = True,\n        include = [\n            \"*.bazel\",\n            \"*.bzl\",\n        ],\n    ),\n)\n\n# Workspace Member Dependencies\nalias(\n    name = \"googletest-0.14.3\",\n    actual = \"@crates__googletest-0.14.3//:googletest\",\n    tags = [\"manual\"],\n)\n\nalias(\n    name = \"googletest\",\n    actual = \"@crates__googletest-0.14.3//:googletest\",\n    tags = [\"manual\"],\n)\n\nalias(\n    name = \"linkme-0.3.37\",\n    actual = \"@crates__linkme-0.3.37//:linkme\",\n    tags = [\"manual\"],\n)\n\nalias(\n    name = \"linkme\",\n    actual = \"@crates__linkme-0.3.37//:linkme\",\n    tags = [\"manual\"],\n)\n\nalias(\n    name = \"paste-1.0.15\",\n    actual = \"@crates__paste-1.0.15//:paste\",\n    tags = [\"manual\"],\n)\n\nalias(\n    name = \"paste\",\n    actual = \"@crates__paste-1.0.15//:paste\",\n    tags = [\"manual\"],\n)\n\nalias(\n    name = \"quote-1.0.47\",\n    actual = \"@crates__quote-1.0.47//:quote\",\n    tags = [\"manual\"],\n)\n\nalias(\n    name = \"quote\",\n    actual = \"@crates__quote-1.0.47//:quote\",\n    tags = [\"manual\"],\n)\n\nalias(\n    name = \"syn-2.0.119\",\n    actual = \"@crates__syn-2.0.119//:syn\",\n    tags = [\"manual\"],\n)\n\nalias(\n    name = \"syn\",\n    actual = \"@crates__syn-2.0.119//:syn\",\n    tags = [\"manual\"],\n)\n",
-                "alias_rules.bzl": "\"\"\"Alias that transitions its target to `compilation_mode=opt`.  Use `transition_alias=\"opt\"` to enable.\"\"\"\n\nload(\"@rules_cc//cc:defs.bzl\", \"CcInfo\")\nload(\"@rules_rust//rust:rust_common.bzl\", \"COMMON_PROVIDERS\")\n\ndef _transition_alias_impl(ctx):\n    # `ctx.attr.actual` is a list of 1 item due to the transition\n    providers = [ctx.attr.actual[0][provider] for provider in COMMON_PROVIDERS]\n    if CcInfo in ctx.attr.actual[0]:\n        providers.append(ctx.attr.actual[0][CcInfo])\n    return providers\n\ndef _change_compilation_mode(compilation_mode):\n    def _change_compilation_mode_impl(_settings, _attr):\n        return {\n            \"//command_line_option:compilation_mode\": compilation_mode,\n        }\n\n    return transition(\n        implementation = _change_compilation_mode_impl,\n        inputs = [],\n        outputs = [\n            \"//command_line_option:compilation_mode\",\n        ],\n    )\n\ndef _transition_alias_rule(compilation_mode):\n    return rule(\n        implementation = _transition_alias_impl,\n        provides = COMMON_PROVIDERS,\n        attrs = {\n            \"actual\": attr.label(\n                mandatory = True,\n                doc = \"`rust_library()` target to transition to `compilation_mode=opt`.\",\n                providers = COMMON_PROVIDERS,\n                cfg = _change_compilation_mode(compilation_mode),\n            ),\n            \"_allowlist_function_transition\": attr.label(\n                default = \"@bazel_tools//tools/allowlists/function_transition_allowlist\",\n            ),\n        },\n        doc = \"Transitions a Rust library crate to the `compilation_mode=opt`.\",\n    )\n\ntransition_alias_dbg = _transition_alias_rule(\"dbg\")\ntransition_alias_fastbuild = _transition_alias_rule(\"fastbuild\")\ntransition_alias_opt = _transition_alias_rule(\"opt\")\n",
-                "defs.bzl": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To \n# regenerate this file, run the following:\n#\n#     bazel mod show_repo 'protobuf'\n###############################################################################\n\"\"\"\n# `crates_repository` API\n\n- [aliases](#aliases)\n- [crate_deps](#crate_deps)\n- [all_crate_deps](#all_crate_deps)\n- [crate_repositories](#crate_repositories)\n\n\"\"\"\n\nload(\"@bazel_tools//tools/build_defs/repo:git.bzl\", \"new_git_repository\")\nload(\"@bazel_tools//tools/build_defs/repo:http.bzl\", \"http_archive\")\nload(\"@bazel_tools//tools/build_defs/repo:utils.bzl\", \"maybe\")\nload(\"@bazel_skylib//lib:selects.bzl\", \"selects\")\nload(\"@rules_rust//crate_universe/private:local_crate_mirror.bzl\", \"local_crate_mirror\")\n\n###############################################################################\n# MACROS API\n###############################################################################\n\n# An identifier that represent common dependencies (unconditional).\n_COMMON_CONDITION = \"\"\n\ndef _flatten_dependency_maps(all_dependency_maps):\n    \"\"\"Flatten a list of dependency maps into one dictionary.\n\n    Dependency maps have the following structure:\n\n    ```python\n    DEPENDENCIES_MAP = {\n        # The first key in the map is a Bazel package\n        # name of the workspace this file is defined in.\n        \"workspace_member_package\": {\n\n            # Not all dependencies are supported for all platforms.\n            # the condition key is the condition required to be true\n            # on the host platform.\n            \"condition\": {\n\n                # An alias to a crate target.     # The label of the crate target the\n                # Aliases are only crate names.   # package name refers to.\n                \"package_name\":                   \"@full//:label\",\n            }\n        }\n    }\n    ```\n\n    Args:\n        all_dependency_maps (list): A list of dicts as described above\n\n    Returns:\n        dict: A dictionary as described above\n    \"\"\"\n    dependencies = {}\n\n    for workspace_deps_map in all_dependency_maps:\n        for pkg_name, conditional_deps_map in workspace_deps_map.items():\n            if pkg_name not in dependencies:\n                non_frozen_map = dict()\n                for key, values in conditional_deps_map.items():\n                    non_frozen_map.update({key: dict(values.items())})\n                dependencies.setdefault(pkg_name, non_frozen_map)\n                continue\n\n            for condition, deps_map in conditional_deps_map.items():\n                # If the condition has not been recorded, do so and continue\n                if condition not in dependencies[pkg_name]:\n                    dependencies[pkg_name].setdefault(condition, dict(deps_map.items()))\n                    continue\n\n                # Alert on any miss-matched dependencies\n                inconsistent_entries = []\n                for crate_name, crate_label in deps_map.items():\n                    existing = dependencies[pkg_name][condition].get(crate_name)\n                    if existing and existing != crate_label:\n                        inconsistent_entries.append((crate_name, existing, crate_label))\n                    dependencies[pkg_name][condition].update({crate_name: crate_label})\n\n    return dependencies\n\ndef crate_deps(deps, package_name = None):\n    \"\"\"Finds the fully qualified label of the requested crates for the package where this macro is called.\n\n    Args:\n        deps (list): The desired list of crate targets.\n        package_name (str, optional): The package name of the set of dependencies to look up.\n            Defaults to `native.package_name()`.\n\n    Returns:\n        list: A list of labels to generated rust targets (str)\n    \"\"\"\n\n    if not deps:\n        return []\n\n    if package_name == None:\n        package_name = native.package_name()\n\n    # Join both sets of dependencies\n    dependencies = _flatten_dependency_maps([\n        _NORMAL_DEPENDENCIES,\n        _NORMAL_DEV_DEPENDENCIES,\n        _PROC_MACRO_DEPENDENCIES,\n        _PROC_MACRO_DEV_DEPENDENCIES,\n        _BUILD_DEPENDENCIES,\n        _BUILD_PROC_MACRO_DEPENDENCIES,\n    ]).pop(package_name, {})\n\n    # Combine all conditional packages so we can easily index over a flat list\n    # TODO: Perhaps this should actually return select statements and maintain\n    # the conditionals of the dependencies\n    flat_deps = {}\n    for deps_set in dependencies.values():\n        for crate_name, crate_label in deps_set.items():\n            flat_deps.update({crate_name: crate_label})\n\n    missing_crates = []\n    crate_targets = []\n    for crate_target in deps:\n        if crate_target not in flat_deps:\n            missing_crates.append(crate_target)\n        else:\n            crate_targets.append(flat_deps[crate_target])\n\n    if missing_crates:\n        fail(\"Could not find crates `{}` among dependencies of `{}`. Available dependencies were `{}`\".format(\n            missing_crates,\n            package_name,\n            dependencies,\n        ))\n\n    return crate_targets\n\ndef all_crate_deps(\n        normal = False, \n        normal_dev = False, \n        proc_macro = False, \n        proc_macro_dev = False,\n        build = False,\n        build_proc_macro = False,\n        package_name = None):\n    \"\"\"Finds the fully qualified label of all requested direct crate dependencies \\\n    for the package where this macro is called.\n\n    If no parameters are set, all normal dependencies are returned. Setting any one flag will\n    otherwise impact the contents of the returned list.\n\n    Args:\n        normal (bool, optional): If True, normal dependencies are included in the\n            output list.\n        normal_dev (bool, optional): If True, normal dev dependencies will be\n            included in the output list.\n        proc_macro (bool, optional): If True, proc_macro dependencies are included\n            in the output list.\n        proc_macro_dev (bool, optional): If True, dev proc_macro dependencies are\n            included in the output list.\n        build (bool, optional): If True, build dependencies are included\n            in the output list.\n        build_proc_macro (bool, optional): If True, build proc_macro dependencies are\n            included in the output list.\n        package_name (str, optional): The package name of the set of dependencies to look up.\n            Defaults to `native.package_name()` when unset.\n\n    Returns:\n        list: A list of labels to generated rust targets (str)\n    \"\"\"\n\n    if package_name == None:\n        package_name = native.package_name()\n\n    # Determine the relevant maps to use\n    all_dependency_maps = []\n    if normal:\n        all_dependency_maps.append(_NORMAL_DEPENDENCIES)\n    if normal_dev:\n        all_dependency_maps.append(_NORMAL_DEV_DEPENDENCIES)\n    if proc_macro:\n        all_dependency_maps.append(_PROC_MACRO_DEPENDENCIES)\n    if proc_macro_dev:\n        all_dependency_maps.append(_PROC_MACRO_DEV_DEPENDENCIES)\n    if build:\n        all_dependency_maps.append(_BUILD_DEPENDENCIES)\n    if build_proc_macro:\n        all_dependency_maps.append(_BUILD_PROC_MACRO_DEPENDENCIES)\n\n    # Default to always using normal dependencies\n    if not all_dependency_maps:\n        all_dependency_maps.append(_NORMAL_DEPENDENCIES)\n\n    dependencies = _flatten_dependency_maps(all_dependency_maps).pop(package_name, None)\n\n    if not dependencies:\n        if dependencies == None:\n            fail(\"Tried to get all_crate_deps for package \" + package_name + \" but that package had no Cargo.toml file\")\n        else:\n            return []\n\n    crate_deps = list(dependencies.pop(_COMMON_CONDITION, {}).values())\n    for condition, deps in dependencies.items():\n        crate_deps += selects.with_or({\n            tuple(_CONDITIONS[condition]): deps.values(),\n            \"//conditions:default\": [],\n        })\n\n    return crate_deps\n\ndef aliases(\n        normal = False,\n        normal_dev = False,\n        proc_macro = False,\n        proc_macro_dev = False,\n        build = False,\n        build_proc_macro = False,\n        package_name = None):\n    \"\"\"Produces a map of Crate alias names to their original label\n\n    If no dependency kinds are specified, `normal` and `proc_macro` are used by default.\n    Setting any one flag will otherwise determine the contents of the returned dict.\n\n    Args:\n        normal (bool, optional): If True, normal dependencies are included in the\n            output list.\n        normal_dev (bool, optional): If True, normal dev dependencies will be\n            included in the output list..\n        proc_macro (bool, optional): If True, proc_macro dependencies are included\n            in the output list.\n        proc_macro_dev (bool, optional): If True, dev proc_macro dependencies are\n            included in the output list.\n        build (bool, optional): If True, build dependencies are included\n            in the output list.\n        build_proc_macro (bool, optional): If True, build proc_macro dependencies are\n            included in the output list.\n        package_name (str, optional): The package name of the set of dependencies to look up.\n            Defaults to `native.package_name()` when unset.\n\n    Returns:\n        dict: The aliases of all associated packages\n    \"\"\"\n    if package_name == None:\n        package_name = native.package_name()\n\n    # Determine the relevant maps to use\n    all_aliases_maps = []\n    if normal:\n        all_aliases_maps.append(_NORMAL_ALIASES)\n    if normal_dev:\n        all_aliases_maps.append(_NORMAL_DEV_ALIASES)\n    if proc_macro:\n        all_aliases_maps.append(_PROC_MACRO_ALIASES)\n    if proc_macro_dev:\n        all_aliases_maps.append(_PROC_MACRO_DEV_ALIASES)\n    if build:\n        all_aliases_maps.append(_BUILD_ALIASES)\n    if build_proc_macro:\n        all_aliases_maps.append(_BUILD_PROC_MACRO_ALIASES)\n\n    # Default to always using normal aliases\n    if not all_aliases_maps:\n        all_aliases_maps.append(_NORMAL_ALIASES)\n        all_aliases_maps.append(_PROC_MACRO_ALIASES)\n\n    aliases = _flatten_dependency_maps(all_aliases_maps).pop(package_name, None)\n\n    if not aliases:\n        return dict()\n\n    common_items = aliases.pop(_COMMON_CONDITION, {}).items()\n\n    # If there are only common items in the dictionary, immediately return them\n    if not len(aliases.keys()) == 1:\n        return dict(common_items)\n\n    # Build a single select statement where each conditional has accounted for the\n    # common set of aliases.\n    crate_aliases = {\"//conditions:default\": dict(common_items)}\n    for condition, deps in aliases.items():\n        condition_triples = _CONDITIONS[condition]\n        for triple in condition_triples:\n            if triple in crate_aliases:\n                crate_aliases[triple].update(deps)\n            else:\n                crate_aliases.update({triple: dict(deps.items() + common_items)})\n\n    return select(crate_aliases)\n\n###############################################################################\n# WORKSPACE MEMBER DEPS AND ALIASES\n###############################################################################\n\n_NORMAL_DEPENDENCIES = {\n    \"\": {\n        _COMMON_CONDITION: {\n            \"googletest\": Label(\"@crates//:googletest-0.14.3\"),\n            \"linkme\": Label(\"@crates//:linkme-0.3.37\"),\n            \"quote\": Label(\"@crates//:quote-1.0.47\"),\n            \"syn\": Label(\"@crates//:syn-2.0.119\"),\n        },\n    },\n}\n\n\n_NORMAL_ALIASES = {\n    \"\": {\n        _COMMON_CONDITION: {\n        },\n    },\n}\n\n\n_NORMAL_DEV_DEPENDENCIES = {\n    \"\": {\n    },\n}\n\n\n_NORMAL_DEV_ALIASES = {\n    \"\": {\n    },\n}\n\n\n_PROC_MACRO_DEPENDENCIES = {\n    \"\": {\n        _COMMON_CONDITION: {\n            \"paste\": Label(\"@crates//:paste-1.0.15\"),\n        },\n    },\n}\n\n\n_PROC_MACRO_ALIASES = {\n    \"\": {\n    },\n}\n\n\n_PROC_MACRO_DEV_DEPENDENCIES = {\n    \"\": {\n    },\n}\n\n\n_PROC_MACRO_DEV_ALIASES = {\n    \"\": {\n    },\n}\n\n\n_BUILD_DEPENDENCIES = {\n    \"\": {\n    },\n}\n\n\n_BUILD_ALIASES = {\n    \"\": {\n    },\n}\n\n\n_BUILD_PROC_MACRO_DEPENDENCIES = {\n    \"\": {\n    },\n}\n\n\n_BUILD_PROC_MACRO_ALIASES = {\n    \"\": {\n    },\n}\n\n\n_CONDITIONS = {\n    \"aarch64-apple-darwin\": [\"@rules_rust//rust/platform:aarch64-apple-darwin\"],\n    \"aarch64-unknown-linux-gnu\": [\"@rules_rust//rust/platform:aarch64-unknown-linux-gnu\"],\n    \"wasm32-unknown-unknown\": [\"@rules_rust//rust/platform:wasm32-unknown-unknown\"],\n    \"wasm32-wasip1\": [\"@rules_rust//rust/platform:wasm32-wasip1\"],\n    \"x86_64-pc-windows-msvc\": [\"@rules_rust//rust/platform:x86_64-pc-windows-msvc\"],\n    \"x86_64-unknown-linux-gnu\": [\"@rules_rust//rust/platform:x86_64-unknown-linux-gnu\"],\n    \"x86_64-unknown-nixos-gnu\": [\"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu\"],\n}\n\n###############################################################################\n\ndef crate_repositories():\n    \"\"\"A macro for defining repositories for all generated crates.\n\n    Returns:\n      A list of repos visible to the module through the module extension.\n    \"\"\"\n    maybe(\n        http_archive,\n        name = \"crates__aho-corasick-1.1.5\",\n        sha256 = \"c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba\",\n        type = \"tar.gz\",\n        urls = [\"https://static.crates.io/crates/aho-corasick/1.1.5/download\"],\n        strip_prefix = \"aho-corasick-1.1.5\",\n        build_file = Label(\"@crates//crates:BUILD.aho-corasick-1.1.5.bazel\"),\n    )\n\n    maybe(\n        http_archive,\n        name = \"crates__autocfg-1.5.1\",\n        sha256 = \"f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53\",\n        type = \"tar.gz\",\n        urls = [\"https://static.crates.io/crates/autocfg/1.5.1/download\"],\n        strip_prefix = \"autocfg-1.5.1\",\n        build_file = Label(\"@crates//crates:BUILD.autocfg-1.5.1.bazel\"),\n    )\n\n    maybe(\n        http_archive,\n        name = \"crates__googletest-0.14.3\",\n        sha256 = \"f6b5e2f2b556b7b90297a5a35c8267dd43a537923d2b329beefdba2b4ec19d94\",\n        type = \"tar.gz\",\n        urls = [\"https://static.crates.io/crates/googletest/0.14.3/download\"],\n        strip_prefix = \"googletest-0.14.3\",\n        build_file = Label(\"@crates//crates:BUILD.googletest-0.14.3.bazel\"),\n    )\n\n    maybe(\n        http_archive,\n        name = \"crates__googletest_macro-0.14.3\",\n        sha256 = \"2ae6abc96141edd26bf5aeec0f119c129c44de3ced09e5073711a02cb74725d0\",\n        type = \"tar.gz\",\n        urls = [\"https://static.crates.io/crates/googletest_macro/0.14.3/download\"],\n        strip_prefix = \"googletest_macro-0.14.3\",\n        build_file = Label(\"@crates//crates:BUILD.googletest_macro-0.14.3.bazel\"),\n    )\n\n    maybe(\n        http_archive,\n        name = \"crates__linkme-0.3.37\",\n        sha256 = \"3045e122bd98aef8ec3ad58ce84f0791f64e70163d1a02710af4aa11a4d54cc5\",\n        type = \"tar.gz\",\n        urls = [\"https://static.crates.io/crates/linkme/0.3.37/download\"],\n        strip_prefix = \"linkme-0.3.37\",\n        build_file = Label(\"@crates//crates:BUILD.linkme-0.3.37.bazel\"),\n    )\n\n    maybe(\n        http_archive,\n        name = \"crates__linkme-impl-0.3.37\",\n        sha256 = \"77060ebe535362c3da75682cd17b0431017b6e7c5661e714fc69a7ad017d1301\",\n        type = \"tar.gz\",\n        urls = [\"https://static.crates.io/crates/linkme-impl/0.3.37/download\"],\n        strip_prefix = \"linkme-impl-0.3.37\",\n        build_file = Label(\"@crates//crates:BUILD.linkme-impl-0.3.37.bazel\"),\n    )\n\n    maybe(\n        http_archive,\n        name = \"crates__memchr-2.8.3\",\n        sha256 = \"cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98\",\n        type = \"tar.gz\",\n        urls = [\"https://static.crates.io/crates/memchr/2.8.3/download\"],\n        strip_prefix = \"memchr-2.8.3\",\n        build_file = Label(\"@crates//crates:BUILD.memchr-2.8.3.bazel\"),\n    )\n\n    maybe(\n        http_archive,\n        name = \"crates__num-traits-0.2.19\",\n        sha256 = \"071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841\",\n        type = \"tar.gz\",\n        urls = [\"https://static.crates.io/crates/num-traits/0.2.19/download\"],\n        strip_prefix = \"num-traits-0.2.19\",\n        build_file = Label(\"@crates//crates:BUILD.num-traits-0.2.19.bazel\"),\n    )\n\n    maybe(\n        http_archive,\n        name = \"crates__paste-1.0.15\",\n        sha256 = \"57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a\",\n        type = \"tar.gz\",\n        urls = [\"https://static.crates.io/crates/paste/1.0.15/download\"],\n        strip_prefix = \"paste-1.0.15\",\n        build_file = Label(\"@crates//crates:BUILD.paste-1.0.15.bazel\"),\n    )\n\n    maybe(\n        http_archive,\n        name = \"crates__proc-macro2-1.0.107\",\n        sha256 = \"985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9\",\n        type = \"tar.gz\",\n        urls = [\"https://static.crates.io/crates/proc-macro2/1.0.107/download\"],\n        strip_prefix = \"proc-macro2-1.0.107\",\n        build_file = Label(\"@crates//crates:BUILD.proc-macro2-1.0.107.bazel\"),\n    )\n\n    maybe(\n        http_archive,\n        name = \"crates__quote-1.0.47\",\n        sha256 = \"1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001\",\n        type = \"tar.gz\",\n        urls = [\"https://static.crates.io/crates/quote/1.0.47/download\"],\n        strip_prefix = \"quote-1.0.47\",\n        build_file = Label(\"@crates//crates:BUILD.quote-1.0.47.bazel\"),\n    )\n\n    maybe(\n        http_archive,\n        name = \"crates__regex-1.13.1\",\n        sha256 = \"f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d\",\n        type = \"tar.gz\",\n        urls = [\"https://static.crates.io/crates/regex/1.13.1/download\"],\n        strip_prefix = \"regex-1.13.1\",\n        build_file = Label(\"@crates//crates:BUILD.regex-1.13.1.bazel\"),\n    )\n\n    maybe(\n        http_archive,\n        name = \"crates__regex-automata-0.4.18\",\n        sha256 = \"ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2\",\n        type = \"tar.gz\",\n        urls = [\"https://static.crates.io/crates/regex-automata/0.4.18/download\"],\n        strip_prefix = \"regex-automata-0.4.18\",\n        build_file = Label(\"@crates//crates:BUILD.regex-automata-0.4.18.bazel\"),\n    )\n\n    maybe(\n        http_archive,\n        name = \"crates__regex-syntax-0.8.11\",\n        sha256 = \"d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4\",\n        type = \"tar.gz\",\n        urls = [\"https://static.crates.io/crates/regex-syntax/0.8.11/download\"],\n        strip_prefix = \"regex-syntax-0.8.11\",\n        build_file = Label(\"@crates//crates:BUILD.regex-syntax-0.8.11.bazel\"),\n    )\n\n    maybe(\n        http_archive,\n        name = \"crates__rustversion-1.0.23\",\n        sha256 = \"cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f\",\n        type = \"tar.gz\",\n        urls = [\"https://static.crates.io/crates/rustversion/1.0.23/download\"],\n        strip_prefix = \"rustversion-1.0.23\",\n        build_file = Label(\"@crates//crates:BUILD.rustversion-1.0.23.bazel\"),\n    )\n\n    maybe(\n        http_archive,\n        name = \"crates__syn-2.0.119\",\n        sha256 = \"872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297\",\n        type = \"tar.gz\",\n        urls = [\"https://static.crates.io/crates/syn/2.0.119/download\"],\n        strip_prefix = \"syn-2.0.119\",\n        build_file = Label(\"@crates//crates:BUILD.syn-2.0.119.bazel\"),\n    )\n\n    maybe(\n        http_archive,\n        name = \"crates__syn-3.0.6\",\n        sha256 = \"8593e8e72159ed2257d083c7a454a85cbf854f37a0966d8d483aff8c8a3ebcee\",\n        type = \"tar.gz\",\n        urls = [\"https://static.crates.io/crates/syn/3.0.6/download\"],\n        strip_prefix = \"syn-3.0.6\",\n        build_file = Label(\"@crates//crates:BUILD.syn-3.0.6.bazel\"),\n    )\n\n    maybe(\n        http_archive,\n        name = \"crates__unicode-ident-1.0.26\",\n        sha256 = \"d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954\",\n        type = \"tar.gz\",\n        urls = [\"https://static.crates.io/crates/unicode-ident/1.0.26/download\"],\n        strip_prefix = \"unicode-ident-1.0.26\",\n        build_file = Label(\"@crates//crates:BUILD.unicode-ident-1.0.26.bazel\"),\n    )\n\n    return [\n       struct(repo=\"crates__googletest-0.14.3\", is_dev_dep = False),\n       struct(repo=\"crates__linkme-0.3.37\", is_dev_dep = False),\n       struct(repo=\"crates__paste-1.0.15\", is_dev_dep = False),\n       struct(repo=\"crates__quote-1.0.47\", is_dev_dep = False),\n       struct(repo=\"crates__syn-2.0.119\", is_dev_dep = False),\n    ]\n"
-              }
-            }
-          },
-          "crates__aho-corasick-1.1.5": {
-            "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive",
-            "attributes": {
-              "remote_patch_strip": 1,
-              "sha256": "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba",
-              "type": "tar.gz",
-              "urls": [
-                "https://static.crates.io/crates/aho-corasick/1.1.5/download"
-              ],
-              "strip_prefix": "aho-corasick-1.1.5",
-              "build_file_content": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To \n# regenerate this file, run the following:\n#\n#     bazel mod show_repo 'protobuf'\n###############################################################################\n\nload(\"@rules_rust//cargo:defs.bzl\", \"cargo_toml_env_vars\")\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\n# buildifier: disable=bzl-visibility\nload(\"@rules_rust//crate_universe/private:selects.bzl\", \"selects\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\ncargo_toml_env_vars(\n    name = \"cargo_toml_env_vars\",\n    src = \"Cargo.toml\",\n)\n\nrust_library(\n    name = \"aho_corasick\",\n    deps = [\n        \"@crates__memchr-2.8.3//:memchr\",\n    ],\n    compile_data = glob(\n        allow_empty = True,\n        include = [\"**\"],\n        exclude = [\n            \"**/* *\",\n            \".tmp_git_root/**/*\",\n            \"BUILD\",\n            \"BUILD.bazel\",\n            \"WORKSPACE\",\n            \"WORKSPACE.bazel\",\n        ],\n    ),\n    crate_features = [\n        \"perf-literal\",\n        \"std\",\n    ],\n    crate_root = \"src/lib.rs\",\n    edition = \"2021\",\n    rustc_env_files = [\n        \":cargo_toml_env_vars\",\n    ],\n    rustc_flags = [\n        \"--cap-lints=allow\",\n    ],\n    srcs = glob(\n        allow_empty = True,\n        include = [\"**/*.rs\"],\n    ),\n    tags = [\n        \"cargo-bazel\",\n        \"crate-name=aho-corasick\",\n        \"manual\",\n        \"noclippy\",\n        \"norustfmt\",\n    ],\n    target_compatible_with = select({\n        \"@rules_rust//rust/platform:aarch64-apple-darwin\": [],\n        \"@rules_rust//rust/platform:aarch64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:wasm32-unknown-unknown\": [],\n        \"@rules_rust//rust/platform:wasm32-wasip1\": [],\n        \"@rules_rust//rust/platform:x86_64-pc-windows-msvc\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu\": [],\n        \"//conditions:default\": [\"@platforms//:incompatible\"],\n    }),\n    version = \"1.1.5\",\n)\n"
-            }
-          },
-          "crates__autocfg-1.5.1": {
-            "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive",
-            "attributes": {
-              "remote_patch_strip": 1,
-              "sha256": "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53",
-              "type": "tar.gz",
-              "urls": [
-                "https://static.crates.io/crates/autocfg/1.5.1/download"
-              ],
-              "strip_prefix": "autocfg-1.5.1",
-              "build_file_content": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To \n# regenerate this file, run the following:\n#\n#     bazel mod show_repo 'protobuf'\n###############################################################################\n\nload(\"@rules_rust//cargo:defs.bzl\", \"cargo_toml_env_vars\")\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\n# buildifier: disable=bzl-visibility\nload(\"@rules_rust//crate_universe/private:selects.bzl\", \"selects\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\ncargo_toml_env_vars(\n    name = \"cargo_toml_env_vars\",\n    src = \"Cargo.toml\",\n)\n\nrust_library(\n    name = \"autocfg\",\n    compile_data = glob(\n        allow_empty = True,\n        include = [\"**\"],\n        exclude = [\n            \"**/* *\",\n            \".tmp_git_root/**/*\",\n            \"BUILD\",\n            \"BUILD.bazel\",\n            \"WORKSPACE\",\n            \"WORKSPACE.bazel\",\n        ],\n    ),\n    crate_root = \"src/lib.rs\",\n    edition = \"2015\",\n    rustc_env_files = [\n        \":cargo_toml_env_vars\",\n    ],\n    rustc_flags = [\n        \"--cap-lints=allow\",\n    ],\n    srcs = glob(\n        allow_empty = True,\n        include = [\"**/*.rs\"],\n    ),\n    tags = [\n        \"cargo-bazel\",\n        \"crate-name=autocfg\",\n        \"manual\",\n        \"noclippy\",\n        \"norustfmt\",\n    ],\n    target_compatible_with = select({\n        \"@rules_rust//rust/platform:aarch64-apple-darwin\": [],\n        \"@rules_rust//rust/platform:aarch64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:wasm32-unknown-unknown\": [],\n        \"@rules_rust//rust/platform:wasm32-wasip1\": [],\n        \"@rules_rust//rust/platform:x86_64-pc-windows-msvc\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu\": [],\n        \"//conditions:default\": [\"@platforms//:incompatible\"],\n    }),\n    version = \"1.5.1\",\n)\n"
-            }
-          },
-          "crates__googletest-0.14.3": {
-            "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive",
-            "attributes": {
-              "remote_patch_strip": 1,
-              "sha256": "f6b5e2f2b556b7b90297a5a35c8267dd43a537923d2b329beefdba2b4ec19d94",
-              "type": "tar.gz",
-              "urls": [
-                "https://static.crates.io/crates/googletest/0.14.3/download"
-              ],
-              "strip_prefix": "googletest-0.14.3",
-              "build_file_content": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To \n# regenerate this file, run the following:\n#\n#     bazel mod show_repo 'protobuf'\n###############################################################################\n\nload(\"@rules_rust//cargo:defs.bzl\", \"cargo_toml_env_vars\")\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\n# buildifier: disable=bzl-visibility\nload(\"@rules_rust//crate_universe/private:selects.bzl\", \"selects\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\ncargo_toml_env_vars(\n    name = \"cargo_toml_env_vars\",\n    src = \"Cargo.toml\",\n)\n\nrust_library(\n    name = \"googletest\",\n    deps = [\n        \"@crates__num-traits-0.2.19//:num_traits\",\n        \"@crates__regex-1.13.1//:regex\",\n    ],\n    proc_macro_deps = [\n        \"@crates__googletest_macro-0.14.3//:googletest_macro\",\n        \"@crates__rustversion-1.0.23//:rustversion\",\n    ],\n    compile_data = glob(\n        allow_empty = True,\n        include = [\"**\"],\n        exclude = [\n            \"**/* *\",\n            \".tmp_git_root/**/*\",\n            \"BUILD\",\n            \"BUILD.bazel\",\n            \"WORKSPACE\",\n            \"WORKSPACE.bazel\",\n        ],\n    ),\n    crate_root = \"src/lib.rs\",\n    edition = \"2021\",\n    rustc_env_files = [\n        \":cargo_toml_env_vars\",\n    ],\n    rustc_flags = [\n        \"--cap-lints=allow\",\n    ],\n    srcs = glob(\n        allow_empty = True,\n        include = [\"**/*.rs\"],\n    ),\n    tags = [\n        \"cargo-bazel\",\n        \"crate-name=googletest\",\n        \"manual\",\n        \"noclippy\",\n        \"norustfmt\",\n    ],\n    target_compatible_with = select({\n        \"@rules_rust//rust/platform:aarch64-apple-darwin\": [],\n        \"@rules_rust//rust/platform:aarch64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:wasm32-unknown-unknown\": [],\n        \"@rules_rust//rust/platform:wasm32-wasip1\": [],\n        \"@rules_rust//rust/platform:x86_64-pc-windows-msvc\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu\": [],\n        \"//conditions:default\": [\"@platforms//:incompatible\"],\n    }),\n    version = \"0.14.3\",\n)\n"
-            }
-          },
-          "crates__googletest_macro-0.14.3": {
-            "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive",
-            "attributes": {
-              "remote_patch_strip": 1,
-              "sha256": "2ae6abc96141edd26bf5aeec0f119c129c44de3ced09e5073711a02cb74725d0",
-              "type": "tar.gz",
-              "urls": [
-                "https://static.crates.io/crates/googletest_macro/0.14.3/download"
-              ],
-              "strip_prefix": "googletest_macro-0.14.3",
-              "build_file_content": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To \n# regenerate this file, run the following:\n#\n#     bazel mod show_repo 'protobuf'\n###############################################################################\n\nload(\"@rules_rust//cargo:defs.bzl\", \"cargo_toml_env_vars\")\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_proc_macro\")\n\n# buildifier: disable=bzl-visibility\nload(\"@rules_rust//crate_universe/private:selects.bzl\", \"selects\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\ncargo_toml_env_vars(\n    name = \"cargo_toml_env_vars\",\n    src = \"Cargo.toml\",\n)\n\nrust_proc_macro(\n    name = \"googletest_macro\",\n    deps = [\n        \"@crates__proc-macro2-1.0.107//:proc_macro2\",\n        \"@crates__quote-1.0.47//:quote\",\n        \"@crates__syn-2.0.119//:syn\",\n    ],\n    compile_data = glob(\n        allow_empty = True,\n        include = [\"**\"],\n        exclude = [\n            \"**/* *\",\n            \".tmp_git_root/**/*\",\n            \"BUILD\",\n            \"BUILD.bazel\",\n            \"WORKSPACE\",\n            \"WORKSPACE.bazel\",\n        ],\n    ),\n    crate_root = \"src/lib.rs\",\n    edition = \"2021\",\n    rustc_env_files = [\n        \":cargo_toml_env_vars\",\n    ],\n    rustc_flags = [\n        \"--cap-lints=allow\",\n    ],\n    srcs = glob(\n        allow_empty = True,\n        include = [\"**/*.rs\"],\n    ),\n    tags = [\n        \"cargo-bazel\",\n        \"crate-name=googletest_macro\",\n        \"manual\",\n        \"noclippy\",\n        \"norustfmt\",\n    ],\n    target_compatible_with = select({\n        \"@rules_rust//rust/platform:aarch64-apple-darwin\": [],\n        \"@rules_rust//rust/platform:aarch64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:wasm32-unknown-unknown\": [],\n        \"@rules_rust//rust/platform:wasm32-wasip1\": [],\n        \"@rules_rust//rust/platform:x86_64-pc-windows-msvc\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu\": [],\n        \"//conditions:default\": [\"@platforms//:incompatible\"],\n    }),\n    version = \"0.14.3\",\n)\n"
-            }
-          },
-          "crates__linkme-0.3.37": {
-            "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive",
-            "attributes": {
-              "remote_patch_strip": 1,
-              "sha256": "3045e122bd98aef8ec3ad58ce84f0791f64e70163d1a02710af4aa11a4d54cc5",
-              "type": "tar.gz",
-              "urls": [
-                "https://static.crates.io/crates/linkme/0.3.37/download"
-              ],
-              "strip_prefix": "linkme-0.3.37",
-              "build_file_content": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To \n# regenerate this file, run the following:\n#\n#     bazel mod show_repo 'protobuf'\n###############################################################################\n\nload(\n    \"@rules_rust//cargo:defs.bzl\",\n    \"cargo_build_script\",\n    \"cargo_toml_env_vars\",\n)\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\n# buildifier: disable=bzl-visibility\nload(\"@rules_rust//crate_universe/private:selects.bzl\", \"selects\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\ncargo_toml_env_vars(\n    name = \"cargo_toml_env_vars\",\n    src = \"Cargo.toml\",\n)\n\nrust_library(\n    name = \"linkme\",\n    deps = [\n        \"@crates__linkme-0.3.37//:build_script_build\",\n    ],\n    proc_macro_deps = [\n        \"@crates__linkme-impl-0.3.37//:linkme_impl\",\n    ],\n    compile_data = glob(\n        allow_empty = True,\n        include = [\"**\"],\n        exclude = [\n            \"**/* *\",\n            \".tmp_git_root/**/*\",\n            \"BUILD\",\n            \"BUILD.bazel\",\n            \"WORKSPACE\",\n            \"WORKSPACE.bazel\",\n        ],\n    ),\n    crate_root = \"src/lib.rs\",\n    edition = \"2021\",\n    rustc_env_files = [\n        \":cargo_toml_env_vars\",\n    ],\n    rustc_flags = [\n        \"--cap-lints=allow\",\n    ],\n    srcs = glob(\n        allow_empty = True,\n        include = [\"**/*.rs\"],\n    ),\n    tags = [\n        \"cargo-bazel\",\n        \"crate-name=linkme\",\n        \"manual\",\n        \"noclippy\",\n        \"norustfmt\",\n    ],\n    target_compatible_with = select({\n        \"@rules_rust//rust/platform:aarch64-apple-darwin\": [],\n        \"@rules_rust//rust/platform:aarch64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:wasm32-unknown-unknown\": [],\n        \"@rules_rust//rust/platform:wasm32-wasip1\": [],\n        \"@rules_rust//rust/platform:x86_64-pc-windows-msvc\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu\": [],\n        \"//conditions:default\": [\"@platforms//:incompatible\"],\n    }),\n    version = \"0.3.37\",\n)\n\ncargo_build_script(\n    name = \"_bs\",\n    compile_data = glob(\n        allow_empty = True,\n        include = [\"**\"],\n        exclude = [\n            \"**/* *\",\n            \"**/*.rs\",\n            \".tmp_git_root/**/*\",\n            \"BUILD\",\n            \"BUILD.bazel\",\n            \"WORKSPACE\",\n            \"WORKSPACE.bazel\",\n        ],\n    ),\n    crate_name = \"build_script_build\",\n    crate_root = \"build.rs\",\n    data = glob(\n        allow_empty = True,\n        include = [\"**\"],\n        exclude = [\n            \"**/* *\",\n            \".tmp_git_root/**/*\",\n            \"BUILD\",\n            \"BUILD.bazel\",\n            \"WORKSPACE\",\n            \"WORKSPACE.bazel\",\n        ],\n    ),\n    edition = \"2021\",\n    pkg_name = \"linkme\",\n    rustc_env_files = [\n        \":cargo_toml_env_vars\",\n    ],\n    rustc_flags = [\n        \"--cap-lints=allow\",\n    ],\n    srcs = glob(\n        allow_empty = True,\n        include = [\"**/*.rs\"],\n    ),\n    tags = [\n        \"cargo-bazel\",\n        \"crate-name=linkme\",\n        \"manual\",\n        \"noclippy\",\n        \"norustfmt\",\n    ],\n    version = \"0.3.37\",\n    visibility = [\"//visibility:private\"],\n)\n\nalias(\n    name = \"build_script_build\",\n    actual = \":_bs\",\n    tags = [\"manual\"],\n)\n"
-            }
-          },
-          "crates__linkme-impl-0.3.37": {
-            "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive",
-            "attributes": {
-              "remote_patch_strip": 1,
-              "sha256": "77060ebe535362c3da75682cd17b0431017b6e7c5661e714fc69a7ad017d1301",
-              "type": "tar.gz",
-              "urls": [
-                "https://static.crates.io/crates/linkme-impl/0.3.37/download"
-              ],
-              "strip_prefix": "linkme-impl-0.3.37",
-              "build_file_content": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To \n# regenerate this file, run the following:\n#\n#     bazel mod show_repo 'protobuf'\n###############################################################################\n\nload(\n    \"@rules_rust//cargo:defs.bzl\",\n    \"cargo_build_script\",\n    \"cargo_toml_env_vars\",\n)\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_proc_macro\")\n\n# buildifier: disable=bzl-visibility\nload(\"@rules_rust//crate_universe/private:selects.bzl\", \"selects\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\ncargo_toml_env_vars(\n    name = \"cargo_toml_env_vars\",\n    src = \"Cargo.toml\",\n)\n\nrust_proc_macro(\n    name = \"linkme_impl\",\n    deps = [\n        \"@crates__linkme-impl-0.3.37//:build_script_build\",\n        \"@crates__proc-macro2-1.0.107//:proc_macro2\",\n        \"@crates__quote-1.0.47//:quote\",\n        \"@crates__syn-3.0.6//:syn\",\n    ],\n    compile_data = glob(\n        allow_empty = True,\n        include = [\"**\"],\n        exclude = [\n            \"**/* *\",\n            \".tmp_git_root/**/*\",\n            \"BUILD\",\n            \"BUILD.bazel\",\n            \"WORKSPACE\",\n            \"WORKSPACE.bazel\",\n        ],\n    ),\n    crate_root = \"src/lib.rs\",\n    edition = \"2021\",\n    rustc_env_files = [\n        \":cargo_toml_env_vars\",\n    ],\n    rustc_flags = [\n        \"--cap-lints=allow\",\n    ],\n    srcs = glob(\n        allow_empty = True,\n        include = [\"**/*.rs\"],\n    ),\n    tags = [\n        \"cargo-bazel\",\n        \"crate-name=linkme-impl\",\n        \"manual\",\n        \"noclippy\",\n        \"norustfmt\",\n    ],\n    target_compatible_with = select({\n        \"@rules_rust//rust/platform:aarch64-apple-darwin\": [],\n        \"@rules_rust//rust/platform:aarch64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:wasm32-unknown-unknown\": [],\n        \"@rules_rust//rust/platform:wasm32-wasip1\": [],\n        \"@rules_rust//rust/platform:x86_64-pc-windows-msvc\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu\": [],\n        \"//conditions:default\": [\"@platforms//:incompatible\"],\n    }),\n    version = \"0.3.37\",\n)\n\ncargo_build_script(\n    name = \"_bs\",\n    compile_data = glob(\n        allow_empty = True,\n        include = [\"**\"],\n        exclude = [\n            \"**/* *\",\n            \"**/*.rs\",\n            \".tmp_git_root/**/*\",\n            \"BUILD\",\n            \"BUILD.bazel\",\n            \"WORKSPACE\",\n            \"WORKSPACE.bazel\",\n        ],\n    ),\n    crate_name = \"build_script_build\",\n    crate_root = \"build.rs\",\n    data = glob(\n        allow_empty = True,\n        include = [\"**\"],\n        exclude = [\n            \"**/* *\",\n            \".tmp_git_root/**/*\",\n            \"BUILD\",\n            \"BUILD.bazel\",\n            \"WORKSPACE\",\n            \"WORKSPACE.bazel\",\n        ],\n    ),\n    edition = \"2021\",\n    pkg_name = \"linkme-impl\",\n    rustc_env_files = [\n        \":cargo_toml_env_vars\",\n    ],\n    rustc_flags = [\n        \"--cap-lints=allow\",\n    ],\n    srcs = glob(\n        allow_empty = True,\n        include = [\"**/*.rs\"],\n    ),\n    tags = [\n        \"cargo-bazel\",\n        \"crate-name=linkme-impl\",\n        \"manual\",\n        \"noclippy\",\n        \"norustfmt\",\n    ],\n    version = \"0.3.37\",\n    visibility = [\"//visibility:private\"],\n)\n\nalias(\n    name = \"build_script_build\",\n    actual = \":_bs\",\n    tags = [\"manual\"],\n)\n"
-            }
-          },
-          "crates__memchr-2.8.3": {
-            "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive",
-            "attributes": {
-              "remote_patch_strip": 1,
-              "sha256": "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98",
-              "type": "tar.gz",
-              "urls": [
-                "https://static.crates.io/crates/memchr/2.8.3/download"
-              ],
-              "strip_prefix": "memchr-2.8.3",
-              "build_file_content": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To \n# regenerate this file, run the following:\n#\n#     bazel mod show_repo 'protobuf'\n###############################################################################\n\nload(\"@rules_rust//cargo:defs.bzl\", \"cargo_toml_env_vars\")\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\n# buildifier: disable=bzl-visibility\nload(\"@rules_rust//crate_universe/private:selects.bzl\", \"selects\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\ncargo_toml_env_vars(\n    name = \"cargo_toml_env_vars\",\n    src = \"Cargo.toml\",\n)\n\nrust_library(\n    name = \"memchr\",\n    compile_data = glob(\n        allow_empty = True,\n        include = [\"**\"],\n        exclude = [\n            \"**/* *\",\n            \".tmp_git_root/**/*\",\n            \"BUILD\",\n            \"BUILD.bazel\",\n            \"WORKSPACE\",\n            \"WORKSPACE.bazel\",\n        ],\n    ),\n    crate_features = [\n        \"alloc\",\n        \"std\",\n    ],\n    crate_root = \"src/lib.rs\",\n    edition = \"2021\",\n    rustc_env_files = [\n        \":cargo_toml_env_vars\",\n    ],\n    rustc_flags = [\n        \"--cap-lints=allow\",\n    ],\n    srcs = glob(\n        allow_empty = True,\n        include = [\"**/*.rs\"],\n    ),\n    tags = [\n        \"cargo-bazel\",\n        \"crate-name=memchr\",\n        \"manual\",\n        \"noclippy\",\n        \"norustfmt\",\n    ],\n    target_compatible_with = select({\n        \"@rules_rust//rust/platform:aarch64-apple-darwin\": [],\n        \"@rules_rust//rust/platform:aarch64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:wasm32-unknown-unknown\": [],\n        \"@rules_rust//rust/platform:wasm32-wasip1\": [],\n        \"@rules_rust//rust/platform:x86_64-pc-windows-msvc\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu\": [],\n        \"//conditions:default\": [\"@platforms//:incompatible\"],\n    }),\n    version = \"2.8.3\",\n)\n"
-            }
-          },
-          "crates__num-traits-0.2.19": {
-            "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive",
-            "attributes": {
-              "remote_patch_strip": 1,
-              "sha256": "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841",
-              "type": "tar.gz",
-              "urls": [
-                "https://static.crates.io/crates/num-traits/0.2.19/download"
-              ],
-              "strip_prefix": "num-traits-0.2.19",
-              "build_file_content": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To \n# regenerate this file, run the following:\n#\n#     bazel mod show_repo 'protobuf'\n###############################################################################\n\nload(\n    \"@rules_rust//cargo:defs.bzl\",\n    \"cargo_build_script\",\n    \"cargo_toml_env_vars\",\n)\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\n# buildifier: disable=bzl-visibility\nload(\"@rules_rust//crate_universe/private:selects.bzl\", \"selects\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\ncargo_toml_env_vars(\n    name = \"cargo_toml_env_vars\",\n    src = \"Cargo.toml\",\n)\n\nrust_library(\n    name = \"num_traits\",\n    deps = [\n        \"@crates__num-traits-0.2.19//:build_script_build\",\n    ],\n    compile_data = glob(\n        allow_empty = True,\n        include = [\"**\"],\n        exclude = [\n            \"**/* *\",\n            \".tmp_git_root/**/*\",\n            \"BUILD\",\n            \"BUILD.bazel\",\n            \"WORKSPACE\",\n            \"WORKSPACE.bazel\",\n        ],\n    ),\n    crate_features = [\n        \"default\",\n        \"std\",\n    ],\n    crate_root = \"src/lib.rs\",\n    edition = \"2021\",\n    rustc_env_files = [\n        \":cargo_toml_env_vars\",\n    ],\n    rustc_flags = [\n        \"--cap-lints=allow\",\n    ],\n    srcs = glob(\n        allow_empty = True,\n        include = [\"**/*.rs\"],\n    ),\n    tags = [\n        \"cargo-bazel\",\n        \"crate-name=num-traits\",\n        \"manual\",\n        \"noclippy\",\n        \"norustfmt\",\n    ],\n    target_compatible_with = select({\n        \"@rules_rust//rust/platform:aarch64-apple-darwin\": [],\n        \"@rules_rust//rust/platform:aarch64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:wasm32-unknown-unknown\": [],\n        \"@rules_rust//rust/platform:wasm32-wasip1\": [],\n        \"@rules_rust//rust/platform:x86_64-pc-windows-msvc\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu\": [],\n        \"//conditions:default\": [\"@platforms//:incompatible\"],\n    }),\n    version = \"0.2.19\",\n)\n\ncargo_build_script(\n    name = \"_bs\",\n    compile_data = glob(\n        allow_empty = True,\n        include = [\"**\"],\n        exclude = [\n            \"**/* *\",\n            \"**/*.rs\",\n            \".tmp_git_root/**/*\",\n            \"BUILD\",\n            \"BUILD.bazel\",\n            \"WORKSPACE\",\n            \"WORKSPACE.bazel\",\n        ],\n    ),\n    crate_features = [\n        \"default\",\n        \"std\",\n    ],\n    crate_name = \"build_script_build\",\n    crate_root = \"build.rs\",\n    data = glob(\n        allow_empty = True,\n        include = [\"**\"],\n        exclude = [\n            \"**/* *\",\n            \".tmp_git_root/**/*\",\n            \"BUILD\",\n            \"BUILD.bazel\",\n            \"WORKSPACE\",\n            \"WORKSPACE.bazel\",\n        ],\n    ),\n    deps = [\n        \"@crates__autocfg-1.5.1//:autocfg\",\n    ],\n    edition = \"2021\",\n    pkg_name = \"num-traits\",\n    rustc_env_files = [\n        \":cargo_toml_env_vars\",\n    ],\n    rustc_flags = [\n        \"--cap-lints=allow\",\n    ],\n    srcs = glob(\n        allow_empty = True,\n        include = [\"**/*.rs\"],\n    ),\n    tags = [\n        \"cargo-bazel\",\n        \"crate-name=num-traits\",\n        \"manual\",\n        \"noclippy\",\n        \"norustfmt\",\n    ],\n    version = \"0.2.19\",\n    visibility = [\"//visibility:private\"],\n)\n\nalias(\n    name = \"build_script_build\",\n    actual = \":_bs\",\n    tags = [\"manual\"],\n)\n"
-            }
-          },
-          "crates__paste-1.0.15": {
-            "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive",
-            "attributes": {
-              "remote_patch_strip": 1,
-              "sha256": "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a",
-              "type": "tar.gz",
-              "urls": [
-                "https://static.crates.io/crates/paste/1.0.15/download"
-              ],
-              "strip_prefix": "paste-1.0.15",
-              "build_file_content": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To \n# regenerate this file, run the following:\n#\n#     bazel mod show_repo 'protobuf'\n###############################################################################\n\nload(\n    \"@rules_rust//cargo:defs.bzl\",\n    \"cargo_build_script\",\n    \"cargo_toml_env_vars\",\n)\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_proc_macro\")\n\n# buildifier: disable=bzl-visibility\nload(\"@rules_rust//crate_universe/private:selects.bzl\", \"selects\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\ncargo_toml_env_vars(\n    name = \"cargo_toml_env_vars\",\n    src = \"Cargo.toml\",\n)\n\nrust_proc_macro(\n    name = \"paste\",\n    deps = [\n        \"@crates__paste-1.0.15//:build_script_build\",\n    ],\n    compile_data = glob(\n        allow_empty = True,\n        include = [\"**\"],\n        exclude = [\n            \"**/* *\",\n            \".tmp_git_root/**/*\",\n            \"BUILD\",\n            \"BUILD.bazel\",\n            \"WORKSPACE\",\n            \"WORKSPACE.bazel\",\n        ],\n    ),\n    crate_root = \"src/lib.rs\",\n    edition = \"2018\",\n    rustc_env_files = [\n        \":cargo_toml_env_vars\",\n    ],\n    rustc_flags = [\n        \"--cap-lints=allow\",\n    ],\n    srcs = glob(\n        allow_empty = True,\n        include = [\"**/*.rs\"],\n    ),\n    tags = [\n        \"cargo-bazel\",\n        \"crate-name=paste\",\n        \"manual\",\n        \"noclippy\",\n        \"norustfmt\",\n    ],\n    target_compatible_with = select({\n        \"@rules_rust//rust/platform:aarch64-apple-darwin\": [],\n        \"@rules_rust//rust/platform:aarch64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:wasm32-unknown-unknown\": [],\n        \"@rules_rust//rust/platform:wasm32-wasip1\": [],\n        \"@rules_rust//rust/platform:x86_64-pc-windows-msvc\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu\": [],\n        \"//conditions:default\": [\"@platforms//:incompatible\"],\n    }),\n    version = \"1.0.15\",\n)\n\ncargo_build_script(\n    name = \"_bs\",\n    compile_data = glob(\n        allow_empty = True,\n        include = [\"**\"],\n        exclude = [\n            \"**/* *\",\n            \"**/*.rs\",\n            \".tmp_git_root/**/*\",\n            \"BUILD\",\n            \"BUILD.bazel\",\n            \"WORKSPACE\",\n            \"WORKSPACE.bazel\",\n        ],\n    ),\n    crate_name = \"build_script_build\",\n    crate_root = \"build.rs\",\n    data = glob(\n        allow_empty = True,\n        include = [\"**\"],\n        exclude = [\n            \"**/* *\",\n            \".tmp_git_root/**/*\",\n            \"BUILD\",\n            \"BUILD.bazel\",\n            \"WORKSPACE\",\n            \"WORKSPACE.bazel\",\n        ],\n    ),\n    edition = \"2018\",\n    pkg_name = \"paste\",\n    rustc_env_files = [\n        \":cargo_toml_env_vars\",\n    ],\n    rustc_flags = [\n        \"--cap-lints=allow\",\n    ],\n    srcs = glob(\n        allow_empty = True,\n        include = [\"**/*.rs\"],\n    ),\n    tags = [\n        \"cargo-bazel\",\n        \"crate-name=paste\",\n        \"manual\",\n        \"noclippy\",\n        \"norustfmt\",\n    ],\n    version = \"1.0.15\",\n    visibility = [\"//visibility:private\"],\n)\n\nalias(\n    name = \"build_script_build\",\n    actual = \":_bs\",\n    tags = [\"manual\"],\n)\n"
-            }
-          },
-          "crates__proc-macro2-1.0.107": {
-            "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive",
-            "attributes": {
-              "remote_patch_strip": 1,
-              "sha256": "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9",
-              "type": "tar.gz",
-              "urls": [
-                "https://static.crates.io/crates/proc-macro2/1.0.107/download"
-              ],
-              "strip_prefix": "proc-macro2-1.0.107",
-              "build_file_content": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To \n# regenerate this file, run the following:\n#\n#     bazel mod show_repo 'protobuf'\n###############################################################################\n\nload(\n    \"@rules_rust//cargo:defs.bzl\",\n    \"cargo_build_script\",\n    \"cargo_toml_env_vars\",\n)\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\n# buildifier: disable=bzl-visibility\nload(\"@rules_rust//crate_universe/private:selects.bzl\", \"selects\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\ncargo_toml_env_vars(\n    name = \"cargo_toml_env_vars\",\n    src = \"Cargo.toml\",\n)\n\nrust_library(\n    name = \"proc_macro2\",\n    deps = [\n        \"@crates__proc-macro2-1.0.107//:build_script_build\",\n        \"@crates__unicode-ident-1.0.26//:unicode_ident\",\n    ],\n    compile_data = glob(\n        allow_empty = True,\n        include = [\"**\"],\n        exclude = [\n            \"**/* *\",\n            \".tmp_git_root/**/*\",\n            \"BUILD\",\n            \"BUILD.bazel\",\n            \"WORKSPACE\",\n            \"WORKSPACE.bazel\",\n        ],\n    ),\n    crate_features = [\n        \"proc-macro\",\n    ] + select({\n        \"@rules_rust//rust/platform:aarch64-apple-darwin\": [\n            \"default\",  # aarch64-apple-darwin\n        ],\n        \"@rules_rust//rust/platform:aarch64-unknown-linux-gnu\": [\n            \"default\",  # aarch64-unknown-linux-gnu\n        ],\n        \"@rules_rust//rust/platform:x86_64-pc-windows-msvc\": [\n            \"default\",  # x86_64-pc-windows-msvc\n        ],\n        \"@rules_rust//rust/platform:x86_64-unknown-linux-gnu\": [\n            \"default\",  # x86_64-unknown-linux-gnu\n        ],\n        \"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu\": [\n            \"default\",  # x86_64-unknown-nixos-gnu\n        ],\n        \"//conditions:default\": [],\n    }),\n    crate_root = \"src/lib.rs\",\n    edition = \"2021\",\n    rustc_env_files = [\n        \":cargo_toml_env_vars\",\n    ],\n    rustc_flags = [\n        \"--cap-lints=allow\",\n    ],\n    srcs = glob(\n        allow_empty = True,\n        include = [\"**/*.rs\"],\n    ),\n    tags = [\n        \"cargo-bazel\",\n        \"crate-name=proc-macro2\",\n        \"manual\",\n        \"noclippy\",\n        \"norustfmt\",\n    ],\n    target_compatible_with = select({\n        \"@rules_rust//rust/platform:aarch64-apple-darwin\": [],\n        \"@rules_rust//rust/platform:aarch64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:wasm32-unknown-unknown\": [],\n        \"@rules_rust//rust/platform:wasm32-wasip1\": [],\n        \"@rules_rust//rust/platform:x86_64-pc-windows-msvc\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu\": [],\n        \"//conditions:default\": [\"@platforms//:incompatible\"],\n    }),\n    version = \"1.0.107\",\n)\n\ncargo_build_script(\n    name = \"_bs\",\n    compile_data = glob(\n        allow_empty = True,\n        include = [\"**\"],\n        exclude = [\n            \"**/* *\",\n            \"**/*.rs\",\n            \".tmp_git_root/**/*\",\n            \"BUILD\",\n            \"BUILD.bazel\",\n            \"WORKSPACE\",\n            \"WORKSPACE.bazel\",\n        ],\n    ),\n    crate_features = [\n        \"proc-macro\",\n    ] + select({\n        \"@rules_rust//rust/platform:aarch64-apple-darwin\": [\n            \"default\",  # aarch64-apple-darwin\n        ],\n        \"@rules_rust//rust/platform:aarch64-unknown-linux-gnu\": [\n            \"default\",  # aarch64-unknown-linux-gnu\n        ],\n        \"@rules_rust//rust/platform:x86_64-pc-windows-msvc\": [\n            \"default\",  # x86_64-pc-windows-msvc\n        ],\n        \"@rules_rust//rust/platform:x86_64-unknown-linux-gnu\": [\n            \"default\",  # x86_64-unknown-linux-gnu\n        ],\n        \"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu\": [\n            \"default\",  # x86_64-unknown-nixos-gnu\n        ],\n        \"//conditions:default\": [],\n    }),\n    crate_name = \"build_script_build\",\n    crate_root = \"build.rs\",\n    data = glob(\n        allow_empty = True,\n        include = [\"**\"],\n        exclude = [\n            \"**/* *\",\n            \".tmp_git_root/**/*\",\n            \"BUILD\",\n            \"BUILD.bazel\",\n            \"WORKSPACE\",\n            \"WORKSPACE.bazel\",\n        ],\n    ),\n    edition = \"2021\",\n    pkg_name = \"proc-macro2\",\n    rustc_env_files = [\n        \":cargo_toml_env_vars\",\n    ],\n    rustc_flags = [\n        \"--cap-lints=allow\",\n    ],\n    srcs = glob(\n        allow_empty = True,\n        include = [\"**/*.rs\"],\n    ),\n    tags = [\n        \"cargo-bazel\",\n        \"crate-name=proc-macro2\",\n        \"manual\",\n        \"noclippy\",\n        \"norustfmt\",\n    ],\n    version = \"1.0.107\",\n    visibility = [\"//visibility:private\"],\n)\n\nalias(\n    name = \"build_script_build\",\n    actual = \":_bs\",\n    tags = [\"manual\"],\n)\n"
-            }
-          },
-          "crates__quote-1.0.47": {
-            "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive",
-            "attributes": {
-              "remote_patch_strip": 1,
-              "sha256": "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001",
-              "type": "tar.gz",
-              "urls": [
-                "https://static.crates.io/crates/quote/1.0.47/download"
-              ],
-              "strip_prefix": "quote-1.0.47",
-              "build_file_content": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To \n# regenerate this file, run the following:\n#\n#     bazel mod show_repo 'protobuf'\n###############################################################################\n\nload(\n    \"@rules_rust//cargo:defs.bzl\",\n    \"cargo_build_script\",\n    \"cargo_toml_env_vars\",\n)\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\n# buildifier: disable=bzl-visibility\nload(\"@rules_rust//crate_universe/private:selects.bzl\", \"selects\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\ncargo_toml_env_vars(\n    name = \"cargo_toml_env_vars\",\n    src = \"Cargo.toml\",\n)\n\nrust_library(\n    name = \"quote\",\n    deps = [\n        \"@crates__proc-macro2-1.0.107//:proc_macro2\",\n        \"@crates__quote-1.0.47//:build_script_build\",\n    ],\n    compile_data = glob(\n        allow_empty = True,\n        include = [\"**\"],\n        exclude = [\n            \"**/* *\",\n            \".tmp_git_root/**/*\",\n            \"BUILD\",\n            \"BUILD.bazel\",\n            \"WORKSPACE\",\n            \"WORKSPACE.bazel\",\n        ],\n    ),\n    crate_features = [\n        \"default\",\n        \"proc-macro\",\n    ],\n    crate_root = \"src/lib.rs\",\n    edition = \"2021\",\n    rustc_env_files = [\n        \":cargo_toml_env_vars\",\n    ],\n    rustc_flags = [\n        \"--cap-lints=allow\",\n    ],\n    srcs = glob(\n        allow_empty = True,\n        include = [\"**/*.rs\"],\n    ),\n    tags = [\n        \"cargo-bazel\",\n        \"crate-name=quote\",\n        \"manual\",\n        \"noclippy\",\n        \"norustfmt\",\n    ],\n    target_compatible_with = select({\n        \"@rules_rust//rust/platform:aarch64-apple-darwin\": [],\n        \"@rules_rust//rust/platform:aarch64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:wasm32-unknown-unknown\": [],\n        \"@rules_rust//rust/platform:wasm32-wasip1\": [],\n        \"@rules_rust//rust/platform:x86_64-pc-windows-msvc\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu\": [],\n        \"//conditions:default\": [\"@platforms//:incompatible\"],\n    }),\n    version = \"1.0.47\",\n)\n\ncargo_build_script(\n    name = \"_bs\",\n    compile_data = glob(\n        allow_empty = True,\n        include = [\"**\"],\n        exclude = [\n            \"**/* *\",\n            \"**/*.rs\",\n            \".tmp_git_root/**/*\",\n            \"BUILD\",\n            \"BUILD.bazel\",\n            \"WORKSPACE\",\n            \"WORKSPACE.bazel\",\n        ],\n    ),\n    crate_features = [\n        \"default\",\n        \"proc-macro\",\n    ],\n    crate_name = \"build_script_build\",\n    crate_root = \"build.rs\",\n    data = glob(\n        allow_empty = True,\n        include = [\"**\"],\n        exclude = [\n            \"**/* *\",\n            \".tmp_git_root/**/*\",\n            \"BUILD\",\n            \"BUILD.bazel\",\n            \"WORKSPACE\",\n            \"WORKSPACE.bazel\",\n        ],\n    ),\n    edition = \"2021\",\n    pkg_name = \"quote\",\n    rustc_env_files = [\n        \":cargo_toml_env_vars\",\n    ],\n    rustc_flags = [\n        \"--cap-lints=allow\",\n    ],\n    srcs = glob(\n        allow_empty = True,\n        include = [\"**/*.rs\"],\n    ),\n    tags = [\n        \"cargo-bazel\",\n        \"crate-name=quote\",\n        \"manual\",\n        \"noclippy\",\n        \"norustfmt\",\n    ],\n    version = \"1.0.47\",\n    visibility = [\"//visibility:private\"],\n)\n\nalias(\n    name = \"build_script_build\",\n    actual = \":_bs\",\n    tags = [\"manual\"],\n)\n"
-            }
-          },
-          "crates__regex-1.13.1": {
-            "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive",
-            "attributes": {
-              "remote_patch_strip": 1,
-              "sha256": "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d",
-              "type": "tar.gz",
-              "urls": [
-                "https://static.crates.io/crates/regex/1.13.1/download"
-              ],
-              "strip_prefix": "regex-1.13.1",
-              "build_file_content": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To \n# regenerate this file, run the following:\n#\n#     bazel mod show_repo 'protobuf'\n###############################################################################\n\nload(\"@rules_rust//cargo:defs.bzl\", \"cargo_toml_env_vars\")\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\n# buildifier: disable=bzl-visibility\nload(\"@rules_rust//crate_universe/private:selects.bzl\", \"selects\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\ncargo_toml_env_vars(\n    name = \"cargo_toml_env_vars\",\n    src = \"Cargo.toml\",\n)\n\nrust_library(\n    name = \"regex\",\n    deps = [\n        \"@crates__aho-corasick-1.1.5//:aho_corasick\",\n        \"@crates__memchr-2.8.3//:memchr\",\n        \"@crates__regex-automata-0.4.18//:regex_automata\",\n        \"@crates__regex-syntax-0.8.11//:regex_syntax\",\n    ],\n    compile_data = glob(\n        allow_empty = True,\n        include = [\"**\"],\n        exclude = [\n            \"**/* *\",\n            \".tmp_git_root/**/*\",\n            \"BUILD\",\n            \"BUILD.bazel\",\n            \"WORKSPACE\",\n            \"WORKSPACE.bazel\",\n        ],\n    ),\n    crate_features = [\n        \"default\",\n        \"perf\",\n        \"perf-backtrack\",\n        \"perf-cache\",\n        \"perf-dfa\",\n        \"perf-inline\",\n        \"perf-literal\",\n        \"perf-onepass\",\n        \"std\",\n        \"unicode\",\n        \"unicode-age\",\n        \"unicode-bool\",\n        \"unicode-case\",\n        \"unicode-gencat\",\n        \"unicode-perl\",\n        \"unicode-script\",\n        \"unicode-segment\",\n    ],\n    crate_root = \"src/lib.rs\",\n    edition = \"2021\",\n    rustc_env_files = [\n        \":cargo_toml_env_vars\",\n    ],\n    rustc_flags = [\n        \"--cap-lints=allow\",\n    ],\n    srcs = glob(\n        allow_empty = True,\n        include = [\"**/*.rs\"],\n    ),\n    tags = [\n        \"cargo-bazel\",\n        \"crate-name=regex\",\n        \"manual\",\n        \"noclippy\",\n        \"norustfmt\",\n    ],\n    target_compatible_with = select({\n        \"@rules_rust//rust/platform:aarch64-apple-darwin\": [],\n        \"@rules_rust//rust/platform:aarch64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:wasm32-unknown-unknown\": [],\n        \"@rules_rust//rust/platform:wasm32-wasip1\": [],\n        \"@rules_rust//rust/platform:x86_64-pc-windows-msvc\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu\": [],\n        \"//conditions:default\": [\"@platforms//:incompatible\"],\n    }),\n    version = \"1.13.1\",\n)\n"
-            }
-          },
-          "crates__regex-automata-0.4.18": {
-            "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive",
-            "attributes": {
-              "remote_patch_strip": 1,
-              "sha256": "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2",
-              "type": "tar.gz",
-              "urls": [
-                "https://static.crates.io/crates/regex-automata/0.4.18/download"
-              ],
-              "strip_prefix": "regex-automata-0.4.18",
-              "build_file_content": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To \n# regenerate this file, run the following:\n#\n#     bazel mod show_repo 'protobuf'\n###############################################################################\n\nload(\"@rules_rust//cargo:defs.bzl\", \"cargo_toml_env_vars\")\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\n# buildifier: disable=bzl-visibility\nload(\"@rules_rust//crate_universe/private:selects.bzl\", \"selects\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\ncargo_toml_env_vars(\n    name = \"cargo_toml_env_vars\",\n    src = \"Cargo.toml\",\n)\n\nrust_library(\n    name = \"regex_automata\",\n    deps = [\n        \"@crates__aho-corasick-1.1.5//:aho_corasick\",\n        \"@crates__memchr-2.8.3//:memchr\",\n        \"@crates__regex-syntax-0.8.11//:regex_syntax\",\n    ],\n    compile_data = glob(\n        allow_empty = True,\n        include = [\"**\"],\n        exclude = [\n            \"**/* *\",\n            \".tmp_git_root/**/*\",\n            \"BUILD\",\n            \"BUILD.bazel\",\n            \"WORKSPACE\",\n            \"WORKSPACE.bazel\",\n        ],\n    ),\n    crate_features = [\n        \"alloc\",\n        \"dfa-onepass\",\n        \"hybrid\",\n        \"meta\",\n        \"nfa-backtrack\",\n        \"nfa-pikevm\",\n        \"nfa-thompson\",\n        \"perf-inline\",\n        \"perf-literal\",\n        \"perf-literal-multisubstring\",\n        \"perf-literal-substring\",\n        \"std\",\n        \"syntax\",\n        \"unicode\",\n        \"unicode-age\",\n        \"unicode-bool\",\n        \"unicode-case\",\n        \"unicode-gencat\",\n        \"unicode-perl\",\n        \"unicode-script\",\n        \"unicode-segment\",\n        \"unicode-word-boundary\",\n    ],\n    crate_root = \"src/lib.rs\",\n    edition = \"2021\",\n    rustc_env_files = [\n        \":cargo_toml_env_vars\",\n    ],\n    rustc_flags = [\n        \"--cap-lints=allow\",\n    ],\n    srcs = glob(\n        allow_empty = True,\n        include = [\"**/*.rs\"],\n    ),\n    tags = [\n        \"cargo-bazel\",\n        \"crate-name=regex-automata\",\n        \"manual\",\n        \"noclippy\",\n        \"norustfmt\",\n    ],\n    target_compatible_with = select({\n        \"@rules_rust//rust/platform:aarch64-apple-darwin\": [],\n        \"@rules_rust//rust/platform:aarch64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:wasm32-unknown-unknown\": [],\n        \"@rules_rust//rust/platform:wasm32-wasip1\": [],\n        \"@rules_rust//rust/platform:x86_64-pc-windows-msvc\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu\": [],\n        \"//conditions:default\": [\"@platforms//:incompatible\"],\n    }),\n    version = \"0.4.18\",\n)\n"
-            }
-          },
-          "crates__regex-syntax-0.8.11": {
-            "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive",
-            "attributes": {
-              "remote_patch_strip": 1,
-              "sha256": "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4",
-              "type": "tar.gz",
-              "urls": [
-                "https://static.crates.io/crates/regex-syntax/0.8.11/download"
-              ],
-              "strip_prefix": "regex-syntax-0.8.11",
-              "build_file_content": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To \n# regenerate this file, run the following:\n#\n#     bazel mod show_repo 'protobuf'\n###############################################################################\n\nload(\"@rules_rust//cargo:defs.bzl\", \"cargo_toml_env_vars\")\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\n# buildifier: disable=bzl-visibility\nload(\"@rules_rust//crate_universe/private:selects.bzl\", \"selects\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\ncargo_toml_env_vars(\n    name = \"cargo_toml_env_vars\",\n    src = \"Cargo.toml\",\n)\n\nrust_library(\n    name = \"regex_syntax\",\n    compile_data = glob(\n        allow_empty = True,\n        include = [\"**\"],\n        exclude = [\n            \"**/* *\",\n            \".tmp_git_root/**/*\",\n            \"BUILD\",\n            \"BUILD.bazel\",\n            \"WORKSPACE\",\n            \"WORKSPACE.bazel\",\n        ],\n    ),\n    crate_features = [\n        \"default\",\n        \"std\",\n        \"unicode\",\n        \"unicode-age\",\n        \"unicode-bool\",\n        \"unicode-case\",\n        \"unicode-gencat\",\n        \"unicode-perl\",\n        \"unicode-script\",\n        \"unicode-segment\",\n    ],\n    crate_root = \"src/lib.rs\",\n    edition = \"2021\",\n    rustc_env_files = [\n        \":cargo_toml_env_vars\",\n    ],\n    rustc_flags = [\n        \"--cap-lints=allow\",\n    ],\n    srcs = glob(\n        allow_empty = True,\n        include = [\"**/*.rs\"],\n    ),\n    tags = [\n        \"cargo-bazel\",\n        \"crate-name=regex-syntax\",\n        \"manual\",\n        \"noclippy\",\n        \"norustfmt\",\n    ],\n    target_compatible_with = select({\n        \"@rules_rust//rust/platform:aarch64-apple-darwin\": [],\n        \"@rules_rust//rust/platform:aarch64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:wasm32-unknown-unknown\": [],\n        \"@rules_rust//rust/platform:wasm32-wasip1\": [],\n        \"@rules_rust//rust/platform:x86_64-pc-windows-msvc\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu\": [],\n        \"//conditions:default\": [\"@platforms//:incompatible\"],\n    }),\n    version = \"0.8.11\",\n)\n"
-            }
-          },
-          "crates__rustversion-1.0.23": {
-            "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive",
-            "attributes": {
-              "remote_patch_strip": 1,
-              "sha256": "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f",
-              "type": "tar.gz",
-              "urls": [
-                "https://static.crates.io/crates/rustversion/1.0.23/download"
-              ],
-              "strip_prefix": "rustversion-1.0.23",
-              "build_file_content": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To \n# regenerate this file, run the following:\n#\n#     bazel mod show_repo 'protobuf'\n###############################################################################\n\nload(\n    \"@rules_rust//cargo:defs.bzl\",\n    \"cargo_build_script\",\n    \"cargo_toml_env_vars\",\n)\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_proc_macro\")\n\n# buildifier: disable=bzl-visibility\nload(\"@rules_rust//crate_universe/private:selects.bzl\", \"selects\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\ncargo_toml_env_vars(\n    name = \"cargo_toml_env_vars\",\n    src = \"Cargo.toml\",\n)\n\nrust_proc_macro(\n    name = \"rustversion\",\n    deps = [\n        \"@crates__rustversion-1.0.23//:build_script_build\",\n    ],\n    compile_data = glob(\n        allow_empty = True,\n        include = [\"**\"],\n        exclude = [\n            \"**/* *\",\n            \".tmp_git_root/**/*\",\n            \"BUILD\",\n            \"BUILD.bazel\",\n            \"WORKSPACE\",\n            \"WORKSPACE.bazel\",\n        ],\n    ),\n    crate_root = \"src/lib.rs\",\n    edition = \"2018\",\n    rustc_env_files = [\n        \":cargo_toml_env_vars\",\n    ],\n    rustc_flags = [\n        \"--cap-lints=allow\",\n    ],\n    srcs = glob(\n        allow_empty = True,\n        include = [\"**/*.rs\"],\n    ),\n    tags = [\n        \"cargo-bazel\",\n        \"crate-name=rustversion\",\n        \"manual\",\n        \"noclippy\",\n        \"norustfmt\",\n    ],\n    target_compatible_with = select({\n        \"@rules_rust//rust/platform:aarch64-apple-darwin\": [],\n        \"@rules_rust//rust/platform:aarch64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:wasm32-unknown-unknown\": [],\n        \"@rules_rust//rust/platform:wasm32-wasip1\": [],\n        \"@rules_rust//rust/platform:x86_64-pc-windows-msvc\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu\": [],\n        \"//conditions:default\": [\"@platforms//:incompatible\"],\n    }),\n    version = \"1.0.23\",\n)\n\ncargo_build_script(\n    name = \"_bs\",\n    compile_data = glob(\n        allow_empty = True,\n        include = [\"**\"],\n        exclude = [\n            \"**/* *\",\n            \"**/*.rs\",\n            \".tmp_git_root/**/*\",\n            \"BUILD\",\n            \"BUILD.bazel\",\n            \"WORKSPACE\",\n            \"WORKSPACE.bazel\",\n        ],\n    ),\n    crate_name = \"build_script_build\",\n    crate_root = \"build/build.rs\",\n    data = glob(\n        allow_empty = True,\n        include = [\"**\"],\n        exclude = [\n            \"**/* *\",\n            \".tmp_git_root/**/*\",\n            \"BUILD\",\n            \"BUILD.bazel\",\n            \"WORKSPACE\",\n            \"WORKSPACE.bazel\",\n        ],\n    ),\n    edition = \"2018\",\n    pkg_name = \"rustversion\",\n    rustc_env_files = [\n        \":cargo_toml_env_vars\",\n    ],\n    rustc_flags = [\n        \"--cap-lints=allow\",\n    ],\n    srcs = glob(\n        allow_empty = True,\n        include = [\"**/*.rs\"],\n    ),\n    tags = [\n        \"cargo-bazel\",\n        \"crate-name=rustversion\",\n        \"manual\",\n        \"noclippy\",\n        \"norustfmt\",\n    ],\n    version = \"1.0.23\",\n    visibility = [\"//visibility:private\"],\n)\n\nalias(\n    name = \"build_script_build\",\n    actual = \":_bs\",\n    tags = [\"manual\"],\n)\n"
-            }
-          },
-          "crates__syn-2.0.119": {
-            "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive",
-            "attributes": {
-              "remote_patch_strip": 1,
-              "sha256": "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297",
-              "type": "tar.gz",
-              "urls": [
-                "https://static.crates.io/crates/syn/2.0.119/download"
-              ],
-              "strip_prefix": "syn-2.0.119",
-              "build_file_content": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To \n# regenerate this file, run the following:\n#\n#     bazel mod show_repo 'protobuf'\n###############################################################################\n\nload(\"@rules_rust//cargo:defs.bzl\", \"cargo_toml_env_vars\")\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\n# buildifier: disable=bzl-visibility\nload(\"@rules_rust//crate_universe/private:selects.bzl\", \"selects\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\ncargo_toml_env_vars(\n    name = \"cargo_toml_env_vars\",\n    src = \"Cargo.toml\",\n)\n\nrust_library(\n    name = \"syn\",\n    deps = [\n        \"@crates__proc-macro2-1.0.107//:proc_macro2\",\n        \"@crates__quote-1.0.47//:quote\",\n        \"@crates__unicode-ident-1.0.26//:unicode_ident\",\n    ],\n    compile_data = glob(\n        allow_empty = True,\n        include = [\"**\"],\n        exclude = [\n            \"**/* *\",\n            \".tmp_git_root/**/*\",\n            \"BUILD\",\n            \"BUILD.bazel\",\n            \"WORKSPACE\",\n            \"WORKSPACE.bazel\",\n        ],\n    ),\n    crate_features = [\n        \"clone-impls\",\n        \"default\",\n        \"derive\",\n        \"parsing\",\n        \"printing\",\n        \"proc-macro\",\n    ] + select({\n        \"@rules_rust//rust/platform:aarch64-apple-darwin\": [\n            \"extra-traits\",  # aarch64-apple-darwin\n            \"full\",  # aarch64-apple-darwin\n        ],\n        \"@rules_rust//rust/platform:aarch64-unknown-linux-gnu\": [\n            \"extra-traits\",  # aarch64-unknown-linux-gnu\n            \"full\",  # aarch64-unknown-linux-gnu\n        ],\n        \"@rules_rust//rust/platform:x86_64-pc-windows-msvc\": [\n            \"extra-traits\",  # x86_64-pc-windows-msvc\n            \"full\",  # x86_64-pc-windows-msvc\n        ],\n        \"@rules_rust//rust/platform:x86_64-unknown-linux-gnu\": [\n            \"extra-traits\",  # x86_64-unknown-linux-gnu\n            \"full\",  # x86_64-unknown-linux-gnu\n        ],\n        \"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu\": [\n            \"extra-traits\",  # x86_64-unknown-nixos-gnu\n            \"full\",  # x86_64-unknown-nixos-gnu\n        ],\n        \"//conditions:default\": [],\n    }),\n    crate_root = \"src/lib.rs\",\n    edition = \"2021\",\n    rustc_env_files = [\n        \":cargo_toml_env_vars\",\n    ],\n    rustc_flags = [\n        \"--cap-lints=allow\",\n    ],\n    srcs = glob(\n        allow_empty = True,\n        include = [\"**/*.rs\"],\n    ),\n    tags = [\n        \"cargo-bazel\",\n        \"crate-name=syn\",\n        \"manual\",\n        \"noclippy\",\n        \"norustfmt\",\n    ],\n    target_compatible_with = select({\n        \"@rules_rust//rust/platform:aarch64-apple-darwin\": [],\n        \"@rules_rust//rust/platform:aarch64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:wasm32-unknown-unknown\": [],\n        \"@rules_rust//rust/platform:wasm32-wasip1\": [],\n        \"@rules_rust//rust/platform:x86_64-pc-windows-msvc\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu\": [],\n        \"//conditions:default\": [\"@platforms//:incompatible\"],\n    }),\n    version = \"2.0.119\",\n)\n"
-            }
-          },
-          "crates__syn-3.0.6": {
-            "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive",
-            "attributes": {
-              "remote_patch_strip": 1,
-              "sha256": "8593e8e72159ed2257d083c7a454a85cbf854f37a0966d8d483aff8c8a3ebcee",
-              "type": "tar.gz",
-              "urls": [
-                "https://static.crates.io/crates/syn/3.0.6/download"
-              ],
-              "strip_prefix": "syn-3.0.6",
-              "build_file_content": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To \n# regenerate this file, run the following:\n#\n#     bazel mod show_repo 'protobuf'\n###############################################################################\n\nload(\"@rules_rust//cargo:defs.bzl\", \"cargo_toml_env_vars\")\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\n# buildifier: disable=bzl-visibility\nload(\"@rules_rust//crate_universe/private:selects.bzl\", \"selects\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\ncargo_toml_env_vars(\n    name = \"cargo_toml_env_vars\",\n    src = \"Cargo.toml\",\n)\n\nrust_library(\n    name = \"syn\",\n    deps = [\n        \"@crates__proc-macro2-1.0.107//:proc_macro2\",\n        \"@crates__quote-1.0.47//:quote\",\n        \"@crates__unicode-ident-1.0.26//:unicode_ident\",\n    ],\n    compile_data = glob(\n        allow_empty = True,\n        include = [\"**\"],\n        exclude = [\n            \"**/* *\",\n            \".tmp_git_root/**/*\",\n            \"BUILD\",\n            \"BUILD.bazel\",\n            \"WORKSPACE\",\n            \"WORKSPACE.bazel\",\n        ],\n    ),\n    crate_features = [\n        \"clone-impls\",\n        \"default\",\n        \"derive\",\n        \"parsing\",\n        \"printing\",\n        \"proc-macro\",\n    ],\n    crate_root = \"src/lib.rs\",\n    edition = \"2021\",\n    rustc_env_files = [\n        \":cargo_toml_env_vars\",\n    ],\n    rustc_flags = [\n        \"--cap-lints=allow\",\n    ],\n    srcs = glob(\n        allow_empty = True,\n        include = [\"**/*.rs\"],\n    ),\n    tags = [\n        \"cargo-bazel\",\n        \"crate-name=syn\",\n        \"manual\",\n        \"noclippy\",\n        \"norustfmt\",\n    ],\n    target_compatible_with = select({\n        \"@rules_rust//rust/platform:aarch64-apple-darwin\": [],\n        \"@rules_rust//rust/platform:aarch64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:wasm32-unknown-unknown\": [],\n        \"@rules_rust//rust/platform:wasm32-wasip1\": [],\n        \"@rules_rust//rust/platform:x86_64-pc-windows-msvc\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu\": [],\n        \"//conditions:default\": [\"@platforms//:incompatible\"],\n    }),\n    version = \"3.0.6\",\n)\n"
-            }
-          },
-          "crates__unicode-ident-1.0.26": {
-            "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive",
-            "attributes": {
-              "remote_patch_strip": 1,
-              "sha256": "d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954",
-              "type": "tar.gz",
-              "urls": [
-                "https://static.crates.io/crates/unicode-ident/1.0.26/download"
-              ],
-              "strip_prefix": "unicode-ident-1.0.26",
-              "build_file_content": "###############################################################################\n# @generated\n# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To \n# regenerate this file, run the following:\n#\n#     bazel mod show_repo 'protobuf'\n###############################################################################\n\nload(\"@rules_rust//cargo:defs.bzl\", \"cargo_toml_env_vars\")\n\nload(\"@rules_rust//rust:defs.bzl\", \"rust_library\")\n\n# buildifier: disable=bzl-visibility\nload(\"@rules_rust//crate_universe/private:selects.bzl\", \"selects\")\n\npackage(default_visibility = [\"//visibility:public\"])\n\ncargo_toml_env_vars(\n    name = \"cargo_toml_env_vars\",\n    src = \"Cargo.toml\",\n)\n\nrust_library(\n    name = \"unicode_ident\",\n    compile_data = glob(\n        allow_empty = True,\n        include = [\"**\"],\n        exclude = [\n            \"**/* *\",\n            \".tmp_git_root/**/*\",\n            \"BUILD\",\n            \"BUILD.bazel\",\n            \"WORKSPACE\",\n            \"WORKSPACE.bazel\",\n        ],\n    ),\n    crate_root = \"src/lib.rs\",\n    edition = \"2021\",\n    rustc_env_files = [\n        \":cargo_toml_env_vars\",\n    ],\n    rustc_flags = [\n        \"--cap-lints=allow\",\n    ],\n    srcs = glob(\n        allow_empty = True,\n        include = [\"**/*.rs\"],\n    ),\n    tags = [\n        \"cargo-bazel\",\n        \"crate-name=unicode-ident\",\n        \"manual\",\n        \"noclippy\",\n        \"norustfmt\",\n    ],\n    target_compatible_with = select({\n        \"@rules_rust//rust/platform:aarch64-apple-darwin\": [],\n        \"@rules_rust//rust/platform:aarch64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:wasm32-unknown-unknown\": [],\n        \"@rules_rust//rust/platform:wasm32-wasip1\": [],\n        \"@rules_rust//rust/platform:x86_64-pc-windows-msvc\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-linux-gnu\": [],\n        \"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu\": [],\n        \"//conditions:default\": [\"@platforms//:incompatible\"],\n    }),\n    version = \"1.0.26\",\n)\n"
-            }
-          }
-        }
-      }
-    },
-    "@@rules_rust+//crate_universe/private:internal_extensions.bzl%cu_nr": {
-      "general": {
-        "bzlTransitiveDigest": "1HzZEEx7jfZ/0qVRcLy/gGqX5dP/CDJjvkQx8gq6E8E=",
-        "usagesDigest": "tG3p3Nb5XxC7vWY/bcKdb//g0HoAxpxxH3F5/jBVlk4=",
-        "recordedInputs": [
-          "REPO_MAPPING:bazel_features+,bazel_features_globals bazel_features++version_extension+bazel_features_globals",
-          "REPO_MAPPING:bazel_features+,bazel_features_version bazel_features++version_extension+bazel_features_version",
-          "REPO_MAPPING:rules_cc+,bazel_skylib bazel_skylib+",
-          "REPO_MAPPING:rules_cc+,bazel_tools bazel_tools",
-          "REPO_MAPPING:rules_cc+,cc_compatibility_proxy rules_cc++compatibility_proxy+cc_compatibility_proxy",
-          "REPO_MAPPING:rules_cc+,platforms platforms",
-          "REPO_MAPPING:rules_cc+,rules_cc rules_cc+",
-          "REPO_MAPPING:rules_cc++compatibility_proxy+cc_compatibility_proxy,rules_cc rules_cc+",
-          "REPO_MAPPING:rules_rust+,bazel_features bazel_features+",
-          "REPO_MAPPING:rules_rust+,bazel_skylib bazel_skylib+",
-          "REPO_MAPPING:rules_rust+,bazel_tools bazel_tools",
-          "REPO_MAPPING:rules_rust+,cui rules_rust++cu+cui",
-          "REPO_MAPPING:rules_rust+,rrc rules_rust++i2+rrc",
-          "REPO_MAPPING:rules_rust+,rules_cc rules_cc+",
-          "REPO_MAPPING:rules_rust+,rules_rust rules_rust+"
-        ],
-        "generatedRepoSpecs": {
-          "cargo_bazel_bootstrap": {
-            "repoRuleId": "@@rules_rust+//cargo/private:cargo_bootstrap.bzl%cargo_bootstrap_repository",
-            "attributes": {
-              "srcs": [
-                "@@rules_rust+//crate_universe:src/api.rs",
-                "@@rules_rust+//crate_universe:src/api/lockfile.rs",
-                "@@rules_rust+//crate_universe:src/cli.rs",
-                "@@rules_rust+//crate_universe:src/cli/generate.rs",
-                "@@rules_rust+//crate_universe:src/cli/query.rs",
-                "@@rules_rust+//crate_universe:src/cli/render.rs",
-                "@@rules_rust+//crate_universe:src/cli/splice.rs",
-                "@@rules_rust+//crate_universe:src/cli/vendor.rs",
-                "@@rules_rust+//crate_universe:src/config.rs",
-                "@@rules_rust+//crate_universe:src/context.rs",
-                "@@rules_rust+//crate_universe:src/context/crate_context.rs",
-                "@@rules_rust+//crate_universe:src/context/platforms.rs",
-                "@@rules_rust+//crate_universe:src/lib.rs",
-                "@@rules_rust+//crate_universe:src/lockfile.rs",
-                "@@rules_rust+//crate_universe:src/main.rs",
-                "@@rules_rust+//crate_universe:src/metadata.rs",
-                "@@rules_rust+//crate_universe:src/metadata/cargo_bin.rs",
-                "@@rules_rust+//crate_universe:src/metadata/cargo_tree_resolver.rs",
-                "@@rules_rust+//crate_universe:src/metadata/cargo_tree_rustc_wrapper.bat",
-                "@@rules_rust+//crate_universe:src/metadata/cargo_tree_rustc_wrapper.sh",
-                "@@rules_rust+//crate_universe:src/metadata/dependency.rs",
-                "@@rules_rust+//crate_universe:src/metadata/metadata_annotation.rs",
-                "@@rules_rust+//crate_universe:src/rendering.rs",
-                "@@rules_rust+//crate_universe:src/rendering/template_engine.rs",
-                "@@rules_rust+//crate_universe:src/rendering/templates/module_bzl.j2",
-                "@@rules_rust+//crate_universe:src/rendering/templates/partials/header.j2",
-                "@@rules_rust+//crate_universe:src/rendering/templates/partials/module/aliases_map.j2",
-                "@@rules_rust+//crate_universe:src/rendering/templates/partials/module/deps_map.j2",
-                "@@rules_rust+//crate_universe:src/rendering/templates/partials/module/repo_git.j2",
-                "@@rules_rust+//crate_universe:src/rendering/templates/partials/module/repo_http.j2",
-                "@@rules_rust+//crate_universe:src/rendering/templates/vendor_module.j2",
-                "@@rules_rust+//crate_universe:src/rendering/verbatim/alias_rules.bzl",
-                "@@rules_rust+//crate_universe:src/select.rs",
-                "@@rules_rust+//crate_universe:src/splicing.rs",
-                "@@rules_rust+//crate_universe:src/splicing/cargo_config.rs",
-                "@@rules_rust+//crate_universe:src/splicing/crate_index_lookup.rs",
-                "@@rules_rust+//crate_universe:src/splicing/splicer.rs",
-                "@@rules_rust+//crate_universe:src/test.rs",
-                "@@rules_rust+//crate_universe:src/utils.rs",
-                "@@rules_rust+//crate_universe:src/utils/starlark.rs",
-                "@@rules_rust+//crate_universe:src/utils/starlark/glob.rs",
-                "@@rules_rust+//crate_universe:src/utils/starlark/label.rs",
-                "@@rules_rust+//crate_universe:src/utils/starlark/select.rs",
-                "@@rules_rust+//crate_universe:src/utils/starlark/select_dict.rs",
-                "@@rules_rust+//crate_universe:src/utils/starlark/select_list.rs",
-                "@@rules_rust+//crate_universe:src/utils/starlark/select_scalar.rs",
-                "@@rules_rust+//crate_universe:src/utils/starlark/select_set.rs",
-                "@@rules_rust+//crate_universe:src/utils/starlark/serialize.rs",
-                "@@rules_rust+//crate_universe:src/utils/starlark/target_compatible_with.rs",
-                "@@rules_rust+//crate_universe:src/utils/symlink.rs",
-                "@@rules_rust+//crate_universe:src/utils/target_triple.rs"
-              ],
-              "binary": "cargo-bazel",
-              "cargo_lockfile": "@@rules_rust+//crate_universe:Cargo.lock",
-              "cargo_toml": "@@rules_rust+//crate_universe:Cargo.toml",
-              "version": "1.93.1",
-              "timeout": 900,
-              "rust_toolchain_cargo_template": "@rust_host_tools//:bin/{tool}",
-              "rust_toolchain_rustc_template": "@rust_host_tools//:bin/{tool}",
-              "compressed_windows_toolchain_names": false
-            }
-          }
-        },
-        "moduleExtensionMetadata": {
-          "explicitRootModuleDirectDeps": [
-            "cargo_bazel_bootstrap"
-          ],
-          "explicitRootModuleDirectDevDeps": [],
-          "useAllRepos": "NO",
-          "reproducible": false
-        }
-      }
-    },
     "@@yq.bzl+//yq:extensions.bzl%yq": {
       "general": {
         "bzlTransitiveDigest": "tDqk+ntWTdxNAWPDjRY1uITgHbti2jcXR5ZdinltBs0=",
-        "usagesDigest": "NIQYQMSfARSdjxNGSnaPYh6knbzGsd2JC2LKznNE208=",
+        "usagesDigest": "6yAP6zSP7pd5U9jgZmk33qt7N31PoxBjbSvMK/J/0aE=",
         "recordedInputs": [],
         "generatedRepoSpecs": {
           "yq_darwin_amd64": {
@@ -906,8 +477,12 @@
     }
   },
   "facts": {
+    "@@aspect_rules_js+//npm:extensions.bzl%pnpm": {
+      "12.13.0": "sha512-HlVxm/JugJ3OXFCE/euqZO+z2pA4rl1oqfimgxHxpFhByMO3ajcpjDtm9rzIBAmpt/M8eKcWij6Q+2Wl2CNa5A==",
+      "exe:12.13.0": "{\"darwin-arm64\":\"sha512-9rRpaMGxxrv5YbptsRTIeG+q2IzQyrkRKXkD30pb7weCC6Xz6vQzfkItzrUZsb2bXyYd7fSsq+luTsreXBQYyQ==\",\"darwin-x64\":\"sha512-A+VFQakozmXIo8kxtcP9sZCKIi94f9uB5jLXRvwnNSA5G6/G6Iq/8E17+fIPf4bm7xvR+qeM794Nz98Q52lutQ==\",\"linux-arm64\":\"sha512-jp29ia+fTNhheXzt4FRUw5CwFW9caPNEdLRuy7/Dlbv3sj+iHldfJXfCojkPE4g71NPVwMpY5Eoc7nkfWexqrA==\",\"linux-arm64-musl\":\"sha512-yZfm/7h1Kdd1XTNf9+F2Gt5R4WuQKMRbkMIpbzCtxpzniPEKGo/2kymNxdHq3jIcfnzHnP+KBR/YONZ+4Icq+g==\",\"linux-x64\":\"sha512-t4EYUFG4SPYaJJVQToWIPq/lLBquCPCxMtt9vV//HirSDl332dnxDnwgvdW29sqLg3Ob2x7zFQ69HZLyoCyfpQ==\",\"linux-x64-musl\":\"sha512-LSD/snRsouEGA52HrTfEbGrCGdkkr5gXfQym26Ogu3I7sc5dJHUHyp8GnA7ewXrFOSRCJXH25mnmQ6Jpit572Q==\",\"win32-arm64\":\"sha512-aDzzll9stgP+p6KKYHNzuShZhBCaxabv481xK5BjfvSnyFbjzu7ksKUIVlsiAw4xAXnrIqvEj0lQarsbBRcIQA==\",\"win32-x64\":\"sha512-Nkw4hDJTcmuO6zDjkTo4Dz7pG2ojEifSBGC4QbFJFIfBoRbN88GIMu/Lm1woxd7ONhJFlfJ+dJeiDyuP0NKtSA==\"}"
+    },
     "@@aspect_tools_telemetry+//:extension.bzl%telemetry": {
-      "notice_version": "2"
+      "notice_version": "3"
     },
     "@@rules_go+//go:extensions.bzl%go_sdk": {
       "1.22.4": {
@@ -1235,6 +810,50 @@
         ]
       }
     },
+    "@@rules_nodejs+//nodejs:extensions.bzl%node": {
+      "26.13.0": {
+        "26.13.0-darwin_amd64": [
+          "node-v26.13.0-darwin-x64.tar.gz",
+          "node-v26.13.0-darwin-x64",
+          "525c9b29bb0263d687de60a4cec0e2a6db876a8eb032369e5795eca71e7c358e"
+        ],
+        "26.13.0-darwin_arm64": [
+          "node-v26.13.0-darwin-arm64.tar.gz",
+          "node-v26.13.0-darwin-arm64",
+          "d38bd5e5a2ddce6bbb5ce45e46e208337da4d51fffe611e567fd32073d6439f6"
+        ],
+        "26.13.0-linux_amd64": [
+          "node-v26.13.0-linux-x64.tar.xz",
+          "node-v26.13.0-linux-x64",
+          "d28a96af6c38596f6d9d97c0ee531c13d238d757742387d1928de822d959e997"
+        ],
+        "26.13.0-linux_arm64": [
+          "node-v26.13.0-linux-arm64.tar.xz",
+          "node-v26.13.0-linux-arm64",
+          "406fe3fbde1c054adff8b297c16fdb5af6659db327c1ac8acd46b56ef1af9a92"
+        ],
+        "26.13.0-linux_ppc64le": [
+          "node-v26.13.0-linux-ppc64le.tar.xz",
+          "node-v26.13.0-linux-ppc64le",
+          "1cf7c718f58471d14f699c9c39cf05d97f43c2e0a2f28e660fa6e36557f8ed6c"
+        ],
+        "26.13.0-linux_s390x": [
+          "node-v26.13.0-linux-s390x.tar.xz",
+          "node-v26.13.0-linux-s390x",
+          "1412eac54e27a6a888de8850cec5d238ed862baff82ec377601a0c3849cd6251"
+        ],
+        "26.13.0-windows_amd64": [
+          "node-v26.13.0-win-x64.zip",
+          "node-v26.13.0-win-x64",
+          "dcc60d59a0746999f99064a01c020445d54d84228c691cdbf25b49ac3b59150a"
+        ],
+        "26.13.0-windows_arm64": [
+          "node-v26.13.0-win-arm64.zip",
+          "node-v26.13.0-win-arm64",
+          "a9427139595156ef484e1fb08957676e09d4232368dd1743a2a9f93f3d241b14"
+        ]
+      }
+    },
     "@@rules_python+//python/extensions:pip.bzl%pip": {
       "dist_hashes": {
         "https://pypi.org/simple": {
@@ -1243,253 +862,332 @@
             "https://files.pythonhosted.org/packages/b9/fa/123043af240e49752f1c4bd24da5053b6bd00cad78c2be53c0d1e8b975bc/backports.tarfile-1.2.0-py3-none-any.whl": "sha256:77e284d754527b01fb1e6fa8a1afe577858ebe4e9dad8919e34c862cb399bc34"
           },
           "certifi": {
-            "https://files.pythonhosted.org/packages/0b/a7/71ac2cff56fec219ed242bb11b8efb69fcc4bec75db06fb7bfe35de520e6/certifi-2026.7.22-py3-none-any.whl": "sha256:62f22742b58a1a33014a2b6b706588a8d7e2a88ae7bd1a6ebe8c992928483775",
-            "https://files.pythonhosted.org/packages/a3/c2/24167ea9858356b47a87a50d39908bfdb72ceeefe0041586e704e5376b3a/certifi-2026.7.22.tar.gz": "sha256:741e2c3b351ddf169a738da9f2c048608ff7f2c5cc02f1ebc6b118bb090d5d55"
+            "https://files.pythonhosted.org/packages/a6/bd/1436c50cc46699de0230fbaacc1d1de7bfec413176099949e9d5112e88f2/certifi-2026.10.19.tar.gz": "sha256:035c1e85572b141bf1c3a3eff0e33a8eb74917522f2559075ff8d2fea780a1ae",
+            "https://files.pythonhosted.org/packages/c4/51/29046e48f693c54e5b7412216d447a1d8362c9653148d98c02cdf65fa733/certifi-2026.10.19-py3-none-any.whl": "sha256:42d35340cc5b9ba78e818ddbff0c5b1c2b779de448a340fd1b989f5fa8670e1b"
           },
           "cffi": {
-            "https://files.pythonhosted.org/packages/04/8c/b925975448cf20634a9fbd5efceb807219db452653648d2897c0989cab2d/cffi-2.1.0-cp311-cp311-musllinux_1_2_x86_64.whl": "sha256:89095c1968b4ba8285840e131bf2891b09ae137fe2146905acae0354fbce1b5e",
-            "https://files.pythonhosted.org/packages/05/ef/6cd4f8c671517162379dc79cfae5aea9106bc38abb89628d5c16adf6a838/cffi-2.1.0-cp315-cp315-win_arm64.whl": "sha256:8d35c139744adb3e727cd51b1a18324bbe44b8bd41bf8322bca4d41289f48eda",
-            "https://files.pythonhosted.org/packages/0f/6f/ade5ce9863a57992a6ea3d0d10d7e29b8749fc127204b3d493d667b2815f/cffi-2.1.0-cp314-cp314-win32.whl": "sha256:1854b724d00f6654c742097d5387569021be12d3a0f770eae1df8f8acfcc6acd",
-            "https://files.pythonhosted.org/packages/11/b6/12fc55092817a5faa26fb8c40c7f9d662e11a46ee248c137aafc42517d92/cffi-2.1.0-cp315-cp315t-macosx_10_15_x86_64.whl": "sha256:f9912624a0c0b834b7520d7769b3644453aabc0a7e1c839da7359f050750e9bc",
-            "https://files.pythonhosted.org/packages/14/d0/117dcd9209255ad8571fbc8c92ef32593a1d294dcec91ddc4e4db50606f2/cffi-2.1.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl": "sha256:eb4e8997a49aa2c08a3e43c9045d224448b8941d88e7ac163c7d383e560cbf98",
-            "https://files.pythonhosted.org/packages/14/f0/134c00ce0779ec86dea2aa1aac69339c2741a8045072676763512363a2ea/cffi-2.1.0-cp314-cp314t-macosx_10_15_x86_64.whl": "sha256:7ea6b3e2c4250ff1de21c630fe72d0f63eb95c2c32ffbf64a358cf4a8836d714",
-            "https://files.pythonhosted.org/packages/19/e5/d3cc82a4a0be7902af279c04181ad038449c096734464a5ae1de3e1401bd/cffi-2.1.0-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl": "sha256:0611e7ebf90573a535ebdc33ae9da222d037853983e13359f580fab781ca017f",
-            "https://files.pythonhosted.org/packages/1b/dc/5620cf930688be01f2d673804291de757a934c90b946dbdc3d84130c2ea4/cffi-2.1.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl": "sha256:b6422532152adf4e59b110cb2808cee7a033800952f5c036b4af047ee43199e7",
-            "https://files.pythonhosted.org/packages/1e/85/990925db5df586ec90beb97529c853497e7f85ba0234830447faf41c3057/cffi-2.1.0-cp312-cp312-macosx_10_15_x86_64.whl": "sha256:df2b82571a1b30f58a87bf4e5a9e78d2b1eff6c6ce8fd3aa3757221f93f0863f",
-            "https://files.pythonhosted.org/packages/20/71/7c8372d30e42415602ed9f268f7cfd66f1b855fed881ecd168bcb45dbc0b/cffi-2.1.0-cp314-cp314-macosx_10_15_x86_64.whl": "sha256:1ff3456eab0d889592d1936d6125bbfbc7ae4d3354a700f8bd80450a66445d4d",
-            "https://files.pythonhosted.org/packages/22/d7/1a74539db16d8bfd839ff1515948948efbb162e574650fd3d846896eea95/cffi-2.1.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl": "sha256:88023dfe18799507b73f1dbb0d14326a17465de1bc9c9c7655c22845e9ddc3a2",
-            "https://files.pythonhosted.org/packages/22/f0/a2fc43084c0433caf7f461bccc013e28f848d04ee1c5ed7fce71423cf4d9/cffi-2.1.0-cp311-cp311-musllinux_1_2_i686.whl": "sha256:7762faa47e8ff7eb80bd261d9a7d8eea2d8baa69de5e95b70c1f338bbe712f02",
-            "https://files.pythonhosted.org/packages/28/3b/fad54de07260b93ddeef4b96d0131d57ea900675df1d410ae1deee52d7a6/cffi-2.1.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.whl": "sha256:33eb1ad83ebe8f313e0df035c406227d55a79456704a863fad9842136af5ad7d",
-            "https://files.pythonhosted.org/packages/28/ed/c127d3ac36e899c965e3361357c3befacd6578c03f40125183e41c3b219e/cffi-2.1.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.whl": "sha256:6ca4919c6e4f89aa99c42510b42cf54596892c00b3f9077f6bdd1505e24b9c8d",
-            "https://files.pythonhosted.org/packages/2c/0e/fac738d73728c6cea2a88a2883dca54892496cbba88a1dc1f2909cb8a6f5/cffi-2.1.0-cp315-cp315-manylinux2014_s390x.manylinux_2_17_s390x.whl": "sha256:2b71d409cccee78310ab5dec549aed052aaea483346e282c7b02362596e01bb0",
-            "https://files.pythonhosted.org/packages/2c/d8/772b8259bf75749adffb1c546828978381fb516f60cf701f6c83daf60c85/cffi-2.1.0-cp315-cp315-win32.whl": "sha256:0a42c688d19fca6e095a53c6a6e2295a5b050a8b289f109adab02a9e61a25de6",
-            "https://files.pythonhosted.org/packages/2e/1a/cc6ae6c2913a03aab8898eee57963cf1035b8df5872ed8b9115fcc7e2be8/cffi-2.1.0-cp314-cp314-win_arm64.whl": "sha256:7d28dff1db6764108bc30788d85d61c876beff416d9a49cb9dd7c5a9f34f5804",
-            "https://files.pythonhosted.org/packages/2e/d2/065fcae1c73979fac8e054462478d0ff8a29c40cdc2ed7ea5676a061df53/cffi-2.1.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl": "sha256:276f20fffd7b396e12516ba8edf9509210ac248cbbc5acbc39cd512f9f59ebe6",
-            "https://files.pythonhosted.org/packages/2f/dd/afa2191fc6d57fedd26e5844a2fe2fcc0bbfa00961bbaa5a41e4921e7cca/cffi-2.1.0-cp315-cp315-win_amd64.whl": "sha256:bccbbb5ee76a61f9d99b5bf3846a51d7fca4b6a732fe46f89295610edaf41853",
-            "https://files.pythonhosted.org/packages/38/37/04f54b8e63a02f3d908332c9effbf8c366167c6f733ed8a3d4f79b7e2a1e/cffi-2.1.0-cp313-cp313-musllinux_1_2_aarch64.whl": "sha256:961be50688f7fba2fa65f63712d3b9b341a22311f5253460ce933f52f0de1c8c",
-            "https://files.pythonhosted.org/packages/38/66/04781a77b411f0bb5b234d62c1814754ab75ebe455ccff1b08e8d7aae98f/cffi-2.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl": "sha256:4d433a51f1870e43a13b6732f92aaf540ff77c2015097c78556f75a2d6c030e0",
-            "https://files.pythonhosted.org/packages/3a/a6/e879bb68cc23a2bc9ba8f4b7d8019f0c2694bad2ab6c4a3701d429439f58/cffi-2.1.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl": "sha256:ff067a8d8d880e7809e4ac88eb009bb848870115317b306666502ccad30b147f",
-            "https://files.pythonhosted.org/packages/3b/30/c806937ed5e4c2c7ac30d9d6b76b5dc57ff8b75d83800d9bb11a8253cf2a/cffi-2.1.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl": "sha256:a016194dbe13d14ee9556e734b772d8d67b947092b268d757fd4290e3ba2dfc2",
-            "https://files.pythonhosted.org/packages/41/aa/3c1409cdd26094efacd1c36c66e0a6eb9d4296e4fd4f9901b8b2042f4323/cffi-2.1.0-cp310-cp310-musllinux_1_2_i686.whl": "sha256:c5f5df567f6eb216de69be06ce55c8b714090fae02b18a3b40da8163b8c5fa9c",
-            "https://files.pythonhosted.org/packages/41/de/92b9eeed4ae4a21d6fd9b2a2c8505cbed573299902ea73981cc13f7ff62c/cffi-2.1.0-cp314-cp314-win_amd64.whl": "sha256:1b96bfe2c4bd825681b7d311ad6d9b7280a091f43e8f63da5729638083cd3bfb",
-            "https://files.pythonhosted.org/packages/45/ca/f91641185cdd90c36d317a9dc7f85e88ef8682d8b300977baff5e23c35d8/cffi-2.1.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.whl": "sha256:19c54ac121cad98450b4896fa9a43ee0180d57bc4bc911a33db6cab1efab6cd3",
-            "https://files.pythonhosted.org/packages/4b/92/e7bb136ad6b5352603732cf907ef862ca103f20f2031c1735a46300c20c9/cffi-2.1.0-cp312-cp312-macosx_11_0_arm64.whl": "sha256:78474632761faa0fb96f30b1c928c84ebcf68713cbb80d15bab09dfe61640fde",
-            "https://files.pythonhosted.org/packages/4b/a4/77b53abbf7a1e0beb9637edbef2a94d15f9c822f591e85d439ffd91519a6/cffi-2.1.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl": "sha256:46b1c8db8f6122420f32d02fffb924c2fe9bc772d228c7c711748fff56aabb2b",
-            "https://files.pythonhosted.org/packages/50/d8/3b86aba791cb610d24e8a3e1b2cd529e71fa15096b04e4d4e360049d4a4c/cffi-2.1.0-cp314-cp314t-macosx_11_0_arm64.whl": "sha256:6af371f3767faeffc6ac1ef57cdfd25844403e9d3f476c5537caee499de96376",
-            "https://files.pythonhosted.org/packages/55/c7/8c8c50cb11c6750051daf12164098a9a6f027ac4356967fd4d800a07f242/cffi-2.1.0-cp315-cp315-ios_13_0_arm64_iphoneos.whl": "sha256:2e9dabb9abcb7ad15938c7196ad5c1718a4e6d33cc79b4c0209bdb64c4a54a5c",
-            "https://files.pythonhosted.org/packages/57/5f/ff100cae70ebe9d8df1c01a00e510e45d9adb5c1fdda84791b199141de97/cffi-2.1.0.tar.gz": "sha256:efc1cdd798b1aaf39b4610bba7aad28c9bea9b910f25c784ccf9ec1fa719d1f9",
-            "https://files.pythonhosted.org/packages/58/0c/f528df19cc94b675087324d4760d9e6d5bfae97d6217aa4fac43de4f5fcc/cffi-2.1.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.whl": "sha256:d9fafc5aa2e2a39aaf7f8cc0c1f044a9b07fca12e558dca53a3cc5c654ad67a7",
-            "https://files.pythonhosted.org/packages/58/85/7ae00d5c8dd6266f4e944c3db630f3c5c9a98b61d469c714d848b1d8138a/cffi-2.1.0-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl": "sha256:a95b05f9baf29b91171b3a8bd2020b028835243e7b0ff6bb23e2a3c228518b1b",
-            "https://files.pythonhosted.org/packages/5a/02/d5e6c43ea85c41bda2a184a3418f195fe7cf602967a8d2b94e085b83deef/cffi-2.1.0-cp315-cp315-musllinux_1_2_x86_64.whl": "sha256:af5e2915d41fe6c961694d7bfdc8562942638200f3ce2765dfb8b745cf997629",
-            "https://files.pythonhosted.org/packages/5a/47/59eb7975cb0e4ef0afa764ea945b29a5bb4537a9f771cb7d6c8a5dd74c95/cffi-2.1.0-cp313-cp313-win_amd64.whl": "sha256:8e74a6135550c4748af665b1b1118b6aab33b1fc6a16f9aff630af107c3b4512",
-            "https://files.pythonhosted.org/packages/5a/67/9e6e09409336d9e515c58367e7cfcf4f89df06ad25252675595a58eb59d5/cffi-2.1.0-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.whl": "sha256:762f99479dcb369f60ab9017ad4ab97a36a1dd7c1ee5a3b15db0f4b8659120cd",
-            "https://files.pythonhosted.org/packages/5a/af/34fee85c48f8d94efc8597bc09470c9dd274c145f1c12e0fbc6ab6d38d74/cffi-2.1.0-cp313-cp313-win_arm64.whl": "sha256:2282cd5e38aa8accd03e99d1256af8411c84cdbee6a89d841b563fdbd1f3e50f",
-            "https://files.pythonhosted.org/packages/5d/7c/b7379a5704c79eda57ce075869ba70a0368d1c850f803b3c0d078d39dcaf/cffi-2.1.0-cp315-cp315-musllinux_1_2_aarch64.whl": "sha256:8f9ec95b8a043d3dfbc74d9abc6f7baf524dd27a8dc160b0a32ff9cdab650c28",
-            "https://files.pythonhosted.org/packages/62/f2/c9522a81c32132799a1972c39f5c5f8b4c8b9f00488a23feaa6c06f07741/cffi-2.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl": "sha256:1e9f50d192a3e525b15a75ab5114e442d83d657b7ec29182a991bc9a88fd3a66",
-            "https://files.pythonhosted.org/packages/65/68/9f3ef890cf3c6ab97bd531c5677f67613d302165d16f8142b2811782a614/cffi-2.1.0-cp311-cp311-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl": "sha256:30b65779d598c370374fefabf138d456fd6f3216bfa7bedfab1ba82025b0cd93",
-            "https://files.pythonhosted.org/packages/68/5a/e536c528bc8057496c360c0978559a2dc45653f89dd6151078aa7d8fca1a/cffi-2.1.0-cp315-cp315t-win32.whl": "sha256:cb96698e3c7413d906ce83f8ffd245ec1bd94707541f299d0ce4d6b0193e982b",
-            "https://files.pythonhosted.org/packages/69/aa/24580a278de21fd7322635556334d9b535f1cbc00b0a3919447cdf464c65/cffi-2.1.0-cp310-cp310-macosx_11_0_arm64.whl": "sha256:164bff1657b2a74f0b6d54e11c9b375bc97b931f2ca9c43fcf875838da1570dd",
-            "https://files.pythonhosted.org/packages/6c/d0/47e338384ab6b1004241002fa616301020cea4fc95f283506565d252f276/cffi-2.1.0-cp314-cp314t-musllinux_1_2_aarch64.whl": "sha256:c16914df9fb7f500e440e6875fa23ff5e0b31db01fa9c06af98d59a91f0dc2e4",
-            "https://files.pythonhosted.org/packages/6e/28/bd53988b9833e8f8ad539d26f4c07a6b3f6bcb1e9e02e7ca038250b3428d/cffi-2.1.0-cp312-cp312-musllinux_1_2_aarch64.whl": "sha256:98fff996e983a36d3aa2eca83af40c5821202e7e6f32d13ae94e3d2286f10cfe",
-            "https://files.pythonhosted.org/packages/6f/08/f2e7d62c460faae0926f2d6e423694aa409ced3bc1fe2927a0a6e5f05416/cffi-2.1.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl": "sha256:799416bae98336e400981ff6e532d67d5c709cfb30afb79865a1315f94b0e224",
-            "https://files.pythonhosted.org/packages/70/25/65bd5b58ea4bfdfc15cde02cb5365f89ef8ab8b2adfb8fe5c4bd4233382f/cffi-2.1.0-cp314-cp314t-musllinux_1_2_x86_64.whl": "sha256:5ecbd0499275d57506d397eebe1981cee87b47fcd9ef5c22cab7ed7644a39a94",
-            "https://files.pythonhosted.org/packages/70/b6/9003c33a3e7d2c1306f5962e646457dcfe5a8cd8fce6bbe02d7af25db783/cffi-2.1.0-cp310-cp310-win32.whl": "sha256:9d72af0cf10a76a600a9690078fe31c63b9588c8e86bf9fd353f713c84b5db0f",
-            "https://files.pythonhosted.org/packages/79/99/0d0fd37f055224085f42bbb2c022d002e17dde4a97972822327b07d84101/cffi-2.1.0-cp312-cp312-musllinux_1_2_x86_64.whl": "sha256:379de10ce1ba048b1448599d1b37b24caee16309d1ac98d3982fc997f768700b",
-            "https://files.pythonhosted.org/packages/7d/95/8de304305cd9204974b0ca051b86d307cafca13aa575a0ef1b44d92c0d8c/cffi-2.1.0-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl": "sha256:702c436735fbe99d59ada02a1f65cfc0d31c0ee8b7290912f8fbc5cd1e4b16c3",
-            "https://files.pythonhosted.org/packages/84/4c/82f132cb4418ee6d953d982b19191e87e2a6372c8a4ce36e50b69d6ade4a/cffi-2.1.0-cp313-cp313-macosx_11_0_arm64.whl": "sha256:716ff8ec22f20b4d988b12884086bcef0fc99737043e503f7a3935a6be99b1ea",
-            "https://files.pythonhosted.org/packages/88/a9/02cae418ec4beb282ace11958d9d4737793439d561fadc7e6d56f2e2b354/cffi-2.1.0-cp310-cp310-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl": "sha256:c941bb58d5a6e1c3892d86e42927ed6c180302f07e6d395d08c416e594b98b46",
-            "https://files.pythonhosted.org/packages/88/f6/01890cfd63c08f8eb96a8319b0443690197d240a8bd6346048cf7bde9190/cffi-2.1.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl": "sha256:3b926723c13eba9f81d2ef3820d63aeceec3b2d4639906047bf675cb8a7a500d",
-            "https://files.pythonhosted.org/packages/8a/26/710688310447531c7a22f857c7f79d9855ec18b03e04494ced723fb37e2f/cffi-2.1.0-cp310-cp310-win_amd64.whl": "sha256:fb62edb5bb52cca65fab91a63afa7561607120d26090a7e8fda6fb9f064726da",
-            "https://files.pythonhosted.org/packages/8b/31/e115c985105dd7ffb32444505f18ceb874bb42d992af05d5dced7ecf1980/cffi-2.1.0-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl": "sha256:3681e031db29958a7502f5c0c9d6bbc4c36cb20f7b104086fa642d1799631ff8",
-            "https://files.pythonhosted.org/packages/8c/e9/45c3a76ad8d43ad9261f4c95436da61128d3ca545d72b9612c0ab5be0b1c/cffi-2.1.0-cp313-cp313-macosx_10_15_x86_64.whl": "sha256:15faec4adfff450819f3aee0e2e02c812de6edb88203aa58807955db2003472a",
-            "https://files.pythonhosted.org/packages/8d/2e/cdac88979f295fde5daa69622c7d2111e56e7ceb94f211357fbe452339e4/cffi-2.1.0-cp315-cp315t-macosx_11_0_arm64.whl": "sha256:df92f2aba50eb4d96718b68ef76f2e57a57b54f2fa62333496d16c6d585a85ca",
-            "https://files.pythonhosted.org/packages/96/88/a996879e2eeccb815f6e3a5967b12a308257412acec882039d386bd2aa7b/cffi-2.1.0-cp313-cp313-ios_13_0_arm64_iphoneos.whl": "sha256:10537b1df4967ca26d21e5072d7d54188354483b91dc75058968d3f0cf13fbda",
-            "https://files.pythonhosted.org/packages/99/e2/67680bf19a6b60d2bb7ff83baefa2a4c3d2d7dc0f3277034b802e1fc504c/cffi-2.1.0-cp315-cp315-ios_13_0_arm64_iphonesimulator.whl": "sha256:37f525a7e7e50c017fdebe58b787be310ad59357ae43a053943a6e1a6c526001",
-            "https://files.pythonhosted.org/packages/9e/4e/e8d7cb5783f1841a3c8fb3a7735838d7484d08ec08c9f984b14cac1ac0e9/cffi-2.1.0-cp311-cp311-win_arm64.whl": "sha256:35aaea0c7ee0e58a5cd8c2fd1a48fdf7ece0d2699b7ecdda08194e9ce5dd9b3d",
-            "https://files.pythonhosted.org/packages/a0/17/1073b53b68c9b5ca6914adf5f8bf55aacc2d3be102418c90700160ea8605/cffi-2.1.0-cp315-cp315t-win_arm64.whl": "sha256:cbb7640ce37159548d2147b5b8c241f962143d4c71231431820783f4dc78f210",
-            "https://files.pythonhosted.org/packages/a0/1c/4ed5a0e5bdca6cbc275556de3328dd1b76fd0c11cc13c88fe66d1d8715f2/cffi-2.1.0-cp313-cp313-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl": "sha256:63960549e4f8dc41e31accb97b975abaecfc44c03e396c093a6436763c2ea7db",
-            "https://files.pythonhosted.org/packages/a2/a5/d4fe77b589e5e82d43ebc809bf2e6474afe8e48e32ea050b9357645b6471/cffi-2.1.0-cp311-cp311-musllinux_1_2_aarch64.whl": "sha256:9d8272c0e483b024e1b9ad029821470ed8ec65631dbd90217469da0e7cd89f1c",
-            "https://files.pythonhosted.org/packages/a6/cf/2b684132056f438567b61e19d690dd31cd0921ace051e0a458be6074369e/cffi-2.1.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.whl": "sha256:47ff3a8bfd8cb9da1af7524b965127095055654c177fcfc7578debcb015eecd0",
-            "https://files.pythonhosted.org/packages/a8/eb/f636456ff21a83fc13c032b58cc5dde061691546ac79efa284b2989b7982/cffi-2.1.0-cp312-cp312-win_amd64.whl": "sha256:c97f080ea627e2863524c5af3836e2270b5f5dfff1f104392b959f8df0c5d384",
-            "https://files.pythonhosted.org/packages/a9/d6/c72eecca433cd3e681c65ed313ab4835d9d4a379704d0f628a6a05f51c2e/cffi-2.1.0-cp313-cp313-musllinux_1_2_x86_64.whl": "sha256:bf5c6cf48238b0eb4c086978c492ad1cbc22373fc5b2d7353b3a598ce6db887a",
-            "https://files.pythonhosted.org/packages/b0/80/c138990aa2a70b1a269f6e06348729836d733d6f970867943f61d367f8cc/cffi-2.1.0-cp312-cp312-win32.whl": "sha256:9b8f0f26ca4e7513c534d351eca551947d053fac438f2a04ac96d882909b0d3a",
-            "https://files.pythonhosted.org/packages/b3/c1/6dbd291ee2ae5a50a034aa057207081f545923bbf15dad4511e985aafff5/cffi-2.1.0-cp314-cp314-musllinux_1_2_x86_64.whl": "sha256:dbf7c7a88e2bac086f06d14577332760bdeecc42bdec8ac4077f6260557d9326",
-            "https://files.pythonhosted.org/packages/b5/9f/d4dc66ca651eb1145a133314cda721abf13cfac3d28c4a0402263ae6ad75/cffi-2.1.0-cp315-cp315t-musllinux_1_2_x86_64.whl": "sha256:ba00f661f8ba35d075c937174e27c2c421cec3942fd2e0ea3e66996757c0fdd9",
-            "https://files.pythonhosted.org/packages/b6/3d/f20f8b886b254e3ad10e15cd4186d3aed49f3e6a35ab37aab9f8f25f7c03/cffi-2.1.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl": "sha256:bf01d8c84cbea96b944c73b22182e6c7c432b3475632b8111dbfdc95ddad6e13",
-            "https://files.pythonhosted.org/packages/b9/26/d00496b22de4d4228f32dde94ad996f350c8aad676d63bcca0743c8dea4d/cffi-2.1.0-cp314-cp314t-win_amd64.whl": "sha256:0582a58f3051372229ca8e7f5f589f9e5632678208d8636fea3676711fdf7fe5",
-            "https://files.pythonhosted.org/packages/b9/65/b434abc97ce7cecc2c640fde160507c0ecc7e21544b483ba3325d2e2ea17/cffi-2.1.0-cp315-cp315t-musllinux_1_2_aarch64.whl": "sha256:86cf8755a791f72c85dc287128cc62d4f24d392e3f1e15837245623f4a33cccc",
-            "https://files.pythonhosted.org/packages/ba/b0/e131a9c41f10607926278453d9596163594fe1c4ebc46efe3b5e5b34eb84/cffi-2.1.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.whl": "sha256:a5781494d4d400a3f47f8f1da94b324f6e6b440a53387774002890a2a2f4b50f",
-            "https://files.pythonhosted.org/packages/c0/e9/6d7724983b3d5a0908dbf74f64038ade77c18646ff6636ec7894fd392ce1/cffi-2.1.0-cp310-cp310-macosx_10_15_x86_64.whl": "sha256:b65f590ef2a44640f9a05dbb548a429b4ade77913ce683ac8b1480777658a6c0",
-            "https://files.pythonhosted.org/packages/c3/c0/d1ec30ffb370f748f2fb54425972bfef9871e0132e82fb589c46b6676049/cffi-2.1.0-cp312-cp312-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl": "sha256:5972433ad71a9e46516584ef60a0fda12d9dc459938d1539c3ddecf9bdc1368d",
-            "https://files.pythonhosted.org/packages/c6/4b/e706f67279140f92939da3475ad610df18bfd52d50f14953a8e5fede71d5/cffi-2.1.0-cp313-cp313-win32.whl": "sha256:db3eb7d46527159a878ec3460e9d40615bc25ba337d477db681aea6e4f05c5d2",
-            "https://files.pythonhosted.org/packages/cc/82/3d5c705acb7abbba9bbd7d79b8e62e0f25b6120eb7ae6ac49f1b721722fe/cffi-2.1.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl": "sha256:ac0f1a2d0cfa7eea3f2aaf006ab6e70e8feeb16b75d65b7e5939982ca2f11056",
-            "https://files.pythonhosted.org/packages/cc/d7/97d3136f81db489ec8d1d67748c110d6c994268fd7528014aa9f2b085e4e/cffi-2.1.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl": "sha256:d53d10f7da99ae46f7373b9150393e9c5eab9b224909982b43832668de4779f5",
-            "https://files.pythonhosted.org/packages/d0/9a/bb1d5ed9c3fcae158e9f6391bf309c95d98c2ac37ed56573228471d0af5e/cffi-2.1.0-cp310-cp310-musllinux_1_2_aarch64.whl": "sha256:3d7f118b5adbfdfead90c25822690b02bc8074fba949bb7858bec4ebd55adb43",
-            "https://files.pythonhosted.org/packages/d3/0b/0ffe8b82d3875bced5fa1e7986a7a46b748262a40ab7f60b475eb9fb1bb3/cffi-2.1.0-cp315-cp315t-win_amd64.whl": "sha256:f146d154428a2523f9cc7936c02353c2459b8f6cf07d3cd1ee1c0a611109c5d5",
-            "https://files.pythonhosted.org/packages/d3/27/93195977168ee63aed233a1a0993a2178798654d1f4bddcdd321d6fd3b21/cffi-2.1.0-cp314-cp314-musllinux_1_2_aarch64.whl": "sha256:c351efb95e832a853a29361675f33a7ce53de1a109cd73fd47af0712213aa4ce",
-            "https://files.pythonhosted.org/packages/d3/67/85c89a59ba36a671e79638f44d466749f08179266a57e4f2ffdf92174072/cffi-2.1.0-cp311-cp311-macosx_10_15_x86_64.whl": "sha256:02cb7ff33ded4f1532476731f89ede53e2e488a8e6205515a82144246ffa7dcc",
-            "https://files.pythonhosted.org/packages/d5/dd/0c7dbf815a579ff005008a2d815a55d6bb047c349eef536d9dc53d3f0a8d/cffi-2.1.0-cp314-cp314t-win_arm64.whl": "sha256:510aeeeac94811b138077451da1fb18b308a5feab47dd2b603af55804155e1c8",
-            "https://files.pythonhosted.org/packages/d6/5c/584e626835f0375c928176c04137c96927165cb8733cdb3150ec04e5ee5e/cffi-2.1.0-cp314-cp314-macosx_11_0_arm64.whl": "sha256:c4165821e131d6d4ca444347c2b694e2311bcfa3fe5a861cc72968f28867beac",
-            "https://files.pythonhosted.org/packages/d8/f0/81478e482afa03f6d18dc8f2afb5edc45b3080853b634b5ed91961be0998/cffi-2.1.0-cp314-cp314-ios_13_0_arm64_iphoneos.whl": "sha256:d2117334c3af3bdcb9a88522b844a2bdb5efdc4f71c6c822df55486ae1c3347a",
-            "https://files.pythonhosted.org/packages/dc/78/aa01ac599a8a4322533d45a1f9bc93b338276d2d59dabbe7c6d92a775c81/cffi-2.1.0-cp314-cp314t-win32.whl": "sha256:7d034dcffa09e9a46c93fa3a3be402096cb5354ac6e41ab8e5cc9cd8b642ad76",
-            "https://files.pythonhosted.org/packages/dd/2c/400ea43e721727dca8a65c4521390e9196757caba4a45643acb2b63271b8/cffi-2.1.0-cp312-cp312-win_arm64.whl": "sha256:6d194185eabd279f1c05ebe3504265ddfc5ad2b58d0714f7db9f01da592e9eb6",
-            "https://files.pythonhosted.org/packages/e0/27/1d0b408497e41a74795af122d7b603c418c5fed0171450f899afd04e594f/cffi-2.1.0-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl": "sha256:0520e1f4c35f44e209cbbb421b67eec42e6a157f59444dfb6058874ff3610e5d",
-            "https://files.pythonhosted.org/packages/e5/4b/1f4c36ab273980d7aa75bb126ea4f8971f24a96108acad3a0a084028c57b/cffi-2.1.0-cp315-cp315-macosx_11_0_arm64.whl": "sha256:cdf2448aab5f661c9315308ec8b93f4e8a1a67a3c733f8631067a2b67d5913dc",
-            "https://files.pythonhosted.org/packages/e6/3f/0b04a700dd64f465c93020253a793a82c9b4dff9961f48facd0df945d9b8/cffi-2.1.0-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.whl": "sha256:7d3538f9c0e50670f4deb93dbb696576e60590369cae2faf7de681e597a8a1f1",
-            "https://files.pythonhosted.org/packages/ea/dd/e3b0baa2d3d6a857ac72b7efbf18e32e487c9cdafcc13049ad765495b15e/cffi-2.1.0-cp311-cp311-macosx_11_0_arm64.whl": "sha256:f5bce581e6b8c235e566a14768a943b172ada3ed73537bb0c0be1edee312d4e7",
-            "https://files.pythonhosted.org/packages/eb/d8/df4543cc087245044ed02ef3ad8e0a26619d0075ac7a77a12dc81177851b/cffi-2.1.0-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl": "sha256:6274dcb2d15cef48daa73ed1be5a40d501d74dccd0cd6db364776d12cb6ba022",
-            "https://files.pythonhosted.org/packages/eb/da/5c4918a2d61d86fa927d716cb3d8e4626ef8dc8f605a599d32f33897f59a/cffi-2.1.0-cp311-cp311-win32.whl": "sha256:64c753a0f87a256020004f37a1c8c02c480e725f910f0b2a0f3f07debd1b2479",
-            "https://files.pythonhosted.org/packages/ec/d1/9a5b7169499e8e8d8e636de70b97ac7c9447104d2ff1a2cd94790cea5162/cffi-2.1.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl": "sha256:0a96b74cda968eebbad56d973efe5098974f0a9fb323865bf99ea1fd24e3e64c",
-            "https://files.pythonhosted.org/packages/ed/a5/e8bbb1ce5b3ac2f53ad6a10bde44318a5a8d99d4f4a000d44a6e39aeb3e4/cffi-2.1.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl": "sha256:7d5980a3433d4b71a5e120f9dd551403d7824e31e2e67124fe2769c404c06913",
-            "https://files.pythonhosted.org/packages/ed/da/4bbe583a3b3a5c8c60892124fe17f3fa3656523faf0d3484eae90f091853/cffi-2.1.0-cp315-cp315-macosx_10_15_x86_64.whl": "sha256:95f2954c2c9473d892eca6e0409f3568b37ab62a8eedb122461f73cc273476e3",
-            "https://files.pythonhosted.org/packages/ef/c3/ad299dc38f3583f8d916b299f028af418a9ec98bc695fcbebeae7420691c/cffi-2.1.0-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.whl": "sha256:90bec57cf82089383bd06a605b3eb8daebf7e5a668520beaf6e327a83a947699",
-            "https://files.pythonhosted.org/packages/f9/c8/6c2de1d55cf35ef8b92885d5ef280790f0fb9634d87ea1cc315176aecd61/cffi-2.1.0-cp311-cp311-win_amd64.whl": "sha256:4f26194e3d95e06501b942642855aed4f953d55e95d7d01b7c4483db3ecff458",
-            "https://files.pythonhosted.org/packages/f9/cf/398272b8bbfd58aa314fda5a7f1cdbb26d1d78ae324a11211521315dd1f0/cffi-2.1.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl": "sha256:03e9810d18c646077e501f661b682fbf5dee4676048527ca3cffe66faa9960dd",
-            "https://files.pythonhosted.org/packages/fa/75/74dfb7c3fc6ebbd408038476bd4c1d7e925c62614e7b9c534ecc34218288/cffi-2.1.0-cp310-cp310-musllinux_1_2_x86_64.whl": "sha256:11b3fb55f4f8ad92274ed26705f65d8f91457de71f5380061eb6d125a768fecd",
-            "https://files.pythonhosted.org/packages/fb/d2/4398416cd699b35167947c6e22aca52c47e69ad5695073c9f1f2c52e04aa/cffi-2.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl": "sha256:aa7a1b53a2a4452ada2d1b5dade9960b2522f1e61293a811a077439e39029565"
+            "https://files.pythonhosted.org/packages/01/9a/11f687cb39d6a3504060d5242f04f48c735afb4d3d533958a20594890cb2/cffi-2.1.1-cp313-cp313-win_arm64.whl": "sha256:63bbfd5ded17c4840ac07cd8f1c21ba9d9708141f840b324f422f41b207e3973",
+            "https://files.pythonhosted.org/packages/02/10/4b3c75dde3d9663c9e02ba05c2668b954f671d4bbe346413ca8c696b295a/cffi-2.1.1-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl": "sha256:fcd22650c908d7b7da162bbfaab594a1227a15d1643a98c68b122ac642fa2264",
+            "https://files.pythonhosted.org/packages/09/b8/eefc0e06913b70aa153bf74c946094a18f58fd4aff11b7f372bfdfdca050/cffi-2.1.1-cp310-cp310-musllinux_1_2_i686.whl": "sha256:3d22a20b1fb1632cc72c22f95f7b0d2961c3e1c235f245ba4c606c4771035659",
+            "https://files.pythonhosted.org/packages/0b/e9/d0061c364cde06ee43168a0d076ac1da512cbc380d44767b844ba34fe2b6/cffi-2.1.1-cp314-cp314-win32.whl": "sha256:1a18a57b58cfb21fc28d72e876acf10eaed67a1ed96226f92af4df681d571c4c",
+            "https://files.pythonhosted.org/packages/0c/75/2f5207ff6d1a613133b23a5203cc0c2a628313b5eb3974d7956ae3c57950/cffi-2.1.1-cp315-cp315-macosx_11_0_arm64.whl": "sha256:2ae64be792b8966f2c69538199728b290e34726562896df1e5dc8ffd8d8188e8",
+            "https://files.pythonhosted.org/packages/0d/fc/5f74e293fced6edb51af3a46c4ccf6c23c9943774ecb375ddbd522c76add/cffi-2.1.1-cp315-cp315-manylinux2014_s390x.manylinux_2_17_s390x.whl": "sha256:471cee653ae88de62096552e6d24ccb4a5adb8c8c9f10b5054d0122c15bf2779",
+            "https://files.pythonhosted.org/packages/10/69/43965eccfdead3b9220015fd1320e117be8c6ed01a62ffab76eeb752f5d5/cffi-2.1.1-cp312-cp312-macosx_10_15_x86_64.whl": "sha256:c8c69575568085ba0b1b10c0249d779a214aea6f6522e949a0fc9fb0fcb449d0",
+            "https://files.pythonhosted.org/packages/17/0b/ba385d8ccedf926c3cd06e8e2f327027da5afe5f0eb30f1f7bc43ac55125/cffi-2.1.1-cp310-cp310-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl": "sha256:42e2f76b9455f5a9a844f770bf3e200ed3da0e15f5df3db9c31fe80b04b3d004",
+            "https://files.pythonhosted.org/packages/18/d4/03026f0c850cbbaa9030750490225b4a7f4d524ea4df72c3cc740a90f4ef/cffi-2.1.1-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.whl": "sha256:75f80557d1389eddbd0de2681f6a390a0c5338c31ddaa821381c203fc3fd50d9",
+            "https://files.pythonhosted.org/packages/1b/8a/af668013284634733f02d683458a0728739c7d6ddb5e14cb0c20832266fe/cffi-2.1.1-cp315-cp315-macosx_10_15_x86_64.whl": "sha256:fb92203a88b3d3053034db775110081c49d28be6551923805e039924093761e4",
+            "https://files.pythonhosted.org/packages/23/59/40338bf421c5accea1d45158170c87006ef1cd371b05c077e76476949728/cffi-2.1.1-cp314-cp314t-macosx_10_15_x86_64.whl": "sha256:7750c6449dff7864bb9bb27ddfb0267756189201a3afc911d82b3caacd70dfc3",
+            "https://files.pythonhosted.org/packages/28/f7/dabe6da2466ecbd82dc62e7342dc6b1065dad990c06f00f0ede9ebf2a0ed/cffi-2.1.1-cp311-cp311-musllinux_1_2_aarch64.whl": "sha256:7225e4514edb64eb6740324353e0da0711954fd8d7da4576755b1c6e09b697cd",
+            "https://files.pythonhosted.org/packages/2a/9c/92934c3bea9f785b23eba304538c0b4d37a2a96d2431eb3a1bc87a11aa19/cffi-2.1.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl": "sha256:49cbc70e6542d4ccccb936558d1064a8012541e78f821f955cff24e357776c94",
+            "https://files.pythonhosted.org/packages/34/34/a95870b9221e09cf4f2ce3178b1a210abdfe63a1bd357da940418d7b8d15/cffi-2.1.1-cp313-cp313-musllinux_1_2_x86_64.whl": "sha256:e0bcb7e0f677f543555d2adff3bf19c05f66cdb4796e5ff602442ab2fe3c4ef7",
+            "https://files.pythonhosted.org/packages/37/15/180e0dab27b9312c7479003d14c9e547634b7dcb934e2cc4650e1b131a7a/cffi-2.1.1-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl": "sha256:9f8d177621de5cb38ee3e731eda45d421db093ec0739f46a5594babda7987a98",
+            "https://files.pythonhosted.org/packages/37/6f/3b5ce4c3b2192d250f04908f2bfd91ef34552ec8f7716a5d4abdb8d67bb2/cffi-2.1.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl": "sha256:f16c709686a78c727bbbf059f92b0bf41c6fc60deec706d2dc19f529175a6125",
+            "https://files.pythonhosted.org/packages/43/1f/1c3d90d91811c8f86ced9ed637956c54bfe5b79ca98fe976d7f8c8979f6b/cffi-2.1.1-cp313-cp313-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl": "sha256:6a8dddef476fab96d066d578fc88526767b836ab5ab21754e1d5bf3879c31c7c",
+            "https://files.pythonhosted.org/packages/44/16/29e6d01b388bef055ecd6ca8244b3f4d336bd09e92d5d892187b9601084e/cffi-2.1.1-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.whl": "sha256:aeae0e330c9f6acd681f647d46cefd30c29f93e3392882e792e82080c9691399",
+            "https://files.pythonhosted.org/packages/44/de/f98430906df1545ffde0d543dd124a7a439bc2cd32b36b9c53f805df7333/cffi-2.1.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl": "sha256:68e62fe11f30d5ca8289242866f0a5291402d8529ca2178ab8afc5c9694ae890",
+            "https://files.pythonhosted.org/packages/4d/45/ba4c93527bc38616a8bd36488acb69a2212d60486794f0c1f318949bbb76/cffi-2.1.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl": "sha256:e2d65b31f36619cda3999b78b2aa9632e76b78448e7a56fc4240824200e7c4fc",
+            "https://files.pythonhosted.org/packages/50/e3/f6234a833e6e08c7007003074723c406559eecf9b48dfc97471e5a8eb7a0/cffi-2.1.1-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl": "sha256:246fa40ce8645a614ff682e0b70f37134e460eaf93a775e0cbe3cca585a67a80",
+            "https://files.pythonhosted.org/packages/52/86/2976131c639aead931c5bee5aba67e4b09fbeb8018b6f282f70803f923a7/cffi-2.1.1-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl": "sha256:363e05fa78e15116c3c32c210ee36884fd6b9afa6d440e47112c3bd511d64cb6",
+            "https://files.pythonhosted.org/packages/53/b2/6187f46f2912276a3ae284076109cc5c8680482f11f766ccf26db4a86427/cffi-2.1.1-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl": "sha256:937c0052c05a31ca1daf18de3158eed4dbfcb9cc107adbea227728d647be701e",
+            "https://files.pythonhosted.org/packages/54/7d/16e5a096677b5e313ca80cd5e5170efa3ea44624a82bb111925522da64b1/cffi-2.1.1-cp312-cp312-macosx_11_0_arm64.whl": "sha256:f81b3b8f3d4e343550fa4baa0e479bba9f2d29ce9c2e9b51d1ce1718d7442fcf",
+            "https://files.pythonhosted.org/packages/55/41/4c7042f317b9217502988f0873af87e16ad606dc20f84e546e3e6ce9764c/cffi-2.1.1-cp313-cp313-macosx_11_0_arm64.whl": "sha256:19ee6127ee34de7d83ce3d371ebc5ed91addbdcc39f9ab15ce4eb35a4e534971",
+            "https://files.pythonhosted.org/packages/56/78/31f00c1bcd97c9bbf55f1bfdf5bc809a5de8887473e90bb9960dca825e80/cffi-2.1.1-cp314-cp314t-win_amd64.whl": "sha256:616f097f2fe415bc92a247f02e11f634e1f9e9a83d327e3c915c15089c87869e",
+            "https://files.pythonhosted.org/packages/56/e6/8941622732edec876dd17d0453dce07317ae96db34f2ec1436c9d3785986/cffi-2.1.1-cp312-cp312-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl": "sha256:811bd1e21d32de12efca32393a0ab3f5133b54fce9bd44b8bd77ab07da14bf6a",
+            "https://files.pythonhosted.org/packages/60/a6/8b149b2c3f2e11aaa1618ef64500b45f50f22c57a977a4dff1aff1f91042/cffi-2.1.1-cp313-cp313-win_amd64.whl": "sha256:1aa5645c30469b09530c4ebca77ebf8f17618293c58f8549cb1a543a50236e7d",
+            "https://files.pythonhosted.org/packages/64/b3/f8aa4f3e34986c7e4ec45072d1b1b9dd295b6b18007b45518d79726dd725/cffi-2.1.1-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.whl": "sha256:3143d81e29e1e20a9ce10901ec369012947876596f75a222235965f2b7ae832e",
+            "https://files.pythonhosted.org/packages/67/b8/b42132ca113dc567d37684437b46ca1dafc885902b02a110a02d5b511857/cffi-2.1.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl": "sha256:58acb8ab8e295e6c5ea12f888cbb13cf21511ef2a3303a23f4325c29d17fe5c1",
+            "https://files.pythonhosted.org/packages/6a/5b/717f1526b9957b34456313c31645c5b82b8fb5c3fe9e4752999be7128bfc/cffi-2.1.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl": "sha256:4a7c934f7360e8cd64fe9efadcbd10c7c6364f531e432b9a4bf5ccbc9e0e8b50",
+            "https://files.pythonhosted.org/packages/6d/cd/a361394c94b2129d604bb846f624a8e88255a3ee33129c434a00d715e64f/cffi-2.1.1-cp315-cp315t-win32.whl": "sha256:06c72bb76605a4b0cd0aad6930b69d4baf7dd5d806cfc409b824191099700e66",
+            "https://files.pythonhosted.org/packages/6f/13/4e56852824a03cdf68523a35686f1c28eacd4bd30a7b0a78e682e6e6e1d3/cffi-2.1.1-cp310-cp310-musllinux_1_2_x86_64.whl": "sha256:1dea0e4d7d4f11f619fe8c1d76caf49e24405b4b5743c0e3be16a500ecd930c9",
+            "https://files.pythonhosted.org/packages/70/c6/d0ea84713fe46b243a436a18fcd47d639732747e21635c8a27191b06dc30/cffi-2.1.1-cp312-cp312-win_arm64.whl": "sha256:7bde5e4cc5c10140859842b9d383af292b22639a4dffb725314baf45968cef80",
+            "https://files.pythonhosted.org/packages/70/d2/16d99a0c4948febc0ebd133a13b2f688ff7f8cb04da971e1128872ce0c03/cffi-2.1.1-cp311-cp311-macosx_10_15_x86_64.whl": "sha256:c8d2c9fd1f2d16f780d15127abb050d13d1a76c03a4bd87d7e4980e45e511e12",
+            "https://files.pythonhosted.org/packages/70/ea/839b50531021a647fb5e929f72cf97bc1ff702b5472166164b5b6e76b851/cffi-2.1.1-cp313-cp313-win32.whl": "sha256:334644fbac4eff73d985a17a91226df55d0f394160c4cfb880e084c8f7161cac",
+            "https://files.pythonhosted.org/packages/73/c0/77ba02423c2f7d7091143c45cd49e0e6575c4c1967394bb542bd923a9b74/cffi-2.1.1-cp311-cp311-win_amd64.whl": "sha256:42f6930c31dc7f50732c9ae793c2786c7b6b044195967bbdde40bb9be81c4cc0",
+            "https://files.pythonhosted.org/packages/75/77/60bebf6f818bec84210ac5b6979ce4eeadce6fbbaabc9c7ab23e506d1ce5/cffi-2.1.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl": "sha256:194cffa889098ced9976c3fc6340305e43f6303657d298da55366907c05c22d6",
+            "https://files.pythonhosted.org/packages/76/af/2aeb4dbb5fc41a04161ae9ff1518de7cec08e164f44a8ce6a4cf7fd2cd1d/cffi-2.1.1-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl": "sha256:31348097ff5bbe827ccc41795d4dd099d9f0625e7def00ee653c137a490c2a6c",
+            "https://files.pythonhosted.org/packages/7b/1b/58496f2ed0a35de575250c02a43ab3cc2c04d494a88fed31c1cabc0fd176/cffi-2.1.1-cp314-cp314t-win_arm64.whl": "sha256:ad2c86c495b899d862ea0f4b42891b8713a3bd45dd4105c7fd51c2a72f39f3a5",
+            "https://files.pythonhosted.org/packages/7c/47/9f1f85f9672ceda4984dc6c4f8824e8558992a2972c3d3c81fb8eb28d4ba/cffi-2.1.1-cp311-cp311-win_arm64.whl": "sha256:c7659f22557c5a0bc4855cd635f55edec690cc008a40768527762cb9fb263455",
+            "https://files.pythonhosted.org/packages/7d/47/5ecf1023850036e674c77ec4de86182d309ae344e39e7cba984b7df5d647/cffi-2.1.1-cp314-cp314t-macosx_11_0_arm64.whl": "sha256:0beceaabe56af686895136a2de78db54ecd8e4046b236b8fd6d6cb61389e9bf2",
+            "https://files.pythonhosted.org/packages/7e/ae/a56fa8c4686ad50e148fcbc8d3ae0d03915ff5c30d795058988c24118cef/cffi-2.1.1-cp315-cp315t-macosx_11_0_arm64.whl": "sha256:4be96343e422f2dfcd12ab5c9f5aebe03f82f737c6bffeca6830b3875cb44aab",
+            "https://files.pythonhosted.org/packages/80/10/c5c0cbf0a657aecf59ef511409734230bf556f05a0d6c9eed7aa5c0a0166/cffi-2.1.1-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl": "sha256:456a61fa52d579ebf9df2e9552ead5129855dbaff6c1e5a9b1bc408809bdc062",
+            "https://files.pythonhosted.org/packages/80/e9/b6ef565e452acb932fb0cb5443f44a78efbd1233e566f02b5a83855e9115/cffi-2.1.1-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.whl": "sha256:28907ab9bfb6aa13184cfc17c6b8e1023c5ab6fd7076d8c20a35e59fe04f8f29",
+            "https://files.pythonhosted.org/packages/80/fb/0bb75b7039588c074b37ae99f40d9bfddf990ecb2fbc346ebccd2e56b9be/cffi-2.1.1-cp312-cp312-win32.whl": "sha256:046bfc24911b37851ee1b51aab8bffe713d89c68c6a057b09484ce9fd5f69b4e",
+            "https://files.pythonhosted.org/packages/81/10/5dc0e7bdd18e22107054288283380fc97a06ae3f1656a106908d666a3c88/cffi-2.1.1-cp314-cp314-musllinux_1_2_x86_64.whl": "sha256:5c58fe613dc5e5336357eff555824a314d8e43282600435c8d1cb6a7a2fedd13",
+            "https://files.pythonhosted.org/packages/82/1d/a4aaf9babd75acb4d5f223bff71533bee748dd770a382619a798960ee9ba/cffi-2.1.1-cp314-cp314-musllinux_1_2_aarch64.whl": "sha256:64faea20f4e2613363a1a9b9c7dd73058f3ecd00133a511e72ad7c511658f527",
+            "https://files.pythonhosted.org/packages/87/5b/da4e39efe18eeb89cf580ea9cfc66b6a7c3eadb808fc0cc1d3a295cb5a5d/cffi-2.1.1-cp314-cp314-win_arm64.whl": "sha256:ab36d55f9ed2d067327667c2fea18dda018eb628dd6347aa01dda6cf1f5d3836",
+            "https://files.pythonhosted.org/packages/8a/f6/c3ad28bd19f77047a03084424fbd4cbe997303267c14423737324be0385d/cffi-2.1.1-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl": "sha256:df423d40ee8654634421812bc3b196da3f9bd7d32929da813f8394c4348a5358",
+            "https://files.pythonhosted.org/packages/8d/b0/0b44f47c60b01b57b6e2bbd92343f13a85a1d93bc46ccf6e47e244acd99c/cffi-2.1.1-cp314-cp314t-musllinux_1_2_x86_64.whl": "sha256:25792eac27877609e7bb06d42ff88278a6624fff2ba9bbb523c09616b117e80f",
+            "https://files.pythonhosted.org/packages/94/1a/4b2f7c92293ba05cbd4a9a1b28faaf0326272d9488e6354657571c48a7aa/cffi-2.1.1-cp310-cp310-macosx_11_0_arm64.whl": "sha256:ca82be1a1d406ecfe1d25dc16cb33488e5a16bf4438c9fb590484ea29d92478b",
+            "https://files.pythonhosted.org/packages/94/e6/bcc91b283be94735e268487a054004f0aa19947b6348fa367db53230abc8/cffi-2.1.1-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl": "sha256:f24fb43132a4c6b4cb4eb029492919b2db645be6808d738f244fd146c03c32cb",
+            "https://files.pythonhosted.org/packages/95/95/86342356ff5953b3fb06f7ef7c5bee212d45e770abc7218d451b9148313c/cffi-2.1.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl": "sha256:a931079504ecc49efed7744c476a5c343a92fabf66dec2db95edb1b2fdc770e2",
+            "https://files.pythonhosted.org/packages/99/7f/040f9e163e4acac3ee3d85b02d00b2576e7ca980d8785f0a3a5f1a9bf7f5/cffi-2.1.1-cp310-cp310-win32.whl": "sha256:7ce713ace7c0e4520535b42b77eaa742c16dab813978064913e5a3cf82973b41",
+            "https://files.pythonhosted.org/packages/9a/95/eff5f0cee78d2eabc7eebffec40d3fc1876b5f3c95582e018bb4b99601f2/cffi-2.1.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl": "sha256:51b31d1c98274844cfd7838ce00bfc27c7423a4dc00fc0772fc3331c2cc90676",
+            "https://files.pythonhosted.org/packages/9b/b5/ba2b299993c26577d529b6ae29841f9e15b9fcf004d65f423f4fcf94ade9/cffi-2.1.1-cp315-cp315t-win_amd64.whl": "sha256:d9c275eaacd24aa73f94ffd6de08fc3f932424d8b6c376f4bed7cde376fe7bc3",
+            "https://files.pythonhosted.org/packages/9d/f4/035513d4117049066b4779dc3b7c0c0fdad175fa13731c9f4003f1cd1478/cffi-2.1.1-cp313-cp313-ios_13_0_arm64_iphoneos.whl": "sha256:b5bdfd1c873d4e093aabc0ca84c4ca6dbc4f752afb5c86f146d9742580c9da2e",
+            "https://files.pythonhosted.org/packages/9e/ef/008a1939e372c06329a3fce4279c02f328488f3526744906eeec3da7ad5f/cffi-2.1.1.tar.gz": "sha256:dd31f52ea1086513bb9df30f8fcee9b8918323ae067a3d5b78bc826a000712be",
+            "https://files.pythonhosted.org/packages/a0/cd/ccac9013a5bd9fd764de118674ab9c805b5ca10c19270d90ee273f8b2240/cffi-2.1.1-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.whl": "sha256:a730a083190634c65cca36ba5f489531576ebd79bcd5c8e172130f6453127231",
+            "https://files.pythonhosted.org/packages/a0/d2/6cd24ae3be000a634109c247d1475d62e5616d0dc78c82770942ec384248/cffi-2.1.1-cp312-cp312-musllinux_1_2_aarch64.whl": "sha256:208f941bb9d18e768138677f0a6d2ce01f590df56043dda1df1535ac57c88517",
+            "https://files.pythonhosted.org/packages/a3/b9/0f2e58b2cefa33255bff36935d42b13180fe559bba82596540eb404bde7d/cffi-2.1.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl": "sha256:5a59cc1c4442bc3d5c703bf720b51138d0bfc173618807c9ee2490a7541dd3d9",
+            "https://files.pythonhosted.org/packages/a4/18/fa7f1f6857d5eb88a4ca99ffcbfb7c387a287ccc154c64a73e86314745d7/cffi-2.1.1-cp315-cp315-musllinux_1_2_aarch64.whl": "sha256:42a494cee34437f05546455144f2b5d9ac09b1face62bcfce597d2e521066688",
+            "https://files.pythonhosted.org/packages/a5/a7/a67c733254d6e7373f7822f8082d8d6beade791e0cf12a7611f376fa61c7/cffi-2.1.1-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.whl": "sha256:a6e721d4b0e45d5b65e87534470e67b18dcd092c83f68fba09f152b9cbc061af",
+            "https://files.pythonhosted.org/packages/a7/06/1c3e01e3ba14c39f6d10bfbac52753b7e22259e38088e5cfe1d704918690/cffi-2.1.1-cp314-cp314-win_amd64.whl": "sha256:3222ba5d678f80a030e6afbcc33dc1ae5cb45facabb61cee2c7016b8432fde48",
+            "https://files.pythonhosted.org/packages/a7/46/2e5fdde8555706dd98139a910ca11be02809f3f605ce956f655d0214e100/cffi-2.1.1-cp313-cp313-macosx_10_15_x86_64.whl": "sha256:9d2055050ea716bd38b7f7f1579c275386646b4894c155a3e2f3cd62ed41b7c6",
+            "https://files.pythonhosted.org/packages/a7/92/500760486c8baab49a7a8a58ba7fc3355ec3974b454b8a09e528efde9e1d/cffi-2.1.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl": "sha256:6e192623c49c94421616a5778fba35cf0d5a8d000650c1967ef4448ee5cdd990",
+            "https://files.pythonhosted.org/packages/aa/29/35e016098c814cd93de9cd320c66b5bfba14dc6ecedd3cb518fa7c408c69/cffi-2.1.1-cp315-cp315t-win_arm64.whl": "sha256:d18e5ac0f2f03f4f518d3e23db0f0cad7faa1da8620e9c09461d443bbf6e6692",
+            "https://files.pythonhosted.org/packages/ac/0c/33a7aeab2f9c76918c52e084beb39c570db3588133412929e8ec06fab90b/cffi-2.1.1-cp315-cp315t-musllinux_1_2_aarch64.whl": "sha256:770de9db11e84213beec501cfcaa013b019820ca881e03344dea5844f7876d94",
+            "https://files.pythonhosted.org/packages/ad/5a/4707a0dc1f203f5dde5a907b0d4e3c25d71120241048bd5bc6f1bb9d4e71/cffi-2.1.1-cp311-cp311-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl": "sha256:154852545011f779917b11c78db2358d095da62a9a172b78ad0a583ee5adc0d0",
+            "https://files.pythonhosted.org/packages/ad/66/c19feabb28485b6e0bbaaafa90837a1ef5d302e90f2178bd33f17a49879b/cffi-2.1.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl": "sha256:3311ed60d36f83378794e1009ac6258bafbf81f7888b4caa7b35a521e3f95813",
+            "https://files.pythonhosted.org/packages/b0/ae/679bf47e73fd77b352171727f07de559a003f14de5d02b904a6ec1fa73ca/cffi-2.1.1-cp310-cp310-musllinux_1_2_aarch64.whl": "sha256:5bb4e7ea95dcd6a014a6fef62e62467d67d8e582326443f3d68e71d6320a9fcf",
+            "https://files.pythonhosted.org/packages/b1/db/dceb9dd5b231e1da801793f8acc9f3c52a7e1afe40bb1aae37e02b0faad5/cffi-2.1.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl": "sha256:c1453022f490d2459a11819d83ad1d586e9ff65a12ac3e705ffebd46d3685dcf",
+            "https://files.pythonhosted.org/packages/b3/a9/9db617d05d7367c1ad0ab00b3aa6e6f9281edd689b4ee9ea0e5a84e89c97/cffi-2.1.1-cp314-cp314-macosx_11_0_arm64.whl": "sha256:661c298b4821edebead0c91edd2b00374d67ad7c5a1f7a91d4442633b79d6a72",
+            "https://files.pythonhosted.org/packages/b4/c6/ab025d75d2c26c19b087c0124e75ee31cb65032f4fe345d356d8c507ab97/cffi-2.1.1-cp311-cp311-musllinux_1_2_x86_64.whl": "sha256:f5cfbc5fe74540d335175b656c725d74d90e3730c626d92575eea35029d9afaa",
+            "https://files.pythonhosted.org/packages/b6/d2/2cde336b375f55c76ca670f0be3978cc048e31e24f3b4d7ce8473150a388/cffi-2.1.1-cp310-cp310-macosx_10_15_x86_64.whl": "sha256:baed1e86cc735622097354b9d1281406caf42ff42a886d29faa8e8d1630333be",
+            "https://files.pythonhosted.org/packages/ba/0b/644a2ec1a4eaba49c2939410bb1eb1d25b09d6d0582f5d2f95c537043725/cffi-2.1.1-cp310-cp310-win_amd64.whl": "sha256:a48d62ab9d6f4f98c983223a547af44be6ca3691074c31cecced6facd3ba2dc1",
+            "https://files.pythonhosted.org/packages/c1/8f/9ebe220eab48a093d1a5a5e339ab0dc7316eef3bb04d63c42f0251b61f50/cffi-2.1.1-cp315-cp315-ios_13_0_arm64_iphoneos.whl": "sha256:dddad92b554513a31f272570678ba307fb9f618f05e3d4a5eacafff9eae03e1d",
+            "https://files.pythonhosted.org/packages/cb/52/3fa190537004dd7f0ab860a6dc7c0175b8667f68d1e618a46f5498d30250/cffi-2.1.1-cp312-cp312-musllinux_1_2_x86_64.whl": "sha256:210019b6c7cf07f081b4c54635c8cf744377001350e29cc0f81c4377b4797735",
+            "https://files.pythonhosted.org/packages/cc/4b/b3a2da8570c704ffc0f9762cdc3ec0f02c8573798e0b5cf7f11c82bbb70f/cffi-2.1.1-cp315-cp315-win_arm64.whl": "sha256:27350daa11d4f10c540e6e89dada4c54feb7256ad03e9a4dc075ebad7ba360d1",
+            "https://files.pythonhosted.org/packages/cd/95/31b535a9f0220ae9f357de4a08d57ce89cb417653c2fd9f075f50822a388/cffi-2.1.1-cp311-cp311-macosx_11_0_arm64.whl": "sha256:398aff33cee2767e3e781d2554c54bd0dff386bb437581e0d8011fde1a942ec1",
+            "https://files.pythonhosted.org/packages/ce/87/616202d8e51342c07d2534c510111c4cc37201775ce8f60802c9335d1edd/cffi-2.1.1-cp311-cp311-musllinux_1_2_i686.whl": "sha256:df913725b79db7bcf03448f36b7bf8815363417d5b58deecf9305e3e30f0f21a",
+            "https://files.pythonhosted.org/packages/d0/ef/5443574510a1207e6f6bc38ba6e1f1de36cb48fef07b2728bb896a21f430/cffi-2.1.1-cp315-cp315t-macosx_10_15_x86_64.whl": "sha256:c26608d2222fb1e94487e4a387d85f13eb55d5ed725cb25a0c589ac4ee60e7bc",
+            "https://files.pythonhosted.org/packages/d3/7b/d6bbf82b8b96e7391438898c42f5bd96dd02030fd5b64937d248220003e2/cffi-2.1.1-cp314-cp314-ios_13_0_arm64_iphoneos.whl": "sha256:7dbb61fe3a7699468030f71bbe5f8a0e326a151daa91beb11a6fc1f980c55e1c",
+            "https://files.pythonhosted.org/packages/d5/6c/bfa0b87b03b9238148beca990292843c9396ba069b54496596594173de7b/cffi-2.1.1-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.whl": "sha256:a4f00aa42f75d6e4595e8866e748cc1705adc0cddfeb2ca86d0d03993d63ba03",
+            "https://files.pythonhosted.org/packages/d9/79/615cc094e2fb508cade7de88d3b4f6c4ec2bab695c97bce9153dc65aadf5/cffi-2.1.1-cp312-cp312-win_amd64.whl": "sha256:f53e442b08449d42821fa4a4fba000095af9f62742a500f978a9f557ec44339a",
+            "https://files.pythonhosted.org/packages/d9/99/c4b0c17cacdc9c3b8f280026286a9826d6a208c0f047591a3c3ce99b91fd/cffi-2.1.1-cp314-cp314-macosx_10_15_x86_64.whl": "sha256:d28630f5854ab07ab1fd4aba756de52326c82e6be15d414b12793f1975048b54",
+            "https://files.pythonhosted.org/packages/db/e2/7e8109f65445bdc673a7b54f02c677de462db75674220fd1335efc8eb598/cffi-2.1.1-cp311-cp311-win32.whl": "sha256:f8ec5e643a9a937f64e1999eb9f75d072263751912dc5cd06d3c85f8f44be7c3",
+            "https://files.pythonhosted.org/packages/df/62/14f74b9543e605d17701dc797b815958b8bb70b7624ce1b832ddad48ed6c/cffi-2.1.1-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.whl": "sha256:aa9511c62d14da7aacc9b4bf51f3f697a621e83b2d6919008243c3aad168eea3",
+            "https://files.pythonhosted.org/packages/e0/31/5158704cc474ab65c1647932e88be78dc0873f47130e253be38bcaf13d01/cffi-2.1.1-cp315-cp315-win_amd64.whl": "sha256:e6e8cff14d6fb0be70a09c0bdc58096f501952d04624ebf867e0e56da2df8960",
+            "https://files.pythonhosted.org/packages/e0/9f/e8e3dfa04a1b4c241f8c91faacad872b4d4efd051d49764ad4e2fd4b9fea/cffi-2.1.1-cp315-cp315-musllinux_1_2_x86_64.whl": "sha256:cc572dace3f60ef98d7b12ff411d20f5362feb31a0439eab0085bbfd349982d7",
+            "https://files.pythonhosted.org/packages/e2/31/9e1313b0a6e30e91b3b3d3fff51ae99c857c07738e3afcce1f7334e1b7ab/cffi-2.1.1-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.whl": "sha256:507a24c282e0f42f8ed737cf048572cbf580468da5555764a8331735e9c736b6",
+            "https://files.pythonhosted.org/packages/e3/26/2cde30fdde421130bfc18f70395731a6e6b2053c6a1978a5258ff04e72fa/cffi-2.1.1-cp315-cp315t-musllinux_1_2_x86_64.whl": "sha256:7da0c5eff80f0197f3b3d1232ec5a682a9325f4ae9016a78f5f5ca35f9ced1f5",
+            "https://files.pythonhosted.org/packages/e9/02/4e7d553a7ac4b4238b38b3c1b80d486e9d4436f8d2acbf87a0997fe3f402/cffi-2.1.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl": "sha256:b0431303acaea1089ad4b3e9ce4e6518193def1118d4073ca848635ee4ea2e96",
+            "https://files.pythonhosted.org/packages/eb/d2/3b7176cb570a1d3e27faf67b72f591af508036e0d8b2be2ef9af9e8c84bb/cffi-2.1.1-cp314-cp314t-win32.whl": "sha256:8ef53b2de9bcb9197d31854256575d59dbac0cba72ac627bb291ef5eceb74be4",
+            "https://files.pythonhosted.org/packages/eb/ff/7b3429ff53aafe931ed8a5fc69f481bbef7ba6de87ddcbb63d08f483f613/cffi-2.1.1-cp313-cp313-musllinux_1_2_aarch64.whl": "sha256:a2d7755bef5a12ed488f4ef1f1b69ee9191d7396083b755a5d2295f6edb4768b",
+            "https://files.pythonhosted.org/packages/f7/a4/4399daaf8f7dfee9d7c3327fdb0426ee041cc63edc358b93911ceb2bfc7a/cffi-2.1.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl": "sha256:34e261f78cb6ceaaa36f42f2613f4380d94d9c759a9c73c769ee6e0247364632",
+            "https://files.pythonhosted.org/packages/f8/7e/8debeb04f1ab9fe2a6963964cd6f1aaf7192627b83926586a6a4e089c9fa/cffi-2.1.1-cp315-cp315-win32.whl": "sha256:4f42141fc14250de6dde5ee7ea4432be017252d91f19c5ad043c084cea629cac",
+            "https://files.pythonhosted.org/packages/fa/01/579d39fb8bef00a335a23d83757b44feb24cd6345a2c451b64cb67b9c362/cffi-2.1.1-cp314-cp314t-musllinux_1_2_aarch64.whl": "sha256:5e7cecbaadb83884793e05828cee59b210b24583b9c7425d0ba6a754fe22eb4e",
+            "https://files.pythonhosted.org/packages/ff/69/844bad3ece306c4782c2ecb93597035b6690d48704b803914c199da1e8b3/cffi-2.1.1-cp315-cp315-ios_13_0_arm64_iphonesimulator.whl": "sha256:da0e573f9f97159390c89d9f1a9e41908b66d408cc5b58d08cf3847d844c531b"
           },
           "charset-normalizer": {
-            "https://files.pythonhosted.org/packages/00/5e/17398df3a139985ba9d11ed072531986f408c8fca952835ef1ab1820c02b/charset_normalizer-3.4.9-cp314-cp314t-macosx_10_15_universal2.whl": "sha256:609b3ba8fcc0fb5ab7af00719d0fb6ad0cb518e48e7712d12fd68f1327951198",
-            "https://files.pythonhosted.org/packages/01/c4/4fa4c8b3097a11f3c5f09a35b72ed6855fb1d332469504962ab7bafcc702/charset_normalizer-3.4.9-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl": "sha256:5e226f6218febc71f6c1fc2fafb91c226f75bdc1d8fb12d66823716e891608fd",
-            "https://files.pythonhosted.org/packages/01/da/a44bd7a13d426e69e4894557106cd58669097bfad4a8681123b618fbfc5d/charset_normalizer-3.4.9-cp310-cp310-win_arm64.whl": "sha256:375b83ed0aecfce76c16d198fbc21f3b11b337d68662bea0a995046682a11419",
-            "https://files.pythonhosted.org/packages/0b/e3/85ec501f206fb049259288c1f3506e53876937fb00edb47009348e66756b/charset_normalizer-3.4.9-cp311-cp311-macosx_10_9_universal2.whl": "sha256:0e94703ec9684807f20cfb5eed95c70f67f2a8f21ad620146d7b5a13677b93e5",
-            "https://files.pythonhosted.org/packages/0c/74/2f62c8821b969ea3bd67cc2e6976834f48ca5d12664d2559ebcd9bcfbed7/charset_normalizer-3.4.9-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl": "sha256:871ff67ea1aad4dfd91736464934d56b32dac49f9fbe16cddba36198a7b3a0db",
-            "https://files.pythonhosted.org/packages/0c/e7/aaf6da33fc9f4691cda8f7efbc9f69179d3d39ec8a4799baf273ee1d8db0/charset_normalizer-3.4.9-cp310-cp310-musllinux_1_2_armv7l.whl": "sha256:65a7ff3f705e57d392f7261b6d0550fe137c3019477431f1c355e0db0a7d3e15",
-            "https://files.pythonhosted.org/packages/0e/42/6dbc00b8cd16011691203e33570fa42ed5746599a2e878112d16eab403a3/charset_normalizer-3.4.9-cp312-cp312-win32.whl": "sha256:78841cccf1af7b40f6f716338d50c0902dbe88d9f800b3c973b7a9a0a693a642",
-            "https://files.pythonhosted.org/packages/10/e0/47c079dd82d217c807479cd59ffd30af56307ea31c108b75758970459ad3/charset_normalizer-3.4.9-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl": "sha256:4d1c96a7a18b9690a4d46df09e3e3382406ae3213727cd1019ebade1c4a81917",
-            "https://files.pythonhosted.org/packages/14/cb/1db8b96547ee3186cd2dd7f2e59dd560a9b80748f3604171f3c153d62811/charset_normalizer-3.4.9-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl": "sha256:58150c9f9b9a552505912d182ccdf26f6396fb6094816ceebcbb20eecabaed94",
-            "https://files.pythonhosted.org/packages/17/6d/bff78a4bacc4891bc63ec5bdc6776d8c85e47fab93d0d5f6223068fad0a4/charset_normalizer-3.4.9-cp39-cp39-win32.whl": "sha256:93d59d504b230e83c7a843251681959a0b6a9cd76f6e146ce1b8a80eb8739af9",
-            "https://files.pythonhosted.org/packages/19/79/55c32d06d76ae4feafe053f061f3e3ab70bcf19f4007797ce8c3efda7830/charset_normalizer-3.4.9-cp314-cp314-manylinux_2_31_armv7l.whl": "sha256:f7fb7d750cfa0a070d2c24e831fd3481019a60dd317ea2b39acbcebc08b6ed81",
-            "https://files.pythonhosted.org/packages/1d/85/181c652953eb5276d198f375b1dd641047392050098100a3a02d6534f657/charset_normalizer-3.4.9-cp310-cp310-musllinux_1_2_aarch64.whl": "sha256:e9701d0049d92c16703a42771b98d560b95248949f23f8cf7b4eddd201814fb9",
-            "https://files.pythonhosted.org/packages/20/95/d75e82f8ce9fd323ebf059c16c9aadefb22a1ecde13b7840b35835e4886c/charset_normalizer-3.4.9-cp314-cp314-win_arm64.whl": "sha256:40a126142a56b2dfc0aacbad1de8310cbf60da7656db0e6b16eebd48e3e93519",
-            "https://files.pythonhosted.org/packages/28/e9/9fb6099b868c82a40698a748ae0fbd4f31ccc13844c176a07158ba2abbfd/charset_normalizer-3.4.9-cp39-cp39-win_arm64.whl": "sha256:476743fe6dfe14a2da12e3ac79125dc84a3b2cf8094369a47a1529b0cd8549fe",
-            "https://files.pythonhosted.org/packages/2b/f9/ef4a69ea338ad3c0deceea0f5f7d2380ae8b52132b06d652cb0d2cd86706/charset_normalizer-3.4.9-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl": "sha256:8a79d9f4d8001473a30c163556b3c3bfebec837495a412dde78b51672f6134f9",
-            "https://files.pythonhosted.org/packages/33/9a/895095b83e7907abd6d3d99aad3a38ad0d9686cc186cb0c94c24320fe63e/charset_normalizer-3.4.9-cp312-cp312-musllinux_1_2_aarch64.whl": "sha256:60f44ade2cf573dad7a277e6f8ca9a51a21dda572b13bd7d8539bb3cd5dbedde",
-            "https://files.pythonhosted.org/packages/36/31/a276bb2e66243072a3fd06fdcab9cbb61a305b02143d70d2bda21d888fa8/charset_normalizer-3.4.9-cp310-cp310-manylinux_2_31_armv7l.whl": "sha256:bcf74c1df76758a395bf0af608c04c82257523f55c9868b334f06270d0f2112b",
-            "https://files.pythonhosted.org/packages/37/8d/ca39a7559a4797505530d084fd3a49a2c959efbbbff146302fb7be4e3b35/charset_normalizer-3.4.9-cp310-cp310-win_amd64.whl": "sha256:8c041122946b7ba21bb32c45b1aa57b1be35527690aeb3c5c234521085632eee",
-            "https://files.pythonhosted.org/packages/3a/25/45f30093ae27dd7b92a793b61882a38685f993700113ca36e0c9c14965e1/charset_normalizer-3.4.9-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl": "sha256:a4fbdde9dd4a9ce5fd52c2b3a347bb50cc89483ef783f1cb00d408c13f7a96c0",
-            "https://files.pythonhosted.org/packages/3d/c6/eee9dca4439b1061f76373f06ea855678cc4a64c1c3c90b50e479edbb8eb/charset_normalizer-3.4.9-cp314-cp314t-win_arm64.whl": "sha256:19ac87f93086ce37b86e098888555c4b4bc48102279bae3350098c0ed664b501",
-            "https://files.pythonhosted.org/packages/3d/ca/ad1d7c7d3077dab873f539d3e1d083c0845a762cb0bafdfbe3ef93add598/charset_normalizer-3.4.9-cp39-cp39-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl": "sha256:920079c3f7456fa213e0829ed2073aaa727fd39d889ead5b4f35d0de5460d04f",
-            "https://files.pythonhosted.org/packages/3d/ef/d96ec496cfea0c21db43b0ad03891308b02388d054cc902cf0e5a1ad6a88/charset_normalizer-3.4.9-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl": "sha256:fa36ec09ef71d158186bc79e359ff5fdd6e7996fe8ab638f00d6b93139ba4fcf",
-            "https://files.pythonhosted.org/packages/42/ab/b9bc2e77d6b44a7e46ef62ec5cac1c9a6ba7b9135a5d560f002696ec9995/charset_normalizer-3.4.9-cp314-cp314-musllinux_1_2_aarch64.whl": "sha256:a4cfde78a9f2880208d16a93b795726a3017d5977e08d1e162a7a31322479c41",
-            "https://files.pythonhosted.org/packages/44/95/80282cce0fae9c3061203d723ee87da996aed79679e65d8935050ee7ca1f/charset_normalizer-3.4.9-cp311-cp311-manylinux_2_31_armv7l.whl": "sha256:c0323c9daef75ef2e5083624b4585018a0c9d5e3b40f607eed81a311270b934b",
-            "https://files.pythonhosted.org/packages/48/18/c8f397329c35e32f6a837e488986f4ae03bd2abebc453b48714991630c2f/charset_normalizer-3.4.9-cp313-cp313-musllinux_1_2_aarch64.whl": "sha256:416c229f77e5ea25b3dfd4b582f8d73d7e43c22320302b9ab128a2d3a0b38efe",
-            "https://files.pythonhosted.org/packages/49/ba/768fa3f36048d81c477a0ce61f813bc1454d80917ccfe550abd9f44f5e24/charset_normalizer-3.4.9-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl": "sha256:f840ed6d8ecba8255df8c42b87fadeda98ddfc6eeec05e2dc66e26d46dd6f58a",
-            "https://files.pythonhosted.org/packages/49/fd/a1d26144398c67486422a72bf5812cda22cb4ccfcd95a290fb41ceb4b8e2/charset_normalizer-3.4.9-cp314-cp314-win_amd64.whl": "sha256:16b65ea0f2465b6fb52aa22de5eca612aa964ddfec00a912e26f4656cbef890b",
-            "https://files.pythonhosted.org/packages/4b/4c/5361f9aa7f2cb58d94f2ab831b3d493f69efb1d239654b4744e3c09527cb/charset_normalizer-3.4.9-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl": "sha256:9104ed0bd76a429d46f9ec0dbc9b08ad1d2dcdf2b00a5a0daa1c145329b35b44",
-            "https://files.pythonhosted.org/packages/4e/6e/de0229a7ef40f6f9d28a837eebf4ec47bdca5dab4e900c84f22919af636a/charset_normalizer-3.4.9-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl": "sha256:4773092f8019072343a7447203308b176e10199920eb02d6195e81bbb3274c29",
-            "https://files.pythonhosted.org/packages/4f/8d/1569f4d0032d6ba2a4fe4591c35bf87868c600c41a71eb5c2e1ffa8464c2/charset_normalizer-3.4.9-cp311-cp311-win_arm64.whl": "sha256:1d22856ffbe153a602df38e4a5464f0b748a54002e0d69ac6d2ad0a197cc99ec",
-            "https://files.pythonhosted.org/packages/50/78/ce342ca4ff30b2eb49fe6d9578df85974f90c67d294113e94efdd9664cbd/charset_normalizer-3.4.9-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl": "sha256:7b86a2b16095d250c6f58b3d9b2eee6f4147754344f3dab0922f7c9bf7d226c9",
-            "https://files.pythonhosted.org/packages/52/94/af74dde74a3996bd959c350709bfe50e297823d70a8c1cbd54b838880863/charset_normalizer-3.4.9-cp314-cp314t-manylinux_2_31_armv7l.whl": "sha256:f86c6358749bd4fda175388691e3ba8c46e24c5347d0afd20f9b7edfc9faf07d",
-            "https://files.pythonhosted.org/packages/5e/be/7ee4453d7e88dfbc4104ccd34900b9f2c7c17dac22881865fe0e82424a25/charset_normalizer-3.4.9-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl": "sha256:b5314963fce9b0b12743891de876e724997864ee22aa496f903f426c7e2fa5b2",
-            "https://files.pythonhosted.org/packages/5f/c0/6eec7bdabe6cbbcc274ec04596f6d93865751a0541d33d60d1ce179bd372/charset_normalizer-3.4.9-cp39-cp39-musllinux_1_2_armv7l.whl": "sha256:ad41ba96094304aa090f5a30cb6e4fb3b3f1c264c523394b4c39bbacc4dc92ba",
-            "https://files.pythonhosted.org/packages/63/01/f2fb3bd3a73be48b173ee0c6aa8d2497af97d5663a8c4c4b491de4c62f7a/charset_normalizer-3.4.9-cp310-cp310-musllinux_1_2_x86_64.whl": "sha256:79580094b00d1789d1f93ea55bc43cb2f611910c72235b7657f3482ddcc1b22d",
-            "https://files.pythonhosted.org/packages/6a/05/c94d5cd23396289c54c93b02e0273b4dd8921641d9968c4828caf9bbaad9/charset_normalizer-3.4.9-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl": "sha256:df7276909358e5635ae203673ab7e509ddd224225a8d6b0790bf13eb2bde1cc5",
-            "https://files.pythonhosted.org/packages/6c/ef/2473d3c4d869155be4af1191111d59c4d5c4e0173026f7e85b176e23bf65/charset_normalizer-3.4.9-cp313-cp313-musllinux_1_2_x86_64.whl": "sha256:69b157c5d3292bcd443faca052f3096f637f1e074b98212a933c074ae23dc3b8",
-            "https://files.pythonhosted.org/packages/6d/46/79847edd07244a4a2d443c6655a7b6ee94203c21539414b059f32713c357/charset_normalizer-3.4.9-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl": "sha256:3c09a49d6cde137258beb3d551994a2927fd35ad5cf96aed573f61bbd67c5f84",
-            "https://files.pythonhosted.org/packages/6e/fb/d560d1d1555debbfe7849d9cac6145c1b537709d79576bf22557ed803b82/charset_normalizer-3.4.9-cp313-cp313-win_arm64.whl": "sha256:611057cc5d5c0afc743ba8be6bd828c17e0aaa8643f9d0a9b9bb7dea80eb8012",
-            "https://files.pythonhosted.org/packages/70/4a/ecbd131485c07fcdfad54e28946d513e3da22ef3b4bd854dcafae54ec739/charset_normalizer-3.4.9-cp312-cp312-macosx_10_13_universal2.whl": "sha256:45b0cc4e3556cd875e09102988d1ab8356c998b596c9fced84547c8138b487a0",
-            "https://files.pythonhosted.org/packages/78/ad/98aae8630ac71f16711968e38a5acfecce41b778bf2f0312851020f565a8/charset_normalizer-3.4.9-cp314-cp314t-musllinux_1_2_armv7l.whl": "sha256:cd6c3d4b783c556fa00bf540854e42f135e2f256abd29669fcd0da0f2dec79c2",
-            "https://files.pythonhosted.org/packages/7e/8d/496817fa0944239ecae662dd57ea765cfeaec6a735f9f025d4b7b72e7143/charset_normalizer-3.4.9-cp314-cp314-macosx_10_15_universal2.whl": "sha256:0327fcd59a935777d83410750c50600ee9571af2846f71ce40f25b13da1ef380",
-            "https://files.pythonhosted.org/packages/7f/f4/ffbb83546e1f198ecc70ecd372b65cf2b50f9068b380abd67640f17a8e18/charset_normalizer-3.4.9-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl": "sha256:16d10d789dd9bcca1173c95af82c58433122564b7bc39385124be735a35cbe99",
-            "https://files.pythonhosted.org/packages/80/33/6c99c1b3e6b8bf730e1bc809b9a2608f224145069114c479a2e9e1494346/charset_normalizer-3.4.9-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl": "sha256:c1225416b463483160e4af85d5fc3a9690ccb53fd4b1865a6437825f5ede3209",
-            "https://files.pythonhosted.org/packages/80/3f/bd97d3d9c613013d07cb7733d299385b41df37f0471310f5a73dc359f0b8/charset_normalizer-3.4.9-cp314-cp314t-win_amd64.whl": "sha256:9b8e0f3107e2200b76f6054de99016eac3ee6762713587b36baaa7e4bd2ae177",
-            "https://files.pythonhosted.org/packages/80/cc/f920afd1a23c58ccd53c1d36085a71893a4737ff5e66e0371efab6809850/charset_normalizer-3.4.9-cp312-cp312-win_amd64.whl": "sha256:4b3dac63058cc36820b0dd072f89898604e2d39686fe05321729d00d8ac185a0",
-            "https://files.pythonhosted.org/packages/83/d5/9096aa3cf532dfad237861544eb47a0f20d5adbf1039760fed8eaae935d9/charset_normalizer-3.4.9-cp311-cp311-win32.whl": "sha256:ac351b3b8014eead140e77e9717e2992c6bbe30b63bc3422422eb84865412e3d",
-            "https://files.pythonhosted.org/packages/83/dc/9b29fa4412b318bf3bfea985c35d67eb55e04b59a7c3f2237168b0e0be6f/charset_normalizer-3.4.9-cp312-cp312-musllinux_1_2_x86_64.whl": "sha256:03d07803992c6c7bbc976327f34b18b6160327fc81cb82c9d504720ac0be3b62",
-            "https://files.pythonhosted.org/packages/86/7e/5ce0bba863470fd1902d5e5843968951bddf38abe4742fc97116ef4598b3/charset_normalizer-3.4.9-cp313-cp313-musllinux_1_2_armv7l.whl": "sha256:75286256590a6320cf106a0d28970d3560aad9ee09aa7b34fb40524792436d35",
-            "https://files.pythonhosted.org/packages/87/3a/ad914516df7e358a81aae018caa5e0470ba827fa6d763b1d2e87d920a5f6/charset_normalizer-3.4.9-cp312-cp312-manylinux_2_31_armv7l.whl": "sha256:90c44bc373b7687f6948b693cceaea1348ae0975d7474746559494468e3c1d84",
-            "https://files.pythonhosted.org/packages/8c/e7/5ddfd76fc061eb52de219658a4aa431cbacadf0a0219c8854f00da50d289/charset_normalizer-3.4.9-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl": "sha256:33bdcc2a32c0a0e861f60841a512c8acc658c87c2ac59d89e3a46dacf7d866e4",
-            "https://files.pythonhosted.org/packages/92/8f/3a47a3667c83c2df9483d91644c6c107de3bf8874aa1793da9d3012eb986/charset_normalizer-3.4.9-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl": "sha256:e4fd89cc178bced6ad29cb3e6dd4aa63fa5017c3524dbd0b25998fb64a87cc8b",
-            "https://files.pythonhosted.org/packages/98/2b/f97f1c193fb855c345d678f5077d6926034db0722df74c8f057020e05a25/charset_normalizer-3.4.9-py3-none-any.whl": "sha256:68e5f26a1ad57ded6d1cfb85331d1c1a195314756471d97758c48498bb4dcdf5",
-            "https://files.pythonhosted.org/packages/9b/f2/c0d4b8508565a36bc5c624e88ed297f5b0b1095011034d7f5b83a69908b5/charset_normalizer-3.4.9-cp314-cp314-win32.whl": "sha256:c1c948747b03be832dceed96ca815cef7360de9aa19d37c730f8e3f6101aca48",
-            "https://files.pythonhosted.org/packages/a1/34/ef5c05f412f42520d7709b7d3784d19640839eb7366ded1755511585429f/charset_normalizer-3.4.9-cp312-cp312-musllinux_1_2_armv7l.whl": "sha256:a1786910334ed46ab1dd73222f2cd1e05c2c3bb39f6dddb4f8b36fc382058a39",
-            "https://files.pythonhosted.org/packages/a2/55/86048bde1c9d0352940bd7b87d825091a52aef67d01cde6c6f7342c5b552/charset_normalizer-3.4.9-cp39-cp39-win_amd64.whl": "sha256:ddf4af30b417d9fe16481e9b81c27ab2a7cde1ff7ba3e85653b02db7d145dc7b",
-            "https://files.pythonhosted.org/packages/a5/34/49b9060e8418b14fb5cba9cf6bfb383111e2538a03a1fb18e66a95aeb3d5/charset_normalizer-3.4.9-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl": "sha256:04ce310cb89c15df659582aee80a0603788732a5e017d5bd5c81158106ce249c",
-            "https://files.pythonhosted.org/packages/a5/ff/c946d63bc3786d5b84d960b0f7ab7e25b828486a946b5aa997625bcaf6a6/charset_normalizer-3.4.9-cp311-cp311-musllinux_1_2_armv7l.whl": "sha256:3d92613ec25e43b05f042302531ec0f00b8445190e43325880cbd6ab7c2581da",
-            "https://files.pythonhosted.org/packages/a6/ec/81e22253f4b7091eca6515bb3da5e45d05a663f7f567bb745695dc60f892/charset_normalizer-3.4.9-cp39-cp39-macosx_10_9_universal2.whl": "sha256:253a4a220747e8b5faf57ec320c4f5efb0cef05f647420bf267143ec15dba10a",
-            "https://files.pythonhosted.org/packages/ad/81/8e983840c6e5b93b33c2ba81aa3d52c2e42f0e9a690ce7607a2e61da4a5c/charset_normalizer-3.4.9-cp310-cp310-macosx_10_9_universal2.whl": "sha256:cd6280cf040f233bd7d3407b743b4b4c74f70e8e1c4199cb112a62c941c0772a",
-            "https://files.pythonhosted.org/packages/af/ba/5e5007c370702f85d2ef75791fac7943ed41e080364a673b20142e430e3e/charset_normalizer-3.4.9-cp311-cp311-musllinux_1_2_x86_64.whl": "sha256:280081916dc341820640489a66e4696049401ef1cf6dd672f672e70ad915aca3",
-            "https://files.pythonhosted.org/packages/b0/3e/faee8f9de92b14ee1198e9163252bb15efee7301b31256a3b6d9ebfdd0dd/charset_normalizer-3.4.9-cp313-cp313-manylinux_2_31_armv7l.whl": "sha256:5b10cd92fc5c498b35a8635df6d5a100207f88b63a4dc1de7ef9a548e1e2cd63",
-            "https://files.pythonhosted.org/packages/b1/27/693ee5e8a18191eb38647360c51cd505013e2bd3b366aa43fd5344c21e3c/charset_normalizer-3.4.9-cp314-cp314t-win32.whl": "sha256:0d861473f743244d349b50f850d10eb87aeb22bbdcc8e64f79273c94af5a8226",
-            "https://files.pythonhosted.org/packages/b2/06/97ec2aeae780b31d742b6352218b43841a6871e2564578ca522dce4a45c3/charset_normalizer-3.4.9-cp313-cp313-macosx_10_13_universal2.whl": "sha256:440eede837960000d74978f0eba527be106b5b9aee0daf779d395276ed0b0614",
-            "https://files.pythonhosted.org/packages/b3/46/03ddc7da576d814fe0a36dd1f0fd3258e95404b4b2e3c026b7923d7e133f/charset_normalizer-3.4.9-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl": "sha256:304b13570067b2547562e308af560b3963857b1fa90bd6afd978130130fe2d6a",
-            "https://files.pythonhosted.org/packages/bd/2a/23f34ec9d04624958e137efdc394888716353190e75f25dd22c7a2c7a8aa/charset_normalizer-3.4.9.tar.gz": "sha256:673611bbd43f0810bec0b0f028ddeaaa501190339cac411f347ac76917c3ae7b",
-            "https://files.pythonhosted.org/packages/c3/69/2a5385192e67175f7d8bd5ce4f57c24bc956439adeae5c13a99aa28a53d1/charset_normalizer-3.4.9-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl": "sha256:2a441ea71902098ffe78c5abe6c494f44160b4af614ed16c3d9a3b1d17fd8ee2",
-            "https://files.pythonhosted.org/packages/c4/02/c57a22739fe05246b0b5783b3bfb6afaac4eebb46f3ececdfb2f048f780e/charset_normalizer-3.4.9-cp310-cp310-win32.whl": "sha256:432786d3561e69aeeae6c7e8648964ce0ad05736120135601f87ac26b9c83381",
-            "https://files.pythonhosted.org/packages/c8/53/a8c042eb9eee4716f4d42a0f5a571eb32a09ec429be9fb0b8b9d765393ba/charset_normalizer-3.4.9-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl": "sha256:68ce9f4d6b26d5ccbf7fd4459bf75f74a0a146677ebba80597df60cbdb20e6f4",
-            "https://files.pythonhosted.org/packages/cb/32/2e64bd2be10e89c61e57ebe6a93fd98ae88eb7ebe414b5121f22c96c69eb/charset_normalizer-3.4.9-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl": "sha256:cc1b0fff8ead343dae06305f954eb8468ba0ec1a97881f42489d198e4ce3c632",
-            "https://files.pythonhosted.org/packages/cd/91/7253a32e86b7e1d1239b1b36ba6dd0f021a21107ab33054b53119cc083b9/charset_normalizer-3.4.9-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl": "sha256:51447e9aa2684679af07ca5021c3db526e0284347ebf4ffcec1154c3350cfe32",
-            "https://files.pythonhosted.org/packages/d0/39/8ff066c672434225f8d25f8b739f992af250944392173dcc88362681c9bf/charset_normalizer-3.4.9-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl": "sha256:21e764fd1e70b6a3e205a0e46f3051701f98a8cb3fad66eeb80e48bb502f8698",
-            "https://files.pythonhosted.org/packages/d0/a3/53ddae3db108a088156aa8ddfafd411ebbc1340f48c5573f697b27f69a39/charset_normalizer-3.4.9-cp313-cp313-win32.whl": "sha256:51307f5c71007673a2bf8232ad973483d281e74cb99c8c5a990af1eefa6277d9",
-            "https://files.pythonhosted.org/packages/d4/ce/9af95f7876194bd7a14e3dfe4a4de2e0bff02666a3910d72beafd06cc297/charset_normalizer-3.4.9-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl": "sha256:df115d4d83168fdf2cae48ef1ff6d1cb4c466364e30861b37121de0f3bf1b990",
-            "https://files.pythonhosted.org/packages/d7/74/3c12f9755717dfe5c5c87da63f35d765fa0c00382ec26bf23f7fae34f2ba/charset_normalizer-3.4.9-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl": "sha256:9cdef90ae47919cae358d8ab15797a800ed41da7aba5d72419fb510729e2ed4b",
-            "https://files.pythonhosted.org/packages/d9/8d/feabb82cb49fcad14515b1d7d1ca4787b0da7fc723a212bf89bc9e0fac52/charset_normalizer-3.4.9-cp311-cp311-musllinux_1_2_aarch64.whl": "sha256:67830fc78e67501f47bb950471b2dcb9b35b140084429318e862895a8e89c993",
-            "https://files.pythonhosted.org/packages/de/d1/b4319dc3229d8272fba305e206fc0a148e2de8d4087917ce62ae6382f359/charset_normalizer-3.4.9-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl": "sha256:aa99adc8f081b475a12843953db36831eaf83ec33eb46a90629ca6a5de45a616",
-            "https://files.pythonhosted.org/packages/e4/56/6c745619ac397e8871e2bcd3cea1eec86b877488f33888b3aef5c3ed506e/charset_normalizer-3.4.9-cp314-cp314t-musllinux_1_2_aarch64.whl": "sha256:83aed2c10721ddd90f68140685391b50811a880af20654c59af6b6c66c40513c",
-            "https://files.pythonhosted.org/packages/e8/5f/b98b8da398637b551e427e7be922bdec19177dc54d6811dcdaa503f23aac/charset_normalizer-3.4.9-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl": "sha256:9bb41182d93ea91f60b4bc8fbf4c820c69ef8a12ab2d917f3f1834f1acad07e8",
-            "https://files.pythonhosted.org/packages/e8/ef/6953a77c7cf2c2ff9998e6f575ab3e380119f100223381565a4f94c1f836/charset_normalizer-3.4.9-cp313-cp313-win_amd64.whl": "sha256:fe2c7201c642b7c308f1675355ad7ff7b66acfe3541625efe5a3ad38f29d6115",
-            "https://files.pythonhosted.org/packages/ea/f8/72eb13dcabe7257035cea8aefd922caad2f110d252bf9f67c4c2ca763aee/charset_normalizer-3.4.9-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl": "sha256:84fd18bcc17526fc2b3c1af7d2b9217d32c9c04448c16ec693b9b4f1985c3d33",
-            "https://files.pythonhosted.org/packages/eb/78/59344ff9a4a7b5f6530bf7bec2c980047cc42c3a616596cdbd8cb5c1a1af/charset_normalizer-3.4.9-cp39-cp39-musllinux_1_2_x86_64.whl": "sha256:43b9e366a31fdd1c87d0eb08f579b4a82b723ea54338f040d6b4e518a026ea29",
-            "https://files.pythonhosted.org/packages/ec/96/5d9364e3342d69f3a045e1777bc47c85c383e6e9466d561b33fdb419d1f9/charset_normalizer-3.4.9-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl": "sha256:9b2aff1c7b3884512b9512c3eaadd9bab39fb45042ffaaa1dd08ff2b9f8109d9",
-            "https://files.pythonhosted.org/packages/ec/b4/ef5a49b2e77c00deb43bb3256592b115ba9e4346016e82c516b8d215bf68/charset_normalizer-3.4.9-cp39-cp39-manylinux_2_31_armv7l.whl": "sha256:231ddcbb35e2ff8973e1365db41fe0572662893b99a05deb183b68ad4c0c8bd4",
-            "https://files.pythonhosted.org/packages/ed/61/710738687f90d01c06a04ed52d6ca1e62dd9b1d8cc2567098167c4691034/charset_normalizer-3.4.9-cp39-cp39-musllinux_1_2_aarch64.whl": "sha256:0fa1aec2d32bcc03c8fa0f6f1712caad1adc38509f31142112e5c9daf5b9c833",
-            "https://files.pythonhosted.org/packages/ed/a1/e29995109e455dc8eff8d0fac6ae509be39561318a7cfeac5d33ad029213/charset_normalizer-3.4.9-cp311-cp311-win_amd64.whl": "sha256:6366a16e1a25018694d6a5d784d09b046edc9eac40ea2b54065c3052672516a1",
-            "https://files.pythonhosted.org/packages/ee/f0/f1c4fe746c395922961b5916ed1d7d6e7d4c84851d19ed43cc89980ec953/charset_normalizer-3.4.9-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl": "sha256:32286a2c8d167e897177b673176c1e3e00d4057caf5d2b64eef9a3666b03018e",
-            "https://files.pythonhosted.org/packages/f0/e6/0386d43a261ff4e4b30c5857af7df877254b46bec7b9d1b74b6bf969a90b/charset_normalizer-3.4.9-cp312-cp312-win_arm64.whl": "sha256:78fa18e436a1a0e58dbd7e02fc4473f3f32cceb12df9dfca542d075961c307d2",
-            "https://files.pythonhosted.org/packages/f1/60/b22cdbee7e4013dab8b0d7647fc6181120fbbbc8f7025c226d15bd5a47fc/charset_normalizer-3.4.9-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl": "sha256:bd47ba7fc3ca94896759ea0109775132d3e7ab921fbf54038e1bab2e46c313c9",
-            "https://files.pythonhosted.org/packages/f1/78/c9c71d599f5aa2d42bcdd35cbbd46d7f535351a57e40ff7d8e5a7e219401/charset_normalizer-3.4.9-cp314-cp314-musllinux_1_2_armv7l.whl": "sha256:d4d6fcde76f94f5cb9e43e9e9a61f16dacefd228cbbf6f1a09bd9b219a92f1a1",
-            "https://files.pythonhosted.org/packages/f4/c4/b3e049d2aa3766180c78507110543d9d50894cc97f57de543f1be521dcdc/charset_normalizer-3.4.9-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl": "sha256:c25fe15c70c59eb7c5ce8c06a1f3fa1da0ecc5ea1e7a5922c40fd2fa9b0d5046",
-            "https://files.pythonhosted.org/packages/f6/39/c914445c321a845097ce4f6ac7de9a18228a77b766272125a1ce00d851eb/charset_normalizer-3.4.9-cp314-cp314-musllinux_1_2_x86_64.whl": "sha256:898f0e9068ca27d37f8e83a5b962821df851532e6c4a7d615c1c033f9da6eedf",
-            "https://files.pythonhosted.org/packages/f7/40/9593d54209765207a7f11073c06494c1721e4ca4a0a426c597679bf7f91e/charset_normalizer-3.4.9-cp314-cp314t-musllinux_1_2_x86_64.whl": "sha256:ee2f2a527e3c1a6e6411eb4209642e138b544a2d72fe5d0d76daf77b24063534"
+            "https://files.pythonhosted.org/packages/01/65/d43b714731bb2f40d4053dfa00ecfc1c5a301f8e3316c5db3a09af59fe94/charset_normalizer-3.5.1-cp37-abi3-win32.whl": "sha256:dd732602a7009217f658d5863d12d79d373a4de0eebc111094bcdd3bb8e0a6cc",
+            "https://files.pythonhosted.org/packages/02/fc/0d9ab98fa7a61394353e8acd0f5f60fc6e94a4615f574af8be0eca14a7ef/charset_normalizer-3.5.1-cp39-cp39-musllinux_1_2_riscv64.whl": "sha256:433c5a81eade63b47e522303bad236f59dba55ea6951746f5558355eeed8c75d",
+            "https://files.pythonhosted.org/packages/03/3b/0cc9a26777334ab2f2e3089b948bbf4e4fe72ea70b897715ef6415043ec8/charset_normalizer-3.5.1-cp315-cp315-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl": "sha256:baf3775a2635e5a11fbd5e4e64ee69c7e86875d224a5c72aca4c141064589a90",
+            "https://files.pythonhosted.org/packages/03/6d/439231dfc3ccfa6f8c06477b7da2219cbd41a2de3d49084df8ec7b5100f2/charset_normalizer-3.5.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl": "sha256:e9fbdce1e47394b09bc9f26ab117dfc8d6491977a11d86f592bb42c779db2fda",
+            "https://files.pythonhosted.org/packages/06/ae/7ae8807410dfa33f8e6f1715740adeaafa8a816cc4cb33508f54b1f7c896/charset_normalizer-3.5.1-cp314-cp314t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl": "sha256:7ac76cf9afd34929d76eb7fcb63be476a4853d8a96f0dcf2d0db68a0cbdf9885",
+            "https://files.pythonhosted.org/packages/09/0a/d3646670292ce8d8f8cc11ac067d44885e697a5591f57a9221128da5e7b3/charset_normalizer-3.5.1-cp313-cp313-ios_13_0_arm64_iphoneos.whl": "sha256:9362dd90aa7dab48c0054a21187791ccf05473f7dba5d92b8033ae62164675e7",
+            "https://files.pythonhosted.org/packages/09/53/27923ce5cc6cbccb832037b27dca98882d9c53e9b69e866bbbef4aae7fc8/charset_normalizer-3.5.1-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl": "sha256:d59b75732e9b6f27388e10c14b0259cc5f2e48c78627d185e6a177b58ad3cffe",
+            "https://files.pythonhosted.org/packages/0d/35/731ac04aa0a097fc1c97f0994c375bdb230c6c96619db794208fe664e9ce/charset_normalizer-3.5.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl": "sha256:c7b742bf31c88566b4bb6335a7f393bb322e580b6bb98df7bd0c25e6e3519ce8",
+            "https://files.pythonhosted.org/packages/10/4c/dc48409274a1817ff349711d26c62aa0c597df865d4d69ef79160c859193/charset_normalizer-3.5.1-cp315-cp315t-musllinux_1_2_riscv64.whl": "sha256:77efcff2b23071c349402ac1066667a3d011f62398d81408c9b88ad991747c9e",
+            "https://files.pythonhosted.org/packages/17/d4/b65c433fc521e58b5f54293982a5e51c05cb5f2dd3f1c7a6acb65b75324e/charset_normalizer-3.5.1-cp311-cp311-win_arm64.whl": "sha256:ae31a1a1db2ee6cc2942fccaf695c934bc7f3db9f2133a3fef1f367cf1a4ab10",
+            "https://files.pythonhosted.org/packages/18/57/a305c968be1ca13f3dd1b32f445877e97addf55d80b65c7cb35fac82b777/charset_normalizer-3.5.1-cp313-cp313-android_24_x86_64.whl": "sha256:88ca277405c2d3b71c4e1c2ee0e7966e807bcba86a69d11e19ba199d18ae4491",
+            "https://files.pythonhosted.org/packages/18/96/2b3a21492d9f65171ac75d872f5018260013d00bfa0ff70ec9f179148cbd/charset_normalizer-3.5.1-cp37-abi3-musllinux_1_2_ppc64le.whl": "sha256:4c4fb141a727957c93edfe5c32a26ceb6b5f6461d67146e2d39f51e16170bea8",
+            "https://files.pythonhosted.org/packages/1b/ee/e4e10a94d51cd1ee638aa7e00b65399e6b2a4e8376ab6d2eac9f95586671/charset_normalizer-3.5.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl": "sha256:58d4aa13a59c969dbfdf9e6a9560e242cbfd9e8a8f50c2747714df1a423adf65",
+            "https://files.pythonhosted.org/packages/1c/6c/c73fa9d5a85f6ab05395de61c5f6984e0a9ff40bb5ff888d46dff02526c6/charset_normalizer-3.5.1-cp314-cp314t-macosx_10_15_universal2.whl": "sha256:fbc597639158fd7c14d55e808718848319540f51b0e6746e3eefa59723a4a348",
+            "https://files.pythonhosted.org/packages/1c/a5/cbe418bbc6ecdfc3e05a0116002897c4b403a5e838d697e64c78e9f0190d/charset_normalizer-3.5.1-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl": "sha256:823f82903d189af463d7df250ef1f7f696f3cee08cc8d91deb565e8d425f6506",
+            "https://files.pythonhosted.org/packages/1e/25/ed3f9919c5aef8cc818be1f972f565f7610d7b2076b8ebb98839516ffc3c/charset_normalizer-3.5.1-cp315-cp315t-win32.whl": "sha256:ac13b004224fb341e1e25a1ed5e19d32f57cdb2a403e01f003b46f051a550f6f",
+            "https://files.pythonhosted.org/packages/20/c8/c36f6e0b2dfec351bd38cbc05362697e58bcd073d7dbd95154290c9714ce/charset_normalizer-3.5.1-cp310-cp310-musllinux_1_2_ppc64le.whl": "sha256:07ffd07412fc5d5e84cd8952acf9ff7e4ed7a708e69d1bada19d8ba91711353f",
+            "https://files.pythonhosted.org/packages/22/95/b4618ce912e6db0b1aae89ba788e38e8a7eba0f3025cc66e8c0699f977b2/charset_normalizer-3.5.1-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl": "sha256:6b7430cf5728e68f6c462254009a6ef4086e1bea43cf2f57aa9c55fb4f50ff96",
+            "https://files.pythonhosted.org/packages/26/de/d8e48c135ae480879539cdb179c8d3b50c7879497d75dd899b5763b69cee/charset_normalizer-3.5.1-cp315-cp315-musllinux_1_2_armv7l.whl": "sha256:838648accb3a7fd9803fd45c87bce8509648eb0c11bc34e216141300977244f2",
+            "https://files.pythonhosted.org/packages/27/e9/61c01fb8b804692569c036b3fc50495814502dcf13a60649c6055390b02c/charset_normalizer-3.5.1-cp314-cp314t-win_arm64.whl": "sha256:fdb8a068947befafba9952162645dc2fecaeb400e64584829ed5e9b2fbe21a7f",
+            "https://files.pythonhosted.org/packages/28/53/a2d249ebddf47b889a100c0bdcb61a2f9dbb8bc24ef325cc062e4f476877/charset_normalizer-3.5.1-cp315-cp315t-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl": "sha256:e4b018dc5a0eee4676e38fe84a47a427816c590b93b55d9025274ec4d6ffc2dc",
+            "https://files.pythonhosted.org/packages/28/f0/0c0ceec6d98b7daa62e361e418135d59685811d79ba11529aad5cdf15e84/charset_normalizer-3.5.1-cp311-cp311-musllinux_1_2_aarch64.whl": "sha256:0722590aabf9dc6a6c0343d523c05458fa2b5047dbe6302fd526bb570600753f",
+            "https://files.pythonhosted.org/packages/29/cd/2b812ce5e888f1ce69a5350281e58aab07ae64a958ecae8912f30865718e/charset_normalizer-3.5.1-cp314-cp314-android_24_arm64_v8a.whl": "sha256:774d157f112367ff4abd29019f38f023c24e00e56edc7829c20e358a5a913ad8",
+            "https://files.pythonhosted.org/packages/2b/b8/11d4840bfc99330cc7fbcc2681ee5a044553a6e77655508d8f9b2bff7b34/charset_normalizer-3.5.1-cp37-abi3-musllinux_1_2_armv7l.whl": "sha256:36047af20e17097c3bb9476c2b7655f2f7aa51322c0ba58c07695bedf755a950",
+            "https://files.pythonhosted.org/packages/2e/1d/0fc91aeaeb3c83b748f532399ce67cf84604b48297405d740000f7a9e786/charset_normalizer-3.5.1-cp314-cp314t-musllinux_1_2_x86_64.whl": "sha256:85d5855daafc240cc045c026d7a15fd198a09b0fc8ff6f5ecbb5297b509cb11e",
+            "https://files.pythonhosted.org/packages/2e/57/de221f1745a90d418199761967e2776bfe2c275a1194220985e8c1d37833/charset_normalizer-3.5.1-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl": "sha256:854066be00447fa8de2ccbbe893e2ffc4b123ef16d897af794c1e18bd4a714b0",
+            "https://files.pythonhosted.org/packages/30/27/78873dc8b6a56357517b74b6bb9568b80450e7bb4f6ef7e3fa9d22aa0bd7/charset_normalizer-3.5.1-cp312-cp312-macosx_10_13_universal2.whl": "sha256:5b6d1386bf0096d26d3a863dc0a487a5b4eb9aa93cf5ba69683d29dde6b9d60f",
+            "https://files.pythonhosted.org/packages/30/c7/63565f860921457feba93bae6c86fb7746deb4cffeed2f375cb845318146/charset_normalizer-3.5.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl": "sha256:e71c909f353863b2b89c83de2ebed71ea6d0df8a6ef65a128193c5e650766bef",
+            "https://files.pythonhosted.org/packages/31/e7/1d994be1b93d41e9502b8b0460eaa88a1dd8df335df415db87d6c3e91ab2/charset_normalizer-3.5.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl": "sha256:94d78ecec2605a8d0398b0f365d5f12a63248438516f5dac536a5eff7337df4a",
+            "https://files.pythonhosted.org/packages/32/90/fcc850bae791abd2e0c041847f13e270aa08692a79f3e00de6d2dce1cb50/charset_normalizer-3.5.1-cp315-cp315-musllinux_1_2_x86_64.whl": "sha256:687c9ca3035544b113bea2055e180af96fb63c0c476e22a9180f51925186e7b7",
+            "https://files.pythonhosted.org/packages/32/cd/4f564b8f132de25db594efc706897069f016790cea63a5669c9df2675f64/charset_normalizer-3.5.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl": "sha256:96eefc178f8636b9c760c5829345307fd81cfae9ab1e80997dbddeb0f54ee9a3",
+            "https://files.pythonhosted.org/packages/34/17/672c251a888ed2aebcdd2fe830ad0104e25ff83c43f5c4f9c15e9fc6853c/charset_normalizer-3.5.1-cp314-cp314t-musllinux_1_2_armv7l.whl": "sha256:52ec005752a56ae79547a05c0139ca2501a0c866390b6115008456b9f0e7cde1",
+            "https://files.pythonhosted.org/packages/34/f7/b13b1ccae2c8ec63980d13be1890eb73f8aeabbfce02a24aabc0908788f5/charset_normalizer-3.5.1-cp315-cp315t-musllinux_1_2_x86_64.whl": "sha256:4d26f14f041e83dd8edfd61f4cd4fa7285d31798b5bf1f28e70c367ba6c41d61",
+            "https://files.pythonhosted.org/packages/35/4f/b911ed898b26a09789eba9c9200c999aff6c61b4bafaf4838e56d1a1e1a3/charset_normalizer-3.5.1-cp37-abi3-win_amd64.whl": "sha256:70055ff39b97c99e7ae40ea3e393fb62aa2e44dbd9b29f8d14f42fb0025c3959",
+            "https://files.pythonhosted.org/packages/35/5a/337e4663a5eae6de99db940ee8066d4145caafb61327db62deda15313cce/charset_normalizer-3.5.1-cp312-cp312-musllinux_1_2_riscv64.whl": "sha256:7235dc28fc6dd9d832ac7c7bce95367dedb85929f17368a0c2bee1e080b9acbf",
+            "https://files.pythonhosted.org/packages/35/8a/3d130aeabcaf3d2466af76b7b141c08d9e89c9016ab4b7cdd0f7dc2d1c62/charset_normalizer-3.5.1-cp37-abi3-musllinux_1_2_s390x.whl": "sha256:3588e376b3ea2eea84976f67273d679f229e24c66dce7b82ae45aef04ff6e072",
+            "https://files.pythonhosted.org/packages/37/2e/651d910af6d0fba325eee1cda37ec5443462ed25360e666c144166eb6091/charset_normalizer-3.5.1-cp313-cp313-musllinux_1_2_s390x.whl": "sha256:35fe081843b35aad20ffeccec3eeffbe637b15d14f3fb22cc1b59cd8ec17e93c",
+            "https://files.pythonhosted.org/packages/37/ab/4e4510e1e288478e2c8333131d1c1382382ba8cd2165053c79e39d1da961/charset_normalizer-3.5.1-cp311-cp311-win32.whl": "sha256:ac00177c4831ffa650f8609e4bdddd5fe09c03b1c0c47acece7e6ea20421598b",
+            "https://files.pythonhosted.org/packages/38/fe/341861ac118dae06f3ec0eb487488af52128f2ef2faf0b11003944d22259/charset_normalizer-3.5.1-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl": "sha256:7c0c10730342b0c9b35dd1d619beb8214e520bd96a1f870f452680b238aab3e0",
+            "https://files.pythonhosted.org/packages/3b/32/9b8929bf384061ee1fe5d9c27c6f9776d3d824039ad4e14c88ec00c7808e/charset_normalizer-3.5.1-cp315-cp315t-macosx_10_15_universal2.whl": "sha256:59171c6e45bf07d0d5cab3b0bf81d945035530f6873398b3b531c31184d46663",
+            "https://files.pythonhosted.org/packages/3d/bb/618749d70f792b44252a777bf89bfb86823b9bbc1ea13fe8ce759b07f38a/charset_normalizer-3.5.1-cp314-cp314-musllinux_1_2_riscv64.whl": "sha256:fce8cbd4997efeb450bd298b54f755dcdff18d496f7a5ddbb4867c6d7c88fdc3",
+            "https://files.pythonhosted.org/packages/3e/11/e6f5b9a3d0e55b0ef7505cd3765cdd48f22db89994c947b316f52f801fd8/charset_normalizer-3.5.1-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl": "sha256:256dd4d85d9e4dc595e2bc983c980e73f62ddeb3165c58b4c3dfe78c5c8548c1",
+            "https://files.pythonhosted.org/packages/3f/fc/f6a85abebd42ce4da2f1db0aa56cc6a0df1995e318b3875d14401b8381d1/charset_normalizer-3.5.1-cp314-cp314t-musllinux_1_2_ppc64le.whl": "sha256:2bced4061f000f7187254a02ad3433ae17eaf991747ceea2f478422590a5bba9",
+            "https://files.pythonhosted.org/packages/42/85/f9e22af69af67c54cce42be9455d9c81294f918b4ccc454db01f66efcac2/charset_normalizer-3.5.1-cp311-cp311-musllinux_1_2_ppc64le.whl": "sha256:bd6c173f04743d483881bffa1478d5a4624475b8cd1d2194956a75548e191c18",
+            "https://files.pythonhosted.org/packages/46/22/111e5be3b740d5c2a5bfcedb3d237b6591e5c2e82ae9d6ffcb121fe0909c/charset_normalizer-3.5.1-cp312-cp312-musllinux_1_2_armv7l.whl": "sha256:5d8531a6569d025f68e2321e7638fb7978f23db58e5f69f56913837aae03816e",
+            "https://files.pythonhosted.org/packages/49/e0/716601f3cc69be7b198951150c75ead1ece33c3c8036ff6ffa46029659a0/charset_normalizer-3.5.1-cp37-abi3-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl": "sha256:343fb4f2821043bd87095f7b08a1a181febc8e36ac64212143bbfd0a0e1bc235",
+            "https://files.pythonhosted.org/packages/4a/4e/8544831ef59d8f27ce92c80871380fdacc8076a8a56ed62f82e54f991333/charset_normalizer-3.5.1-cp315-cp315-macosx_10_15_universal2.whl": "sha256:9085f87b0e38a2b92b8923059b4e8789fe40d9279712d15dcc670048d77079af",
+            "https://files.pythonhosted.org/packages/4d/66/70dfad64f15be09c15ccfee81330a7e515895dbe296dd23114e9a231268a/charset_normalizer-3.5.1-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl": "sha256:fa48b1b63d639f9483e0633e092f5851e2348c352f1f9bb6c8182f87884ef876",
+            "https://files.pythonhosted.org/packages/4d/81/ae557d3c44d1a1d688696d60563413a0866a91b7ebc50f20df838be3d8c8/charset_normalizer-3.5.1-cp314-cp314t-win_amd64.whl": "sha256:acaf604462bf330b0d07e7a07c1d6e4adac79e5fb13e9c5140590542cafacc00",
+            "https://files.pythonhosted.org/packages/4f/ab/74a55fd803916a35ac461daf002708191aac19b546b80dc8cabfedc63d98/charset_normalizer-3.5.1-cp314-cp314-musllinux_1_2_x86_64.whl": "sha256:9ac4444d8d4fd4c4bd08bf451ed3167aa9e7ec6cdb41b648794f1d1103652e36",
+            "https://files.pythonhosted.org/packages/53/31/7f79c671d827080d6eecd697fbbeb4f0f6f8507bf4c5625b5f6398ec5876/charset_normalizer-3.5.1-cp39-cp39-win_amd64.whl": "sha256:012a22b88a77ca2e59b98ac5889b0deb604147666032f45e6d6e217634d2550d",
+            "https://files.pythonhosted.org/packages/55/53/7d819bd23a00ef45039146fa2cce1daa2f0771e758c5653ee1f6edac91ed/charset_normalizer-3.5.1-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl": "sha256:00668ebb0609751758682eb0b5857e7c35b9f00e84dfdef062e103244ec94d45",
+            "https://files.pythonhosted.org/packages/55/66/3bb56a47f7dcba014055b1a1d33c6f08bbe9c1e74dba154cfa25f90ae885/charset_normalizer-3.5.1-cp315-cp315t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl": "sha256:19a3dd5aa73cef1c99687c4fc57db016a9c17104ae1185da88ba566a5d3bebe4",
+            "https://files.pythonhosted.org/packages/58/67/62df6a907162461f372e95cbbc1bc64c7457e86abcc851feb84409a11eff/charset_normalizer-3.5.1-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl": "sha256:3e5e1224c0a6a90e05843e07adfec669edebec17801c67072f51e59561d63c0b",
+            "https://files.pythonhosted.org/packages/58/ad/b9aecf38d805cbcf84fa94f14c5d972a16561e20296a11dc799a5dcf3763/charset_normalizer-3.5.1-cp310-cp310-musllinux_1_2_x86_64.whl": "sha256:494b70049a4d69aec6e8137c13af4cf8db8c9f9820a1392ac293b0dd2987a818",
+            "https://files.pythonhosted.org/packages/5b/75/5b20dd1e6573a01a08158fe104104fa2c8abf941745596954185726cd46c/charset_normalizer-3.5.1-cp313-cp313-win_arm64.whl": "sha256:fd0a274c0e5f9a21565cd9d3dd749b61f96b7aa1e20a93aa1ba4029518f2e5c0",
+            "https://files.pythonhosted.org/packages/5b/97/fb4e82231aba271ffd775a1b4993b0defc4e3059f286ae41d9433409fe85/charset_normalizer-3.5.1-cp37-abi3-macosx_10_9_universal2.whl": "sha256:41876ee62a3dddf48ff1121ad8f0798032aa03f2fd35f21f34a4cab14f18d8d2",
+            "https://files.pythonhosted.org/packages/5c/64/12b4c2a11ee8df4fcc518c78b0d93e3a92bd3d5253d1617ce74ff0e8c7ef/charset_normalizer-3.5.1-cp313-cp313-musllinux_1_2_riscv64.whl": "sha256:90b7481fb62fbe172c558bc6fd1c4c98d82004a54a7551f20e11ac9bf0b8708c",
+            "https://files.pythonhosted.org/packages/5e/fa/40414471acf0aa0692ca77305aa00e434fcd8288f0941c93c30e9a5f8f2f/charset_normalizer-3.5.1-cp315-cp315-musllinux_1_2_s390x.whl": "sha256:cc0329df4caaceb950d2f580b5ac716a377f7059624a0bafaeaf8a218c6ed774",
+            "https://files.pythonhosted.org/packages/62/16/46556278c2168d12df9da7fede5dc6fc70e60301b26a82bbeec238c9cfe3/charset_normalizer-3.5.1-cp312-cp312-win32.whl": "sha256:cfa1c0cc3a8f9f53f1243a5a99ac36fd003880199383b37672e86ddda9cb07e2",
+            "https://files.pythonhosted.org/packages/64/60/7c5469f455f4fa65d39da9f088dffc1a586560bfb9e3279441eed78bd469/charset_normalizer-3.5.1-cp39-cp39-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl": "sha256:994e883d17c559cdfd38c84003c8b27d25424a1077272a17e7cd27bfe0bf57b2",
+            "https://files.pythonhosted.org/packages/64/77/9ae101cb33bd9f681551e82a2b9e08eec99ff715458340931370f4228de9/charset_normalizer-3.5.1-cp39-cp39-musllinux_1_2_x86_64.whl": "sha256:eb12fb2ba69ffa05f8695f61c69e591dc4b4a12ac3757ac8af8adb259bf56d17",
+            "https://files.pythonhosted.org/packages/67/c4/217755fd1abc50d326c252922cd642002758095a81ff45010337b8b3ef65/charset_normalizer-3.5.1-cp315-cp315-musllinux_1_2_ppc64le.whl": "sha256:195ce897c6153c0700078142cf8efe3e6454ca4cf4357499e4078dfd83396626",
+            "https://files.pythonhosted.org/packages/69/2b/d8be3523ddf9f0b0f3e56d1359034aa10653a4d11564c697f802b4775766/charset_normalizer-3.5.1-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl": "sha256:ce854f5f478050ade5a238731c4ca985a7d3b3cb53ff600a9b5c3b689b5f0a7a",
+            "https://files.pythonhosted.org/packages/69/d5/43c2b3e9d8267092b913eb8b0603f0f71993c395632886bd37a7223f96cf/charset_normalizer-3.5.1-cp315-cp315t-win_amd64.whl": "sha256:35aea775dc2bd5f54cd84a1cd2696cc3207c479cb9cf0bd346f0d343e4300ddb",
+            "https://files.pythonhosted.org/packages/6a/b6/034f6802e9c3f6418966cfabb7db8c9252cc2429c5098f41cc43af804149/charset_normalizer-3.5.1-cp311-cp311-macosx_10_9_universal2.whl": "sha256:eda059b6bc8bc0812d626fd91a7ce01bf583df0a61296eff390fd94141a34e30",
+            "https://files.pythonhosted.org/packages/6f/89/bb5108dc6c3651dca963f2b0a3ba19bbcb370c94e1b6d3e0e844a58e6dca/charset_normalizer-3.5.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl": "sha256:b9af956078716df40d985fb0dfeb2c2120c5ca92ba4ff4b388acfd01cdc14d08",
+            "https://files.pythonhosted.org/packages/71/aa/554e2614f38fc34c58ff1d0911ae8535ad2516440d5482d76fe59f1088b0/charset_normalizer-3.5.1-cp310-cp310-macosx_10_9_universal2.whl": "sha256:d1ee1e296209fdce05b81b663250eefa02213a2da7b41bf26f7829b8ba3545aa",
+            "https://files.pythonhosted.org/packages/74/76/f2fc7380f056cc273a53af37f50d08ad54b2c59f61078f31432edcf1c2bd/charset_normalizer-3.5.1-cp314-cp314-ios_13_0_arm64_iphonesimulator.whl": "sha256:4c9548dc78002099910abaebc0a72ac58b7d30931869e0351c09b507dff4ece3",
+            "https://files.pythonhosted.org/packages/75/9c/019fbb9f4834491a160951349b1a3714439376f66e5f7cf18b4f18f0c7aa/charset_normalizer-3.5.1-cp37-abi3-musllinux_1_2_aarch64.whl": "sha256:a2028475ba855475b8b4d3cfeb4994269c967aea8b9892dfba907f4263a863a3",
+            "https://files.pythonhosted.org/packages/76/4e/362d4f9fdcdf5556fb2aa3ce7d4a58ebce03ed1ff03aa1d9aca8d02f13f3/charset_normalizer-3.5.1-cp313-cp313-pyemscripten_2025_0_wasm32.whl": "sha256:9d9a0dc7cbe9bec24c3f767c9122c41fe5a1bc43f47cd099d00d393e09769de4",
+            "https://files.pythonhosted.org/packages/76/84/6f1290fa07ae6978d3960caa3eb1b8019bf9284ab7c2297b00c099ef4250/charset_normalizer-3.5.1-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl": "sha256:1d1c7a53a6c2103925cdd6d7229f8c567379f211c869793df679f2e9f738c369",
+            "https://files.pythonhosted.org/packages/79/71/6ee3a48a21e844e5079d8e9b2e91c641da5a7912a748e9e94c9e3ab9ce1c/charset_normalizer-3.5.1-cp39-cp39-musllinux_1_2_s390x.whl": "sha256:13e3afe97712e8887cd516e960c63f0b93122971e5b5e4b2622fe7701771e838",
+            "https://files.pythonhosted.org/packages/7a/7c/4938c329b6a9d446f6a59aa2092ff7118f274209b5ed0e26893d1d30a63c/charset_normalizer-3.5.1-cp314-cp314-win_amd64.whl": "sha256:c658c50ac0c98cd755a2dd50b7977d3bca7df401dcc47fbdfa87db53ef7d4e8b",
+            "https://files.pythonhosted.org/packages/7a/c2/071575791dcc88316c0a9a65ce38897a82e4cfe4a325f0f7fe1b1ac47bcf/charset_normalizer-3.5.1-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl": "sha256:394fea06235c8543390050ed5f529187074b029fb027213f6c46ac11ab5d950e",
+            "https://files.pythonhosted.org/packages/7c/c1/49a91fe7e97c8140094ca5c64161ab623a70d9f636bf834eace14048acb5/charset_normalizer-3.5.1-cp315-cp315t-musllinux_1_2_armv7l.whl": "sha256:252d099029bcbea642f2a06c4ed5046bdf8b5a8150b64afa5e027e88b106e5ee",
+            "https://files.pythonhosted.org/packages/7d/07/469f78af590f7d5cd48e20d8dbfa3d66deeff9ba37768c04d886b5afd45c/charset_normalizer-3.5.1-cp315-cp315t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl": "sha256:ced3fdd71aaa83ce593746c2edb42b7a59cb4c19c8b5c407781c72e493aae55a",
+            "https://files.pythonhosted.org/packages/7e/3f/ffb64458527c7668031d5eb095d978de561958dc9f5b53f8e488a533e603/charset_normalizer-3.5.1-cp314-cp314-musllinux_1_2_s390x.whl": "sha256:6c9cdde8becb25a7fde49924511aa2644d6f8081cc8df8e9452724303348d8e3",
+            "https://files.pythonhosted.org/packages/7f/a6/e3b46852424246065355644f4fb6dbccc0239a42a2eee27ecfc8957f0bcd/charset_normalizer-3.5.1-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl": "sha256:2679de311c7946dde5d3b6f44941844133ff5c7cb86099c0061ab1e8901c20a8",
+            "https://files.pythonhosted.org/packages/80/c2/a7379b840292d0c1ab9fbd17d1f3967aa81794dc95bc74be8999d7fedcf7/charset_normalizer-3.5.1-cp37-abi3-musllinux_1_2_x86_64.whl": "sha256:e199fb99720074809a7720f1c0b4d919eea8b87e88713e0f8f602f7bef543d9d",
+            "https://files.pythonhosted.org/packages/81/58/d325912115caec62d6bdd77bbab5e0b7da5d234a9f20affdffcbcb530d0b/charset_normalizer-3.5.1-cp315-cp315t-musllinux_1_2_s390x.whl": "sha256:a5cbd90ecf0fc62e64726917ad083b73001f0563657a87ec3c0b504e277dc90d",
+            "https://files.pythonhosted.org/packages/82/38/083a24028304bc85bb9e376fed801178423dcbb67495f73b6ea0624e1894/charset_normalizer-3.5.1-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl": "sha256:b54e7e13267d49ffbfe68e25b3cbd774dab38fa37238f71265e91b36146eb21c",
+            "https://files.pythonhosted.org/packages/84/79/a88c181e7f4a7579696fedb34fa63844ede2ff7caf44c5f321cec57d92fb/charset_normalizer-3.5.1-cp39-cp39-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl": "sha256:e06efa066f7dbadbc84ebc126a97c452a6451dfcf589d89d788484949e1cf795",
+            "https://files.pythonhosted.org/packages/85/54/46000450ada53bd9eac5429a2c8c54cd2d9b39c0c255f229aea9af0948a5/charset_normalizer-3.5.1-cp314-cp314-musllinux_1_2_ppc64le.whl": "sha256:bb57753e36e4855b8ca375069482250a6246372331a3e4f3407eaebb007443f5",
+            "https://files.pythonhosted.org/packages/86/2e/b93135b5034b1157fb29554b0d06d4844ce62282f0e0a14036f93d7ee2e7/charset_normalizer-3.5.1-cp310-cp310-win_arm64.whl": "sha256:a6d095662e73e74f0a49988e0593373e243e3a52e27bfeea0a859e88acf4a0f5",
+            "https://files.pythonhosted.org/packages/86/d3/e367787febe4e74769dec0f406f2c3c8d1b955fce5aee1fd0f94e8367a45/charset_normalizer-3.5.1-cp315-cp315-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl": "sha256:8fe532b3c966d1fb794e0698e4589d0444017ae77fc0b31edea13c0e35bcc449",
+            "https://files.pythonhosted.org/packages/87/bd/fbc24d825c66f1c74f6ccdea3742c3d8354a4888e86d1315a197fee69061/charset_normalizer-3.5.1-cp310-cp310-musllinux_1_2_aarch64.whl": "sha256:950f23cb393f85543777b0433f082cddd25b51ab398eac7971146495679efe5f",
+            "https://files.pythonhosted.org/packages/88/be/55127bfca72c0cff6c022488d140d7c5b04c771e3b72e9bdb4836d54979d/charset_normalizer-3.5.1-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl": "sha256:f6f7deae3feb4edfa2efaf7c574fe88cbf055038a6abdb40188e4fff66d5699f",
+            "https://files.pythonhosted.org/packages/8a/33/56d97ade41c8db611e727168c52ae46c9224c362ec28d4b65d7e9869e8da/charset_normalizer-3.5.1-cp313-cp313-win_amd64.whl": "sha256:aea996a6aba25260827c9ea511d1addfde2da9eb686ac961838509086188b7e6",
+            "https://files.pythonhosted.org/packages/8a/76/c681192bbda3d55356db5dadd64381d5202b37c6b598fcda5282e88b5d3d/charset_normalizer-3.5.1-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl": "sha256:ab743e9bc90c1f73552ec33e10e3331315acd2c397b36065b591b0181de533cc",
+            "https://files.pythonhosted.org/packages/8c/c2/027335f0aa337a2a2e121bac1ad88c4f02ba6053ea0926802784f3db11af/charset_normalizer-3.5.1-cp315-cp315-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl": "sha256:8ac8c94b6539074e0f40899301273ac8402b9b3e01c7b7ba269ff30340aaaf20",
+            "https://files.pythonhosted.org/packages/90/c6/b09e05e6db7f64338e0dc067c79577b1138da86c1e38369096851d96be88/charset_normalizer-3.5.1-cp313-cp313-musllinux_1_2_x86_64.whl": "sha256:fd0350afdc3aabd5576f60ea109228bd5538139713c7b094c5cd27c73a98bc6f",
+            "https://files.pythonhosted.org/packages/95/b5/a18d0dd1157ab655cc2cb14a545f4a4784bbad70ab3502412e36097502d9/charset_normalizer-3.5.1-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl": "sha256:04368edf83514385ffc3e1cfd4546e595f4f1272dd23ba437a93a9cc3741d47b",
+            "https://files.pythonhosted.org/packages/96/10/e9aa7923d3ddac652c99a1c5f7be494e737e151566a44abe018daf757f2c/charset_normalizer-3.5.1-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl": "sha256:9dbdd9205662134957cf0c324f639bdc5031c0ca056e2369e238db75187c0f11",
+            "https://files.pythonhosted.org/packages/98/66/7c42677e739ba66746b297e2046918d793078094dc239e1e72768cffccc6/charset_normalizer-3.5.1-cp314-cp314t-musllinux_1_2_riscv64.whl": "sha256:9eea3ab2597a5e65fe65296e2d6a84570845a6b55532d90333d740d48bbc850a",
+            "https://files.pythonhosted.org/packages/9a/4c/be49ada26b1f0232d57aa89bbebf997a5cc2332a5616b6eca26ff680044d/charset_normalizer-3.5.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl": "sha256:4582c27e8c889d64811987b5967fbd3ae0c823fe1fd933b543d55ac20bb475fa",
+            "https://files.pythonhosted.org/packages/9d/7a/4c6c298171e6b3e745633180ff59350fc0ca0db1ffd28df1e369e0579f71/charset_normalizer-3.5.1-cp312-cp312-win_amd64.whl": "sha256:3617ac3cfd8b9888f145ad89dd6e692285834b0201c6074a5eeaad3fd4d668c2",
+            "https://files.pythonhosted.org/packages/9e/4a/a6ee107430768a5334e6d63f31f148a04a1a491ef161a1ac9415a73f2fa8/charset_normalizer-3.5.1-cp314-cp314-android_24_x86_64.whl": "sha256:26422d45fd13551cf564c58932f7d72b4f58b93b0fcf18c35ba6be12b46bb102",
+            "https://files.pythonhosted.org/packages/9f/2f/fe3f187327aac18e2d54e9d2b08e15d27bf9b642d9e51c219f130fc34d1a/charset_normalizer-3.5.1-cp37-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl": "sha256:a6dac12ff6b846103483683f60c5f8fee205121adc58ffd87e90a90a3af69e99",
+            "https://files.pythonhosted.org/packages/9f/cf/7568d8c1c9100b7c8bab9035215a6b36b32b39bb50cabaee9389c4606887/charset_normalizer-3.5.1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl": "sha256:789b8982559ae28dad2356519f841655756cdcd96616410590ae0b17454ee64f",
+            "https://files.pythonhosted.org/packages/a0/2a/6a9034b7d3c60b17499afb482df5878bf9fa20b50cc3887d5ef017a833db/charset_normalizer-3.5.1-cp314-cp314-pyemscripten_2026_0_wasm32.whl": "sha256:f03ac127268b43ef4fe9e6ab6794a6794b49485a0cc0c1db79876d2f33f75bc7",
+            "https://files.pythonhosted.org/packages/a1/5d/9ed554480eda8e447b673648628fdc29574d23dbad01fe11837adedd1cae/charset_normalizer-3.5.1-cp315-cp315-win_arm64.whl": "sha256:5fc45d653ea8c9a20479167e11d4a0f8cb2fa3470737ab6f9c827532313187b7",
+            "https://files.pythonhosted.org/packages/a4/2d/64a13610fd28c80f97aff0ea5cf31cf255d220a8243ac0c78c66fd3d874d/charset_normalizer-3.5.1-cp39-cp39-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl": "sha256:5e2d0e146dcb57034f8b97dc58d2d512cb90aba253960ce449f695fec6a82c6f",
+            "https://files.pythonhosted.org/packages/a4/a0/562247944386f7d4ef94467e84876600cc1e0f1b93239aaa9213d2bc3cbd/charset_normalizer-3.5.1-cp313-cp313-macosx_10_13_universal2.whl": "sha256:e90251c0c7bdd54a100a0dce3c07b7e637278c93af29dbf78ebb89a58c4bac7d",
+            "https://files.pythonhosted.org/packages/a4/c8/ab42b07cfd82e919f427fcfaa7c41abae8242833ad1aad66d42bae40b669/charset_normalizer-3.5.1-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl": "sha256:0b2b1b3fa5670c127b246df1d0c059defd41f689a868a3b9d79df9b1cac42d22",
+            "https://files.pythonhosted.org/packages/a5/e9/e925ca7569cf9fb9701fd82503fee73eea5268fdb856bdd64947092d3daa/charset_normalizer-3.5.1-cp314-cp314t-musllinux_1_2_aarch64.whl": "sha256:c010f5581d9c612804cc59fcf7b524b707fbcb72828551237ab545bb5c7034af",
+            "https://files.pythonhosted.org/packages/a8/76/9aad3e9c8865e5e0efa9a7f6f81c37a67635a985145ecd44528a81e088ee/charset_normalizer-3.5.1-cp315-cp315t-win_arm64.whl": "sha256:fb78f6e7fcd8ad785d28cd577168bc1aaee827b25bb8755638f694794ea98f0a",
+            "https://files.pythonhosted.org/packages/ac/33/eeb384dbd8dec570661354592f4f2e1b2fcc92585624d146a000caf53841/charset_normalizer-3.5.1-cp314-cp314-win_arm64.whl": "sha256:4bea7f8ebe90bbd7f0e4a2de42ca6924ba23e3e76418c408ff82f1d46fabd687",
+            "https://files.pythonhosted.org/packages/ad/c3/525f508cd1e58d0450ac55ed40ac75bc3a97482c59def5278456a5fbf03c/charset_normalizer-3.5.1-cp315-cp315t-musllinux_1_2_aarch64.whl": "sha256:9b5db6052055d34d41230fb78d7c439c23dc536a9896f6cb039e8dd92cfc1263",
+            "https://files.pythonhosted.org/packages/ae/10/3d8c777cf9024615295aa1b808324ad5b4a77855869c00824bad74ffaf8a/charset_normalizer-3.5.1-cp314-cp314t-win32.whl": "sha256:58d3e12c88e0950bca850ae1f7c256055c097639c2edb9eb123af9807d8b15e4",
+            "https://files.pythonhosted.org/packages/af/3d/391b193eb9f3e84b02f9314088c386debdc0debee843535aaea2e2c6715d/charset_normalizer-3.5.1-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl": "sha256:5c84bec0ab5ae0c64bfe73a7d2adcb5ce73b467523fc27fd6a28ab2aa6cbe35a",
+            "https://files.pythonhosted.org/packages/af/af/53afe99068b3c10b4cbae592a52ef72a7c92c0188440e83ee3a078fd8f75/charset_normalizer-3.5.1-cp315-cp315-win32.whl": "sha256:706bfd38730a5ac7a365793269a00f4e988178cec121391f4248d84ad8c972e9",
+            "https://files.pythonhosted.org/packages/b1/ba/ef83ae3aca816393decfa3530976f38a79812d707b80b580ac33b83f9877/charset_normalizer-3.5.1-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl": "sha256:f9f8405c2c758532c74fed975dbee57be1f31a6e865c031870c79a6ed3212ada",
+            "https://files.pythonhosted.org/packages/b2/2c/45847198c16f4b38090cc7423b2b6a9008e438704d8ab413211832498d31/charset_normalizer-3.5.1-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl": "sha256:ba2f37ee79e6338845261a3c5b1784e5d1acdff2c0785b284f1b633033d136ab",
+            "https://files.pythonhosted.org/packages/b2/e0/489aa2a33b944077d4c2c705c245d833dc12cd571a52fc67eaf273f5373a/charset_normalizer-3.5.1-cp39-cp39-musllinux_1_2_aarch64.whl": "sha256:55261ac0d2941c42f196dd576f543d87a8ee03cd6f5e30dfb4d807b2e3b9121a",
+            "https://files.pythonhosted.org/packages/b4/d4/703be739b26acce318bd29eb3b25b7209e1b1f527f9eae3d1f1f01fdde2b/charset_normalizer-3.5.1-cp313-cp313-win32.whl": "sha256:d63600d620ad0064c3a748b950ac5ea38a80190e5498532efefa4b7b3f1da1f3",
+            "https://files.pythonhosted.org/packages/b7/23/b38a20598d5a825f85d9d7636860e56ff0db1479f86497a6e485aa9326f7/charset_normalizer-3.5.1-cp310-cp310-win32.whl": "sha256:94fbf1c0c6cc0d3d5e50f9a9313a8cdca90dd696d34b381cd1704f8c9e939f20",
+            "https://files.pythonhosted.org/packages/b7/52/643d11ffd60e9ac2fd1fb87e167a19285b9eefeff4a40e63c87cbfbeab36/charset_normalizer-3.5.1-cp312-cp312-musllinux_1_2_x86_64.whl": "sha256:ba501e667c17d8411f98e67a022d9604ef179aff0e459b7e292c796837c13573",
+            "https://files.pythonhosted.org/packages/b8/d7/34d8e404e358d2adcc5a228c2134643af00104c8fb0bf525f3688d756f05/charset_normalizer-3.5.1-cp315-cp315-musllinux_1_2_riscv64.whl": "sha256:978eab16f55b4ab2c2a745be9a0a840bf8f09a7f227d9c76eb30214d078865a5",
+            "https://files.pythonhosted.org/packages/b9/2d/918d0e98a0e679469ed05bb2d90c2088b4d315bb612969d8499f76fb5210/charset_normalizer-3.5.1-cp310-cp310-musllinux_1_2_armv7l.whl": "sha256:c1dcc36dcb96abc02236e182d17e0f71430152a6c2c7447421da2d2dc144edea",
+            "https://files.pythonhosted.org/packages/b9/90/082cc45599c392f28c036a497f49e0634041a785fc3849c80ccf396d096f/charset_normalizer-3.5.1-cp310-cp310-musllinux_1_2_s390x.whl": "sha256:a545775cfe815855ea32d7c27731d79da358ef2055b4a25830231b1622dd18aa",
+            "https://files.pythonhosted.org/packages/ba/ed/1dd7cfebb4e75812934c49ca3b79757d11948053f7937ab7070c151f3c55/charset_normalizer-3.5.1-cp311-cp311-musllinux_1_2_s390x.whl": "sha256:6e2912d4babbc65196ac13c2f53468dc57fb8b9c25ef913e8c59ddf7c6dc0e1b",
+            "https://files.pythonhosted.org/packages/bc/61/2cb6ad133dbbb449fa2d37ccae973232f4827e799af258d15e589a3d1e9e/charset_normalizer-3.5.1-cp313-cp313-android_24_arm64_v8a.whl": "sha256:4f298bdadb8f0b9e5672877f647d1be9373ef5320c9e2f049795e26cad28b6a9",
+            "https://files.pythonhosted.org/packages/bd/67/0f40eaf8d1b6e7cf15e82382a2965efaca787fc1c2794b7021d37aaf5036/charset_normalizer-3.5.1-cp313-cp313-musllinux_1_2_ppc64le.whl": "sha256:5c0ea61a470e070686aa30892fed79e297d2c8d0ab46b8bcdf027d38c51da591",
+            "https://files.pythonhosted.org/packages/bf/eb/239c84503cc9e3ba6eb34686a24bc66e84f3924efdd7e38e751a19f6bc10/charset_normalizer-3.5.1-cp311-cp311-musllinux_1_2_x86_64.whl": "sha256:3d27167433c0d5f18dc850f07d0b3816221984fecdc405d6c157a6f0b8f8e9e6",
+            "https://files.pythonhosted.org/packages/c0/24/ef36367d38b9ddd4bccbf72888c342e8de1f5ae506fa0b2dcf970e2732a1/charset_normalizer-3.5.1-cp313-cp313-musllinux_1_2_aarch64.whl": "sha256:c71fb0d56c920c269cd3e2e3fe7c610e3f1fdb21a6ce60efa6430ff63676cea6",
+            "https://files.pythonhosted.org/packages/c0/8c/58efc6393e405a8d52b241d31dd9118352c247e4017110c3edfdb4618f0d/charset_normalizer-3.5.1-cp39-cp39-musllinux_1_2_ppc64le.whl": "sha256:2e9cf9253119d8e5d111f05d71626786fd3d6193817316eab1ca088cdb8593cf",
+            "https://files.pythonhosted.org/packages/c1/ce/9962938e179cf9f699d3f1e7b3114b5d7642dee6a893745229f9dd04f274/charset_normalizer-3.5.1-cp314-cp314-musllinux_1_2_armv7l.whl": "sha256:329fc3ccb63ad22d867d84c2adea759a64079a37ba4a343433b02c7a2816871e",
+            "https://files.pythonhosted.org/packages/c3/92/de7e32ed05341e7a9c4c877c318418197b7f2d66a3b68d561bf2ac57ca3e/charset_normalizer-3.5.1-cp37-abi3-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl": "sha256:4b599739b93b2cbeded49645ae3c8d1405c29ddfbceac1545c87a3f9580a9e96",
+            "https://files.pythonhosted.org/packages/c3/d9/35ae3f64f29d0179c35c3baefe575904df2913dde519129c7f75995a2b1d/charset_normalizer-3.5.1-cp314-cp314-ios_13_0_arm64_iphoneos.whl": "sha256:09a7bba9f739468c8e78c36a75c33768e53cb1959fc638f510454c14683f00d5",
+            "https://files.pythonhosted.org/packages/c4/25/d5f4198819e6059735a84e8d0bfb72dc33976da67b97adcd3fb5a5e07ec6/charset_normalizer-3.5.1-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl": "sha256:0c6dfb5ca6723eeed15aa8e564a014d69fcb8812f94eef11fe3631e0508199f5",
+            "https://files.pythonhosted.org/packages/c4/58/c9295c61e3f826ba7d874f0fd1c5e335dbec928d7b9146b33b48d14a25f1/charset_normalizer-3.5.1-cp39-cp39-win_arm64.whl": "sha256:29880d17a8eb0b5cfdfd8944b468322928059aa35f1f5fa8ff22b149ec0b42f8",
+            "https://files.pythonhosted.org/packages/c8/e3/d119f86a01f9331e8186175f24873b1d74a7ee9e2e4b4d68f9947dae5afd/charset_normalizer-3.5.1-cp315-cp315-musllinux_1_2_aarch64.whl": "sha256:21b82d8082f6f5e7f456ef0bd16323d08de1266efbfeb476e64b2a91d1471a4e",
+            "https://files.pythonhosted.org/packages/c9/bc/f46a132041b29e4a8779ed712d3df1bf112e94ca8de58b66d7ec2c0cf8b9/charset_normalizer-3.5.1-cp315-cp315-win_amd64.whl": "sha256:92caef967d287a407085d61176fce4012b1dd62daed4eb6d5ceb26d3d2538712",
+            "https://files.pythonhosted.org/packages/ca/7b/311b3e02e8c4092400c449c850a760d8c45d900983c83a70cc07208c551d/charset_normalizer-3.5.1-cp310-cp310-musllinux_1_2_riscv64.whl": "sha256:f5542f9b941279d82d41eb0aa9f98eba36fe4df5c7086c651df7944935b37182",
+            "https://files.pythonhosted.org/packages/ca/85/f82f8a92e31c7519410e2e1afdc630f28ec47490ce2c09a11c1a43cbb459/charset_normalizer-3.5.1-cp312-cp312-musllinux_1_2_s390x.whl": "sha256:4abdc5f9ad448c1ecbfae2974b820535d6bc6e7eef63babbab3d81cf46968c71",
+            "https://files.pythonhosted.org/packages/cc/61/d01fc49b8dea277640b55a9e15960dbca9fdc8c9fde18e572d39c59f4019/charset_normalizer-3.5.1-py3-none-any.whl": "sha256:6df0ec430f9a831772c23ca5a224cba36517a58a84bb32c32bb59a9fa67c47f6",
+            "https://files.pythonhosted.org/packages/cc/a4/689bb42e8e7cd492f3cb64907c6bc00ad247ec9a3628cd3f8eed126e8ae1/charset_normalizer-3.5.1-cp314-cp314-musllinux_1_2_aarch64.whl": "sha256:01e93745f7f219b703b60ba7afead36cfc4242782be5af484673fc500df12da5",
+            "https://files.pythonhosted.org/packages/cd/d7/eb95a042f0dd22e304b0b6472b154f3546a1a039a9ee89ccb2a7f61591fc/charset_normalizer-3.5.1-cp312-cp312-win_arm64.whl": "sha256:88e85ab89cb822c1e635f51d6d32e488f94e002e70e2f492bdb8b945543f345a",
+            "https://files.pythonhosted.org/packages/ce/48/5a97e84d63af1d55c07439cb80e56d99a8efb4295700eb4e18c0d1615d2c/charset_normalizer-3.5.1-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl": "sha256:0d929fc574b4d6fd9e7c0f5c2ede8716a41911923aa7fa5fce38e0818aa4a1ac",
+            "https://files.pythonhosted.org/packages/d0/91/bc145e42f93d6601b9a26f5421af2d7c3093ae6e6d03b8e583c9cebbf530/charset_normalizer-3.5.1-cp39-cp39-macosx_10_9_universal2.whl": "sha256:85de3134b5379856e323ba37c19c9256d39425f7b76a63af52b09fb4664c2e8f",
+            "https://files.pythonhosted.org/packages/d1/91/249943372195935ff7393eae5842c7dae6fd04401e512bbd69dab1aae40b/charset_normalizer-3.5.1-cp39-cp39-win32.whl": "sha256:56490c595a28b1bb27dfc583e816152a9767721ef58b2c03b13f954d2f707420",
+            "https://files.pythonhosted.org/packages/d2/21/83fffb77864408b8bf0fe1ca603926401d6f8775a8e150b39aacc9958f8a/charset_normalizer-3.5.1-cp310-cp310-win_amd64.whl": "sha256:be47f99644b208bff7766314013f9acf57b056b04191d570d68ad14022cf5b1d",
+            "https://files.pythonhosted.org/packages/d3/05/71bfc5caa0abcc45aea1f6a4d50ac68e59605ddc7666fe8494f4cd229665/charset_normalizer-3.5.1-cp37-abi3-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl": "sha256:ae4a097991662cd4fff0ddc74e0fe7874f82e00042fa0ea00855645ed0c79598",
+            "https://files.pythonhosted.org/packages/d3/58/56a48c296601274c4689b864a8e2dfb209b81dfcb39472753ce95eea662b/charset_normalizer-3.5.1-cp315-cp315t-musllinux_1_2_ppc64le.whl": "sha256:6199d5606e2bbf2b096cf64d03f8b6790c91081d5ac866b8e7bb6422738cc60c",
+            "https://files.pythonhosted.org/packages/d3/bc/f528dfb78d3bfdc8ee6aeea81eb22e6918d03e4442d373a79717f17de45e/charset_normalizer-3.5.1-cp39-cp39-musllinux_1_2_armv7l.whl": "sha256:5ca0555312ae2fe82715cada7fac375530c2f3349e1eaa1bcb33d0283ac79a18",
+            "https://files.pythonhosted.org/packages/d5/fa/6a7e2a7c4b5451912b8c417732df79574354443592a88d616de03da66ae5/charset_normalizer-3.5.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl": "sha256:aa2bb0b37202dca27175591f761108b5d34096ade1191ffe4808bdf6b1571488",
+            "https://files.pythonhosted.org/packages/d6/aa/a69a2028e8bd052476c245460ab19d7de595de084dd968f2d75cd50c3e25/charset_normalizer-3.5.1-cp37-abi3-musllinux_1_2_riscv64.whl": "sha256:2f293479cce755c75f1697e87c409b7ae4c555c7dfecb6e988ad13abba943031",
+            "https://files.pythonhosted.org/packages/d7/c7/9e48cee5c161fe24da823b61bf381921d77cb994a0a4de148e95018c1984/charset_normalizer-3.5.1-cp37-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl": "sha256:cee5dd7c6fb5dd52a0fe2a740f9bc6e3593f5f8b1788bde49de02086f30182b2",
+            "https://files.pythonhosted.org/packages/db/ab/55e683ba0fff2e43adafc10daa3001eac90fdaa419a97227d5a7067eedde/charset_normalizer-3.5.1-cp313-cp313-musllinux_1_2_armv7l.whl": "sha256:485a0d363cafefcd2538a73c7c838daa2035f09b2c9f9b5e3133f80c6aeb84c2",
+            "https://files.pythonhosted.org/packages/de/93/d51ec556e01042fed6f993ea859311bc7917b466684182fbbceb6ca24762/charset_normalizer-3.5.1-cp313-cp313-ios_13_0_arm64_iphonesimulator.whl": "sha256:977cdbd483a9cff38179bea4fd754289a6f2195c7abd414aba85410b3e66cc5e",
+            "https://files.pythonhosted.org/packages/de/d8/a50b79237f417af10f8c2a501ce8d1ca87829a22e69117891ca4ba20a69e/charset_normalizer-3.5.1-cp314-cp314t-musllinux_1_2_s390x.whl": "sha256:496846868fea80e479324862fa877f02411f2fd0f83b79ccee2607aa68b2a032",
+            "https://files.pythonhosted.org/packages/e0/91/39c3af510b0aa32bbda03374259200f28430febfd1bf5e511fe765282ce5/charset_normalizer-3.5.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl": "sha256:15f024313246a4ed976c60f440bb8d257815513a681d212ff74fd46f7d715a90",
+            "https://files.pythonhosted.org/packages/e3/57/32f0ccea59e8612057c61d6fd22ef2cb63cca93c9fe594094919696ac170/charset_normalizer-3.5.1-cp311-cp311-win_amd64.whl": "sha256:f9b1e28d0e8dbfa858abdba91d6b547beaf2df1a59bec6da6faae7b96a4991a9",
+            "https://files.pythonhosted.org/packages/e5/3f/143b048436775b0f76ac3eec145c019e8173ccc2885c8f20319b996d5e83/charset_normalizer-3.5.1.tar.gz": "sha256:6117b84ea48435e5356dc737f5121485c30920ba43375fa7b434fd753df0eac3",
+            "https://files.pythonhosted.org/packages/e7/80/b9348b5d3041209f98b4cdad7655766369233f1d533f4f4f7558e9717bec/charset_normalizer-3.5.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl": "sha256:6e5e4d73d588ca5ed09df1b7dcd1b203d1df3c542e3f50d126c947d432b10731",
+            "https://files.pythonhosted.org/packages/e7/a0/47b18adeed31c8f16ba9700f32c1b18594cfa09f47eb672a488c273c22bf/charset_normalizer-3.5.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl": "sha256:e6621fb2a4988d6e53eedc455e5903e2679f3967b8acb3d639f1b63c14a2e893",
+            "https://files.pythonhosted.org/packages/e9/40/095ce62fa078483cccc1fa2b36e6bc9580b85422a20ee9f925341c50e44f/charset_normalizer-3.5.1-cp314-cp314-macosx_10_15_universal2.whl": "sha256:c428c6c31eb5f4277d7f8eccaf767fbd548ddd5ce3c8b4f4cbbfab3d96b5904c",
+            "https://files.pythonhosted.org/packages/e9/a3/887c1642f0da26000b0e0652d91071113c0e72cea33952e225cf589f49a9/charset_normalizer-3.5.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl": "sha256:a3a370082ce34d0612f421e15fe011c53bb1feff21a26d06ad4fb244dab5a375",
+            "https://files.pythonhosted.org/packages/f0/3e/48f4cd187b1c33189d86039e9cbe4f92c05454175504b44ff81806d4d1bf/charset_normalizer-3.5.1-cp311-cp311-musllinux_1_2_armv7l.whl": "sha256:aa1099b956fb795e686d073568f6dc002a0bb89765ea6d5b055dd7d9bf1b116c",
+            "https://files.pythonhosted.org/packages/f0/a7/920baf467bfd9bf689f3b318340f37aee4572a71f162bd8db51da55ba4fa/charset_normalizer-3.5.1-cp37-abi3-win_arm64.whl": "sha256:87e4f41d375c0b9be2fb5251aee4b8a689169e134535aed81bf085c3b647451e",
+            "https://files.pythonhosted.org/packages/f1/5a/0e58b1c04a1596e0256f407274a92d5fb2ee21324409d1fab1da48a65b5b/charset_normalizer-3.5.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl": "sha256:2f06b7eae9dbe77fe1d644ca244dad508de8d302870a43f3c559b521270938a0",
+            "https://files.pythonhosted.org/packages/f3/46/1d362e1a00d035d66b9869e1281eee115907f7e390a16a07824ab5737360/charset_normalizer-3.5.1-cp314-cp314-win32.whl": "sha256:1f5883d77fd409a261abb5dc8ccbe335720d798b1de4abb3b1d47ccbbc76b53b",
+            "https://files.pythonhosted.org/packages/f5/28/c2028e7021fb89c6e56868ed0e387b8e9aa811abdd2ab3208d6578d2c930/charset_normalizer-3.5.1-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl": "sha256:6ba32c4d2abf1d2fe7cf27d280f4cca5664233b0f885549c7761719eb977f486",
+            "https://files.pythonhosted.org/packages/f5/7b/ade0a122600319dfa0b1000ab0f9731c94a817904cf3c5de408c73a4ede7/charset_normalizer-3.5.1-cp37-abi3-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl": "sha256:b39b69b347e5e47a3b5b8cfc005c68c1ba347474e3960236c4944a8ecd174962",
+            "https://files.pythonhosted.org/packages/f5/e3/38b975422534a608f98c360e79c2f07c763d66dd4272300d45fb1fee54b0/charset_normalizer-3.5.1-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl": "sha256:366ec70f5547c640d3ce1985722490f23faf4eb5216a7eeba78277490e78dacb",
+            "https://files.pythonhosted.org/packages/f6/0b/c5292a2462d69b7378ea89793bbb5b2b6fcf6f7dd6d1667f9619094ad553/charset_normalizer-3.5.1-cp312-cp312-musllinux_1_2_aarch64.whl": "sha256:96fef3e886d6a9874b14f27fc193fbdc69d5d8035783d86aa4e1cea594e695f9",
+            "https://files.pythonhosted.org/packages/f9/d2/d2aad6fe0dbb44b194bf3becb60f5a0ac48446ade999a47fe7bb41eb09a7/charset_normalizer-3.5.1-cp312-cp312-musllinux_1_2_ppc64le.whl": "sha256:aae2ee51122d3ae968a3837d97dc24a0aeebb0dea23694422cd172bd30017cd6",
+            "https://files.pythonhosted.org/packages/fa/ec/3a616c3806ec3f957337e6bf874ae7d64693185039edfbbf87103b8c8631/charset_normalizer-3.5.1-cp39-cp39-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl": "sha256:a951ad59cad9145664a730d3036b40b844e74d2d3683da40111463cd3a83845d",
+            "https://files.pythonhosted.org/packages/fb/af/63240b0c0248c075c2535a1f1bd992821d8251b9f173abc13329661d09e4/charset_normalizer-3.5.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl": "sha256:62b55f6722735a6c472f88361cde6640608773d9443cebdbb51abf436a1fcdd3",
+            "https://files.pythonhosted.org/packages/fd/4c/9044135f42127630b6fa742feb51256353f6ab87a78f2fdd1de3de955a7f/charset_normalizer-3.5.1-cp311-cp311-musllinux_1_2_riscv64.whl": "sha256:f298e218441525d3794428b4c8b8fb8662c6d3ea79925d4807ee6b9a96a3bca5",
+            "https://files.pythonhosted.org/packages/ff/c1/2adc2800903fb013210349313b710a5376856578d9e33e6b9a1d8b36714a/charset_normalizer-3.5.1-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl": "sha256:cc5d36d96478aa9c60654bd932525bf32964c62a7281eafdf16d85003a8d6004"
           },
           "cryptography": {
-            "https://files.pythonhosted.org/packages/09/41/3797cfaf69cae04a13ee78ebd83f0678d9c02b4779d21ce24445326f1a69/cryptography-49.0.0-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl": "sha256:36d1709f992593689b45bda411498d62c6e365f2ca00b84657d4dadd24de16db",
-            "https://files.pythonhosted.org/packages/11/2d/5e1fb307cb5931881516b464c98774b3f2c36b5d4bb9a2830253cf553cad/cryptography-49.0.0-cp314-cp314t-manylinux_2_34_x86_64.whl": "sha256:d8ecde755e2e91bf773fc94e8c9d730cd7f2007004cb492263a794ec3899a1c8",
-            "https://files.pythonhosted.org/packages/17/50/983e838c7fd0d87fd8c969bcdd328edaf5f756e38df5281637424c155873/cryptography-49.0.0-cp314-cp314t-manylinux_2_31_armv7l.whl": "sha256:07cab27cc7b7e0fd28e5e26bb9eeedde5c135c868b46de4a27845abe94af6122",
-            "https://files.pythonhosted.org/packages/19/2a/5bb823f5bedcf80718cea7fbc95ec5515cca3769633c4b01a32be7f30e7c/cryptography-49.0.0-cp39-abi3-macosx_11_0_arm64.whl": "sha256:ec5e529fb80935c94fe7b729f9972b50e351a0e6b50aa294fd5cabb109fcc29a",
-            "https://files.pythonhosted.org/packages/1f/09/f42b1d190c5ba75f72062a387f8030d1d75f6ab035788f1d9c4b01de6525/cryptography-49.0.0-cp311-abi3-win_amd64.whl": "sha256:e5dfc1e64de5677cec922ffa8da89c546d0415bf6efdf081842e5d44c84e1f0e",
-            "https://files.pythonhosted.org/packages/1f/99/d1c90d6041656cc6ee229dc99cd67fd0cd5aec3c5f7d72fffc27cc750054/cryptography-49.0.0.tar.gz": "sha256:f89660a348f4f78a92366240a61404e337586ef7f5909a2fef59ca88ef505493",
-            "https://files.pythonhosted.org/packages/20/2c/0622f20ff02b2ef32558733443805dc82fd4c275be01b2d19d14676f3a1b/cryptography-49.0.0-cp311-abi3-manylinux_2_28_x86_64.whl": "sha256:2afe9051da7ae7bd5905da5a949280c7d2bb75682e188f650a9d0f2756b834c6",
-            "https://files.pythonhosted.org/packages/24/01/186c825898477d77e2324d5360fefe622ff1d8d1963ec0554e2cada8ec77/cryptography-49.0.0-cp39-abi3-manylinux_2_28_ppc64le.whl": "sha256:9e82dcc8e56052715fb18b2429e3bca4823b1629136a2084fc45a9a5cecb9b64",
-            "https://files.pythonhosted.org/packages/2c/99/2d13299eb3dd27b02dcfaafcc91d6b5cb3329f7cbd6d8f51921acd566c1a/cryptography-49.0.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl": "sha256:35b151772baff2c74cba7fa290ceaff4c3b11c0c881eb93eb5dbc05a7cfbba18",
-            "https://files.pythonhosted.org/packages/3d/df/40577043ca124e17012f408ddddaeb213b856336ac82ddb3bc915f39e29f/cryptography-49.0.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl": "sha256:f78ff2c9ed8dc2d036b0f4d640e22522213d047c1b14e61205a7e55c80a494d4",
-            "https://files.pythonhosted.org/packages/47/f1/1d3eaa243bfc5de4a187b22aa8c048b3e4980bfbe830ac46e6bac2e66947/cryptography-49.0.0-cp314-cp314t-manylinux_2_28_ppc64le.whl": "sha256:f37d847238971164fdbc68ade6f6574aecc9c0af714190e2083429ff68f4ce9d",
-            "https://files.pythonhosted.org/packages/4a/91/01ce7303a4579e6d3a6abef01bd322848e9ea7a219adcabc5048b9033571/cryptography-49.0.0-cp311-abi3-manylinux_2_28_aarch64.whl": "sha256:53ecee2e23f7169b6117e99fc8a944e5e50f79e69758a83b52a00cb98ab2b2d2",
-            "https://files.pythonhosted.org/packages/4c/fe/93ecac273d3738939d023612ad12cca9a3740a5345d69fda04134c43fd96/cryptography-49.0.0-cp314-cp314t-win_amd64.whl": "sha256:33cd0565932807baddb67b96dbee92f2c374b5c89dee09fd74079aeb8c8dba61",
-            "https://files.pythonhosted.org/packages/4f/01/339573cf1023163a400b0b5d16f6d507de413b9f60be6fd1b77feeaf6737/cryptography-49.0.0-cp311-abi3-musllinux_1_2_aarch64.whl": "sha256:b87e65d263b3e5d3bb92a57e2a6638e2f31110fa7aa890c7b2dbba42248d0a3f",
-            "https://files.pythonhosted.org/packages/58/39/2d51306721330c486495853eda1c567880ff036de15a14c4b74f399934af/cryptography-49.0.0-cp314-cp314t-manylinux_2_28_x86_64.whl": "sha256:c2bc30226390d60ea19d9f82b19db005fe0452154a23c1c410c12ea801e43561",
-            "https://files.pythonhosted.org/packages/62/99/a2c95cf8293f07491e9e27c20cc4dcd18176d944e674679adeb1d0173fd6/cryptography-49.0.0-cp311-abi3-manylinux_2_28_ppc64le.whl": "sha256:2eda353d8a27bcbcaa4cbed18994a74ab4d19a2ca897db188ea269ab9b71419b",
-            "https://files.pythonhosted.org/packages/63/d3/4a83af35d65e3fad632c926fad684c193ea4398569ccb0bbbc7fe8f5dc9a/cryptography-49.0.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl": "sha256:fc1e275c2f1d97b1a6450b8b0ea3ebfa6e087a611c2b26cb2404d48588abab7b",
-            "https://files.pythonhosted.org/packages/67/d0/a5fcd3515f0bae49a7b6d0413cc1bdccdcc1fc0047037a0d480642cdc5d6/cryptography-49.0.0-cp39-abi3-manylinux_2_34_ppc64le.whl": "sha256:6fc361c34fb6aac015ce19435876635e5c6d21db31998b0920f675f131e043b8",
-            "https://files.pythonhosted.org/packages/68/28/8a3ad4653662c93fc44dc4e5d8fd374c25c42e07b34bbfbadf49cf57a5a8/cryptography-49.0.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl": "sha256:7abcee80084cda3f7691f3eb1ce480d8df49cec637b429aa35986c1de71738aa",
-            "https://files.pythonhosted.org/packages/6c/72/3e798c064bc39e471008075d0f9bc9daf77a80879c092e4a8e170c585ed4/cryptography-49.0.0-cp39-abi3-manylinux_2_31_armv7l.whl": "sha256:8c25ceb16df5b9435f3f6a9829204985b0e0cbee3b48aacd432c7d2c850b44d9",
-            "https://files.pythonhosted.org/packages/6c/a0/db537264e234f7273a73ec020873d6d6b39dfd8a53db78b550ca8320440e/cryptography-49.0.0-cp39-abi3-musllinux_1_2_aarch64.whl": "sha256:67e1d20ad9ef3a563c59ef22e7a8a0b8210bd26604369ea4a30a7c66aefe504e",
-            "https://files.pythonhosted.org/packages/6d/88/05563c7fe2e914e87d1a536d06fe83e66b4e1d95cb593e05aea375531da8/cryptography-49.0.0-cp311-abi3-manylinux_2_34_aarch64.whl": "sha256:ccac2bfebc306b862133e3bb71f3f6ee8bb525240089b2d952e4144b3a6d5da7",
-            "https://files.pythonhosted.org/packages/71/fd/577302e213a1be9468f92d1afef66fcf1ef83d516819d9992ca547f592bd/cryptography-49.0.0-cp311-abi3-musllinux_1_2_x86_64.whl": "sha256:66ec79c3904820572d7e987abdf304281f141d37ad9a489b8e97066e7b9b6459",
-            "https://files.pythonhosted.org/packages/86/12/c48a424f38db03027be9f7ed5c7dc5de9933dbee992865f98b13727a009d/cryptography-49.0.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl": "sha256:196ecd6a36e4e9aa10270393bb98d8df88fccee0bf1e5128b91ae4eb4375896d",
-            "https://files.pythonhosted.org/packages/93/77/8df9eb486495979bccecd1062e2eaf435250e84437040295b57d09048b0b/cryptography-49.0.0-cp39-abi3-musllinux_1_2_x86_64.whl": "sha256:42b0684e0e40cf26122427802486f6d93aea593612603a94fbf260c7eb1e9c1b",
-            "https://files.pythonhosted.org/packages/94/64/2923570ac1c0bd3a737aa366ac3abbbbde273042308b8cde95e2364a6e6a/cryptography-49.0.0-pp311-pypy311_pp73-manylinux_2_34_aarch64.whl": "sha256:b47db11c2c3525083296069b98ac5221907455e989ae0c2e3008bde851921615",
-            "https://files.pythonhosted.org/packages/9b/22/adf66990e63584a68dfb50c24f48a125c07b1699899381c8151e63ed458c/cryptography-49.0.0-cp311-abi3-macosx_11_0_arm64.whl": "sha256:966fe0e9c67490071f14c0d2b1cb2dfb3023c5ce39457343931415f08382f2db",
-            "https://files.pythonhosted.org/packages/a0/84/84fe36f19caf857d61cb7fc9c63035a47ffabd84ea12d1d393148efa3615/cryptography-49.0.0-cp39-abi3-manylinux_2_34_x86_64.whl": "sha256:2400ef9c9e2299a25614eb1dea3db54a69b1349efd043bfac9c67630d136df36",
-            "https://files.pythonhosted.org/packages/a3/5b/c5246635d5fd3b64e0d45ae10e99fd32fe9676a79915ccfe5a61ba9af1a5/cryptography-49.0.0-cp311-abi3-manylinux_2_31_armv7l.whl": "sha256:0b82e28ee398a386f0807bba7884d30f25218855690f45115831bcce5d90822c",
-            "https://files.pythonhosted.org/packages/a5/4d/9c0cd02f95e2602dd5e563da149ee0830abef3537be8b34dc56281ebe27a/cryptography-49.0.0-cp39-abi3-manylinux_2_28_aarch64.whl": "sha256:0f21641cf4b30fca7aee061ced0ec7ad7b073518088b7c9969a297c0ae796c69",
-            "https://files.pythonhosted.org/packages/a7/f5/8f571d7e27c55bce9f76f026143bcb1e040a4233149ecca0bea5fa5dd5f7/cryptography-49.0.0-cp314-cp314t-manylinux_2_34_aarch64.whl": "sha256:b20133d204d2bb56ba047642199603876c872026ca53e79c35b83772ab2cc505",
-            "https://files.pythonhosted.org/packages/a8/b2/2193fc74f81aee4f9b62733133b73b5176718932ed8f2e4b03fa040480a6/cryptography-49.0.0-cp314-cp314t-manylinux_2_28_aarch64.whl": "sha256:4ae387c9cb68ea569ca17e490d66d8142b81c3cc814bf179974b7d146e490bbb",
-            "https://files.pythonhosted.org/packages/a9/3c/f3ad17eecc1a57b0ba236dc01f90e783c51f4a2f35f64777cc4f47a184b2/cryptography-49.0.0-cp311-abi3-manylinux_2_34_x86_64.whl": "sha256:cbc77da8c523d5abd028635ba850a6966fcee2c82e2bf65a41d1d8afe0f98be9",
-            "https://files.pythonhosted.org/packages/aa/50/a9caea39ad19c431c1a3f8a31114df65b260cdfe67786b6c7e7c040c4c44/cryptography-49.0.0-pp311-pypy311_pp73-win_amd64.whl": "sha256:be9fcb48a55f023493482827d4f459bd263cc20efde64f204b97c123201850c6",
-            "https://files.pythonhosted.org/packages/ab/f8/614dc7e051418cfe53d55173c1e24c6b0085e89996fe90508c2fdf769aef/cryptography-49.0.0-pp311-pypy311_pp73-manylinux_2_34_x86_64.whl": "sha256:084ef1af862eb07ec46d25f68689f2102a9fc0e05ce7b80f14f5fe51e4eef0f6",
-            "https://files.pythonhosted.org/packages/b8/7b/62cbbab75d0659865bf0273790031544a0b16c8072d258f9428dcd8190dc/cryptography-49.0.0-cp39-abi3-manylinux_2_28_x86_64.whl": "sha256:6f2debedf9ca60cf1d5bd466475638af5130f89965605cd818484d19987d3a21",
-            "https://files.pythonhosted.org/packages/b9/26/814681d14248d95d73d5c3eea0c39a94eb8302df966f670a2c60de90974b/cryptography-49.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl": "sha256:32703d93296f5c1f4b53349ad3a250c2cae0fdecd3a3dd5d47e616d8d616af27",
-            "https://files.pythonhosted.org/packages/c2/e6/f60198ea8d9dfa15fff9ed4ca02ce362f6eadd9ba757dcc50634c4257b63/cryptography-49.0.0-cp39-abi3-win_amd64.whl": "sha256:026ac7423e6fa66872d3bf889be5974507da3944f866f704fa200eadacd00001",
-            "https://files.pythonhosted.org/packages/c4/b6/d7696e4e890d6ae1469935164c9e5215c557671cb78d6e3f458ccceaa632/cryptography-49.0.0-cp311-abi3-manylinux_2_34_ppc64le.whl": "sha256:d0527ce944105f257f605a827d6ebead966c752038b6e8656abb9c5edee6fc68",
-            "https://files.pythonhosted.org/packages/d6/a7/f9dac0ab7f80368c56993a7bf638ef9935f825c91902798481fac0898138/cryptography-49.0.0-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl": "sha256:c83782480a4a9da4d0feb51950131ba32e12e70813848b3343f6e18c28a66838",
-            "https://files.pythonhosted.org/packages/d7/70/2ba3769dd0ae167e2f33dfa9592d45db6ff9a61d62ca1a5b3d1bdd09068f/cryptography-49.0.0-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl": "sha256:b39efa323140595abd3ecca8529d321ae50f55f3aa3ba9cc81ea56a6011953d5",
-            "https://files.pythonhosted.org/packages/e4/c0/bff5a02ee731d207d6a1ed51732549d8c53d2bc8da1d10ec6f2844201d68/cryptography-49.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl": "sha256:e3fb64c420688e5319ae25113a354015abbd8dffbfbc41781a1ea66fc7622ac3",
-            "https://files.pythonhosted.org/packages/e6/8b/43011f7ebe515a8aa20d61f290a326cd890c2e738e16e59eaff8d9c3a412/cryptography-49.0.0-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl": "sha256:0e959b578856a3924bc0cbb710fc12c387b9412a951389f3ca61704a9e25f325",
-            "https://files.pythonhosted.org/packages/e7/84/0e27016a6fc5a0886f797018b26aa42f40c09a82332bff77822a451deaaa/cryptography-49.0.0-cp314-cp314t-manylinux_2_34_ppc64le.whl": "sha256:b970c6da94d5bb18629db453d14f2a1300f6bf59b61e9b82377931ef95504866",
-            "https://files.pythonhosted.org/packages/ec/9e/db72b3ae7fc9cfad53e630e56c6ae83b9b6ff0bf3718ffb8012d20b3aabf/cryptography-49.0.0-cp314-cp314t-macosx_11_0_arm64.whl": "sha256:73a205dce83953d131a4aa1e0fd917a2fd1c5b1eef251e9d7152efefcbf5caf7",
-            "https://files.pythonhosted.org/packages/f0/ee/6fca21d1ac73e06f8bef71940abfd4d2f6472b4bca284d770f32bd4086f6/cryptography-49.0.0-cp39-abi3-manylinux_2_34_aarch64.whl": "sha256:28d8b15e6275f12c8a207dc309dfa957903c927d08d0cc937ee3f63f200693cc"
+            "https://files.pythonhosted.org/packages/08/bd/ed5396be499ffcf8807a585bfe38b71a1fbdd1c342b4f9b6d0ef5162a946/cryptography-50.0.1-cp314-cp314t-manylinux_2_28_aarch64.whl": "sha256:a8f40ea47330e71b594a7e246898f93177c259490c63183dbaf9e571d71ed9a5",
+            "https://files.pythonhosted.org/packages/0d/5c/13ea642e08e2544d0f5396122055f4820cfacb3203562197b5967125ea97/cryptography-50.0.1-cp39-abi3-manylinux_2_31_armv7l.whl": "sha256:2b34d76a652ea2b6faf777c35df230c5637842cd904e04f16230c3f9f03e4361",
+            "https://files.pythonhosted.org/packages/13/0e/b1f92e013228111413f2e6743948b80bc24dfd3c1b87ba98ceea16f5df89/cryptography-50.0.1-cp311-abi3-musllinux_1_2_aarch64.whl": "sha256:be224a65493ec5b74a158ff22a5522ce4a5ca1e543c647a3a4730d4a09e5f959",
+            "https://files.pythonhosted.org/packages/14/9a/6d3a4d7852e22d657438b7bf51f66102c7d71c0e1fafeec652281d0403e5/cryptography-50.0.1-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl": "sha256:5fe939deeb161024a6be98229c953b6591fef1f41214497a78fe793a244c017f",
+            "https://files.pythonhosted.org/packages/1a/01/0127d11a762b31a9ee0221894f540318761783f3fdc4bc5d057698caebd5/cryptography-50.0.1-cp314-cp314t-manylinux_2_34_x86_64.whl": "sha256:79bf008d1f9af6071c797ad133e39915dfee7614f18f18f4db9072eb715064a3",
+            "https://files.pythonhosted.org/packages/1d/e0/e786934472e3ac4ecdecc7b129a0ca1a2a40dffdafcf2c3ea9d4397f8def/cryptography-50.0.1-pp311-pypy311_pp73-manylinux_2_34_aarch64.whl": "sha256:d63ae8f6481fec907ac0f588eee8a90aefde112c633131fe540e5711ddbb5a4e",
+            "https://files.pythonhosted.org/packages/1f/ab/89e2b798d2c3925f82e2bb72d5979f3d2f6da2dd22ef4a8cd8b70d920039/cryptography-50.0.1-cp39-abi3-musllinux_1_2_x86_64.whl": "sha256:2a93d05e34d5f67fba6f891fe85d929999baa7195e853923ea6d7576c9e68c5e",
+            "https://files.pythonhosted.org/packages/27/3a/3c5f80daa4dcd47323c7af8a2fcb90de27a33564d4fcac69846c0972691a/cryptography-50.0.1-cp39-abi3-manylinux_2_28_aarch64.whl": "sha256:4c4188f7c0cf655be5c06342b817ed0f9595b69ffa2b12026e5353eed29dea88",
+            "https://files.pythonhosted.org/packages/29/ba/042ca458b8c64348c768284b5d23e69b92ed53d057ab779fee628564676d/cryptography-50.0.1-cp311-abi3-manylinux_2_31_armv7l.whl": "sha256:359e62deae718bce96170e223fdcb6357e4fbd3bb7a3a75f4430763532560e49",
+            "https://files.pythonhosted.org/packages/2d/fd/60d0ddf4defa12e482c9d5e0f554384d6e8ab25341fd15f060028fd92e6a/cryptography-50.0.1-cp314-cp314t-musllinux_1_2_x86_64.whl": "sha256:42be3bb70596b3abe4ac097b75be223e8b3ab614a0e5de068e3dcc54d71d6149",
+            "https://files.pythonhosted.org/packages/39/0d/a1e7633e2c744d0f2983320a27e924ef2264c79c56e1a58d5fb0a1cfd413/cryptography-50.0.1-cp314-cp314t-manylinux_2_31_armv7l.whl": "sha256:ac02b07824d4d1001bd4367599f839c19cb171924c796e52c23508ac14c2c0cc",
+            "https://files.pythonhosted.org/packages/39/3b/e96c1ef71edef71057c7e3c3d982ce8fda554e0c52d0cc19c18845cde3eb/cryptography-50.0.1-cp311-abi3-manylinux_2_34_aarch64.whl": "sha256:e2ca8fd1b6b4b82a1c4cb02841d0837e3c12336c2e24b520ab8ab3b969733d8f",
+            "https://files.pythonhosted.org/packages/42/8b/cb12b1b60c91b074ca6bf0fdd59aa8f10d8bc5f73af8faece86ef0421b37/cryptography-50.0.1-cp311-abi3-win_amd64.whl": "sha256:aed8db4f6d71c51efb89530e12d9464e7bf2923d46c3205dc794a2a93f8c0648",
+            "https://files.pythonhosted.org/packages/47/92/b4317e8c32c4f47b062f5398bd79106b220a124546f42be83bf32b761e2a/cryptography-50.0.1-cp314-cp314t-manylinux_2_28_x86_64.whl": "sha256:8df2de9102026855887e4587084f6eabd80ed0f345b8ad8a7ac27ab9bf4723e0",
+            "https://files.pythonhosted.org/packages/4d/56/bc4f2b209e766c93372cfcd59b781a0b2b59700f62a969580415b699c2b2/cryptography-50.0.1-cp314-cp314t-win_amd64.whl": "sha256:f74455bb086a85d5e81246412602aaa97ed095e504cd40dd261ef50be42205bf",
+            "https://files.pythonhosted.org/packages/4d/72/3a2711d967977ab5fc80b782837c7e8d1ac7445e764c20c381a265c57ef3/cryptography-50.0.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl": "sha256:a0b1a59e3a089064a0ec309e9428c8e3ae4e161419d20ac33600767e83fc658a",
+            "https://files.pythonhosted.org/packages/51/cf/5b3f53a0b74d122f023476ede40ba5d3e70d5cf475f73b899740d26a4fb2/cryptography-50.0.1-pp311-pypy311_pp73-manylinux_2_34_x86_64.whl": "sha256:804728ce710890870f3aaa344b2e161172d258d768ac139d02cfd9092d0d94e6",
+            "https://files.pythonhosted.org/packages/55/32/38c0d344b98c06d34b5df8946565a9c0d6dbf32c8e0730a7f05f0a3c6cab/cryptography-50.0.1-cp311-abi3-manylinux_2_28_ppc64le.whl": "sha256:5fe002589592ed749ce77fe0695fcbd3500dd61d7d6db5858a7544c612fa8e45",
+            "https://files.pythonhosted.org/packages/57/26/e6d4fc8512a51a5f9ee7bfdbfb853bce1197087df40c9ad993ad370b846f/cryptography-50.0.1-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl": "sha256:ff838d62ec1bfce4f9ba7fa16f4a7b554cd8d0c299e6be37502161a660c84eef",
+            "https://files.pythonhosted.org/packages/5b/f0/424cb557d99aa86ac55da5e2add02e2882e44047b6264f93ade1b975a993/cryptography-50.0.1-cp314-cp314t-macosx_11_0_arm64.whl": "sha256:30a125032e5642a21ff816e021152bd4e7e94f03eff3f4b7fca41cd22bc3110f",
+            "https://files.pythonhosted.org/packages/5e/a5/9ec7e81e8526c0d7a387d73386b2daed3f39e10d81a85930bd1b6bfba65c/cryptography-50.0.1-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl": "sha256:05ba322c4da95b262a212c345af888ef2c37c88c0509756ea00a0e6d68850f23",
+            "https://files.pythonhosted.org/packages/63/8e/f1f955e0921dd2b6d22eae7e8d24a4c4b638d10735ffbf6a71f99eb0fcb8/cryptography-50.0.1-cp39-abi3-musllinux_1_2_aarch64.whl": "sha256:fd3718b960d0b5dd213cdf03f3bcb7000e69dda0de8b956061947ff6bcff5558",
+            "https://files.pythonhosted.org/packages/6e/2b/214cf0cf93db9628c3c20c896b229f327f6fb1b20e4b3743d8ad3f00af8b/cryptography-50.0.1-cp39-abi3-manylinux_2_28_ppc64le.whl": "sha256:2ebbfb0f1fed745e91796e3e1080a1440423fdae8ece1b995a1d80883a409054",
+            "https://files.pythonhosted.org/packages/71/44/711e61f7d014be825ef79b285b047292d1bf893732ac1bc030a351fb517f/cryptography-50.0.1-pp311-pypy311_pp73-win_amd64.whl": "sha256:693c99b49bd37d0d096e4334c10232c77248c415b98d35236094cdf96d57258b",
+            "https://files.pythonhosted.org/packages/73/35/5c3717edf9e68a0550ce04e28eab493fe545eccd81742af03f6a75fe260b/cryptography-50.0.1-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl": "sha256:fb4b9672d389c738b175c4166e78310f8a70358886aacd9173ee03a85ffdc671",
+            "https://files.pythonhosted.org/packages/7e/22/c3654cccc856e9d682817b04ac3ee79731cb09ca6f95996a95c904de2883/cryptography-50.0.1-cp311-abi3-musllinux_1_2_x86_64.whl": "sha256:9ebcdd5519be9b652a46f507817a74591774fc3d6923ac364e4dfa64e36b291b",
+            "https://files.pythonhosted.org/packages/7e/3c/0e77bd5ffcf078e9dd27d3074aad6c030d9b10d0bf69329d573c927a188c/cryptography-50.0.1-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl": "sha256:e22dfed744bd4002e909464cb23d2f0b05c6f3113a79ef2e9864a53db737c733",
+            "https://files.pythonhosted.org/packages/84/a9/ee16a903f13755e914d1eecc482fe64d1f10761c3960e5d8fa6837377aff/cryptography-50.0.1-cp39-abi3-macosx_11_0_arm64.whl": "sha256:ca83d00d9e69cd5eb63f2e69c3a5a59e0cecae5ae14c6ae0b35830fe3b37bad0",
+            "https://files.pythonhosted.org/packages/84/d5/7d1fe1cb93f91c428093ff234e128c89ba8ea61a6f26aab406081f9b996e/cryptography-50.0.1-cp39-abi3-manylinux_2_34_aarch64.whl": "sha256:01f41478cf33fc605a6a089cd56d28b45c6c0b45a1928b61797f2621a04bac71",
+            "https://files.pythonhosted.org/packages/85/66/6ccca4722987ddedaa7fc9c3f4708af7431f5535666c174350830888c6b7/cryptography-50.0.1-cp311-abi3-manylinux_2_34_x86_64.whl": "sha256:51afcfceb15597cf2635068e4ac9a56b2abde622edde17f37d85fd7b5306497a",
+            "https://files.pythonhosted.org/packages/88/dd/b215616f9bab3fc18510c78a4e5c9f362d77838503c363dc747c7d4f5c6f/cryptography-50.0.1-cp314-cp314t-manylinux_2_34_aarch64.whl": "sha256:cbf74a81765ee67413503ca6e26dcc4f6f5a519822436cc0a1b97aab6c1b8a17",
+            "https://files.pythonhosted.org/packages/8c/eb/5d7124083e8d8cda8f5b348f544b71ad6f707ad63193758ef4d8e569da02/cryptography-50.0.1-cp39-abi3-manylinux_2_34_x86_64.whl": "sha256:9dde0a357190eb3b1da1bb9ab750e9c85cba82ca5977aa0836cbb94e92611239",
+            "https://files.pythonhosted.org/packages/90/34/9ce9a62ed9dc82ca9fd6a34445b6904af56e5f38b3eae2ed32e49c36053d/cryptography-50.0.1-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl": "sha256:53e279950892dc102c6b4e52af03ae5ea92fac572a1ddab78ca73a997f62b69f",
+            "https://files.pythonhosted.org/packages/99/89/87ef49ffe383ef4e147d27b7bf2088fb0b54ea409dd87b5a89442e5828a5/cryptography-50.0.1-cp39-abi3-win_amd64.whl": "sha256:55d16b1ef3ee0958d893a977b19777887e546c9954ea81b200c3301a864013f2",
+            "https://files.pythonhosted.org/packages/9e/b9/e7425ebfb599241a0c1d7000f1b466c3062da66c19d9525031315dff7213/cryptography-50.0.1-cp314-cp314t-musllinux_1_2_aarch64.whl": "sha256:330fbb252391c596f1ae42c5754449dc924e6ad012dca8efe0d703f9f2d12ec6",
+            "https://files.pythonhosted.org/packages/b1/1b/ec3ebd31741d0e963612c4fe43caa39341b9b1e031e469820e42e4c83918/cryptography-50.0.1-cp314-cp314t-manylinux_2_34_ppc64le.whl": "sha256:16c5ecd954b3330ebfb6605eca4fd952da8bef376551d5cc264534e3770a9ee6",
+            "https://files.pythonhosted.org/packages/b4/f2/bb1f56e10815b789df0b409a69fa4992ff3d3fef9c72747f4a6b26fed38e/cryptography-50.0.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl": "sha256:8921d58f426793c5f1b47f0b59575780de9a095214958d0eb37d909593db8367",
+            "https://files.pythonhosted.org/packages/ba/19/797e2aaac9df6a66f1550f49979dc1b1e39ecd2077501c30efa81e8d5d67/cryptography-50.0.1-cp311-abi3-macosx_11_0_arm64.whl": "sha256:b8f852c65863251b9e3a1b8c150ce21e59b522dbb6a7d4bc80e680d38388e986",
+            "https://files.pythonhosted.org/packages/bb/ad/5d6702db60b1e40b41ef513b6967ff5848f307d50f8449baf1634f5908f1/cryptography-50.0.1.tar.gz": "sha256:5dd9bda1c12b4162f6ff568eeb5e0ff956c28d14406e875cfe8a63a2d414ff20",
+            "https://files.pythonhosted.org/packages/c7/27/8d207af749c453ee17ea087340b3f2b4adef75aadd1d277b1b129bdda84e/cryptography-50.0.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl": "sha256:9cb3cb952cf5a8abd50c782a98a89d71699715e802fe349704b47f2425b42a94",
+            "https://files.pythonhosted.org/packages/d6/51/3f9701867a46b6c1740c9b52fc4d3bed6cbdcfedcc9b6e64305c07f39cff/cryptography-50.0.1-cp39-abi3-manylinux_2_28_x86_64.whl": "sha256:407fe2b6db00939c05c0e945e9914238f2f0a430974839429dafc82b1ee6bee5",
+            "https://files.pythonhosted.org/packages/dd/04/557fc5ead96a829e0bc812a3b9dc4a52a2f27e4f7f5950da7ff27653a805/cryptography-50.0.1-cp39-abi3-manylinux_2_34_ppc64le.whl": "sha256:fc3ed7ebd2a8c96f5b166de0ab9b624996bef3b07bbeb19364dfb78222c22c80",
+            "https://files.pythonhosted.org/packages/e1/1b/82f0f0d8858d4432be1af790477edf62aef90324041aa07c57e57bef1af7/cryptography-50.0.1-cp311-abi3-manylinux_2_28_x86_64.whl": "sha256:51593d180cf6d179bde5c5d065bed81386b1f381656ae7d042b7ffc87a9895ad",
+            "https://files.pythonhosted.org/packages/e3/38/45abd72ef63f2e7d0754a6cacf97bd8b69512ace7f6130d24c39ece65da2/cryptography-50.0.1-cp311-abi3-manylinux_2_34_ppc64le.whl": "sha256:76de83fbd91ac49c0feaaa983d0748fd7a53176afac5fb3bf7478d244f0eb527",
+            "https://files.pythonhosted.org/packages/e6/de/d3cdc2815697aae84126cbd6a030ca7b6b452e28a88b501b836bd3aa7a86/cryptography-50.0.1-cp311-abi3-manylinux_2_28_aarch64.whl": "sha256:e74591e283fe6eb956416c929eb58262a719fe0311fd9054c62c3350ed8760d8",
+            "https://files.pythonhosted.org/packages/f6/6e/1cf405c5c8e8df7545378048e954792f00b7f2367af8863ce8b8f3e10607/cryptography-50.0.1-cp314-cp314t-manylinux_2_28_ppc64le.whl": "sha256:a255449073358275b64b67d3f595f268bbef70e72b6edb65e0c70c735bf739c9"
           },
           "docutils": {
             "https://files.pythonhosted.org/packages/32/91/30151a39f7570f448ed84529390628a651d7f27c87d73c9b887f8189695e/docutils-0.23-py3-none-any.whl": "sha256:25d013af9bf23bc1c7b2b093dff4208166c53a94786c9e447808335ef1185fea",
@@ -1500,12 +1198,12 @@
             "https://files.pythonhosted.org/packages/6d/04/c2156091427636080787aac190019dc64096e56a23b7364d3c1764ee3a06/id-1.6.1.tar.gz": "sha256:d0732d624fb46fd4e7bc4e5152f00214450953b9e772c182c1c22964def1a069"
           },
           "idna": {
-            "https://files.pythonhosted.org/packages/1e/5e/d4e9f1a599fb8e573b7b87160658329fbf28d19eac2718f51fc3def3aa5a/idna-3.18-py3-none-any.whl": "sha256:7f952cbe720b688055e3f87de14f5c3e5fdaa8bc3928985c4077ca689de849a2",
-            "https://files.pythonhosted.org/packages/cd/63/9496c57188a2ee585e0f1db071d75089a11e98aa86eb99d9d7618fc1edce/idna-3.18.tar.gz": "sha256:ffb385a7e039654cef1ab9ef32c6fafe283c0c0467bba1d9029738ce4a14a848"
+            "https://files.pythonhosted.org/packages/57/b0/0e52c878c53f245edd3a11020f20979b3f490f245af532c7cae3027754b5/idna-3.19-py3-none-any.whl": "sha256:815e7be7a7806d54abb586dc943addc79e8b2ee16915059658cbeff4b1b43bf4",
+            "https://files.pythonhosted.org/packages/5f/f7/abb373e5757eaec4b922b92f97ec8d6d7e057cf06778247604fbc4e7c3f3/idna-3.19.tar.gz": "sha256:5e0811a4383b21dc5838069f801c4fb62113b7447663d2530d2bd6e77b49bf15"
           },
           "importlib-metadata": {
-            "https://files.pythonhosted.org/packages/38/3d/2d244233ac4f76e38533cfcb2991c9eb4c7bf688ae0a036d30725b8faafe/importlib_metadata-9.0.0-py3-none-any.whl": "sha256:2d21d1cc5a017bd0559e36150c21c830ab1dc304dedd1b7ea85d20f45ef3edd7",
-            "https://files.pythonhosted.org/packages/a9/01/15bb152d77b21318514a96f43af312635eb2500c96b55398d020c93d86ea/importlib_metadata-9.0.0.tar.gz": "sha256:a4f57ab599e6a2e3016d7595cfd72eb4661a5106e787a95bcc90c7105b831efc"
+            "https://files.pythonhosted.org/packages/6f/7e/1e7e8dc30634b93ebb3d58a3dea569ad146e656218d3960ab04f62047b29/importlib_metadata-9.0.1.tar.gz": "sha256:ab830580bc0ef3db61ce8fae716389e5462b67e033018bab6d8f80ef17172f99",
+            "https://files.pythonhosted.org/packages/b3/55/ecca97ae19075f1fac62def77731e7f535e6c1fb8f92ff08160c5e6dade8/importlib_metadata-9.0.1-py3-none-any.whl": "sha256:bba5600596a7e21f3eef53281cf28d6a5195634d2f2b78ff9501a3272c6eaab0"
           },
           "jaraco-classes": {
             "https://files.pythonhosted.org/packages/06/c0/ed4a27bc5571b99e3cff68f8a9fa5b56ff7df1c2251cc715a652ddd26402/jaraco.classes-3.4.0.tar.gz": "sha256:47a024b51d0239c0dd8c8540c6c7f484be3b8fcf0b2d85c13825780d3b3f3acd",
@@ -1540,53 +1238,53 @@
             "https://files.pythonhosted.org/packages/e8/3d/1087453384dbde46a8c7f9356eead2c58be8a7bf156bca40243377c85715/more_itertools-11.1.0-py3-none-any.whl": "sha256:4b65538ae22f6fed0ce4874efd317463a7489796a0939fa66824dd542125a192"
           },
           "nh3": {
-            "https://files.pythonhosted.org/packages/09/a1/ea83abe738a3fbaa203dfdb836ca7cbab0e7e9609faaee4fe1d4652599c0/nh3-0.3.6-cp314-cp314t-musllinux_1_2_i686.whl": "sha256:edb2b4a1a27523e6cc7c417f8d21ce3d005243548b93e56b762b66b0c7f589f9",
-            "https://files.pythonhosted.org/packages/0a/13/6f1e302ca674ac74362e150848ad56a1be5145391204f74facdb8e94df12/nh3-0.3.6-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl": "sha256:455469a29951edc92bc48b47ac2281c3f2609e6c4f6a047056449f8c2c23facf",
-            "https://files.pythonhosted.org/packages/0e/24/a0d80182a18919665fefd19c1c06f1d1df1c9a6455d0252de40c034a0bc3/nh3-0.3.6-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl": "sha256:e6b7beece07525dc6e6b0fc2f104442de2ba328360ad00e50cbe2e1fd620447d",
-            "https://files.pythonhosted.org/packages/11/f9/3966c61455668c08853bf5e33b4bed93c421f3194ce4de896dc248d6f6ce/nh3-0.3.6-cp38-abi3-musllinux_1_2_armv7l.whl": "sha256:f5ed5fe84aee7f39db95c214a7421bf0499fbf500fec6d86a4e29bfc37971438",
-            "https://files.pythonhosted.org/packages/17/0c/6cdb5ee1e127be50dc8391e54bddc1f64e87bf4bfad0c55633320e2e02db/nh3-0.3.6-cp38-abi3-musllinux_1_2_x86_64.whl": "sha256:36d06341bd501240d320f5942481ed5e6846136b666e1ba4faf802b78ebc875f",
-            "https://files.pythonhosted.org/packages/19/d3/479cb4ae440424825735d60525b53e3c77fd60fd6e6afc0e984f00eb0178/nh3-0.3.6-cp38-abi3-musllinux_1_2_i686.whl": "sha256:082675ff87b9385ec430ffe6d5847ba7456cc39b73720cd4add472f9f4cffd56",
-            "https://files.pythonhosted.org/packages/25/bb/431615ba1d1d3eb63cde0f974f2114edf863a8a3f6049a12fed23fc241d3/nh3-0.3.6-cp38-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl": "sha256:44673b27010051ab5a5e438a86ec31bbda61d4a77d7e900af6b7be3037c1abae",
-            "https://files.pythonhosted.org/packages/30/a8/fb2c38845efb703a9173bffdfc745fc64d2b0e55cfc73a3647d2f028250c/nh3-0.3.6-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl": "sha256:2f90d9a0cfdbee218994fdaaeeb5a0fde62d08f35e4eef0378ec1e2200172fd0",
-            "https://files.pythonhosted.org/packages/36/ea/5542f3c45da4c00290d9d67a65e996702e23e613c4b627de3e09cb9fe357/nh3-0.3.6-cp314-cp314t-win_amd64.whl": "sha256:4713502748f564fee0633b37b3403783ce0a3af3a3d148ad91025a5bdadb7bc6",
-            "https://files.pythonhosted.org/packages/3c/a6/bfaa00046e58603507dcfc266c4778e3ab7adf68a5dedd73b6274b8d9314/nh3-0.3.6-cp38-abi3-manylinux_2_31_riscv64.whl": "sha256:25c733bee928530556b1db0ea46c52cf5aa686146e38e60a6fc7cb801ef91cec",
-            "https://files.pythonhosted.org/packages/41/21/e1084ab18eb589506335c7c7576f2d4643e9a0c0e33983ef0e549a256b96/nh3-0.3.6-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl": "sha256:e1b160831c9cdb06a6c79c2f9cdb11386602938f9af260d1c457a85add4f6f69",
-            "https://files.pythonhosted.org/packages/49/09/0d8e3101636d9ad88cdefb2914e764cb8e876ebdbb4286bfc251277d9c67/nh3-0.3.6-cp314-cp314t-musllinux_1_2_armv7l.whl": "sha256:889932a97fb4abb6f95fef1914c0d269ebfb60011e67121c1163059b9449dbb4",
-            "https://files.pythonhosted.org/packages/4b/4a/526f199626bfcb496bc01a268051b44737962005553b158e985ed7e64865/nh3-0.3.6-cp314-cp314t-musllinux_1_2_aarch64.whl": "sha256:f2f14b7ae1fca99c4a66c981aac3974e7fbc1ca30a12673d223ae1df76680917",
-            "https://files.pythonhosted.org/packages/59/62/5b6108bedaef2b2637fed04c87bdbcb5967b9961758b41f0e466ef22a022/nh3-0.3.6-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl": "sha256:34d2b0d934156b87ee114f599a3ba9b8b9e17b5d79652ba3a13fa50903de965e",
-            "https://files.pythonhosted.org/packages/5b/67/314f6151bad77a93d751978a344033e1fc890822f05f0416079338e34231/nh3-0.3.6-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl": "sha256:905f877dc66dd7aea4a76e54bcb26acb5ff8216f720c0017ccf63e0e6035698e",
-            "https://files.pythonhosted.org/packages/5e/1b/ef84624f14954d270f74060a19fc550dd4f06656399447569afb584d8c06/nh3-0.3.6.tar.gz": "sha256:f3736c9dd3d1856f80cd031715b84ca75cda2bbb1ac802c3da26bfce590838d7",
-            "https://files.pythonhosted.org/packages/66/35/26bd47e6af5915a628281dccdac354ddf4e32f7397047894270acd8c9870/nh3-0.3.6-cp314-cp314t-win_arm64.whl": "sha256:69bbb92865a693d909db3a700d3c01537533844d0948c1e9323561ce06ecda41",
-            "https://files.pythonhosted.org/packages/66/69/0654482b8635012fbae67826bd6c381abb05d841ac7388b9b4666300fdad/nh3-0.3.6-cp314-cp314t-musllinux_1_2_x86_64.whl": "sha256:43bc1ed3fa0716295fabee29ba42b2667e4a51d140b0a68e092170a765474fa6",
-            "https://files.pythonhosted.org/packages/68/17/06e72a18ee9b572914447338237ca7eb164c0df901f141bc10d1282247a2/nh3-0.3.6-cp38-abi3-musllinux_1_2_aarch64.whl": "sha256:82ca5bf427ad1b216b65ede1a2e2d87dc49bec417ceba0f297213107d3cd9d78",
-            "https://files.pythonhosted.org/packages/7b/e5/7cafee2f0413ca4cb0ef3bd111e94d408a48810008b283ad8aee00dd1809/nh3-0.3.6-cp38-abi3-win_arm64.whl": "sha256:69f365963f63a1e9bff53bdbb3c542c7c2efed3e163c9d5d83a772a2ac468c21",
-            "https://files.pythonhosted.org/packages/82/fa/2b5d684e3edf1e81bfd02d298c78c3e3da77ca1d8a2be3183a79544a7548/nh3-0.3.6-cp38-abi3-win_amd64.whl": "sha256:f338ac7d594c067679f1e99b4f5ec3906842979560f9d8f15d6bdfa39a353b10",
-            "https://files.pythonhosted.org/packages/99/3e/6506aa4f23dc7b7993a2d0a45dca3ce864ec48380adfe15a173e643c63e8/nh3-0.3.6-cp314-cp314t-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl": "sha256:2411e8c3cee81a1ddd62c2a5d50585c28aa5566d373ad1db92536b95ddb24ef2",
-            "https://files.pythonhosted.org/packages/b0/94/f48d08e6f72a406300fa11d8acd929fea1a80d4bf750fa292cb10785f126/nh3-0.3.6-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl": "sha256:d14bf7982e7a77c0c775634c29c07ce08b38a046df73e1c1f139b3e82f18a38e",
-            "https://files.pythonhosted.org/packages/e3/e1/e96e7864a7a53bd6b6fab7e9632467382a2a2c1f3fed951918ad131542fb/nh3-0.3.6-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl": "sha256:e196fa70c2ff2eb4de7d3df3108f8f358c1d69dff20d45b11f20a5aa227ffb6d",
-            "https://files.pythonhosted.org/packages/e9/55/9de666ad975d6ccd77d799ea0add55ee2347aa81286ce21b2a97c070746b/nh3-0.3.6-cp38-abi3-win32.whl": "sha256:5276ef17bdba9ad8040575c74072008b13aae429436e9d0429e718bb5f90f4da",
-            "https://files.pythonhosted.org/packages/ed/a6/1f7285ffadc8307c4dbeb08d21b920536d5117785056d1079e998c4dfa44/nh3-0.3.6-cp314-cp314t-win32.whl": "sha256:597a8e843bea00b2eb5520658dc24a9bb032e7fc9e7c2c0c4cd29420220c9796",
-            "https://files.pythonhosted.org/packages/f3/ab/a7653bce9a3b204be6a6931767a9e23595807bb84790ce6685e4d7e5bd08/nh3-0.3.6-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl": "sha256:a43ebd7543555c3ac1bc353023d0794e75cb76f6f18f19c32e95441496c0cc25"
+            "https://files.pythonhosted.org/packages/00/0c/1a8985fd43fea5530c0ac890b6f0b423770ee72f111b70b7a77f2dec243a/nh3-0.3.7-cp38-abi3-musllinux_1_2_aarch64.whl": "sha256:d56e76bd3cadb09b6b0cef364850811663734b348a25f5f587a2819c495367bd",
+            "https://files.pythonhosted.org/packages/04/5c/aa1468e3e281e78d2b3b7d762ccba59f681af355e971dbd255d5903f7b86/nh3-0.3.7-cp314-cp314t-musllinux_1_2_armv7l.whl": "sha256:94fd6e59553fbb9ffd8ba71bbd5a54e3126ba01799a097ae30d5341d750bc6ac",
+            "https://files.pythonhosted.org/packages/07/42/a687e7091928806e514f89fa2666f25ec9bfe0a902fc4402b25e51ce408b/nh3-0.3.7-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl": "sha256:f266d3f1b3647449923a8e406524632220dd5d8b647078dfe45b885d33d10479",
+            "https://files.pythonhosted.org/packages/17/40/2a0921d45b20828708bcb56887e47dcf8cae13818de5bf9a01308d348712/nh3-0.3.7-cp38-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl": "sha256:19f288c938ec6eef1f5d2c6cab47838e71fef8097e1c1233802be5a6230ba086",
+            "https://files.pythonhosted.org/packages/18/2f/022b27146d52d24b1b353b003359134788ecbcd6fcdf6283adbd57c0fbc8/nh3-0.3.7.tar.gz": "sha256:71860d01c16f4d8c72e334e0674beb2b0899dbd0bf760de18932ef4390303848",
+            "https://files.pythonhosted.org/packages/1d/18/3ab564595cb88196f50d26e163ed0fd2acc731ab26ac615df91981885887/nh3-0.3.7-cp314-cp314t-win_arm64.whl": "sha256:157ec1eb7a62f3d9a7badb8d82d89aa810e3e24e097eedfa481a25d0c8a99877",
+            "https://files.pythonhosted.org/packages/1e/60/847a21339f095c4d4c655af31fa2d18b174585bcc210709facacc7ce205c/nh3-0.3.7-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl": "sha256:eae64328e46a25785535afcb6885b6f182ecaf5ee8c88f8c075422db8aacc65b",
+            "https://files.pythonhosted.org/packages/20/64/9e36594efad6c290de4240d02cb2bd80c339a4ab1c4de66e599ffa6d9d81/nh3-0.3.7-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl": "sha256:bc42bb1193c1e28a1e74c2cabaca178e118a7103e8832699fef8a2b3e2496493",
+            "https://files.pythonhosted.org/packages/26/a4/c3423351e8d864ad756e85e15f0c01433361f14d34e4ed156482c0518f2a/nh3-0.3.7-cp38-abi3-musllinux_1_2_x86_64.whl": "sha256:6698a822132beedab80f131c08d8d0ac5a178ddeb488d02ca4b67716ecfac7af",
+            "https://files.pythonhosted.org/packages/42/e5/ae8c0782fce74fb6fcf7234bb3d4017f37ce181b4f9d29369eab21c50a04/nh3-0.3.7-cp38-abi3-musllinux_1_2_i686.whl": "sha256:15f5fbf090f5c88d61c820e1fc1fceecb6520cca9fe85649c06b57ef9dc9ff62",
+            "https://files.pythonhosted.org/packages/4b/6a/478f153f1d7c0baaa3d1e8bb5fdcee3a6235f90fe44ea969a9d4e2b8c47a/nh3-0.3.7-cp38-abi3-win32.whl": "sha256:6e4280115d44c3b278eef712a86748c1a723105cd79feec46952383117ab4e59",
+            "https://files.pythonhosted.org/packages/6a/9f/57d186d9d3dd38905dc12dddb3484406cdf6aa0b1ce33639a2d277d4ee1c/nh3-0.3.7-cp314-cp314t-musllinux_1_2_i686.whl": "sha256:18f4278ecd157d43cb35acd5aae9f35cfa79f546b4922bd86536adc0f6312102",
+            "https://files.pythonhosted.org/packages/6b/53/097a5ad0b34b15d67a472ef849165a54209fa5fbd3e639801c6fe439ba28/nh3-0.3.7-cp314-cp314t-musllinux_1_2_x86_64.whl": "sha256:808def0c8c07843e6e50dc84f532457bfa2cfd17417b219a5d9e7c773709331a",
+            "https://files.pythonhosted.org/packages/7b/7f/1a103e00aaf5e59f2dee4c2709aac609bb2d4bb74fddaf0dcfade11ed87b/nh3-0.3.7-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl": "sha256:4968fe8d2db97c6f047659bf46a449fd8ec377f44ebf3e0a1b96c0d3a333ae32",
+            "https://files.pythonhosted.org/packages/7b/e3/3212c1a5b5745245d7f18885207bbddb34c56075f34dd682bd539aad55cc/nh3-0.3.7-cp38-abi3-manylinux_2_31_riscv64.whl": "sha256:5ffdfcb9a686ffb12765376bcfb6b5b55728516d3c0ee317d29982381ded3df8",
+            "https://files.pythonhosted.org/packages/85/05/b0e6bef633549a23347d5462aa288fcc42381e7918482062ca3cb456242a/nh3-0.3.7-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl": "sha256:e8fd1ab205258b29254f72db377d99e2c96aa7653ef3b015ccab0420b094b506",
+            "https://files.pythonhosted.org/packages/93/a7/02dd159d4e71f98607d8d4249cddb7561e77be1a8e4dec77d76e1b68fc99/nh3-0.3.7-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl": "sha256:9b7279d43323a25225df23576af6594a16693f61431170848b8b2ac21ad4f174",
+            "https://files.pythonhosted.org/packages/94/0d/c257754bf57f829f307aa226bbe136d3a1356b5a0d08324c7b6bd2a8aacd/nh3-0.3.7-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl": "sha256:6c3aa50eb26e9228238271db9f983cbc3b006dfbfeca2d4dc34c33ddc6ac5ea5",
+            "https://files.pythonhosted.org/packages/9a/a7/c57a2c70534418310889a65ccfac3525e62f0bc0a8613225903403755ce7/nh3-0.3.7-cp314-cp314t-win32.whl": "sha256:874b7d67a067bd29a59223f6270fc30da4edd8e6d87fd219fc93bcbaa662c946",
+            "https://files.pythonhosted.org/packages/a6/ed/c5510c615dce55b6fcc364aa1838142f938beed64f5e4927490dfcaf4405/nh3-0.3.7-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl": "sha256:70f5ac8626e899a4bab0ef74ca2f5bd602f49c7b739e6e5026b4afc6d63dac42",
+            "https://files.pythonhosted.org/packages/b2/5d/891e533b716cf00df76ad0ba6485dcfd14d59a6430a3cc99057c4c04004e/nh3-0.3.7-cp38-abi3-musllinux_1_2_armv7l.whl": "sha256:fd4a70efb45d5372174f718878eb7a35c12677626a63b2f103b23b833457dcac",
+            "https://files.pythonhosted.org/packages/b4/b9/34433ccb1f0fe6968dabbb7d4bf5721c6221878ef07832748c06655a6a80/nh3-0.3.7-cp38-abi3-win_amd64.whl": "sha256:618e3059caf41ccdf5dcccb3fa9df4cf6e4efe23d1382a8bbfca272a8a4f8bfc",
+            "https://files.pythonhosted.org/packages/ce/88/b594f0e86856b37e182fb663283da419eea6424972506e640e890885467f/nh3-0.3.7-cp314-cp314t-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl": "sha256:91a4dab4e94d9fc54b9f67b1adfb23e81fab7ab43f33c3b8c97be9aa38f789ba",
+            "https://files.pythonhosted.org/packages/d8/4a/e9c436089a0c80b928011ead0efd156aa7639a19b6064ef58dcedcab8369/nh3-0.3.7-cp314-cp314t-musllinux_1_2_aarch64.whl": "sha256:be53a4825585f701955cb9baf49f478f56eb81e20294329fe4bc689dd5dd81fa",
+            "https://files.pythonhosted.org/packages/e4/d1/9d70e0e418a48280ec0ddc6c1b08b4b1136ebcc31a1625e57ff5c665fa51/nh3-0.3.7-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl": "sha256:de2b2aab32ea303405debefdcfc58043d3e635fa3f67b9eb140d2b0e0c0d2563",
+            "https://files.pythonhosted.org/packages/e6/b7/efda1d0a611d940bdfde6893bde1ea6b7b7d48c31273aea48e35b822fd58/nh3-0.3.7-cp314-cp314t-win_amd64.whl": "sha256:614dac4a4c36ad084e78447d16fe898dedd762e354a7ab9cda2984e82f67883d",
+            "https://files.pythonhosted.org/packages/f9/70/e140dffff6e808dc6343598df76e7e2407fd0f581de3524c75fba2e0cf24/nh3-0.3.7-cp38-abi3-win_arm64.whl": "sha256:f04b7d333b27f13ca439da3cf1c75c2fba34f104969f6ce4ac8e7079699c2f4a"
           },
           "packaging": {
-            "https://files.pythonhosted.org/packages/d7/f1/e7a6dd94a8d4a5626c03e4e99c87f241ba9e350cd9e6d75123f992427270/packaging-26.2.tar.gz": "sha256:ff452ff5a3e828ce110190feff1178bb1f2ea2281fa2075aadb987c2fb221661",
-            "https://files.pythonhosted.org/packages/df/b2/87e62e8c3e2f4b32e5fe99e0b86d576da1312593b39f47d8ceef365e95ed/packaging-26.2-py3-none-any.whl": "sha256:5fc45236b9446107ff2415ce77c807cee2862cb6fac22b8a73826d0693b0980e"
+            "https://files.pythonhosted.org/packages/63/34/ba1c580383c9eada3711951fef0795c80b829a078d72188184bcab9dd527/packaging-26.3-py3-none-any.whl": "sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c",
+            "https://files.pythonhosted.org/packages/7d/fa/3944b40b07da9ce895c0e6303a5ab7d53da063554f534556b134a54d6093/packaging-26.3.tar.gz": "sha256:94edc256424af38762eb31306eed28beb9f0efc50a8837492c9d6fd6004aed79"
           },
           "pycparser": {
             "https://files.pythonhosted.org/packages/0c/c3/44f3fbbfa403ea2a7c779186dc20772604442dde72947e7d01069cbe98e3/pycparser-3.0-py3-none-any.whl": "sha256:b727414169a36b7d524c1c3e31839a521725078d7b2ff038656844266160a992",
             "https://files.pythonhosted.org/packages/1b/7d/92392ff7815c21062bea51aa7b87d45576f649f16458d78b7cf94b9ab2e6/pycparser-3.0.tar.gz": "sha256:600f49d217304a5902ac3c37e1281c9fe94e4d0489de643a9504c5cdfdfc6b29"
           },
           "pygments": {
-            "https://files.pythonhosted.org/packages/c3/b2/bc9c9196916376152d655522fdcebac55e66de6603a76a02bca1b6414f6c/pygments-2.20.0.tar.gz": "sha256:6757cd03768053ff99f3039c1a36d6c0aa0b263438fcab17520b30a303a82b5f",
-            "https://files.pythonhosted.org/packages/f4/7e/a72dd26f3b0f4f2bf1dd8923c85f7ceb43172af56d63c7383eb62b332364/pygments-2.20.0-py3-none-any.whl": "sha256:81a9e26dd42fd28a23a2d169d86d7ac03b46e2f8b59ed4698fb4785f946d0176"
+            "https://files.pythonhosted.org/packages/49/2e/ced460408999b33da6b31b0021b0f37d329e202d4169aeb164493778f25b/pygments-2.21.0.tar.gz": "sha256:610ca751c9bc2492b38eb9a38a7fbc93edbbb2d7182edaf34e66ae493dee5c8c",
+            "https://files.pythonhosted.org/packages/71/46/17f022dd3e953bf20a04a028a21ec746d942f8d2af30fa0f124fa0e6a684/pygments-2.21.0-py3-none-any.whl": "sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9"
           },
           "pywin32-ctypes": {
             "https://files.pythonhosted.org/packages/85/9f/01a1a99704853cb63f253eea009390c88e7131c67e66a0a02099a8c917cb/pywin32-ctypes-0.2.3.tar.gz": "sha256:d162dc04946d704503b2edc4d55f3dba5c1d539ead017afa00142c38b9885755",
             "https://files.pythonhosted.org/packages/de/3d/8161f7711c017e01ac9f008dfddd9410dff3674334c233bde66e7ba65bbf/pywin32_ctypes-0.2.3-py3-none-any.whl": "sha256:8a1513379d709975552d202d942d9837758905c8d01eb82b8bcc30918929e7b8"
           },
           "readme-renderer": {
-            "https://files.pythonhosted.org/packages/02/51/d3a6ea424652c60f05600d8c2e01a55c913755e7cdad64afabbd1aa16f44/readme_renderer-45.0.tar.gz": "sha256:030a8fac74904f8fba11ad1bb6964e3f76e896dc7e5e71f16af190c9056696d1",
-            "https://files.pythonhosted.org/packages/97/1b/295bf2fa3e740131778065e5ffa2c481f0e7210182d408e9a2c244ff5b0c/readme_renderer-45.0-py3-none-any.whl": "sha256:3385ed220117104a2bceb4a9dac8c5fdf6d1f96890d7ea2a9c7174fd5c84091f"
+            "https://files.pythonhosted.org/packages/25/d7/9309494fad74ee831d4546f69325b5519f37c6dfb2d9ba495db8c6d4f4ca/readme_renderer-46.0.tar.gz": "sha256:af3e964914f6310a33ff67b72a4bdd940bed8d7c3bdecd2d14f40edf284bfe90",
+            "https://files.pythonhosted.org/packages/4b/72/ac5ca81fe9121fcaa9d828d21017cba00a16a98e4ea5fb60c878f93dda4f/readme_renderer-46.0-py3-none-any.whl": "sha256:d0dae1f74bb273b534770cb4cccb6bb78735540afdb03c2146f4e19dcd412560"
           },
           "requests": {
             "https://files.pythonhosted.org/packages/a0/f4/c67b0b3f1b9245e8d266f0f112c500d50e5b4e83cb6f3b71b6528104182a/requests-2.34.2-py3-none-any.whl": "sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0",
diff --git a/configs/agent_configs.textproto b/configs/agent_configs.textproto
index c16bf16b..612d7c5 100644
--- a/configs/agent_configs.textproto
+++ b/configs/agent_configs.textproto
@@ -62,3 +62,15 @@
   automatic: true
 }
 
+# Default Multi-Perspective Code Review Agent
+configs: {
+  id: "code-review-agent"
+  display_name: "Code Review Agent"
+  description: "Default multi-perspective review agent for gerrit."
+  include_filters: {
+    project: "gerrit"
+    path_regex: ".*"
+  }
+  use_default_subagents: true
+  tags: "code-review-agent"
+}
diff --git a/external_deps.lock.json b/external_deps.lock.json
index 20a84a6..f5af6f3 100644
--- a/external_deps.lock.json
+++ b/external_deps.lock.json
@@ -1,57 +1,57 @@
 {
   "__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": "THERE_IS_NO_DATA_ONLY_ZUUL",
   "__INPUT_ARTIFACTS_HASH": {
-    "antlr:antlr": 1249073166,
-    "aopalliance:aopalliance": -1416324331,
-    "args4j:args4j": 484840357,
-    "ch.qos.reload4j:reload4j": -1216325797,
-    "com.github.ben-manes.caffeine:caffeine": 1735183231,
-    "com.github.ben-manes.caffeine:guava": -2131703186,
-    "com.github.rholder:guava-retrying": 1309513165,
-    "com.google.auto.factory:auto-factory": -1222857861,
-    "com.google.auto.service:auto-service-annotations": 964333928,
-    "com.google.auto.value:auto-value": -661233359,
-    "com.google.auto.value:auto-value-annotations": 1386235898,
-    "com.google.auto:auto-common": -832702775,
-    "com.google.code.findbugs:jsr305": -1992157670,
-    "com.google.code.gson:gson": 2063056812,
-    "com.google.common.html.types:types": 1474029483,
-    "com.google.errorprone:error_prone_annotations": -1409032738,
+    "antlr:antlr": 922184171,
+    "aopalliance:aopalliance": 297412442,
+    "args4j:args4j": 1844957097,
+    "ch.qos.reload4j:reload4j": 468466190,
+    "com.github.ben-manes.caffeine:caffeine": -60879720,
+    "com.github.ben-manes.caffeine:guava": -926584503,
+    "com.github.rholder:guava-retrying": -1158425612,
+    "com.google.auto.factory:auto-factory": 2061747342,
+    "com.google.auto.service:auto-service-annotations": 494658103,
+    "com.google.auto.value:auto-value": 1601811244,
+    "com.google.auto.value:auto-value-annotations": 1937464771,
+    "com.google.auto:auto-common": 605821486,
+    "com.google.code.findbugs:jsr305": 1894092877,
+    "com.google.code.gson:gson": 579810017,
+    "com.google.common.html.types:types": -1565521082,
+    "com.google.errorprone:error_prone_annotations": -1370395573,
     "com.google.errorprone:error_prone_type_annotations": -1223112919,
     "com.google.escapevelocity:escapevelocity": -17168624,
-    "com.google.flogger:flogger": -825712792,
-    "com.google.flogger:flogger-log4j-backend": 1730247028,
-    "com.google.flogger:flogger-system-backend": 1522076251,
-    "com.google.flogger:google-extensions": -355130314,
-    "com.google.guava:failureaccess": -2032498474,
-    "com.google.guava:guava": -1756621521,
-    "com.google.guava:guava-testlib": -203887467,
-    "com.google.inject.extensions:guice-assistedinject": -1742632647,
-    "com.google.inject.extensions:guice-servlet": -1284557873,
-    "com.google.inject:guice": 2106361664,
-    "com.google.j2objc:j2objc-annotations": -727464895,
-    "com.google.jimfs:jimfs": -1004381565,
-    "com.google.protobuf:protobuf-java": 130636446,
-    "com.google.template:soy": -843524660,
-    "com.google.truth.extensions:truth-java8-extension": -129319374,
-    "com.google.truth.extensions:truth-liteproto-extension": 1463279446,
-    "com.google.truth.extensions:truth-proto-extension": 1270333764,
-    "com.google.truth:truth": -790731381,
-    "com.googlecode.javaewah:JavaEWAH": 1414179411,
-    "com.googlecode.prolog-cafe:prolog-cafeteria": 1472963375,
-    "com.googlecode.prolog-cafe:prolog-compiler": -348984778,
-    "com.googlecode.prolog-cafe:prolog-io": -1081577073,
-    "com.googlecode.prolog-cafe:prolog-runtime": 1849117715,
-    "com.h2database:h2": 377222208,
-    "com.ibm.icu:icu4j": -802150924,
-    "com.icegreen:greenmail": -1151466560,
-    "com.ryanharter.auto.value:auto-value-gson-extension": 520453879,
-    "com.ryanharter.auto.value:auto-value-gson-factory": 1068512450,
-    "com.ryanharter.auto.value:auto-value-gson-runtime": 187755792,
-    "com.squareup:javapoet": 1762437360,
-    "com.sun.mail:javax.mail": -1087889454,
+    "com.google.flogger:flogger": -38159395,
+    "com.google.flogger:flogger-log4j-backend": -1031492015,
+    "com.google.flogger:flogger-system-backend": 1831570954,
+    "com.google.flogger:google-extensions": 1156659279,
+    "com.google.guava:failureaccess": 892280507,
+    "com.google.guava:guava": -278329907,
+    "com.google.guava:guava-testlib": -2065549145,
+    "com.google.inject.extensions:guice-assistedinject": -1633579390,
+    "com.google.inject.extensions:guice-servlet": 1331904556,
+    "com.google.inject:guice": 285885373,
+    "com.google.j2objc:j2objc-annotations": -758748938,
+    "com.google.jimfs:jimfs": 643103458,
+    "com.google.protobuf:protobuf-java": -226930769,
+    "com.google.template:soy": 830313674,
+    "com.google.truth.extensions:truth-java8-extension": -1498654531,
+    "com.google.truth.extensions:truth-liteproto-extension": 1845738777,
+    "com.google.truth.extensions:truth-proto-extension": -385644437,
+    "com.google.truth:truth": 67900490,
+    "com.googlecode.javaewah:JavaEWAH": -592111002,
+    "com.googlecode.prolog-cafe:prolog-cafeteria": 540501616,
+    "com.googlecode.prolog-cafe:prolog-compiler": 626105353,
+    "com.googlecode.prolog-cafe:prolog-io": -567526384,
+    "com.googlecode.prolog-cafe:prolog-runtime": 1690151692,
+    "com.h2database:h2": -1123940597,
+    "com.ibm.icu:icu4j": -361890945,
+    "com.icegreen:greenmail": -1688190659,
+    "com.ryanharter.auto.value:auto-value-gson-extension": -949538944,
+    "com.ryanharter.auto.value:auto-value-gson-factory": 476272597,
+    "com.ryanharter.auto.value:auto-value-gson-runtime": -2042171193,
+    "com.squareup:javapoet": 186124283,
+    "com.sun.mail:javax.mail": -860150139,
     "com.vladsch.flexmark:flexmark": -550438914,
-    "com.vladsch.flexmark:flexmark-all": -2127316941,
+    "com.vladsch.flexmark:flexmark-all": 1777926680,
     "com.vladsch.flexmark:flexmark-ext-abbreviation": -475593117,
     "com.vladsch.flexmark:flexmark-ext-admonition": -1153966935,
     "com.vladsch.flexmark:flexmark-ext-anchorlink": 839917508,
@@ -100,130 +100,159 @@
     "com.vladsch.flexmark:flexmark-util-visitor": -1002447604,
     "com.vladsch.flexmark:flexmark-youtrack-converter": -1024344568,
     "commons-beanutils:commons-beanutils": -399736270,
-    "commons-codec:commons-codec": -1724312797,
+    "commons-codec:commons-codec": -104521094,
     "commons-collections:commons-collections": -1308259318,
-    "commons-dbcp:commons-dbcp": -873877417,
+    "commons-dbcp:commons-dbcp": 2032916076,
     "commons-digester:commons-digester": 1688456634,
-    "commons-io:commons-io": 1305681826,
+    "commons-io:commons-io": 1226199767,
     "commons-logging:commons-logging": -264381874,
-    "commons-net:commons-net": 1227155931,
-    "commons-pool:commons-pool": -2015226625,
-    "commons-validator:commons-validator": -349173223,
-    "dk.brics:automaton": -733058,
-    "eu.medsea.mimeutil:mime-util": -1364938376,
-    "io.dropwizard.metrics:metrics-core": 1542162680,
-    "io.github.java-diff-utils:java-diff-utils": 1296992014,
-    "io.sweers.autotransient:autotransient": 1591678970,
-    "jakarta.inject:jakarta.inject-api": 190564362,
+    "commons-net:commons-net": -221634372,
+    "commons-pool:commons-pool": 2048447638,
+    "commons-validator:commons-validator": -577653668,
+    "dk.brics:automaton": -1644468747,
+    "eu.medsea.mimeutil:mime-util": 1812448407,
+    "io.dropwizard.metrics:metrics-core": -921287201,
+    "io.github.java-diff-utils:java-diff-utils": 253797311,
+    "io.sweers.autotransient:autotransient": -1866824261,
+    "jakarta.inject:jakarta.inject-api": -251046605,
     "jakarta.servlet:jakarta.servlet-api": -3550902,
-    "javax.activation:activation": -940616209,
+    "javax.activation:activation": 357577168,
     "javax.annotation:jsr250-api": -593155132,
-    "javax.inject:javax.inject": -297932879,
-    "javax.servlet:javax.servlet-api": 669233360,
-    "junit:junit": -744267592,
+    "javax.inject:javax.inject": -1699438632,
+    "javax.servlet:javax.servlet-api": -1317726989,
+    "junit:junit": 1633899997,
     "log4j:log4j": 182326902,
-    "net.bytebuddy:byte-buddy": 612145055,
-    "net.bytebuddy:byte-buddy-agent": -48125545,
+    "net.bytebuddy:byte-buddy": -2085665942,
+    "net.bytebuddy:byte-buddy-agent": -85049742,
     "net.java.dev.jna:jna": -867910362,
     "net.java.dev.jna:jna-platform": -561312286,
-    "net.minidev:json-smart": -1043043954,
+    "net.minidev:json-smart": -1322128591,
     "net.sf.jopt-simple:jopt-simple": 906822697,
-    "net.sourceforge.nekohtml:nekohtml": 1723624706,
-    "org.antlr:antlr": -2055062274,
-    "org.antlr:antlr-runtime": -2145792567,
-    "org.antlr:stringtemplate": -752719922,
+    "net.sourceforge.nekohtml:nekohtml": 1344054753,
+    "org.antlr:antlr": -1950345125,
+    "org.antlr:antlr-runtime": 2041808304,
+    "org.antlr:stringtemplate": 1543798403,
     "org.apache.ant:ant": 51716534,
-    "org.apache.commons:commons-compress": -1289113474,
+    "org.apache.commons:commons-compress": -314451781,
     "org.apache.commons:commons-lang3": 1729335886,
     "org.apache.commons:commons-math3": -1738699872,
-    "org.apache.commons:commons-text": -1886494041,
-    "org.apache.httpcomponents:fluent-hc": 58615850,
-    "org.apache.httpcomponents:httpclient": 1643860045,
-    "org.apache.httpcomponents:httpcore": -1696303652,
-    "org.apache.james:apache-mime4j-core": -753273784,
-    "org.apache.james:apache-mime4j-dom": -1889888125,
-    "org.apache.lucene:lucene-analysis-common": 1272813182,
-    "org.apache.lucene:lucene-backward-codecs": 2105178323,
-    "org.apache.lucene:lucene-core": 990479611,
+    "org.apache.commons:commons-text": 1055279470,
+    "org.apache.httpcomponents:fluent-hc": -439690549,
+    "org.apache.httpcomponents:httpclient": -214613560,
+    "org.apache.httpcomponents:httpcore": -215175681,
+    "org.apache.james:apache-mime4j-core": -1179449391,
+    "org.apache.james:apache-mime4j-dom": -1166393204,
+    "org.apache.lucene:lucene-analysis-common": -894438603,
+    "org.apache.lucene:lucene-backward-codecs": 1670381248,
+    "org.apache.lucene:lucene-core": 217510296,
     "org.apache.lucene:lucene-facet": -125344464,
-    "org.apache.lucene:lucene-misc": -1066196978,
+    "org.apache.lucene:lucene-misc": -2101583963,
     "org.apache.lucene:lucene-queries": 1341801569,
-    "org.apache.lucene:lucene-queryparser": -1514200525,
+    "org.apache.lucene:lucene-queryparser": -536798880,
     "org.apache.lucene:lucene-sandbox": 1803509280,
-    "org.apache.mina:mina-core": -1403307213,
+    "org.apache.mina:mina-core": 91220592,
     "org.apache.sshd:sshd-common": 1844247612,
+    "org.apache.sshd:sshd-contrib": -227876379,
     "org.apache.sshd:sshd-core": 602454664,
-    "org.apache.sshd:sshd-mina": 582747848,
-    "org.apache.sshd:sshd-osgi": -115413327,
-    "org.apache.sshd:sshd-sftp": 292810504,
-    "org.asciidoctor:asciidoctorj": -457860213,
+    "org.apache.sshd:sshd-mina": 694283879,
+    "org.apache.sshd:sshd-osgi": 2122040286,
+    "org.apache.sshd:sshd-scp": -734172109,
+    "org.apache.sshd:sshd-sftp": 1275502119,
+    "org.asciidoctor:asciidoctorj": -2038258635,
     "org.assertj:assertj-core": -1145412507,
-    "org.bouncycastle:bcpg-jdk18on": 915299298,
-    "org.bouncycastle:bcpkix-jdk18on": -1660815403,
-    "org.bouncycastle:bcprov-jdk18on": -1559819624,
-    "org.bouncycastle:bcutil-jdk18on": 2018001773,
-    "org.commonmark:commonmark": 1129543740,
-    "org.commonmark:commonmark-ext-autolink": -1853742120,
-    "org.commonmark:commonmark-ext-gfm-strikethrough": 350394231,
-    "org.commonmark:commonmark-ext-gfm-tables": 1881582931,
-    "org.commonmark:commonmark-ext-yaml-front-matter": -1519651186,
-    "org.eclipse.jetty.ee11:jetty-ee11-servlet": 1925464069,
-    "org.eclipse.jetty.ee8:jetty-ee8-nested": -947438461,
-    "org.eclipse.jetty.ee8:jetty-ee8-security": -1982637940,
-    "org.eclipse.jetty.ee8:jetty-ee8-servlet": -658639341,
-    "org.eclipse.jetty:jetty-http": 444148373,
-    "org.eclipse.jetty:jetty-io": 635179443,
-    "org.eclipse.jetty:jetty-jmx": -1833865362,
-    "org.eclipse.jetty:jetty-security": -1139114931,
-    "org.eclipse.jetty:jetty-server": 549886160,
-    "org.eclipse.jetty:jetty-session": -698327697,
-    "org.eclipse.jetty:jetty-util": 235435535,
-    "org.eclipse.jetty:jetty-util-ajax": 57972836,
-    "org.hamcrest:hamcrest": 1547523135,
-    "org.jruby:jruby-complete": -2103568068,
+    "org.bouncycastle:bcpg-jdk18on": 219577418,
+    "org.bouncycastle:bcpkix-jdk18on": 254639479,
+    "org.bouncycastle:bcprov-jdk18on": 1844858264,
+    "org.bouncycastle:bcutil-jdk18on": -468935969,
+    "org.commonmark:commonmark": 1195706039,
+    "org.commonmark:commonmark-ext-autolink": -14213733,
+    "org.commonmark:commonmark-ext-gfm-strikethrough": -1869090916,
+    "org.commonmark:commonmark-ext-gfm-tables": -1669467072,
+    "org.commonmark:commonmark-ext-yaml-front-matter": -1752796379,
+    "org.eclipse.jetty.ee11:jetty-ee11-servlet": -1689444857,
+    "org.eclipse.jetty.ee8:jetty-ee8-nested": 740140505,
+    "org.eclipse.jetty.ee8:jetty-ee8-security": -1502309584,
+    "org.eclipse.jetty.ee8:jetty-ee8-servlet": -233119159,
+    "org.eclipse.jetty:jetty-http": 1944366707,
+    "org.eclipse.jetty:jetty-io": -961968491,
+    "org.eclipse.jetty:jetty-jmx": 902603002,
+    "org.eclipse.jetty:jetty-security": -1245064773,
+    "org.eclipse.jetty:jetty-server": 350283864,
+    "org.eclipse.jetty:jetty-session": 609012057,
+    "org.eclipse.jetty:jetty-util": 753118393,
+    "org.eclipse.jetty:jetty-util-ajax": -282298300,
+    "org.hamcrest:hamcrest": -1704983590,
+    "org.jruby:jruby": 2078748399,
     "org.json:json": -811907600,
-    "org.jsoup:jsoup": -1061087167,
-    "org.mockito:mockito-core": 1330163800,
-    "org.nibor.autolink:autolink": -342487050,
-    "org.objenesis:objenesis": 748376655,
-    "org.openid4java:openid4java": -1889179110,
+    "org.jsoup:jsoup": -747440887,
+    "org.mockito:mockito-core": -1229333582,
+    "org.nibor.autolink:autolink": 1339824623,
+    "org.objenesis:objenesis": -1132991882,
+    "org.openid4java:openid4java": 1322498581,
     "org.openjdk.jmh:jmh-core": 983716932,
     "org.openjdk.jmh:jmh-generator-annprocess": -1162360421,
-    "org.ow2.asm:asm": 1206815935,
-    "org.ow2.asm:asm-analysis": 53497832,
-    "org.ow2.asm:asm-commons": 1607605466,
-    "org.ow2.asm:asm-tree": -1365652182,
-    "org.ow2.asm:asm-util": 838800782,
-    "org.roaringbitmap:RoaringBitmap": -1626007605,
-    "org.roaringbitmap:shims": 1581618356,
-    "org.slf4j:jcl-over-slf4j": 1978020546,
-    "org.slf4j:slf4j-api": -2005163028,
-    "org.slf4j:slf4j-ext": -916772347,
+    "org.ow2.asm:asm": -2012913214,
+    "org.ow2.asm:asm-analysis": -1605962133,
+    "org.ow2.asm:asm-commons": 782423645,
+    "org.ow2.asm:asm-tree": 1820278445,
+    "org.ow2.asm:asm-util": 1009806609,
+    "org.roaringbitmap:RoaringBitmap": -1733921478,
+    "org.roaringbitmap:shims": -510093903,
+    "org.slf4j:jcl-over-slf4j": -1147569706,
+    "org.slf4j:slf4j-api": -1626237844,
+    "org.slf4j:slf4j-ext": 1893088691,
     "org.slf4j:slf4j-log4j12": -630224096,
-    "org.slf4j:slf4j-reload4j": 1021466445,
-    "org.slf4j:slf4j-simple": 1999565066,
-    "org.tukaani:xz": -1743168321,
+    "org.slf4j:slf4j-reload4j": -1037943957,
+    "org.slf4j:slf4j-simple": -917181919,
+    "org.tukaani:xz": 521927096,
     "repositories": 2019057769,
-    "xerces:xercesImpl": -1165914651,
+    "xerces:xercesImpl": -358868296,
     "xml-apis:xml-apis": -113825062
   },
   "__RESOLVED_ARTIFACTS_HASH": {
     "antlr:antlr": -947608540,
     "aopalliance:aopalliance": 1403132272,
     "aopalliance:aopalliance:jar:sources": -1259601821,
-    "args4j:args4j": 208424838,
-    "args4j:args4j:jar:sources": -370825913,
+    "args4j:args4j": -209094749,
+    "args4j:args4j:jar:sources": -1304112715,
     "ch.qos.reload4j:reload4j": -523782034,
     "ch.qos.reload4j:reload4j:jar:sources": -338991604,
-    "com.beust:jcommander": -1223620106,
-    "com.beust:jcommander:jar:sources": 1270399231,
+    "ch.randelshofer:fastdoubleparser": -1282519171,
+    "ch.randelshofer:fastdoubleparser:jar:sources": 2097810143,
+    "com.dylibso.chicory:log": -316681168,
+    "com.dylibso.chicory:log:jar:sources": 104686015,
+    "com.dylibso.chicory:runtime": -1070404169,
+    "com.dylibso.chicory:runtime:jar:sources": -1764615673,
+    "com.dylibso.chicory:wasi": 1512974207,
+    "com.dylibso.chicory:wasi:jar:sources": 73736946,
+    "com.dylibso.chicory:wasm": -204930975,
+    "com.dylibso.chicory:wasm:jar:sources": 970374469,
     "com.github.ben-manes.caffeine:caffeine": -1342502459,
     "com.github.ben-manes.caffeine:caffeine:jar:sources": 1780037606,
-    "com.github.ben-manes.caffeine:guava": 1717885520,
+    "com.github.ben-manes.caffeine:guava": 2132082326,
     "com.github.ben-manes.caffeine:guava:jar:sources": 1590068668,
-    "com.github.rholder:guava-retrying": -789983219,
+    "com.github.jnr:jffi": 1596008543,
+    "com.github.jnr:jffi:jar:native": -1334695591,
+    "com.github.jnr:jffi:jar:sources": -500902186,
+    "com.github.jnr:jnr-a64asm": 238969940,
+    "com.github.jnr:jnr-a64asm:jar:sources": -1985559629,
+    "com.github.jnr:jnr-constants": 1446937876,
+    "com.github.jnr:jnr-constants:jar:sources": 1132202614,
+    "com.github.jnr:jnr-enxio": 1963399729,
+    "com.github.jnr:jnr-enxio:jar:sources": 1913626220,
+    "com.github.jnr:jnr-ffi": 1244110474,
+    "com.github.jnr:jnr-ffi:jar:sources": -1060124038,
+    "com.github.jnr:jnr-netdb": -1001999952,
+    "com.github.jnr:jnr-netdb:jar:sources": -1452663111,
+    "com.github.jnr:jnr-posix": -2101697300,
+    "com.github.jnr:jnr-posix:jar:sources": -1821839137,
+    "com.github.jnr:jnr-unixsocket": 572367266,
+    "com.github.jnr:jnr-unixsocket:jar:sources": 219616201,
+    "com.github.jnr:jnr-x86asm": 2124831399,
+    "com.github.jnr:jnr-x86asm:jar:sources": 1619799649,
+    "com.github.rholder:guava-retrying": -375786413,
     "com.github.rholder:guava-retrying:jar:sources": 2030887181,
-    "com.google.auto.factory:auto-factory": 2025609377,
+    "com.google.auto.factory:auto-factory": -716533215,
     "com.google.auto.factory:auto-factory:jar:sources": -861333607,
     "com.google.auto.service:auto-service-annotations": 195984873,
     "com.google.auto.service:auto-service-annotations:jar:sources": -902556490,
@@ -231,13 +260,13 @@
     "com.google.auto.value:auto-value-annotations": 641752776,
     "com.google.auto.value:auto-value-annotations:jar:sources": -2083311588,
     "com.google.auto.value:auto-value:jar:sources": -30292358,
-    "com.google.auto:auto-common": -195836273,
+    "com.google.auto:auto-common": 218360533,
     "com.google.auto:auto-common:jar:sources": -2100626169,
     "com.google.code.findbugs:jsr305": -998441376,
     "com.google.code.findbugs:jsr305:jar:sources": -640520676,
     "com.google.code.gson:gson": -2014404431,
     "com.google.code.gson:gson:jar:sources": 935710753,
-    "com.google.common.html.types:types": -621178945,
+    "com.google.common.html.types:types": 1832628997,
     "com.google.common.html.types:types:jar:sources": -1323749402,
     "com.google.errorprone:error_prone_annotations": 804114225,
     "com.google.errorprone:error_prone_annotations:jar:sources": -2115535816,
@@ -251,37 +280,37 @@
     "com.google.flogger:google-extensions:jar:sources": -1667103726,
     "com.google.guava:failureaccess": 1715931538,
     "com.google.guava:failureaccess:jar:sources": 1303858893,
-    "com.google.guava:guava": 555169272,
-    "com.google.guava:guava-testlib": 1085873063,
-    "com.google.guava:guava-testlib:jar:sources": 1351030420,
-    "com.google.guava:guava:jar:sources": 1246910673,
+    "com.google.guava:guava": 932766883,
+    "com.google.guava:guava-testlib": 1478425263,
+    "com.google.guava:guava-testlib:jar:sources": 321153161,
+    "com.google.guava:guava:jar:sources": -1067173521,
     "com.google.guava:listenablefuture": 1079558157,
     "com.google.inject.extensions:guice-assistedinject": -205980308,
     "com.google.inject.extensions:guice-assistedinject:jar:sources": 550961491,
     "com.google.inject.extensions:guice-servlet": -325370690,
     "com.google.inject.extensions:guice-servlet:jar:sources": -828654042,
-    "com.google.inject:guice:jar:classes": 1808670374,
+    "com.google.inject:guice:jar:classes": -1001250580,
     "com.google.inject:guice:jar:sources": -2060215316,
     "com.google.j2objc:j2objc-annotations": 1702790440,
     "com.google.j2objc:j2objc-annotations:jar:sources": -1254484583,
-    "com.google.jimfs:jimfs": 375012684,
+    "com.google.jimfs:jimfs": 789209490,
     "com.google.jimfs:jimfs:jar:sources": -555304721,
     "com.google.jsinterop:jsinterop-annotations": 1636460091,
     "com.google.jsinterop:jsinterop-annotations:jar:sources": 694679492,
     "com.google.protobuf:protobuf-java": -1812001120,
     "com.google.protobuf:protobuf-java:jar:sources": -322237137,
-    "com.google.template:soy": 1069575414,
-    "com.google.template:soy:jar:sources": 895044971,
-    "com.google.truth.extensions:truth-java8-extension": 766384514,
+    "com.google.template:soy": -997159907,
+    "com.google.template:soy:jar:sources": 613026710,
+    "com.google.truth.extensions:truth-java8-extension": -91281205,
     "com.google.truth.extensions:truth-java8-extension:jar:sources": 1257445795,
-    "com.google.truth.extensions:truth-liteproto-extension": -1774954418,
+    "com.google.truth.extensions:truth-liteproto-extension": -1244120662,
     "com.google.truth.extensions:truth-liteproto-extension:jar:sources": -754757455,
-    "com.google.truth.extensions:truth-proto-extension": 1034568564,
+    "com.google.truth.extensions:truth-proto-extension": 702762574,
     "com.google.truth.extensions:truth-proto-extension:jar:sources": -171856482,
-    "com.google.truth:truth": 2133252626,
+    "com.google.truth:truth": -1272987563,
     "com.google.truth:truth:jar:sources": 494258718,
-    "com.googlecode.javaewah:JavaEWAH": 1782327838,
-    "com.googlecode.javaewah:JavaEWAH:jar:sources": -77762967,
+    "com.googlecode.javaewah:JavaEWAH": 536180633,
+    "com.googlecode.javaewah:JavaEWAH:jar:sources": 1003442530,
     "com.googlecode.prolog-cafe:prolog-cafeteria": 1676859953,
     "com.googlecode.prolog-cafe:prolog-cafeteria:jar:sources": -2075023034,
     "com.googlecode.prolog-cafe:prolog-compiler": 796735585,
@@ -290,11 +319,17 @@
     "com.googlecode.prolog-cafe:prolog-io:jar:sources": 2063038283,
     "com.googlecode.prolog-cafe:prolog-runtime": -776672418,
     "com.googlecode.prolog-cafe:prolog-runtime:jar:sources": 1445213194,
-    "com.h2database:h2": -552414482,
-    "com.h2database:h2:jar:sources": 1071831572,
+    "com.h2database:h2": -708777079,
+    "com.h2database:h2:jar:sources": 857756152,
+    "com.headius:backport9": -514470990,
+    "com.headius:backport9:jar:sources": -1060913623,
+    "com.headius:invokebinder": -829629371,
+    "com.headius:invokebinder:jar:sources": -1846290205,
+    "com.headius:options": 2106801967,
+    "com.headius:options:jar:sources": -1059667112,
     "com.ibm.icu:icu4j": -1725310050,
     "com.ibm.icu:icu4j:jar:sources": 163265109,
-    "com.icegreen:greenmail": 945965666,
+    "com.icegreen:greenmail": -151631445,
     "com.icegreen:greenmail:jar:sources": -245613146,
     "com.ryanharter.auto.value:auto-value-gson-extension": -1071085858,
     "com.ryanharter.auto.value:auto-value-gson-extension:jar:sources": -670606081,
@@ -307,25 +342,33 @@
     "com.sun.mail:javax.mail": -1925012432,
     "com.sun.mail:javax.mail:jar:sources": 608124446,
     "com.vladsch.flexmark:flexmark-all:jar:lib": 1454723856,
-    "commons-codec:commons-codec": -28659539,
-    "commons-codec:commons-codec:jar:sources": -499809306,
+    "commons-codec:commons-codec": -1332445711,
+    "commons-codec:commons-codec:jar:sources": 1241814857,
     "commons-dbcp:commons-dbcp": 1878088686,
     "commons-dbcp:commons-dbcp:jar:sources": 699520492,
     "commons-io:commons-io": 1072619124,
     "commons-io:commons-io:jar:sources": -238571367,
-    "commons-net:commons-net": 2103840351,
-    "commons-net:commons-net:jar:sources": -729248524,
+    "commons-net:commons-net": 1995393131,
+    "commons-net:commons-net:jar:sources": -1655164653,
     "commons-pool:commons-pool": -212519749,
     "commons-pool:commons-pool:jar:sources": 1134824914,
     "commons-validator:commons-validator": -842137273,
     "commons-validator:commons-validator:jar:sources": 1073953409,
     "dk.brics:automaton": -509279352,
     "dk.brics:automaton:jar:sources": 1035320481,
-    "eu.medsea.mimeutil:mime-util": -188093271,
-    "io.dropwizard.metrics:metrics-core": 740461012,
+    "eu.medsea.mimeutil:mime-util": -947720124,
+    "io.dropwizard.metrics:metrics-core": 2067658873,
     "io.dropwizard.metrics:metrics-core:jar:sources": -1988318320,
     "io.github.java-diff-utils:java-diff-utils": -1180802694,
     "io.github.java-diff-utils:java-diff-utils:jar:sources": 1551226070,
+    "io.roastedroot:redline": -1563401986,
+    "io.roastedroot:redline-api": -694215047,
+    "io.roastedroot:redline-api:jar:sources": 979956914,
+    "io.roastedroot:redline-bridge": -370093466,
+    "io.roastedroot:redline-bridge:jar:sources": -1848320915,
+    "io.roastedroot:redline-runner-jffi": -689433931,
+    "io.roastedroot:redline-runner-jffi:jar:sources": 1629602238,
+    "io.roastedroot:redline:jar:sources": 162282201,
     "io.sweers.autotransient:autotransient": 1808939417,
     "io.sweers.autotransient:autotransient:jar:sources": -703216994,
     "jakarta.inject:jakarta.inject-api": 188991469,
@@ -338,12 +381,16 @@
     "javax.inject:javax.inject:jar:sources": 1222576539,
     "javax.servlet:javax.servlet-api": 735808080,
     "javax.servlet:javax.servlet-api:jar:sources": -2015355058,
+    "joda-time:joda-time": 2092189510,
+    "joda-time:joda-time:jar:sources": 273193335,
     "junit:junit": -1256429642,
     "junit:junit:jar:sources": 940567721,
-    "net.bytebuddy:byte-buddy": 570606503,
-    "net.bytebuddy:byte-buddy-agent": -647040865,
-    "net.bytebuddy:byte-buddy-agent:jar:sources": 1035878534,
-    "net.bytebuddy:byte-buddy:jar:sources": -750344117,
+    "me.qmx.jitescript:jitescript": -483352198,
+    "me.qmx.jitescript:jitescript:jar:sources": 1920201576,
+    "net.bytebuddy:byte-buddy": -1914258003,
+    "net.bytebuddy:byte-buddy-agent": 682658697,
+    "net.bytebuddy:byte-buddy-agent:jar:sources": -1164352937,
+    "net.bytebuddy:byte-buddy:jar:sources": 891177431,
     "net.java.dev.jna:jna": 1622514527,
     "net.java.dev.jna:jna-platform": 1756885266,
     "net.java.dev.jna:jna-platform:jar:sources": -507721531,
@@ -366,7 +413,7 @@
     "org.apache.ant:ant-launcher": -333622244,
     "org.apache.ant:ant-launcher:jar:sources": -77100552,
     "org.apache.ant:ant:jar:sources": 389240804,
-    "org.apache.commons:commons-compress": -832484004,
+    "org.apache.commons:commons-compress": 151329248,
     "org.apache.commons:commons-compress:jar:sources": -1888643111,
     "org.apache.commons:commons-lang3": 1841935436,
     "org.apache.commons:commons-lang3:jar:sources": -982252396,
@@ -374,16 +421,16 @@
     "org.apache.commons:commons-math3:jar:sources": -2132756896,
     "org.apache.commons:commons-text": 869132518,
     "org.apache.commons:commons-text:jar:sources": 400790036,
-    "org.apache.httpcomponents:fluent-hc": -1791063366,
+    "org.apache.httpcomponents:fluent-hc": 213470706,
     "org.apache.httpcomponents:fluent-hc:jar:sources": -1265691559,
-    "org.apache.httpcomponents:httpclient": -930110091,
+    "org.apache.httpcomponents:httpclient": -1485924559,
     "org.apache.httpcomponents:httpclient:jar:sources": -779528763,
     "org.apache.httpcomponents:httpcore": 67453319,
     "org.apache.httpcomponents:httpcore:jar:sources": 2134002822,
-    "org.apache.james:apache-mime4j-core": 1172767236,
-    "org.apache.james:apache-mime4j-core:jar:sources": 1540423501,
-    "org.apache.james:apache-mime4j-dom": -704995319,
-    "org.apache.james:apache-mime4j-dom:jar:sources": -1311932247,
+    "org.apache.james:apache-mime4j-core": -1694594588,
+    "org.apache.james:apache-mime4j-core:jar:sources": -22221334,
+    "org.apache.james:apache-mime4j-dom": -1145067327,
+    "org.apache.james:apache-mime4j-dom:jar:sources": -296670150,
     "org.apache.lucene:lucene-analysis-common": 117494556,
     "org.apache.lucene:lucene-analysis-common:jar:sources": 184261997,
     "org.apache.lucene:lucene-backward-codecs": 497823300,
@@ -394,26 +441,30 @@
     "org.apache.lucene:lucene-misc:jar:sources": 619654209,
     "org.apache.lucene:lucene-queryparser": -1551455963,
     "org.apache.lucene:lucene-queryparser:jar:sources": -1536444117,
-    "org.apache.mina:mina-core": -584591076,
+    "org.apache.mina:mina-core": -354250191,
     "org.apache.mina:mina-core:jar:sources": 71382131,
-    "org.apache.sshd:sshd-mina": -36716477,
-    "org.apache.sshd:sshd-mina:jar:sources": 97528844,
-    "org.apache.sshd:sshd-osgi": 1810958617,
-    "org.apache.sshd:sshd-osgi:jar:sources": 710209222,
-    "org.apache.sshd:sshd-sftp": -320832840,
-    "org.apache.sshd:sshd-sftp:jar:sources": -1268961386,
-    "org.asciidoctor:asciidoctorj": 1685789893,
-    "org.asciidoctor:asciidoctorj:jar:sources": 2091708864,
-    "org.assertj:assertj-core": 1185991420,
+    "org.apache.sshd:sshd-contrib": 722931067,
+    "org.apache.sshd:sshd-contrib:jar:sources": 1165135011,
+    "org.apache.sshd:sshd-mina": 2004004570,
+    "org.apache.sshd:sshd-mina:jar:sources": -563090466,
+    "org.apache.sshd:sshd-osgi": 1205937329,
+    "org.apache.sshd:sshd-osgi:jar:sources": -737647791,
+    "org.apache.sshd:sshd-sftp": 1698263334,
+    "org.apache.sshd:sshd-sftp:jar:sources": 1050551263,
+    "org.asciidoctor:asciidoctorj": 845592762,
+    "org.asciidoctor:asciidoctorj-api": 1059094284,
+    "org.asciidoctor:asciidoctorj-api:jar:sources": 989901516,
+    "org.asciidoctor:asciidoctorj:jar:sources": -1209916532,
+    "org.assertj:assertj-core": -253199576,
     "org.assertj:assertj-core:jar:sources": -697161745,
-    "org.bouncycastle:bcpg-jdk18on": 1314692470,
-    "org.bouncycastle:bcpg-jdk18on:jar:sources": -1476258101,
-    "org.bouncycastle:bcpkix-jdk18on": -1562281305,
-    "org.bouncycastle:bcpkix-jdk18on:jar:sources": 1945286569,
-    "org.bouncycastle:bcprov-jdk18on": -390275162,
-    "org.bouncycastle:bcprov-jdk18on:jar:sources": -2118706434,
-    "org.bouncycastle:bcutil-jdk18on": -1194874921,
-    "org.bouncycastle:bcutil-jdk18on:jar:sources": -1005159791,
+    "org.bouncycastle:bcpg-jdk18on": 1344554762,
+    "org.bouncycastle:bcpg-jdk18on:jar:sources": 1086923059,
+    "org.bouncycastle:bcpkix-jdk18on": -287047843,
+    "org.bouncycastle:bcpkix-jdk18on:jar:sources": -1855368494,
+    "org.bouncycastle:bcprov-jdk18on": -751439126,
+    "org.bouncycastle:bcprov-jdk18on:jar:sources": 485448997,
+    "org.bouncycastle:bcutil-jdk18on": -1269559261,
+    "org.bouncycastle:bcutil-jdk18on:jar:sources": 1897597974,
     "org.checkerframework:checker-compat-qual": -1467964223,
     "org.checkerframework:checker-compat-qual:jar:sources": 187825033,
     "org.checkerframework:checker-qual": -739034920,
@@ -428,78 +479,97 @@
     "org.commonmark:commonmark-ext-yaml-front-matter": 1918089254,
     "org.commonmark:commonmark-ext-yaml-front-matter:jar:sources": -902462472,
     "org.commonmark:commonmark:jar:sources": -1511261547,
-    "org.eclipse.jetty.ee11:jetty-ee11-servlet": -820847559,
-    "org.eclipse.jetty.ee11:jetty-ee11-servlet:jar:sources": -873060978,
-    "org.eclipse.jetty.ee8:jetty-ee8-nested": -159062536,
-    "org.eclipse.jetty.ee8:jetty-ee8-nested:jar:sources": 466458242,
-    "org.eclipse.jetty.ee8:jetty-ee8-security": -198386270,
-    "org.eclipse.jetty.ee8:jetty-ee8-security:jar:sources": 494500175,
-    "org.eclipse.jetty.ee8:jetty-ee8-servlet": 130236687,
-    "org.eclipse.jetty.ee8:jetty-ee8-servlet:jar:sources": -1891333550,
+    "org.crac:crac": 853021667,
+    "org.crac:crac:jar:sources": -1045886349,
+    "org.eclipse.jetty.ee11:jetty-ee11-servlet": 724378609,
+    "org.eclipse.jetty.ee11:jetty-ee11-servlet:jar:sources": 565135182,
+    "org.eclipse.jetty.ee8:jetty-ee8-nested": 1759154570,
+    "org.eclipse.jetty.ee8:jetty-ee8-nested:jar:sources": 1005566104,
+    "org.eclipse.jetty.ee8:jetty-ee8-security": 1461787080,
+    "org.eclipse.jetty.ee8:jetty-ee8-security:jar:sources": -722932162,
+    "org.eclipse.jetty.ee8:jetty-ee8-servlet": -1602560061,
+    "org.eclipse.jetty.ee8:jetty-ee8-servlet:jar:sources": 1732994844,
     "org.eclipse.jetty.toolchain:jetty-servlet-api": 1364182673,
     "org.eclipse.jetty.toolchain:jetty-servlet-api:jar:sources": 736604807,
-    "org.eclipse.jetty:jetty-http": -328633070,
-    "org.eclipse.jetty:jetty-http:jar:sources": 1289113758,
-    "org.eclipse.jetty:jetty-io": -1748418908,
-    "org.eclipse.jetty:jetty-io:jar:sources": -444551156,
-    "org.eclipse.jetty:jetty-jmx": 856481565,
-    "org.eclipse.jetty:jetty-jmx:jar:sources": -1523078582,
-    "org.eclipse.jetty:jetty-security": -1524832457,
-    "org.eclipse.jetty:jetty-security:jar:sources": -272643394,
-    "org.eclipse.jetty:jetty-server": 92951848,
-    "org.eclipse.jetty:jetty-server:jar:sources": -1602164191,
-    "org.eclipse.jetty:jetty-session": -1408099417,
-    "org.eclipse.jetty:jetty-session:jar:sources": -1187228748,
-    "org.eclipse.jetty:jetty-util": -1243632909,
-    "org.eclipse.jetty:jetty-util-ajax": -818511585,
-    "org.eclipse.jetty:jetty-util-ajax:jar:sources": -884639814,
-    "org.eclipse.jetty:jetty-util:jar:sources": 1776811920,
+    "org.eclipse.jetty:jetty-http": 729415188,
+    "org.eclipse.jetty:jetty-http:jar:sources": -1532728803,
+    "org.eclipse.jetty:jetty-io": -1914296455,
+    "org.eclipse.jetty:jetty-io:jar:sources": -1048223707,
+    "org.eclipse.jetty:jetty-jmx": -308859603,
+    "org.eclipse.jetty:jetty-jmx:jar:sources": 706930056,
+    "org.eclipse.jetty:jetty-security": -2084723508,
+    "org.eclipse.jetty:jetty-security:jar:sources": 1336552060,
+    "org.eclipse.jetty:jetty-server": 399159750,
+    "org.eclipse.jetty:jetty-server:jar:sources": -1317113198,
+    "org.eclipse.jetty:jetty-session": -792297065,
+    "org.eclipse.jetty:jetty-session:jar:sources": -88714331,
+    "org.eclipse.jetty:jetty-util": 12774316,
+    "org.eclipse.jetty:jetty-util-ajax": -1733323484,
+    "org.eclipse.jetty:jetty-util-ajax:jar:sources": -253683184,
+    "org.eclipse.jetty:jetty-util:jar:sources": -512138282,
     "org.hamcrest:hamcrest": 1282317766,
     "org.hamcrest:hamcrest-core": 649657847,
     "org.hamcrest:hamcrest-core:jar:sources": -1646511374,
     "org.hamcrest:hamcrest:jar:sources": 1394599014,
-    "org.jruby:jruby-complete": -1216064857,
-    "org.jruby:jruby-complete:jar:sources": -308329410,
-    "org.jsoup:jsoup": 885756132,
-    "org.jsoup:jsoup:jar:sources": -2058254438,
-    "org.jspecify:jspecify": 117231129,
-    "org.jspecify:jspecify:jar:sources": -2134060298,
-    "org.mockito:mockito-core": -1701291388,
-    "org.mockito:mockito-core:jar:sources": 1900207417,
+    "org.jruby.jcodings:jcodings": -670130762,
+    "org.jruby.jcodings:jcodings:jar:sources": -1788488622,
+    "org.jruby.joni:joni": 652498333,
+    "org.jruby.joni:joni:jar:sources": 1044080184,
+    "org.jruby:dirgra": -1432445703,
+    "org.jruby:dirgra:jar:sources": -1467471945,
+    "org.jruby:jruby": -659313193,
+    "org.jruby:jruby-base": -1506889109,
+    "org.jruby:jruby-base:jar:sources": -679962120,
+    "org.jruby:jruby-prism": -1252895675,
+    "org.jruby:jruby-prism:jar:sources": -1968476554,
+    "org.jruby:jruby-stdlib": 1860547675,
+    "org.jruby:jruby:jar:sources": 567964875,
+    "org.jruby:jzlib": -1541291350,
+    "org.jruby:jzlib:jar:sources": -942778938,
+    "org.jsoup:jsoup": 1818671647,
+    "org.jsoup:jsoup:jar:sources": 1318808240,
+    "org.jspecify:jspecify": -109882726,
+    "org.jspecify:jspecify:jar:sources": 345277939,
+    "org.mockito:mockito-core": -1058138256,
+    "org.mockito:mockito-core:jar:sources": 1799409451,
     "org.nibor.autolink:autolink": -443901116,
     "org.nibor.autolink:autolink:jar:sources": -1863403724,
     "org.objenesis:objenesis": 1536526812,
     "org.objenesis:objenesis:jar:sources": 321662415,
-    "org.openid4java:openid4java": -469605553,
+    "org.openid4java:openid4java": 231338479,
     "org.openid4java:openid4java:jar:sources": -1312563952,
     "org.openjdk.jmh:jmh-core": 262505124,
     "org.openjdk.jmh:jmh-core:jar:sources": 814651627,
     "org.openjdk.jmh:jmh-generator-annprocess": 554503664,
     "org.openjdk.jmh:jmh-generator-annprocess:jar:sources": -59690191,
-    "org.ow2.asm:asm": 1614653533,
-    "org.ow2.asm:asm-analysis": 865618371,
-    "org.ow2.asm:asm-analysis:jar:sources": 860015432,
-    "org.ow2.asm:asm-commons": 33716409,
-    "org.ow2.asm:asm-commons:jar:sources": 899206392,
-    "org.ow2.asm:asm-tree": -1173653421,
-    "org.ow2.asm:asm-tree:jar:sources": 590990274,
-    "org.ow2.asm:asm-util": 1667785410,
-    "org.ow2.asm:asm-util:jar:sources": 902318962,
-    "org.ow2.asm:asm:jar:sources": 340034775,
+    "org.ow2.asm:asm": -153858314,
+    "org.ow2.asm:asm-analysis": -2022113823,
+    "org.ow2.asm:asm-analysis:jar:sources": -984134817,
+    "org.ow2.asm:asm-commons": -1686699013,
+    "org.ow2.asm:asm-commons:jar:sources": 682798039,
+    "org.ow2.asm:asm-tree": -1259783189,
+    "org.ow2.asm:asm-tree:jar:sources": 25283133,
+    "org.ow2.asm:asm-util": 1574772395,
+    "org.ow2.asm:asm-util:jar:sources": -1069535031,
+    "org.ow2.asm:asm:jar:sources": 1372783843,
     "org.roaringbitmap:RoaringBitmap": -1389417978,
     "org.roaringbitmap:RoaringBitmap:jar:sources": -144719403,
     "org.roaringbitmap:shims": -1535336248,
     "org.roaringbitmap:shims:jar:sources": -422658237,
-    "org.slf4j:jcl-over-slf4j": 1113513525,
-    "org.slf4j:jcl-over-slf4j:jar:sources": 494484499,
-    "org.slf4j:slf4j-api": 500377983,
-    "org.slf4j:slf4j-api:jar:sources": 1751644771,
-    "org.slf4j:slf4j-ext": -1625091915,
-    "org.slf4j:slf4j-ext:jar:sources": 194861628,
-    "org.slf4j:slf4j-reload4j": -1779685465,
-    "org.slf4j:slf4j-reload4j:jar:sources": -1558574593,
-    "org.slf4j:slf4j-simple": -1055624668,
-    "org.slf4j:slf4j-simple:jar:sources": 751828941,
+    "org.ruby-lang:prism-parser-api": -1291583223,
+    "org.ruby-lang:prism-parser-api:jar:sources": 256247713,
+    "org.ruby-lang:prism-parser-wasm": 1367333582,
+    "org.ruby-lang:prism-parser-wasm:jar:sources": 2138143504,
+    "org.slf4j:jcl-over-slf4j": 654857378,
+    "org.slf4j:jcl-over-slf4j:jar:sources": 1447796761,
+    "org.slf4j:slf4j-api": -736053657,
+    "org.slf4j:slf4j-api:jar:sources": -72528589,
+    "org.slf4j:slf4j-ext": 1208467804,
+    "org.slf4j:slf4j-ext:jar:sources": 1632735534,
+    "org.slf4j:slf4j-reload4j": 1168851309,
+    "org.slf4j:slf4j-reload4j:jar:sources": 2075068386,
+    "org.slf4j:slf4j-simple": -506243416,
+    "org.slf4j:slf4j-simple:jar:sources": -58141894,
     "org.tukaani:xz": -321288404,
     "org.tukaani:xz:jar:sources": -893332662,
     "xerces:xercesImpl": -1852819301,
@@ -521,10 +591,10 @@
     },
     "args4j:args4j": {
       "shasums": {
-        "jar": "91ddeaba0b24adce72291c618c00bbdce1c884755f6c4dba9c5c46e871c69ed6",
-        "sources": "a337a37bc6fc9a2d81c952f4c6ebd5db12351e994d00e112d7fe87a4dd707204"
+        "jar": "5a13b0f7ff519183e55b8f453b8faaa23b92ccf0443f1fac515fedf2246bdc18",
+        "sources": "179ee53818ef244600238091c7c6333340e86bb83c605b2fb104a427571e0d1e"
       },
-      "version": "2.33"
+      "version": "2.37"
     },
     "ch.qos.reload4j:reload4j": {
       "shasums": {
@@ -533,12 +603,40 @@
       },
       "version": "1.2.26"
     },
-    "com.beust:jcommander": {
+    "ch.randelshofer:fastdoubleparser": {
       "shasums": {
-        "jar": "019c12fec1ce5c02cbabb150f6ac8a86d92a0ecc9c89a549e5537283e863000c",
-        "sources": "6682ba2de6bac5950c99c7ebda6c5bfd6dde4026619fcb16f4f8de869ca78579"
+        "jar": "4242e2335299026524d331355a6cd75abdc38c8fed4402f25b5c7ce9d7668cc1",
+        "sources": "6e8815541cf5123e1dac460946227f1bbb109e0570bbbc4c6a50067bd94b2c38"
       },
-      "version": "1.35"
+      "version": "2.0.1"
+    },
+    "com.dylibso.chicory:log": {
+      "shasums": {
+        "jar": "79e4e505060d48dee4f520daa9591dbb9b9dc2e3073e1a5fcb2018bfd2d5d1f2",
+        "sources": "9454b97bc6e6b47ff3a086306afe6e15c3066e2488fe0454d555a7075e7592e9"
+      },
+      "version": "1.7.5"
+    },
+    "com.dylibso.chicory:runtime": {
+      "shasums": {
+        "jar": "cdbb2bd4e353eacff78da5dd3454694316eaa6d2950aab3d1517dca41ae4a0b2",
+        "sources": "61fbc99ed4fa699a583c37e5efec154a72f5cf12e54a8ebb876916c4c7a1bf5f"
+      },
+      "version": "1.7.5"
+    },
+    "com.dylibso.chicory:wasi": {
+      "shasums": {
+        "jar": "52f68c155b1dc4ff6df9a6b9eb84201029886561e87bc77a858bd14333c1cfbc",
+        "sources": "ba7e84336b031759b58de4c46369f5e6d2e9952dda997befc35b81578e2505c6"
+      },
+      "version": "1.7.5"
+    },
+    "com.dylibso.chicory:wasm": {
+      "shasums": {
+        "jar": "16558a66bac04f7e00ea06950f52d87ce2cfff535a54bac2115f2c13e0b3050b",
+        "sources": "c43890628fafb77b7cb884313d4d39b465006f400799a42f40f02c08b5ce422c"
+      },
+      "version": "1.7.5"
     },
     "com.github.ben-manes.caffeine:caffeine": {
       "shasums": {
@@ -554,6 +652,70 @@
       },
       "version": "2.9.2"
     },
+    "com.github.jnr:jffi": {
+      "shasums": {
+        "jar": "402f3c4652ff33ef3c9deb81ee3e9487bd62a91605fe1f2bdf2e2d6f2f4bb4ff",
+        "native": "278915be4feba64d6050aab4bbfb255d5daad494ac442e4826da55d2ac81cfe5",
+        "sources": "4ea4699fbea87a8f66872e7b3c9492ce92e46ecf725c14869a17d30f9261875e"
+      },
+      "version": "1.4.3"
+    },
+    "com.github.jnr:jnr-a64asm": {
+      "shasums": {
+        "jar": "53ae5ea7fa5c284e8279aa348e7b9de4548b0cae10bfd058fa217c791875e4cf",
+        "sources": "2106b98c7d794fb01237e7243d975b9bc8450aa87bf34f93d7b5fcc651af7ff1"
+      },
+      "version": "1.0.0"
+    },
+    "com.github.jnr:jnr-constants": {
+      "shasums": {
+        "jar": "1abad8ddc450d415ee6fc62bfd3c87b9db58e71b8b2e3b04c87570f78f66e526",
+        "sources": "fa0738dfa8049c43513a5ba93ac5fd40b4022478114dd22905851ce5d5c3b8df"
+      },
+      "version": "0.11.2"
+    },
+    "com.github.jnr:jnr-enxio": {
+      "shasums": {
+        "jar": "a12d105550cf5615200e5db5b9efbd8e9a625a23e4c18eeb57669623bcd9dcbf",
+        "sources": "54de138be9553261b601187da3d109ae0d6be9df1b477422c39ab3ad386972fe"
+      },
+      "version": "0.33.3"
+    },
+    "com.github.jnr:jnr-ffi": {
+      "shasums": {
+        "jar": "c7671fa32080def6b4edbce102248f8b38a452f0ea094a233e6e8e4441075e67",
+        "sources": "06a4eb5c5051c133afe2a36796ab15e702346f3d1d64b0e93dfe9fa47bf446be"
+      },
+      "version": "2.3.3"
+    },
+    "com.github.jnr:jnr-netdb": {
+      "shasums": {
+        "jar": "24f54abd859979b6caabf4918b022c57fc0d3247def4bfe68e5a30172409fc3c",
+        "sources": "1033a0e67b5d2860dc6d17bdb4604442d7b826da81066a8d4f1019db83f602f5"
+      },
+      "version": "1.2.0"
+    },
+    "com.github.jnr:jnr-posix": {
+      "shasums": {
+        "jar": "db64bc6168e87215741807114be0a0ceb3037d85132f155d119a0419a102176b",
+        "sources": "8bcd17e851fb2ff188e5b548675c15478ad694ef0752e86f5651374a1ef50675"
+      },
+      "version": "3.2.4"
+    },
+    "com.github.jnr:jnr-unixsocket": {
+      "shasums": {
+        "jar": "002b1aac41d38de1646e48ae8dd98494d53a0ed01bc832a71c9c8957759f7e22",
+        "sources": "679b90db8bcc76da9231f984676881d1114e15225bc06110070326f462f608d0"
+      },
+      "version": "0.39.5"
+    },
+    "com.github.jnr:jnr-x86asm": {
+      "shasums": {
+        "jar": "39f3675b910e6e9b93825f8284bec9f4ad3044cd20a6f7c8ff9e2f8695ebf21e",
+        "sources": "3c983efd496f95ea5382ca014f96613786826136e0ce13d5c1cbc3097ea92ca0"
+      },
+      "version": "1.0.2"
+    },
     "com.github.rholder:guava-retrying": {
       "shasums": {
         "jar": "5f6049a70c6c2fb56a5f3a3e1350ce1e853b5c6ccaba01fbf9c6835d72ac9484",
@@ -661,17 +823,17 @@
     },
     "com.google.guava:guava": {
       "shasums": {
-        "jar": "1e301f0c52ac248b0b14fdc3d12283c77252d4d6f48521d572e7d8c4c2cc4ac7",
-        "sources": "79423ae87a2203950e0e3ce2a00682b3b8d8557e631bbf662dba5494fe3b55cb"
+        "jar": "97b79ec3f2c0a6313a0c2df51ce1abdf8907e6531803467b81efcaaf99b35161",
+        "sources": "4f183ff540044f5ce4f9c1084888510632dfac2953ced0da45760bc74d99f4ca"
       },
-      "version": "33.5.0-jre"
+      "version": "33.8.0-jre"
     },
     "com.google.guava:guava-testlib": {
       "shasums": {
-        "jar": "d98a26c3c32803007ca4a1126f36d66cc0ba4b4471eb650ed2e329a2b49b285b",
-        "sources": "b535fa90b57f7b44167383e5c60d73f4086c6cbab474fb6cadb29df9d241b321"
+        "jar": "000e5ed77a98960f3a4d09d46ee81eae97a910f5d1ee581de7c75ac693c4f488",
+        "sources": "ac33201d640297c9ca59930254ad219130231591a1c325ea0aa0dab6729c6122"
       },
-      "version": "33.5.0-jre"
+      "version": "33.8.0-jre"
     },
     "com.google.guava:listenablefuture": {
       "shasums": {
@@ -730,10 +892,10 @@
     },
     "com.google.template:soy": {
       "shasums": {
-        "jar": "f68ae7f2daa8c343075210a21014ccdf042435a2d5c0dacb39f7a78b8ea88491",
-        "sources": "0e886bf691a90d0fbe9e19e3a0eec5c7e72e4386f209e86988b6e867ba1e4441"
+        "jar": "becacbd2df937cd4416e7aa683144946048cfaa479bff54d33b0c8ca60a8fda8",
+        "sources": "f9e1cbe8c77bb4d34e2de6f303d0f24aa4781371c4dd4880deb001d83c809a37"
       },
-      "version": "2024-01-30"
+      "version": "2024-02-26"
     },
     "com.google.truth.extensions:truth-java8-extension": {
       "shasums": {
@@ -765,10 +927,10 @@
     },
     "com.googlecode.javaewah:JavaEWAH": {
       "shasums": {
-        "jar": "b19204331ac6e204befaf508a68f52ec6b4638d9d9bacddbebd435f9c4d500f2",
-        "sources": "dff89879de1a8f5ec14b75f4ee2e32a544afd75dffa8d4d8d2494a0d981c993c"
+        "jar": "d65226949713c4c61a784f41c51167e7b0316f93764398ebba9e4336b3d954c2",
+        "sources": "abf457c01352b9e44212b131dbae4c2a878668820d168dc981b65170980eca71"
       },
-      "version": "1.1.12"
+      "version": "1.2.3"
     },
     "com.googlecode.prolog-cafe:prolog-cafeteria": {
       "shasums": {
@@ -800,10 +962,31 @@
     },
     "com.h2database:h2": {
       "shasums": {
-        "jar": "82a80a2ac06901b03cdb233c663d21c4f49c884bf6d0cf85022729e8db9ab86f",
-        "sources": "6c2c426f446a2493213f42f628f5ecdf180685659322e5b4f72a92ba18d5f273"
+        "jar": "90b11dc413da82070ef15fc943282c1408e6ffd34fa68998335fea8603b5ff20",
+        "sources": "ff3d277f962df614283d0a754949eea1e4685ed645f603a590f19c5dbbdb83b3"
       },
-      "version": "2.5.250"
+      "version": "2.5.252"
+    },
+    "com.headius:backport9": {
+      "shasums": {
+        "jar": "89dccb0f38901d9d15280c55d3a435bb7867d93756b17a2bf99f505daf9f9a1f",
+        "sources": "281efa3625d7e481bc9e0525c4ce96fc96da33cce1683daeec399a9cb989f72c"
+      },
+      "version": "1.13"
+    },
+    "com.headius:invokebinder": {
+      "shasums": {
+        "jar": "e57f1f072c30dac4b0fe49b43987eb0b5fb1705b6f045bee10415d457df2c40b",
+        "sources": "c675b34ef57bc8e007eff9c63782cac21f6042830c322e593db15ab35d2d7b40"
+      },
+      "version": "1.16"
+    },
+    "com.headius:options": {
+      "shasums": {
+        "jar": "c4c52c7931c945792d48c6010596195359a35a82d6ac36c645f14705b9a277db",
+        "sources": "bd98465a92520607e7479222e476a5d02b1d8f4579f3bfe50b8f9ee53559be22"
+      },
+      "version": "1.6"
     },
     "com.ibm.icu:icu4j": {
       "shasums": {
@@ -862,10 +1045,10 @@
     },
     "commons-codec:commons-codec": {
       "shasums": {
-        "jar": "ba005f304cef92a3dede24a38ad5ac9b8afccf0d8f75839d6c1338634cf7f6e4",
-        "sources": "6c50e3dd81284139baddf94b3d0f78d25135eea0853f6495267196cdcf5949e3"
+        "jar": "6af66595f9f6a7bb58ce66518d6888d40b547c366d2262f06676eee19528ff66",
+        "sources": "ad76b2fe9ac7e07e75dfc605055e7235b9a831d1a138e42cb5e198e515f461f4"
       },
-      "version": "1.18.0"
+      "version": "1.20.0"
     },
     "commons-dbcp:commons-dbcp": {
       "shasums": {
@@ -883,10 +1066,10 @@
     },
     "commons-net:commons-net": {
       "shasums": {
-        "jar": "d3b3866c61a47ba3bf040ab98e60c3010d027da0e7a99e1755e407dd47bc2702",
-        "sources": "5024a2b980df7bec5f837177775ebf0e5bec25374deaca65f02571fe65ed52f5"
+        "jar": "9e88444afadc9467f0bf3d328f93b9538da35a9be05cdee430766e64fddbd6c5",
+        "sources": "d770d2be3a5cf9c75af743c36ac9f2ef737f53d70950a495976504eb33333319"
       },
-      "version": "3.6"
+      "version": "3.13.0"
     },
     "commons-pool:commons-pool": {
       "shasums": {
@@ -929,6 +1112,34 @@
       },
       "version": "4.16"
     },
+    "io.roastedroot:redline": {
+      "shasums": {
+        "jar": "6f48b5f5db15169619b0d350f79cf46954c8498ef620b76dccea2edb5f44c1f9",
+        "sources": "f3ff81cb68db03083e4fc2c7c99e141574eeb5510216b835474ab905b214c3c2"
+      },
+      "version": "0.0.5"
+    },
+    "io.roastedroot:redline-api": {
+      "shasums": {
+        "jar": "49352a589ed932fa88f8bb2c25ca5521e636cb63bd22afba2bcff1aec8d36ea6",
+        "sources": "d8fbff3a811104420b2263aee0cf0c9a52bc91397456d4d20c0f576647d9ee1c"
+      },
+      "version": "0.0.5"
+    },
+    "io.roastedroot:redline-bridge": {
+      "shasums": {
+        "jar": "2f722732b71f66bac53747d0fbe0f4f333115e933ebffad0e8bd7c5d5beb8768",
+        "sources": "2ca6b58af0ad664e1cb13e2457fefa31cb17f94420ad652683154917afa2f8bb"
+      },
+      "version": "0.0.5"
+    },
+    "io.roastedroot:redline-runner-jffi": {
+      "shasums": {
+        "jar": "13299a7e88a68429500b8a4cb7b7b18d7f0268f7a6328505465a886d8336ee31",
+        "sources": "3970d3c41b757c41057b762544f7d8c720a209c6ec2e19c06a1357cd1e264d25"
+      },
+      "version": "0.0.5"
+    },
     "io.sweers.autotransient:autotransient": {
       "shasums": {
         "jar": "914ce84508410ee1419514925f93b1855a9f7a7b5b5d02fc07f411d2a45f1bba",
@@ -971,6 +1182,13 @@
       },
       "version": "4.0.1"
     },
+    "joda-time:joda-time": {
+      "shasums": {
+        "jar": "1e2da6f9eb65f20a25d9a3186831ed2b3fb14f7a48e1ef8206135ee58cb143d3",
+        "sources": "22e583c91dc1badb59cad602e1f33dbbd79bc09f2fe32f7f65bd978caf860934"
+      },
+      "version": "2.14.0"
+    },
     "junit:junit": {
       "shasums": {
         "jar": "8e495b634469d64fb8acfa3495a065cbacc8a0fff55ce1e31007be4c16dc57d3",
@@ -978,19 +1196,26 @@
       },
       "version": "4.13.2"
     },
+    "me.qmx.jitescript:jitescript": {
+      "shasums": {
+        "jar": "035d4afc5a27202c3e3f38c32506e3657697a4d6d97463eb25affe1cbf45efd5",
+        "sources": "87b8d0f256452a61a78dd4870d088e346400702c2602c089e2aafb6f9a078da5"
+      },
+      "version": "0.4.1"
+    },
     "net.bytebuddy:byte-buddy": {
       "shasums": {
-        "jar": "2ed11da684a8f5b088e0222baa87461cd757e433a8dc4a03671457229d91d5fa",
-        "sources": "b1d35137942a8bff4199b8a2baa00ed3872923bc6878a6ff2731f9324fe1a2fc"
+        "jar": "b7f2b2f111c6ddc09d3d9718ca5895dde16217bb4e5f2d2a6eb571f274909a82",
+        "sources": "00560ac03d67ad6278741a87fc9046c39972daea9ab5ff3378e1b6df3fce7d40"
       },
-      "version": "1.18.12"
+      "version": "1.18.14"
     },
     "net.bytebuddy:byte-buddy-agent": {
       "shasums": {
-        "jar": "287703bea3473edf89e1b373a097e49bad04ed48b85796228f68b1474dc93cf8",
-        "sources": "d4a1b7ab677479288a48889da66ee6e5a76b331ed3fbfb832568b7fc01c6c094"
+        "jar": "6f9159206c4c7950c7ce571b534dcc6457cc27b960146724fbe70c552dd55b97",
+        "sources": "9f52d0860ad2a867af1183f9fc7a4bd41a84a1a8f4b7e69fd4f09aa61968fe95"
       },
-      "version": "1.18.12"
+      "version": "1.18.14"
     },
     "net.java.dev.jna:jna": {
       "shasums": {
@@ -1120,17 +1345,17 @@
     },
     "org.apache.james:apache-mime4j-core": {
       "shasums": {
-        "jar": "aeb313efda27ae902964a3fcdbd235f91ea13c7a5b193dd752f626b073da230f",
-        "sources": "d45fe485b0cb5819a2e8e860c3fc7508beb5cd3b42a9190f2493798cbe2fc8ab"
+        "jar": "7941ef3a99a999f4960734e272434fa47d67df980babf5ce8fe426bfcaa26c94",
+        "sources": "bf447d5b58ad0c75486ec27597663f955d503ea54a405acc55568210f28507cd"
       },
-      "version": "0.8.1"
+      "version": "0.8.10"
     },
     "org.apache.james:apache-mime4j-dom": {
       "shasums": {
-        "jar": "25547c2ebd438669f3b60ad04e5befb123994a685453ada66fb61dcc9d396800",
-        "sources": "df2d902a9229a54648ab8ed4372ee142cc19a6731c928be70afb017a30399b86"
+        "jar": "1dc362d8e6511d53237c0cfd39c8fce5eb947538338421b85541d3beffb40efb",
+        "sources": "d0f9c94e68498421ea0a5972190b35281047fd500b8e56c688c8c3fb04bb90ce"
       },
-      "version": "0.8.1"
+      "version": "0.8.10"
     },
     "org.apache.lucene:lucene-analysis-common": {
       "shasums": {
@@ -1174,33 +1399,47 @@
       },
       "version": "2.2.9"
     },
+    "org.apache.sshd:sshd-contrib": {
+      "shasums": {
+        "jar": "f2ff18d632df7b695c561a083d6abc7775d5772cdd012b55ad8856353d19bdf2",
+        "sources": "87f68fa0a85a64039cf1cd5b05a993829e45916e68c188aa28c11d0919231b2b"
+      },
+      "version": "2.20.0"
+    },
     "org.apache.sshd:sshd-mina": {
       "shasums": {
-        "jar": "da1088d16ba7953444b7d9aefcfc60c9b5e000bf26542d4c3ed0573f692bf14a",
-        "sources": "a8e548e09d8744effe88d83dcd55faa87dc14c37f8a0a595b4c6af3b20e558aa"
+        "jar": "78a8de5cbd1004f5110fac491ba7842706b4e5c43fc91f638a483f95965b23c7",
+        "sources": "a337bcc1579c79f4a9a980e212b7080f3fbf9afca3e2808cf2251aec5178ac81"
       },
-      "version": "2.19.0"
+      "version": "2.20.0"
     },
     "org.apache.sshd:sshd-osgi": {
       "shasums": {
-        "jar": "0b6b9371c6a97430390b84c23c58f4470927a747e74704a0ca7d19a09a66fe37",
-        "sources": "d11b69618dba155f075571cbd9b21741953c27dfa9a1af09b4024f2183226abe"
+        "jar": "87d569c6b9bdfd27008c11c7966abb42022952e77034f47ba5ab6acf17ba3f62",
+        "sources": "af7a72033fe3bbbf8bf9b763b068ac83b5668ed8b7628f168fcf83b6f397f8c0"
       },
-      "version": "2.19.0"
+      "version": "2.20.0"
     },
     "org.apache.sshd:sshd-sftp": {
       "shasums": {
-        "jar": "a3ad30d2feba9fad589c7ad9117fcd9d332823697d59eb424fe2902f4d805575",
-        "sources": "e26b7df972cead5c529bca6ab3e782c27dd43b323f9a54f98d9e23d4f5d03c30"
+        "jar": "70ce2e0e35b1106c4371471fb93313e67e0ceab8f127bc09432e115f67a5089e",
+        "sources": "0b06a4c4425460577f356b0205a2667cd2bb4a1a25210e35772b7a0ff2cd61d0"
       },
-      "version": "2.19.0"
+      "version": "2.20.0"
     },
     "org.asciidoctor:asciidoctorj": {
       "shasums": {
-        "jar": "599fd7281344ee8085caac3b8e99dc1ea1d8443918dc10f5dc0790db6a7cff7d",
-        "sources": "4ab024122aa75097053965908eeb675c2c9a00c63032072e9e5f3164d7d7ee4a"
+        "jar": "dca289ed528a5bf2de2429211d831199e205c423e2f31e54394e11a7cecb579c",
+        "sources": "d4486bb44683715c05f304b0e5fe4a6017fa62885c5e5f9611027c49c796c22b"
       },
-      "version": "1.5.8.1"
+      "version": "3.0.1"
+    },
+    "org.asciidoctor:asciidoctorj-api": {
+      "shasums": {
+        "jar": "6b5d6dc7fc43c5620751dfb880f70822db313067dfa1005f80abd3a29686d8af",
+        "sources": "733112a7c49d202c32fb6187e20a863996bb21d4a46ea4ef20871aed3aa5ed61"
+      },
+      "version": "3.0.1"
     },
     "org.assertj:assertj-core": {
       "shasums": {
@@ -1211,31 +1450,31 @@
     },
     "org.bouncycastle:bcpg-jdk18on": {
       "shasums": {
-        "jar": "39426367dc247dfaae9b1253457a39298b6b9a6c28a39b908bca829e315323dd",
-        "sources": "605b09bd826d7e4e3e0cb4faf2e9b53a6bcb452be963c91499b79fd8497685be"
+        "jar": "8a52ea45b2063f6d41b8ca94409f255a1f4604922f7451c18a7cfd3a3c5b85ab",
+        "sources": "02c36d0c102abbae4ce5c81449cf66338f6befcec2844fc07d685c412e20f1d6"
       },
-      "version": "1.85"
+      "version": "1.86"
     },
     "org.bouncycastle:bcpkix-jdk18on": {
       "shasums": {
-        "jar": "c9f82b2d4e99c4bbdfccf684e52cc06ea06a0b567bfd0d08f9c5a3f417055996",
-        "sources": "e5331f467331aba29bda6ddfb0df0da6d568928e29c2b0f20ea2fe123d802d20"
+        "jar": "8d8b41a4b149bdae8d331f059a578870954d1e3ff29f8269a9eb3ee19a7e4ef7",
+        "sources": "0bb00b50a80404e40c6465cb8012d3835d2a9100d94d16eaa9efed4587d7e34d"
       },
-      "version": "1.85"
+      "version": "1.86"
     },
     "org.bouncycastle:bcprov-jdk18on": {
       "shasums": {
-        "jar": "986b0fb92ec10e0c66b43e036ce0077e6150cfaecd1db9fb92b56672e157afe5",
-        "sources": "b37ac84b1d5435ab7b8d166c16ab9f75e09f68f8ec50479bae433939b241b03f"
+        "jar": "2af190b300cbb0b35e248ccf5f4a06b6072030aeb3da7a98ec73abe5b4cb371f",
+        "sources": "34a8b7dcb030a08ddd5356d3d5be962f9299ca5275e1460273186f8fdbe44c34"
       },
-      "version": "1.85.2"
+      "version": "1.86"
     },
     "org.bouncycastle:bcutil-jdk18on": {
       "shasums": {
-        "jar": "590f55ed5d68529239898a4a5c4f730b6e37f45d1cfa3fbe51f8485abe32c42d",
-        "sources": "b470a692878f92abf00b9c3af9147a45453250a80930df8f23f1d092c55e2d5e"
+        "jar": "1c268e15f785aafb1e4670d8d6e5f856f69475e96c162dadcd1ff9b350e9139f",
+        "sources": "a79e8cdbc04a24aecf64503eda9a4aa61019132484c64f7ce32a68ac30ef6df7"
       },
-      "version": "1.85"
+      "version": "1.86"
     },
     "org.checkerframework:checker-compat-qual": {
       "shasums": {
@@ -1286,33 +1525,40 @@
       },
       "version": "0.24.0"
     },
+    "org.crac:crac": {
+      "shasums": {
+        "jar": "f4426e1641c8f0fa2f025a4cd7c40c285abaf265930e6717adfcaef03d034850",
+        "sources": "56f6a3d9b292cecdb2bd7d13debd7d440d6d41358e215142d75aa499fbe96747"
+      },
+      "version": "1.5.0"
+    },
     "org.eclipse.jetty.ee11:jetty-ee11-servlet": {
       "shasums": {
-        "jar": "af76ee845345f184d96d8f6c926e64f8bda4cf858013598d392ad604d37e6bac",
-        "sources": "0daaa96e80d48f516c580b7f18bcdf2ebdea75654a7fddb1a1a933af36ae2d16"
+        "jar": "a4875bcf0d1a2273f91c1fff7c5acec90b36093c79cf7b4056d838e6b51b3592",
+        "sources": "25ece70cdd255807bc5d10bf836999f5213b09b7d2ecfb64454648b0a03bc852"
       },
-      "version": "12.1.12"
+      "version": "12.1.14"
     },
     "org.eclipse.jetty.ee8:jetty-ee8-nested": {
       "shasums": {
-        "jar": "1c44681c868acc128c046e83a7e649197a6aa1d9a78f2d7588a2202d8bc94302",
-        "sources": "c04b2473642ff95ccd12a743112a115c76ce93ba94b4d58e70624c1b094ad6ec"
+        "jar": "8b8f01f07ea260336a1b1be4f1fc395f1583e3c9375cce0bfd89ac05502a0661",
+        "sources": "be7afb2425c5f68799f0f61a55ba1e47cba2303b77c8ec5d7e3b83f306dbe30a"
       },
-      "version": "12.1.12"
+      "version": "12.1.13"
     },
     "org.eclipse.jetty.ee8:jetty-ee8-security": {
       "shasums": {
-        "jar": "2d2cc4f51a89cd43d2d5cab7603d6ceff3d78947e5cb2f62fb2d7eac5a1d39e9",
-        "sources": "a8b42ba8dfb60ed6805b7c4ef51631726a593b617cf4472724c00b16fa003c49"
+        "jar": "9edec53a81ca35aa5e5e56ff1f6b6c11a0869aff6877ca1948b876f5901ac061",
+        "sources": "33156aeab4a1c000e7db53efbf458e7042a3dcbe34793733e77c6111ecfc2095"
       },
-      "version": "12.1.12"
+      "version": "12.1.13"
     },
     "org.eclipse.jetty.ee8:jetty-ee8-servlet": {
       "shasums": {
-        "jar": "feeba82222e0dc9c517124254ecd79d1244cfb13ced1ed8aca59e0656e331e4e",
-        "sources": "3eba19d3ffe606959bd948600bb9e0cc107008b35d632747dd88906de2c4a15b"
+        "jar": "084695e621ad2204744e13f66a7dfc3187a38ada535a3ddf1f609dbf3cb214a0",
+        "sources": "243fcf11815cdc64ac948a92bc73b888e90cd6c57e6a8893fd7468a85a7c0012"
       },
-      "version": "12.1.12"
+      "version": "12.1.13"
     },
     "org.eclipse.jetty.toolchain:jetty-servlet-api": {
       "shasums": {
@@ -1323,59 +1569,59 @@
     },
     "org.eclipse.jetty:jetty-http": {
       "shasums": {
-        "jar": "5476e16ef7e28883dba3669ee06491021e4a9aeba9a76f901a3f5c2bb5252a3e",
-        "sources": "ed89dee39bef7a469218ea81ad69675e247ee35debcbb8d5e685cbf127301585"
+        "jar": "3bb84bfdd0992453986a8f7422dbf55cf779a0a780ff8a68041bb6119fb997fd",
+        "sources": "807b19cad128148101f54ae88d1b90041b9aafa0c6ee807829cc7e34f6aa9e4c"
       },
-      "version": "12.1.12"
+      "version": "12.1.13"
     },
     "org.eclipse.jetty:jetty-io": {
       "shasums": {
-        "jar": "a809a6a534adccfaa08bca94aa54328e3ac858973ccddbda770f7e9e0f5099fc",
-        "sources": "db0aa06342140ef5f91e1923120376a1abc8ef04911a4350da105f90428f8695"
+        "jar": "946338a5db4e906ba0698dcdae350394736062cf915b5f16ebf787bcee7fffae",
+        "sources": "f0b9394088799d1fcdee0a04b05a7c196e08708cf35d7fd4d90a0f8e9d1bd57d"
       },
-      "version": "12.1.12"
+      "version": "12.1.13"
     },
     "org.eclipse.jetty:jetty-jmx": {
       "shasums": {
-        "jar": "21c9e70b26ec32c3f4c06af36538c17f86d835561de41575741058ded8c73a43",
-        "sources": "439f0045abe56c4a6b4e09e3120d0c0077c253b7f6c0fa5dc6bafb3003ed8d1c"
+        "jar": "67d3b531f95ad1bbda3593daea199ad27bedf7060c42b76c5c19094ead8b0492",
+        "sources": "f0a3738b89ca8787f9d6f3f5faaef190823cc9933bab404a167d22182b55988a"
       },
-      "version": "12.1.12"
+      "version": "12.1.13"
     },
     "org.eclipse.jetty:jetty-security": {
       "shasums": {
-        "jar": "fcc0206c1ac66b632ef29a59ccf76c3f3737a62ef54694b1d111eeb2e6efe804",
-        "sources": "e6b477ec23e940f00fc592a68f64118418b039c9f3e0a0f7d6409a4a56c98777"
+        "jar": "64b15214158097af40db345a31bb71cfe0d4a6c7c19cb59cd4c0a97245999ee8",
+        "sources": "e2ef68a998189c9ae8834ed5d7e6afbb2dc7354973db34f5e75c550ce8e017f8"
       },
-      "version": "12.1.12"
+      "version": "12.1.13"
     },
     "org.eclipse.jetty:jetty-server": {
       "shasums": {
-        "jar": "9ba04bb8d011444a10873a51b1cb8297c04f70db55c8a8d9efcc3a9b97896787",
-        "sources": "4c9f9b9162336d26315bd37d8dfd241c6dbfce2af9676255f11f6036dfd57b56"
+        "jar": "978265f1ac637c504b537f5d56e07d4a47e7c4bb0752d9dd66b79f5be754abfa",
+        "sources": "e741f6346001ccfdc29e379d93c03b5f6a7c7339459631b90295b9bd5611f5a3"
       },
-      "version": "12.1.12"
+      "version": "12.1.13"
     },
     "org.eclipse.jetty:jetty-session": {
       "shasums": {
-        "jar": "73aea4cdd91f2027da1a09cd5953b661625017971d53d8e1ff342f8547752b06",
-        "sources": "12b6ae5b07e9614c81e0cfbb464475ab1e8a638bb35a4c770e5358e60fc64267"
+        "jar": "30ebd5d63895f97aad0d626a567b40552d4c2bd9978adedc46e7a23b4652f595",
+        "sources": "016c850dd2abd265e55e0133bd80abb60441b736ee00693acc8b3c7b7f5ca7b7"
       },
-      "version": "12.1.12"
+      "version": "12.1.13"
     },
     "org.eclipse.jetty:jetty-util": {
       "shasums": {
-        "jar": "f6fbfa61cfcca032ff82ad8ff3b66a14374047f15486521dbc89a6c0df19ccf2",
-        "sources": "04b565fe8b23d70735515d135932bd3c6b283ff29e5944a9165df3043eeba99d"
+        "jar": "3e408e60fe71a337979004fc4e47bfd3c08a931cf33b46b6a5dc4dbdd088c2fd",
+        "sources": "22effda30ab02e609e054fc79d829c238ec3be07396a2cc206f116d4dc5c27ed"
       },
-      "version": "12.1.12"
+      "version": "12.1.13"
     },
     "org.eclipse.jetty:jetty-util-ajax": {
       "shasums": {
-        "jar": "ca4d49183b8f92af96c04dab7a40e70cc2ebac554e6de010e1b9a983ae342cb2",
-        "sources": "41bcaeb259a63a898885dd05bfa6b8231051079e38140bbb4f18181a9037b319"
+        "jar": "fc0c7c1f6986461305a8a8c80733a4a4859c90f857fcaaf58f3ed3bae84e8a86",
+        "sources": "81a913fd5d5e8656b98984a7422e5ab02e62de525e187646b09f97bb7206f671"
       },
-      "version": "12.1.12"
+      "version": "12.1.13"
     },
     "org.hamcrest:hamcrest": {
       "shasums": {
@@ -1391,33 +1637,81 @@
       },
       "version": "1.3"
     },
-    "org.jruby:jruby-complete": {
+    "org.jruby.jcodings:jcodings": {
       "shasums": {
-        "jar": "bdf1a7ca08161d42262b3dad5888ba6fecaf9a2da7ff9170489224f3525cb457",
-        "sources": "72de5a81b60da3db86753ac6c62a5297a6f47665df93c6480633222d6fc13ff5"
+        "jar": "0b4d0b0c1e2f1bdf17f4c30ecf5261bf62763af6f18b0fd1e743226c994ccf96",
+        "sources": "67aeddc35800a1ae92f1d9bc3300af0ab7daa8c52bd2302d5d673836a0edafaf"
       },
-      "version": "9.1.17.0"
+      "version": "1.0.64"
+    },
+    "org.jruby.joni:joni": {
+      "shasums": {
+        "jar": "6054ab5bbf2dcc633fe62a359f1b39518e591fa76c90f9d50c7abb987d1f6774",
+        "sources": "b6e681a3ba0a71f5484f1a20e9acb08a32510ac3b12f851a30cb2be4d235269f"
+      },
+      "version": "2.2.7"
+    },
+    "org.jruby:dirgra": {
+      "shasums": {
+        "jar": "2956f1c36d8d2bcbdbc3d070a4e6f59b323e280e2c829bbb3e3203dc7ea005fa",
+        "sources": "e12c0dc5719257e5cf6ec85ce4c1bd512a9db699b95b1b8e595cef6d5a75671f"
+      },
+      "version": "0.5"
+    },
+    "org.jruby:jruby": {
+      "shasums": {
+        "jar": "aa409cb9af32c8b3de2ffc9538abe784aff6c179857af3d0d6346fc4b0e645b0",
+        "sources": "49d5d9ca0c888c78b5674323c41dade523c381c21040380086ffb75f1bb285d4"
+      },
+      "version": "10.1.2.0"
+    },
+    "org.jruby:jruby-base": {
+      "shasums": {
+        "jar": "8ffad0b8422e6964ac0b28a966dadba82845c8b107124969f515f345b4db8404",
+        "sources": "e21ca23a48e81673629b010bc39529ee5f742f98b3ac3aaebcafe9142ec25824"
+      },
+      "version": "10.1.2.0"
+    },
+    "org.jruby:jruby-prism": {
+      "shasums": {
+        "jar": "b95b33a3b6e3e6c6c843a2fc35a11185782a84001480073dbaf563f8b6415e52",
+        "sources": "f1a8c7f96a5381f7840157dcc0c3073411ebb7e36227876ab3feb03b21f99533"
+      },
+      "version": "2.0.4"
+    },
+    "org.jruby:jruby-stdlib": {
+      "shasums": {
+        "jar": "93c5bfec7f3c24d40ccdc432d64dea7063a6604f61832a77600e83d3cd40fbba"
+      },
+      "version": "10.1.2.0"
+    },
+    "org.jruby:jzlib": {
+      "shasums": {
+        "jar": "97e2d8359168c484113c38837fdd74453577e6ed8575bb35eb65bc117a90b97f",
+        "sources": "9c645c94537b8d819e92637f2ee6455ae92960950923ab8f7c21682f2dc4bb05"
+      },
+      "version": "1.1.5"
     },
     "org.jsoup:jsoup": {
       "shasums": {
-        "jar": "92af19ec57cc77637db4490f0f5011f0444d353209ce36083bac428f9b81a39c",
-        "sources": "8a8120654188ccb1a10ca7b84d2be13340cb7500743b257896193c192a2ed8e3"
+        "jar": "e9d8c856856680427f096d156f02a414289985c930998fcb519ce5be39b42003",
+        "sources": "f0ed21735857df93c3e461d1aecf89d28c3eda552f2e043d68959d341376aa17"
       },
-      "version": "1.14.3"
+      "version": "1.23.2"
     },
     "org.jspecify:jspecify": {
       "shasums": {
-        "jar": "1fad6e6be7557781e4d33729d49ae1cdc8fdda6fe477bb0cc68ce351eafdfbab",
-        "sources": "adf0898191d55937fb3192ba971826f4f294292c4a960740f3c27310e7b70296"
+        "jar": "070d75f261fe4c5b8202508366715f7f2d4660f88c8ef7e6d3575e48c9683b66",
+        "sources": "230c491aac6d2a2b7e66b68d4331b1d2626f1bf3a372c33bbe2b077297e46c45"
       },
-      "version": "1.0.0"
+      "version": "1.0.1"
     },
     "org.mockito:mockito-core": {
       "shasums": {
-        "jar": "ae295bebd5d11fab97ab297815dc7617188b86003cbce3dfd5c0d5c3a6cc4a0c",
-        "sources": "38f869a12a1168ca8dc2a4acd090d8129a7f81afc8f1fc61582701894755fefd"
+        "jar": "97a1f835ad84075255aa37809e4379eff541273c02c6201cbad49bd5950932cd",
+        "sources": "6941ad79b3a92ba2dbd8a00570b0e2dcaf15529de4452c789454f11660f03bf7"
       },
-      "version": "5.23.0"
+      "version": "5.24.0"
     },
     "org.nibor.autolink:autolink": {
       "shasums": {
@@ -1456,38 +1750,38 @@
     },
     "org.ow2.asm:asm": {
       "shasums": {
-        "jar": "6f3828a215c920059a5efa2fb55c233d6c54ec5cadca99ce1b1bdd10077c7ddd",
-        "sources": "057e39aa1800b25bc8944846a376509990f49b7fe1e07192b1d6e48e1a780eb2"
+        "jar": "ed825d10ab1399c8c0cb669e688cf0c8c82629b4c8399b58352b68e92ca10fcb",
+        "sources": "cb29bf42b4008972c566944d377192aa1b2d90275b9cfa9a7fa86de669fde11c"
       },
-      "version": "9.9.1"
+      "version": "9.10.1"
     },
     "org.ow2.asm:asm-analysis": {
       "shasums": {
-        "jar": "6260bffc8ec008dd1b713702c7994e2c94d188a3da5bef9e87278a16df6a7522",
-        "sources": "ff731d401ea2407759ea19b4b025800d32495a51a912f2553d987cddda424773"
+        "jar": "dede75a21306b65974ecd8f87114ff6970f09fb794157a4ca09ab25c888c2bfc",
+        "sources": "a85db3987f46505bba104ab1d267692aaa1937792007dcdffad34f54c76193ef"
       },
-      "version": "9.9.1"
+      "version": "9.10.1"
     },
     "org.ow2.asm:asm-commons": {
       "shasums": {
-        "jar": "c2319e014ce7199f2b7f7d56d6bb991863168c3f4b6cd6c9f542a4937ef7ef88",
-        "sources": "196e1b24b51f35fe9b09c930e159830dcded8b113ab2b7394d8ac353752d8a00"
+        "jar": "6d0abefb7cbf972ea16edb37ec14835372505063a45f976ab7ea889ed9497895",
+        "sources": "a26e55103e094a0f6df75a7b5e578bd7b4ad73abd2641b0fa2ac97db70641906"
       },
-      "version": "9.9.1"
+      "version": "9.10.1"
     },
     "org.ow2.asm:asm-tree": {
       "shasums": {
-        "jar": "0f3555096b720b820bbacab0b515589bee0200bee099bda14c561738ae837ba1",
-        "sources": "9d1fe261fa1d29904ca9dbc76878396e76bc225191676a8c16ad2669a205321a"
+        "jar": "3dfb0d5b6a106cd40b5b250e39935fbf2f927f4477546a5369a3ac609cf0506b",
+        "sources": "93a9406bb68abff43f491891625e0d3c7edce87b70d2370ec1ea4627c9ead090"
       },
-      "version": "9.9.1"
+      "version": "9.10.1"
     },
     "org.ow2.asm:asm-util": {
       "shasums": {
-        "jar": "c5ebbbeaf68126af094b42fa4800f59bc4413abd02d95b9aefad722cd257e207",
-        "sources": "dd19b2285e6dad31a3b1c8bc2e55d8248d83eef0f7ba28372db288444705ae86"
+        "jar": "1bb99d091fba2597dc6d51193e9bbcf0d8447e7ed96bd8f0198b18152f09655c",
+        "sources": "a7cbc3782c5384837149f84869dcc24625ed9a0bcaec9e929e69c44abf8f7125"
       },
-      "version": "9.9.1"
+      "version": "9.10.1"
     },
     "org.roaringbitmap:RoaringBitmap": {
       "shasums": {
@@ -1503,40 +1797,54 @@
       },
       "version": "0.9.44"
     },
+    "org.ruby-lang:prism-parser-api": {
+      "shasums": {
+        "jar": "32fe119a8165b389b5a1c535dc870f034ef198cab74fc6cb006d91ae29fb21ec",
+        "sources": "c216c06429b7456e9e44859d4798298005a46b141f3401b2c3c7049493ecd80e"
+      },
+      "version": "0.0.4"
+    },
+    "org.ruby-lang:prism-parser-wasm": {
+      "shasums": {
+        "jar": "a9c5fe745b38e69009dc3f126756ff8ad8ba12658b942b49317c79702b5e251b",
+        "sources": "fceecbcc5c3665615de4677a6f1020f05fd87ed5ef6c99147fb0fdec2769f9a2"
+      },
+      "version": "0.0.4"
+    },
     "org.slf4j:jcl-over-slf4j": {
       "shasums": {
-        "jar": "ec5c36d57d2dbe100f84878f944575cb7871da32c7a115b8d7e0721277045d67",
-        "sources": "d0a96716020e44f95f1d94c4d2deeda009056847a125453010d4258db6b53776"
+        "jar": "32f95628a4baa60ea8a5b052c8cb6e51d07b0fee3e6092414070874f69daf710",
+        "sources": "16a77e50e2ec588004671e07336c66fb606612e520dd3531be944e345258c212"
       },
-      "version": "2.0.18"
+      "version": "2.0.20"
     },
     "org.slf4j:slf4j-api": {
       "shasums": {
-        "jar": "44508fd1576500688c790b190acdd16fec4f8c79a3e0b900afd70503cf055f55",
-        "sources": "192e007cf7f2be41d40574e44521fc0b7ce55e01f13dbe0fa8707c8ae3329075"
+        "jar": "7e1446499b359675d8aabe6af2de86b85e72ae8a2a932c0b40d0e5ba57097439",
+        "sources": "565e509928d095e20c5d93ca5e3a528e98fc7410c3ca4e84b05ccfadf21b40ba"
       },
-      "version": "2.0.18"
+      "version": "2.0.20"
     },
     "org.slf4j:slf4j-ext": {
       "shasums": {
-        "jar": "75b7945f29a915c0bb984b195d9e60eaca51a57f0b4a2617a8e1f8bc4a4b1b98",
-        "sources": "e60d1f5e66607a182d10597f2d67b7d6db5f10ffbfd4459ee2a7b4eedba5db4c"
+        "jar": "aea68c153bebc2aedd63f07c2391e8a1fd87a4e2a6d086fe787f1d5abc31824d",
+        "sources": "413f1f693016ff7239eb4fb5bf4fad90709c6ded719f305b5b9f91bc3a558e38"
       },
-      "version": "2.0.18"
+      "version": "2.0.20"
     },
     "org.slf4j:slf4j-reload4j": {
       "shasums": {
-        "jar": "37dc7cb891448c3c0db454d9e84c54b3f4e6a5f84b0db35917e7d0f322ae60df",
-        "sources": "b9ce8823a81f3fdc44e017c25ac78ca856cc1cddef1bf85b05f0cbea84b7d57f"
+        "jar": "194277130731fe0ef2a7237759f31a71dc62c116aa4fce26effeb371576ee85b",
+        "sources": "77079cbb0c1dffd8be7e72263c490885054efa7b2958417ef9c1ad7c55014a78"
       },
-      "version": "2.0.18"
+      "version": "2.0.20"
     },
     "org.slf4j:slf4j-simple": {
       "shasums": {
-        "jar": "8268bd018a5709b07209e0d8ca6221a37584ba1bc12ba985b8335a82c648bdd0",
-        "sources": "977f636bc90dc879c56cd6b6158abf0ee77a6f4619ab23342781a273b743786b"
+        "jar": "8e701404786a4f87219d39d4853c86dfe4e86ae99376a39749df6c08e75022e0",
+        "sources": "9ef476562573cf5df5bababc1e7da701d87a525991828b3dace15e5f2deff54c"
       },
-      "version": "2.0.18"
+      "version": "2.0.20"
     },
     "org.tukaani:xz": {
       "shasums": {
@@ -1554,6 +1862,14 @@
     }
   },
   "dependencies": {
+    "com.dylibso.chicory:runtime": [
+      "com.dylibso.chicory:wasm"
+    ],
+    "com.dylibso.chicory:wasi": [
+      "com.dylibso.chicory:log",
+      "com.dylibso.chicory:runtime",
+      "com.dylibso.chicory:wasm"
+    ],
     "com.github.ben-manes.caffeine:caffeine": [
       "com.google.errorprone:error_prone_annotations",
       "org.checkerframework:checker-qual"
@@ -1562,6 +1878,28 @@
       "com.github.ben-manes.caffeine:caffeine",
       "com.google.guava:guava"
     ],
+    "com.github.jnr:jnr-enxio": [
+      "com.github.jnr:jnr-constants"
+    ],
+    "com.github.jnr:jnr-ffi": [
+      "com.github.jnr:jffi",
+      "com.github.jnr:jffi:jar:native",
+      "com.github.jnr:jnr-a64asm",
+      "com.github.jnr:jnr-x86asm",
+      "org.ow2.asm:asm",
+      "org.ow2.asm:asm-analysis",
+      "org.ow2.asm:asm-commons",
+      "org.ow2.asm:asm-tree",
+      "org.ow2.asm:asm-util"
+    ],
+    "com.github.jnr:jnr-posix": [
+      "com.github.jnr:jnr-constants"
+    ],
+    "com.github.jnr:jnr-unixsocket": [
+      "com.github.jnr:jnr-constants",
+      "com.github.jnr:jnr-enxio",
+      "com.github.jnr:jnr-posix"
+    ],
     "com.github.rholder:guava-retrying": [
       "com.google.code.findbugs:jsr305",
       "com.google.guava:guava"
@@ -1639,7 +1977,6 @@
       "com.google.guava:guava",
       "com.google.protobuf:protobuf-java",
       "com.ibm.icu:icu4j",
-      "javax.inject:javax.inject",
       "org.ow2.asm:asm",
       "org.ow2.asm:asm-analysis",
       "org.ow2.asm:asm-commons",
@@ -1700,12 +2037,36 @@
     "commons-dbcp:commons-dbcp": [
       "commons-pool:commons-pool"
     ],
+    "commons-net:commons-net": [
+      "commons-io:commons-io"
+    ],
     "eu.medsea.mimeutil:mime-util": [
       "org.slf4j:slf4j-api"
     ],
     "io.dropwizard.metrics:metrics-core": [
       "org.slf4j:slf4j-api"
     ],
+    "io.roastedroot:redline": [
+      "com.dylibso.chicory:runtime",
+      "io.roastedroot:redline-api",
+      "io.roastedroot:redline-runner-jffi"
+    ],
+    "io.roastedroot:redline-api": [
+      "com.dylibso.chicory:runtime",
+      "com.dylibso.chicory:wasm"
+    ],
+    "io.roastedroot:redline-bridge": [
+      "com.dylibso.chicory:log",
+      "com.dylibso.chicory:runtime",
+      "com.dylibso.chicory:wasi",
+      "com.dylibso.chicory:wasm"
+    ],
+    "io.roastedroot:redline-runner-jffi": [
+      "com.dylibso.chicory:runtime",
+      "com.dylibso.chicory:wasm",
+      "io.roastedroot:redline-api",
+      "io.roastedroot:redline-bridge"
+    ],
     "junit:junit": [
       "org.hamcrest:hamcrest-core"
     ],
@@ -1743,7 +2104,11 @@
       "commons-codec:commons-codec",
       "org.apache.httpcomponents:httpcore"
     ],
+    "org.apache.james:apache-mime4j-core": [
+      "commons-io:commons-io"
+    ],
     "org.apache.james:apache-mime4j-dom": [
+      "commons-io:commons-io",
       "org.apache.james:apache-mime4j-core"
     ],
     "org.apache.lucene:lucene-analysis-common": [
@@ -1761,6 +2126,11 @@
     "org.apache.mina:mina-core": [
       "org.slf4j:slf4j-api"
     ],
+    "org.apache.sshd:sshd-contrib": [
+      "org.apache.sshd:sshd-sftp",
+      "org.slf4j:jcl-over-slf4j",
+      "org.slf4j:slf4j-api"
+    ],
     "org.apache.sshd:sshd-mina": [
       "org.apache.mina:mina-core",
       "org.slf4j:jcl-over-slf4j",
@@ -1775,8 +2145,8 @@
       "org.slf4j:slf4j-api"
     ],
     "org.asciidoctor:asciidoctorj": [
-      "com.beust:jcommander",
-      "org.jruby:jruby-complete"
+      "org.asciidoctor:asciidoctorj-api",
+      "org.jruby:jruby"
     ],
     "org.assertj:assertj-core": [
       "net.bytebuddy:byte-buddy"
@@ -1861,6 +2231,42 @@
       "org.eclipse.jetty:jetty-util",
       "org.slf4j:slf4j-api"
     ],
+    "org.jruby.joni:joni": [
+      "org.jruby.jcodings:jcodings"
+    ],
+    "org.jruby:jruby": [
+      "org.jruby:jruby-base",
+      "org.jruby:jruby-stdlib"
+    ],
+    "org.jruby:jruby-base": [
+      "ch.randelshofer:fastdoubleparser",
+      "com.github.jnr:jffi",
+      "com.github.jnr:jffi:jar:native",
+      "com.github.jnr:jnr-constants",
+      "com.github.jnr:jnr-enxio",
+      "com.github.jnr:jnr-ffi",
+      "com.github.jnr:jnr-netdb",
+      "com.github.jnr:jnr-posix",
+      "com.github.jnr:jnr-unixsocket",
+      "com.headius:backport9",
+      "com.headius:invokebinder",
+      "com.headius:options",
+      "joda-time:joda-time",
+      "me.qmx.jitescript:jitescript",
+      "org.crac:crac",
+      "org.jruby.jcodings:jcodings",
+      "org.jruby.joni:joni",
+      "org.jruby:dirgra",
+      "org.jruby:jruby-prism",
+      "org.jruby:jzlib",
+      "org.ow2.asm:asm",
+      "org.ow2.asm:asm-commons",
+      "org.ow2.asm:asm-util"
+    ],
+    "org.jruby:jruby-prism": [
+      "org.ruby-lang:prism-parser-api",
+      "org.ruby-lang:prism-parser-wasm"
+    ],
     "org.mockito:mockito-core": [
       "net.bytebuddy:byte-buddy",
       "net.bytebuddy:byte-buddy-agent",
@@ -1896,6 +2302,14 @@
     "org.roaringbitmap:RoaringBitmap": [
       "org.roaringbitmap:shims"
     ],
+    "org.ruby-lang:prism-parser-wasm": [
+      "com.dylibso.chicory:log",
+      "com.dylibso.chicory:runtime",
+      "com.dylibso.chicory:wasi",
+      "com.dylibso.chicory:wasm",
+      "io.roastedroot:redline",
+      "org.ruby-lang:prism-parser-api"
+    ],
     "org.slf4j:jcl-over-slf4j": [
       "org.slf4j:slf4j-api"
     ],
@@ -1949,12 +2363,26 @@
       "org.apache.log4j.varia",
       "org.apache.log4j.xml"
     ],
-    "com.beust:jcommander": [
-      "com.beust.jcommander",
-      "com.beust.jcommander.converters",
-      "com.beust.jcommander.defaultprovider",
-      "com.beust.jcommander.internal",
-      "com.beust.jcommander.validators"
+    "ch.randelshofer:fastdoubleparser": [
+      "ch.randelshofer.fastdoubleparser",
+      "ch.randelshofer.fastdoubleparser.bte",
+      "ch.randelshofer.fastdoubleparser.chr"
+    ],
+    "com.dylibso.chicory:log": [
+      "com.dylibso.chicory.log"
+    ],
+    "com.dylibso.chicory:runtime": [
+      "com.dylibso.chicory.runtime",
+      "com.dylibso.chicory.runtime.alloc",
+      "com.dylibso.chicory.runtime.internal"
+    ],
+    "com.dylibso.chicory:wasi": [
+      "com.dylibso.chicory.wasi"
+    ],
+    "com.dylibso.chicory:wasm": [
+      "com.dylibso.chicory.wasm",
+      "com.dylibso.chicory.wasm.io",
+      "com.dylibso.chicory.wasm.types"
     ],
     "com.github.ben-manes.caffeine:caffeine": [
       "com.github.benmanes.caffeine",
@@ -1965,6 +2393,105 @@
     "com.github.ben-manes.caffeine:guava": [
       "com.github.benmanes.caffeine.guava"
     ],
+    "com.github.jnr:jffi": [
+      "com.kenai.jffi",
+      "com.kenai.jffi.internal"
+    ],
+    "com.github.jnr:jnr-a64asm": [
+      "jnr.a64asm"
+    ],
+    "com.github.jnr:jnr-constants": [
+      "jnr.constants",
+      "jnr.constants.platform",
+      "jnr.constants.platform.aix",
+      "jnr.constants.platform.darwin",
+      "jnr.constants.platform.dragonflybsd",
+      "jnr.constants.platform.fake",
+      "jnr.constants.platform.freebsd",
+      "jnr.constants.platform.freebsd.aarch64",
+      "jnr.constants.platform.linux",
+      "jnr.constants.platform.linux.aarch64",
+      "jnr.constants.platform.linux.loongarch64",
+      "jnr.constants.platform.linux.mips64el",
+      "jnr.constants.platform.linux.powerpc64",
+      "jnr.constants.platform.linux.s390x",
+      "jnr.constants.platform.openbsd",
+      "jnr.constants.platform.solaris",
+      "jnr.constants.platform.windows"
+    ],
+    "com.github.jnr:jnr-enxio": [
+      "jnr.enxio.channels"
+    ],
+    "com.github.jnr:jnr-ffi": [
+      "jnr.ffi",
+      "jnr.ffi.annotations",
+      "jnr.ffi.byref",
+      "jnr.ffi.mapper",
+      "jnr.ffi.provider",
+      "jnr.ffi.provider.converters",
+      "jnr.ffi.provider.jffi",
+      "jnr.ffi.provider.jffi.platform.aarch64.darwin",
+      "jnr.ffi.provider.jffi.platform.aarch64.freebsd",
+      "jnr.ffi.provider.jffi.platform.aarch64.linux",
+      "jnr.ffi.provider.jffi.platform.aarch64.openbsd",
+      "jnr.ffi.provider.jffi.platform.aarch64.windows",
+      "jnr.ffi.provider.jffi.platform.arm.linux",
+      "jnr.ffi.provider.jffi.platform.i386.darwin",
+      "jnr.ffi.provider.jffi.platform.i386.freebsd",
+      "jnr.ffi.provider.jffi.platform.i386.linux",
+      "jnr.ffi.provider.jffi.platform.i386.midnightbsd",
+      "jnr.ffi.provider.jffi.platform.i386.openbsd",
+      "jnr.ffi.provider.jffi.platform.i386.solaris",
+      "jnr.ffi.provider.jffi.platform.i386.windows",
+      "jnr.ffi.provider.jffi.platform.loongarch64.linux",
+      "jnr.ffi.provider.jffi.platform.mips.linux",
+      "jnr.ffi.provider.jffi.platform.mips64.linux",
+      "jnr.ffi.provider.jffi.platform.mips64el.linux",
+      "jnr.ffi.provider.jffi.platform.mipsel.linux",
+      "jnr.ffi.provider.jffi.platform.ppc.aix",
+      "jnr.ffi.provider.jffi.platform.ppc.darwin",
+      "jnr.ffi.provider.jffi.platform.ppc.linux",
+      "jnr.ffi.provider.jffi.platform.ppc64.aix",
+      "jnr.ffi.provider.jffi.platform.ppc64.freebsd",
+      "jnr.ffi.provider.jffi.platform.ppc64.ibmi",
+      "jnr.ffi.provider.jffi.platform.ppc64.linux",
+      "jnr.ffi.provider.jffi.platform.ppc64.openbsd",
+      "jnr.ffi.provider.jffi.platform.ppc64le.linux",
+      "jnr.ffi.provider.jffi.platform.riscv64.linux",
+      "jnr.ffi.provider.jffi.platform.s390.linux",
+      "jnr.ffi.provider.jffi.platform.s390x.linux",
+      "jnr.ffi.provider.jffi.platform.sparc.solaris",
+      "jnr.ffi.provider.jffi.platform.sparcv9.linux",
+      "jnr.ffi.provider.jffi.platform.sparcv9.solaris",
+      "jnr.ffi.provider.jffi.platform.x86_64.darwin",
+      "jnr.ffi.provider.jffi.platform.x86_64.dragonfly",
+      "jnr.ffi.provider.jffi.platform.x86_64.freebsd",
+      "jnr.ffi.provider.jffi.platform.x86_64.linux",
+      "jnr.ffi.provider.jffi.platform.x86_64.midnightbsd",
+      "jnr.ffi.provider.jffi.platform.x86_64.openbsd",
+      "jnr.ffi.provider.jffi.platform.x86_64.solaris",
+      "jnr.ffi.provider.jffi.platform.x86_64.windows",
+      "jnr.ffi.types",
+      "jnr.ffi.util",
+      "jnr.ffi.util.ref",
+      "jnr.ffi.util.ref.internal"
+    ],
+    "com.github.jnr:jnr-netdb": [
+      "jnr.netdb"
+    ],
+    "com.github.jnr:jnr-posix": [
+      "jnr.posix",
+      "jnr.posix.util",
+      "jnr.posix.windows"
+    ],
+    "com.github.jnr:jnr-unixsocket": [
+      "jnr.unixsocket",
+      "jnr.unixsocket.impl"
+    ],
+    "com.github.jnr:jnr-x86asm": [
+      "com.kenai.jnr.x86asm",
+      "jnr.x86asm"
+    ],
     "com.github.rholder:guava-retrying": [
       "com.github.rholder.retry"
     ],
@@ -2287,6 +2814,22 @@
       "org.h2.value",
       "org.h2.value.lob"
     ],
+    "com.headius:backport9": [
+      "com.headius.backport9.buffer",
+      "com.headius.backport9.modules",
+      "com.headius.backport9.modules.impl",
+      "com.headius.backport9.platform",
+      "com.headius.backport9.stack",
+      "com.headius.backport9.stack.impl"
+    ],
+    "com.headius:invokebinder": [
+      "com.headius.invokebinder",
+      "com.headius.invokebinder.transform"
+    ],
+    "com.headius:options": [
+      "com.headius.options",
+      "com.headius.options.example"
+    ],
     "com.ibm.icu:icu4j": [
       "com.ibm.icu.dev.tool.docs",
       "com.ibm.icu.impl",
@@ -2552,6 +3095,23 @@
       "com.github.difflib.text.deltamerge",
       "com.github.difflib.unifieddiff"
     ],
+    "io.roastedroot:redline": [
+      "io.roastedroot.redline"
+    ],
+    "io.roastedroot:redline-api": [
+      "io.roastedroot.redline.api",
+      "io.roastedroot.redline.api.internal"
+    ],
+    "io.roastedroot:redline-bridge": [
+      "io.roastedroot.redline.bridge"
+    ],
+    "io.roastedroot:redline-bridge:jar:sources": [
+      "io.roastedroot.redline.bridge"
+    ],
+    "io.roastedroot:redline-runner-jffi": [
+      "io.roastedroot.redline.runner",
+      "io.roastedroot.redline.runner.internal"
+    ],
     "io.sweers.autotransient:autotransient": [
       "io.sweers.autotransient"
     ],
@@ -2578,6 +3138,15 @@
       "javax.servlet.descriptor",
       "javax.servlet.http"
     ],
+    "joda-time:joda-time": [
+      "org.joda.time",
+      "org.joda.time.base",
+      "org.joda.time.chrono",
+      "org.joda.time.convert",
+      "org.joda.time.field",
+      "org.joda.time.format",
+      "org.joda.time.tz"
+    ],
     "junit:junit": [
       "junit.extensions",
       "junit.framework",
@@ -2612,6 +3181,10 @@
       "org.junit.runners.parameterized",
       "org.junit.validator"
     ],
+    "me.qmx.jitescript:jitescript": [
+      "me.qmx.jitescript",
+      "me.qmx.jitescript.util"
+    ],
     "net.bytebuddy:byte-buddy": [
       "net.bytebuddy",
       "net.bytebuddy.agent.builder",
@@ -3231,6 +3804,23 @@
       "org.apache.mina.util",
       "org.apache.mina.util.byteaccess"
     ],
+    "org.apache.sshd:sshd-contrib": [
+      "org.apache.sshd.contrib.client.auth.password",
+      "org.apache.sshd.contrib.common.channel.throttle",
+      "org.apache.sshd.contrib.common.compression",
+      "org.apache.sshd.contrib.common.io",
+      "org.apache.sshd.contrib.common.session.helpers",
+      "org.apache.sshd.contrib.common.signature",
+      "org.apache.sshd.contrib.common.util.io",
+      "org.apache.sshd.contrib.common.util.security.androidopenssl",
+      "org.apache.sshd.contrib.server.scp",
+      "org.apache.sshd.contrib.server.session.proxyprotocol",
+      "org.apache.sshd.contrib.server.session.proxyprotocolv2",
+      "org.apache.sshd.contrib.server.session.proxyprotocolv2.data",
+      "org.apache.sshd.contrib.server.session.proxyprotocolv2.exception",
+      "org.apache.sshd.contrib.server.session.proxyprotocolv2.utils",
+      "org.apache.sshd.contrib.server.subsystem.sftp"
+    ],
     "org.apache.sshd:sshd-mina": [
       "org.apache.sshd.mina"
     ],
@@ -3359,19 +3949,25 @@
       "org.apache.sshd.sftp.server"
     ],
     "org.asciidoctor:asciidoctorj": [
+      "org.asciidoctor.jruby",
+      "org.asciidoctor.jruby.ast.impl",
+      "org.asciidoctor.jruby.converter.internal",
+      "org.asciidoctor.jruby.converter.spi",
+      "org.asciidoctor.jruby.extension.internal",
+      "org.asciidoctor.jruby.extension.processorproxies",
+      "org.asciidoctor.jruby.extension.spi",
+      "org.asciidoctor.jruby.internal",
+      "org.asciidoctor.jruby.log.internal",
+      "org.asciidoctor.jruby.syntaxhighlighter.internal",
+      "org.asciidoctor.jruby.syntaxhighlighter.spi"
+    ],
+    "org.asciidoctor:asciidoctorj-api": [
       "org.asciidoctor",
       "org.asciidoctor.ast",
-      "org.asciidoctor.ast.impl",
-      "org.asciidoctor.cli",
       "org.asciidoctor.converter",
-      "org.asciidoctor.converter.internal",
-      "org.asciidoctor.converter.spi",
       "org.asciidoctor.extension",
-      "org.asciidoctor.extension.internal",
-      "org.asciidoctor.extension.spi",
-      "org.asciidoctor.internal",
       "org.asciidoctor.log",
-      "org.asciidoctor.log.internal"
+      "org.asciidoctor.syntaxhighlighter"
     ],
     "org.assertj:assertj-core": [
       "org.assertj.core.annotation",
@@ -3418,6 +4014,9 @@
       "org.bouncycastle.openpgp.api.bc",
       "org.bouncycastle.openpgp.api.exception",
       "org.bouncycastle.openpgp.api.jcajce",
+      "org.bouncycastle.openpgp.api.operator",
+      "org.bouncycastle.openpgp.api.operator.bc",
+      "org.bouncycastle.openpgp.api.operator.jcajce",
       "org.bouncycastle.openpgp.api.util",
       "org.bouncycastle.openpgp.bc",
       "org.bouncycastle.openpgp.jcajce",
@@ -3429,6 +4028,9 @@
       "org.bouncycastle.cades",
       "org.bouncycastle.cert",
       "org.bouncycastle.cert.bc",
+      "org.bouncycastle.cert.c509",
+      "org.bouncycastle.cert.c509.bc",
+      "org.bouncycastle.cert.c509.jcajce",
       "org.bouncycastle.cert.cmp",
       "org.bouncycastle.cert.crmf",
       "org.bouncycastle.cert.crmf.bc",
@@ -3542,8 +4144,10 @@
       "org.bouncycastle.crypto.prng",
       "org.bouncycastle.crypto.prng.drbg",
       "org.bouncycastle.crypto.signers",
+      "org.bouncycastle.crypto.signers.lms",
       "org.bouncycastle.crypto.signers.mldsa",
       "org.bouncycastle.crypto.signers.slhdsa",
+      "org.bouncycastle.crypto.signers.xmss",
       "org.bouncycastle.crypto.threshold",
       "org.bouncycastle.crypto.tls",
       "org.bouncycastle.crypto.util",
@@ -3587,6 +4191,7 @@
       "org.bouncycastle.jcajce.provider.asymmetric.mlkem",
       "org.bouncycastle.jcajce.provider.asymmetric.rsa",
       "org.bouncycastle.jcajce.provider.asymmetric.slhdsa",
+      "org.bouncycastle.jcajce.provider.asymmetric.sm9",
       "org.bouncycastle.jcajce.provider.asymmetric.util",
       "org.bouncycastle.jcajce.provider.asymmetric.x509",
       "org.bouncycastle.jcajce.provider.config",
@@ -3621,24 +4226,19 @@
       "org.bouncycastle.math.ec.endo",
       "org.bouncycastle.math.ec.rfc7748",
       "org.bouncycastle.math.ec.rfc8032",
+      "org.bouncycastle.math.ec.sm9",
       "org.bouncycastle.math.ec.tools",
       "org.bouncycastle.math.field",
       "org.bouncycastle.math.raw",
       "org.bouncycastle.pqc.asn1",
       "org.bouncycastle.pqc.crypto",
       "org.bouncycastle.pqc.crypto.aimer",
-      "org.bouncycastle.pqc.crypto.cmce",
-      "org.bouncycastle.pqc.crypto.crystals.dilithium",
       "org.bouncycastle.pqc.crypto.faest",
       "org.bouncycastle.pqc.crypto.falcon",
-      "org.bouncycastle.pqc.crypto.frodo",
       "org.bouncycastle.pqc.crypto.haetae",
-      "org.bouncycastle.pqc.crypto.hawk",
       "org.bouncycastle.pqc.crypto.hqc",
       "org.bouncycastle.pqc.crypto.lms",
       "org.bouncycastle.pqc.crypto.mayo",
-      "org.bouncycastle.pqc.crypto.mldsa",
-      "org.bouncycastle.pqc.crypto.mlkem",
       "org.bouncycastle.pqc.crypto.mqom",
       "org.bouncycastle.pqc.crypto.newhope",
       "org.bouncycastle.pqc.crypto.ntru",
@@ -3647,7 +4247,7 @@
       "org.bouncycastle.pqc.crypto.qruov",
       "org.bouncycastle.pqc.crypto.saber",
       "org.bouncycastle.pqc.crypto.sdith",
-      "org.bouncycastle.pqc.crypto.slhdsa",
+      "org.bouncycastle.pqc.crypto.smaugt",
       "org.bouncycastle.pqc.crypto.snova",
       "org.bouncycastle.pqc.crypto.sphincs",
       "org.bouncycastle.pqc.crypto.sqisign",
@@ -3659,15 +4259,10 @@
       "org.bouncycastle.pqc.jcajce.provider",
       "org.bouncycastle.pqc.jcajce.provider.aimer",
       "org.bouncycastle.pqc.jcajce.provider.bike",
-      "org.bouncycastle.pqc.jcajce.provider.cmce",
-      "org.bouncycastle.pqc.jcajce.provider.dilithium",
       "org.bouncycastle.pqc.jcajce.provider.faest",
       "org.bouncycastle.pqc.jcajce.provider.falcon",
-      "org.bouncycastle.pqc.jcajce.provider.frodo",
       "org.bouncycastle.pqc.jcajce.provider.haetae",
-      "org.bouncycastle.pqc.jcajce.provider.hawk",
       "org.bouncycastle.pqc.jcajce.provider.hqc",
-      "org.bouncycastle.pqc.jcajce.provider.kyber",
       "org.bouncycastle.pqc.jcajce.provider.lms",
       "org.bouncycastle.pqc.jcajce.provider.mayo",
       "org.bouncycastle.pqc.jcajce.provider.mqom",
@@ -3675,21 +4270,20 @@
       "org.bouncycastle.pqc.jcajce.provider.ntru",
       "org.bouncycastle.pqc.jcajce.provider.ntruplus",
       "org.bouncycastle.pqc.jcajce.provider.ntruprime",
-      "org.bouncycastle.pqc.jcajce.provider.picnic",
       "org.bouncycastle.pqc.jcajce.provider.qruov",
       "org.bouncycastle.pqc.jcajce.provider.saber",
       "org.bouncycastle.pqc.jcajce.provider.sdith",
+      "org.bouncycastle.pqc.jcajce.provider.smaugt",
       "org.bouncycastle.pqc.jcajce.provider.snova",
       "org.bouncycastle.pqc.jcajce.provider.sphincs",
-      "org.bouncycastle.pqc.jcajce.provider.sphincsplus",
       "org.bouncycastle.pqc.jcajce.provider.sqisign",
       "org.bouncycastle.pqc.jcajce.provider.uov",
       "org.bouncycastle.pqc.jcajce.provider.util",
       "org.bouncycastle.pqc.jcajce.provider.xmss",
       "org.bouncycastle.pqc.jcajce.spec",
       "org.bouncycastle.pqc.legacy.bike",
-      "org.bouncycastle.pqc.legacy.picnic",
-      "org.bouncycastle.pqc.legacy.rainbow",
+      "org.bouncycastle.pqc.legacy.crystals.dilithium",
+      "org.bouncycastle.pqc.legacy.hawk",
       "org.bouncycastle.pqc.legacy.sphincsplus",
       "org.bouncycastle.pqc.math.ntru",
       "org.bouncycastle.pqc.math.ntru.parameters",
@@ -3734,6 +4328,8 @@
       "org.bouncycastle.asn1.rosstandart",
       "org.bouncycastle.asn1.smime",
       "org.bouncycastle.asn1.tsp",
+      "org.bouncycastle.cbor",
+      "org.bouncycastle.cbor.c509",
       "org.bouncycastle.oer",
       "org.bouncycastle.oer.its",
       "org.bouncycastle.oer.its.etsi102941",
@@ -3819,6 +4415,10 @@
       "org.commonmark.ext.front.matter",
       "org.commonmark.ext.front.matter.internal"
     ],
+    "org.crac:crac": [
+      "org.crac",
+      "org.crac.management"
+    ],
     "org.eclipse.jetty.ee11:jetty-ee11-servlet": [
       "org.eclipse.jetty.ee11.servlet",
       "org.eclipse.jetty.ee11.servlet.internal",
@@ -3917,75 +4517,7 @@
       "org.hamcrest.core",
       "org.hamcrest.internal"
     ],
-    "org.jruby:jruby-complete": [
-      "com.headius.invokebinder",
-      "com.headius.invokebinder.transform",
-      "com.headius.modulator",
-      "com.headius.modulator.impl",
-      "com.headius.options",
-      "com.headius.options.example",
-      "com.headius.unsafe.fences",
-      "com.jcraft.jzlib",
-      "com.kenai.constantine",
-      "com.kenai.constantine.platform",
-      "com.kenai.jffi",
-      "com.kenai.jffi.internal",
-      "com.kenai.jnr.x86asm",
-      "com.martiansoftware.nailgun",
-      "com.martiansoftware.nailgun.builtins",
-      "jnr.constants",
-      "jnr.constants.platform",
-      "jnr.constants.platform.darwin",
-      "jnr.constants.platform.fake",
-      "jnr.constants.platform.freebsd",
-      "jnr.constants.platform.linux",
-      "jnr.constants.platform.openbsd",
-      "jnr.constants.platform.solaris",
-      "jnr.constants.platform.windows",
-      "jnr.enxio.channels",
-      "jnr.ffi",
-      "jnr.ffi.annotations",
-      "jnr.ffi.byref",
-      "jnr.ffi.mapper",
-      "jnr.ffi.provider",
-      "jnr.ffi.provider.converters",
-      "jnr.ffi.provider.jffi",
-      "jnr.ffi.provider.jffi.platform.aarch64.linux",
-      "jnr.ffi.provider.jffi.platform.arm.linux",
-      "jnr.ffi.provider.jffi.platform.i386.darwin",
-      "jnr.ffi.provider.jffi.platform.i386.freebsd",
-      "jnr.ffi.provider.jffi.platform.i386.linux",
-      "jnr.ffi.provider.jffi.platform.i386.openbsd",
-      "jnr.ffi.provider.jffi.platform.i386.solaris",
-      "jnr.ffi.provider.jffi.platform.i386.windows",
-      "jnr.ffi.provider.jffi.platform.mips.linux",
-      "jnr.ffi.provider.jffi.platform.mipsel.linux",
-      "jnr.ffi.provider.jffi.platform.ppc.aix",
-      "jnr.ffi.provider.jffi.platform.ppc.darwin",
-      "jnr.ffi.provider.jffi.platform.ppc.linux",
-      "jnr.ffi.provider.jffi.platform.ppc64.linux",
-      "jnr.ffi.provider.jffi.platform.ppc64le.linux",
-      "jnr.ffi.provider.jffi.platform.s390.linux",
-      "jnr.ffi.provider.jffi.platform.s390x.linux",
-      "jnr.ffi.provider.jffi.platform.sparc.solaris",
-      "jnr.ffi.provider.jffi.platform.sparcv9.linux",
-      "jnr.ffi.provider.jffi.platform.sparcv9.solaris",
-      "jnr.ffi.provider.jffi.platform.x86_64.darwin",
-      "jnr.ffi.provider.jffi.platform.x86_64.freebsd",
-      "jnr.ffi.provider.jffi.platform.x86_64.linux",
-      "jnr.ffi.provider.jffi.platform.x86_64.openbsd",
-      "jnr.ffi.provider.jffi.platform.x86_64.solaris",
-      "jnr.ffi.provider.jffi.platform.x86_64.windows",
-      "jnr.ffi.types",
-      "jnr.ffi.util",
-      "jnr.ffi.util.ref",
-      "jnr.ffi.util.ref.internal",
-      "jnr.netdb",
-      "jnr.posix",
-      "jnr.posix.util",
-      "jnr.posix.windows",
-      "jnr.unixsocket",
-      "jnr.x86asm",
+    "org.jruby.jcodings:jcodings": [
       "org.jcodings",
       "org.jcodings.ascii",
       "org.jcodings.constants",
@@ -3995,19 +4527,20 @@
       "org.jcodings.transcode",
       "org.jcodings.transcode.specific",
       "org.jcodings.unicode",
-      "org.jcodings.util",
-      "org.joda.time",
-      "org.joda.time.base",
-      "org.joda.time.chrono",
-      "org.joda.time.convert",
-      "org.joda.time.field",
-      "org.joda.time.format",
-      "org.joda.time.tz",
+      "org.jcodings.util"
+    ],
+    "org.jruby.joni:joni": [
       "org.joni",
       "org.joni.ast",
       "org.joni.bench",
       "org.joni.constants",
-      "org.joni.exception",
+      "org.joni.constants.internal",
+      "org.joni.exception"
+    ],
+    "org.jruby:dirgra": [
+      "org.jruby.dirgra"
+    ],
+    "org.jruby:jruby-base": [
       "org.jruby",
       "org.jruby.anno",
       "org.jruby.ant",
@@ -4022,9 +4555,7 @@
       "org.jruby.compiler",
       "org.jruby.compiler.impl",
       "org.jruby.compiler.util",
-      "org.jruby.dirgra",
       "org.jruby.embed",
-      "org.jruby.embed.bsf",
       "org.jruby.embed.internal",
       "org.jruby.embed.io",
       "org.jruby.embed.jsr223",
@@ -4035,9 +4566,11 @@
       "org.jruby.embed.variable",
       "org.jruby.exceptions",
       "org.jruby.ext",
+      "org.jruby.ext.api",
       "org.jruby.ext.bigdecimal",
       "org.jruby.ext.cgi.escape",
       "org.jruby.ext.coverage",
+      "org.jruby.ext.date",
       "org.jruby.ext.digest",
       "org.jruby.ext.etc",
       "org.jruby.ext.fcntl",
@@ -4045,26 +4578,24 @@
       "org.jruby.ext.ffi.io",
       "org.jruby.ext.ffi.jffi",
       "org.jruby.ext.fiber",
-      "org.jruby.ext.io.wait",
+      "org.jruby.ext.io.nonblock",
       "org.jruby.ext.jruby",
       "org.jruby.ext.mathn",
-      "org.jruby.ext.net.protocol",
-      "org.jruby.ext.nkf",
+      "org.jruby.ext.monitor",
       "org.jruby.ext.pathname",
       "org.jruby.ext.rbconfig",
       "org.jruby.ext.ripper",
-      "org.jruby.ext.securerandom",
+      "org.jruby.ext.set",
       "org.jruby.ext.socket",
-      "org.jruby.ext.stringio",
-      "org.jruby.ext.strscan",
-      "org.jruby.ext.tempfile",
       "org.jruby.ext.thread",
       "org.jruby.ext.timeout",
       "org.jruby.ext.tracepoint",
       "org.jruby.ext.zlib",
+      "org.jruby.gen",
       "org.jruby.internal.runtime",
       "org.jruby.internal.runtime.methods",
       "org.jruby.ir",
+      "org.jruby.ir.builder",
       "org.jruby.ir.dataflow",
       "org.jruby.ir.dataflow.analyses",
       "org.jruby.ir.instructions",
@@ -4080,6 +4611,8 @@
       "org.jruby.ir.representations",
       "org.jruby.ir.runtime",
       "org.jruby.ir.targets",
+      "org.jruby.ir.targets.indy",
+      "org.jruby.ir.targets.simple",
       "org.jruby.ir.transformations.inlining",
       "org.jruby.ir.util",
       "org.jruby.java.addons",
@@ -4090,7 +4623,6 @@
       "org.jruby.java.util",
       "org.jruby.javasupport",
       "org.jruby.javasupport.binding",
-      "org.jruby.javasupport.bsf",
       "org.jruby.javasupport.ext",
       "org.jruby.javasupport.proxy",
       "org.jruby.javasupport.util",
@@ -4098,20 +4630,11 @@
       "org.jruby.lexer.yacc",
       "org.jruby.main",
       "org.jruby.management",
-      "org.jruby.me.qmx.jitescript",
-      "org.jruby.me.qmx.jitescript.util",
-      "org.jruby.org.objectweb.asm",
-      "org.jruby.org.objectweb.asm.commons",
-      "org.jruby.org.objectweb.asm.signature",
-      "org.jruby.org.objectweb.asm.tree",
-      "org.jruby.org.objectweb.asm.tree.analysis",
-      "org.jruby.org.objectweb.asm.util",
       "org.jruby.parser",
       "org.jruby.platform",
       "org.jruby.runtime",
       "org.jruby.runtime.backtrace",
       "org.jruby.runtime.builtin",
-      "org.jruby.runtime.callback",
       "org.jruby.runtime.callsite",
       "org.jruby.runtime.component",
       "org.jruby.runtime.encoding",
@@ -4123,16 +4646,24 @@
       "org.jruby.runtime.profile",
       "org.jruby.runtime.profile.builtin",
       "org.jruby.runtime.scope",
+      "org.jruby.runtime.scopes",
       "org.jruby.specialized",
       "org.jruby.threading",
       "org.jruby.util",
       "org.jruby.util.cli",
       "org.jruby.util.collections",
-      "org.jruby.util.encoding",
       "org.jruby.util.func",
       "org.jruby.util.io",
       "org.jruby.util.log",
-      "org.jruby.util.unsafe"
+      "org.jruby.util.time"
+    ],
+    "org.jruby:jruby-prism": [
+      "org.jruby.prism",
+      "org.jruby.prism.builder",
+      "org.jruby.prism.parser"
+    ],
+    "org.jruby:jzlib": [
+      "com.jcraft.jzlib"
     ],
     "org.jsoup:jsoup": [
       "org.jsoup",
@@ -4290,6 +4821,15 @@
     "org.roaringbitmap:shims": [
       "org.roaringbitmap"
     ],
+    "org.ruby-lang:prism-parser-api": [
+      "org.ruby_lang.prism"
+    ],
+    "org.ruby-lang:prism-parser-wasm": [
+      "org.ruby_lang.prism.wasm"
+    ],
+    "org.ruby-lang:prism-parser-wasm:jar:sources": [
+      "org.ruby_lang.prism.wasm"
+    ],
     "org.slf4j:jcl-over-slf4j": [
       "org.apache.commons.logging",
       "org.apache.commons.logging.impl"
@@ -4377,12 +4917,39 @@
       "args4j:args4j:jar:sources",
       "ch.qos.reload4j:reload4j",
       "ch.qos.reload4j:reload4j:jar:sources",
-      "com.beust:jcommander",
-      "com.beust:jcommander:jar:sources",
+      "ch.randelshofer:fastdoubleparser",
+      "ch.randelshofer:fastdoubleparser:jar:sources",
+      "com.dylibso.chicory:log",
+      "com.dylibso.chicory:log:jar:sources",
+      "com.dylibso.chicory:runtime",
+      "com.dylibso.chicory:runtime:jar:sources",
+      "com.dylibso.chicory:wasi",
+      "com.dylibso.chicory:wasi:jar:sources",
+      "com.dylibso.chicory:wasm",
+      "com.dylibso.chicory:wasm:jar:sources",
       "com.github.ben-manes.caffeine:caffeine",
       "com.github.ben-manes.caffeine:caffeine:jar:sources",
       "com.github.ben-manes.caffeine:guava",
       "com.github.ben-manes.caffeine:guava:jar:sources",
+      "com.github.jnr:jffi",
+      "com.github.jnr:jffi:jar:native",
+      "com.github.jnr:jffi:jar:sources",
+      "com.github.jnr:jnr-a64asm",
+      "com.github.jnr:jnr-a64asm:jar:sources",
+      "com.github.jnr:jnr-constants",
+      "com.github.jnr:jnr-constants:jar:sources",
+      "com.github.jnr:jnr-enxio",
+      "com.github.jnr:jnr-enxio:jar:sources",
+      "com.github.jnr:jnr-ffi",
+      "com.github.jnr:jnr-ffi:jar:sources",
+      "com.github.jnr:jnr-netdb",
+      "com.github.jnr:jnr-netdb:jar:sources",
+      "com.github.jnr:jnr-posix",
+      "com.github.jnr:jnr-posix:jar:sources",
+      "com.github.jnr:jnr-unixsocket",
+      "com.github.jnr:jnr-unixsocket:jar:sources",
+      "com.github.jnr:jnr-x86asm",
+      "com.github.jnr:jnr-x86asm:jar:sources",
       "com.github.rholder:guava-retrying",
       "com.github.rholder:guava-retrying:jar:sources",
       "com.google.auto.factory:auto-factory",
@@ -4454,6 +5021,12 @@
       "com.googlecode.prolog-cafe:prolog-runtime:jar:sources",
       "com.h2database:h2",
       "com.h2database:h2:jar:sources",
+      "com.headius:backport9",
+      "com.headius:backport9:jar:sources",
+      "com.headius:invokebinder",
+      "com.headius:invokebinder:jar:sources",
+      "com.headius:options",
+      "com.headius:options:jar:sources",
       "com.ibm.icu:icu4j",
       "com.ibm.icu:icu4j:jar:sources",
       "com.icegreen:greenmail",
@@ -4488,6 +5061,14 @@
       "io.dropwizard.metrics:metrics-core:jar:sources",
       "io.github.java-diff-utils:java-diff-utils",
       "io.github.java-diff-utils:java-diff-utils:jar:sources",
+      "io.roastedroot:redline",
+      "io.roastedroot:redline-api",
+      "io.roastedroot:redline-api:jar:sources",
+      "io.roastedroot:redline-bridge",
+      "io.roastedroot:redline-bridge:jar:sources",
+      "io.roastedroot:redline-runner-jffi",
+      "io.roastedroot:redline-runner-jffi:jar:sources",
+      "io.roastedroot:redline:jar:sources",
       "io.sweers.autotransient:autotransient",
       "io.sweers.autotransient:autotransient:jar:sources",
       "jakarta.inject:jakarta.inject-api",
@@ -4500,8 +5081,12 @@
       "javax.inject:javax.inject:jar:sources",
       "javax.servlet:javax.servlet-api",
       "javax.servlet:javax.servlet-api:jar:sources",
+      "joda-time:joda-time",
+      "joda-time:joda-time:jar:sources",
       "junit:junit",
       "junit:junit:jar:sources",
+      "me.qmx.jitescript:jitescript",
+      "me.qmx.jitescript:jitescript:jar:sources",
       "net.bytebuddy:byte-buddy",
       "net.bytebuddy:byte-buddy-agent",
       "net.bytebuddy:byte-buddy-agent:jar:sources",
@@ -4558,6 +5143,8 @@
       "org.apache.lucene:lucene-queryparser:jar:sources",
       "org.apache.mina:mina-core",
       "org.apache.mina:mina-core:jar:sources",
+      "org.apache.sshd:sshd-contrib",
+      "org.apache.sshd:sshd-contrib:jar:sources",
       "org.apache.sshd:sshd-mina",
       "org.apache.sshd:sshd-mina:jar:sources",
       "org.apache.sshd:sshd-osgi",
@@ -4565,6 +5152,8 @@
       "org.apache.sshd:sshd-sftp",
       "org.apache.sshd:sshd-sftp:jar:sources",
       "org.asciidoctor:asciidoctorj",
+      "org.asciidoctor:asciidoctorj-api",
+      "org.asciidoctor:asciidoctorj-api:jar:sources",
       "org.asciidoctor:asciidoctorj:jar:sources",
       "org.assertj:assertj-core",
       "org.assertj:assertj-core:jar:sources",
@@ -4590,6 +5179,8 @@
       "org.commonmark:commonmark-ext-yaml-front-matter",
       "org.commonmark:commonmark-ext-yaml-front-matter:jar:sources",
       "org.commonmark:commonmark:jar:sources",
+      "org.crac:crac",
+      "org.crac:crac:jar:sources",
       "org.eclipse.jetty.ee11:jetty-ee11-servlet",
       "org.eclipse.jetty.ee11:jetty-ee11-servlet:jar:sources",
       "org.eclipse.jetty.ee8:jetty-ee8-nested",
@@ -4620,8 +5211,21 @@
       "org.hamcrest:hamcrest-core",
       "org.hamcrest:hamcrest-core:jar:sources",
       "org.hamcrest:hamcrest:jar:sources",
-      "org.jruby:jruby-complete",
-      "org.jruby:jruby-complete:jar:sources",
+      "org.jruby.jcodings:jcodings",
+      "org.jruby.jcodings:jcodings:jar:sources",
+      "org.jruby.joni:joni",
+      "org.jruby.joni:joni:jar:sources",
+      "org.jruby:dirgra",
+      "org.jruby:dirgra:jar:sources",
+      "org.jruby:jruby",
+      "org.jruby:jruby-base",
+      "org.jruby:jruby-base:jar:sources",
+      "org.jruby:jruby-prism",
+      "org.jruby:jruby-prism:jar:sources",
+      "org.jruby:jruby-stdlib",
+      "org.jruby:jruby:jar:sources",
+      "org.jruby:jzlib",
+      "org.jruby:jzlib:jar:sources",
       "org.jsoup:jsoup",
       "org.jsoup:jsoup:jar:sources",
       "org.jspecify:jspecify",
@@ -4652,6 +5256,10 @@
       "org.roaringbitmap:RoaringBitmap:jar:sources",
       "org.roaringbitmap:shims",
       "org.roaringbitmap:shims:jar:sources",
+      "org.ruby-lang:prism-parser-api",
+      "org.ruby-lang:prism-parser-api:jar:sources",
+      "org.ruby-lang:prism-parser-wasm",
+      "org.ruby-lang:prism-parser-wasm:jar:sources",
       "org.slf4j:jcl-over-slf4j",
       "org.slf4j:jcl-over-slf4j:jar:sources",
       "org.slf4j:slf4j-api",
@@ -4675,12 +5283,39 @@
       "args4j:args4j:jar:sources",
       "ch.qos.reload4j:reload4j",
       "ch.qos.reload4j:reload4j:jar:sources",
-      "com.beust:jcommander",
-      "com.beust:jcommander:jar:sources",
+      "ch.randelshofer:fastdoubleparser",
+      "ch.randelshofer:fastdoubleparser:jar:sources",
+      "com.dylibso.chicory:log",
+      "com.dylibso.chicory:log:jar:sources",
+      "com.dylibso.chicory:runtime",
+      "com.dylibso.chicory:runtime:jar:sources",
+      "com.dylibso.chicory:wasi",
+      "com.dylibso.chicory:wasi:jar:sources",
+      "com.dylibso.chicory:wasm",
+      "com.dylibso.chicory:wasm:jar:sources",
       "com.github.ben-manes.caffeine:caffeine",
       "com.github.ben-manes.caffeine:caffeine:jar:sources",
       "com.github.ben-manes.caffeine:guava",
       "com.github.ben-manes.caffeine:guava:jar:sources",
+      "com.github.jnr:jffi",
+      "com.github.jnr:jffi:jar:native",
+      "com.github.jnr:jffi:jar:sources",
+      "com.github.jnr:jnr-a64asm",
+      "com.github.jnr:jnr-a64asm:jar:sources",
+      "com.github.jnr:jnr-constants",
+      "com.github.jnr:jnr-constants:jar:sources",
+      "com.github.jnr:jnr-enxio",
+      "com.github.jnr:jnr-enxio:jar:sources",
+      "com.github.jnr:jnr-ffi",
+      "com.github.jnr:jnr-ffi:jar:sources",
+      "com.github.jnr:jnr-netdb",
+      "com.github.jnr:jnr-netdb:jar:sources",
+      "com.github.jnr:jnr-posix",
+      "com.github.jnr:jnr-posix:jar:sources",
+      "com.github.jnr:jnr-unixsocket",
+      "com.github.jnr:jnr-unixsocket:jar:sources",
+      "com.github.jnr:jnr-x86asm",
+      "com.github.jnr:jnr-x86asm:jar:sources",
       "com.github.rholder:guava-retrying",
       "com.github.rholder:guava-retrying:jar:sources",
       "com.google.auto.factory:auto-factory",
@@ -4752,6 +5387,12 @@
       "com.googlecode.prolog-cafe:prolog-runtime:jar:sources",
       "com.h2database:h2",
       "com.h2database:h2:jar:sources",
+      "com.headius:backport9",
+      "com.headius:backport9:jar:sources",
+      "com.headius:invokebinder",
+      "com.headius:invokebinder:jar:sources",
+      "com.headius:options",
+      "com.headius:options:jar:sources",
       "com.ibm.icu:icu4j",
       "com.ibm.icu:icu4j:jar:sources",
       "com.icegreen:greenmail",
@@ -4786,6 +5427,14 @@
       "io.dropwizard.metrics:metrics-core:jar:sources",
       "io.github.java-diff-utils:java-diff-utils",
       "io.github.java-diff-utils:java-diff-utils:jar:sources",
+      "io.roastedroot:redline",
+      "io.roastedroot:redline-api",
+      "io.roastedroot:redline-api:jar:sources",
+      "io.roastedroot:redline-bridge",
+      "io.roastedroot:redline-bridge:jar:sources",
+      "io.roastedroot:redline-runner-jffi",
+      "io.roastedroot:redline-runner-jffi:jar:sources",
+      "io.roastedroot:redline:jar:sources",
       "io.sweers.autotransient:autotransient",
       "io.sweers.autotransient:autotransient:jar:sources",
       "jakarta.inject:jakarta.inject-api",
@@ -4798,8 +5447,12 @@
       "javax.inject:javax.inject:jar:sources",
       "javax.servlet:javax.servlet-api",
       "javax.servlet:javax.servlet-api:jar:sources",
+      "joda-time:joda-time",
+      "joda-time:joda-time:jar:sources",
       "junit:junit",
       "junit:junit:jar:sources",
+      "me.qmx.jitescript:jitescript",
+      "me.qmx.jitescript:jitescript:jar:sources",
       "net.bytebuddy:byte-buddy",
       "net.bytebuddy:byte-buddy-agent",
       "net.bytebuddy:byte-buddy-agent:jar:sources",
@@ -4856,6 +5509,8 @@
       "org.apache.lucene:lucene-queryparser:jar:sources",
       "org.apache.mina:mina-core",
       "org.apache.mina:mina-core:jar:sources",
+      "org.apache.sshd:sshd-contrib",
+      "org.apache.sshd:sshd-contrib:jar:sources",
       "org.apache.sshd:sshd-mina",
       "org.apache.sshd:sshd-mina:jar:sources",
       "org.apache.sshd:sshd-osgi",
@@ -4863,6 +5518,8 @@
       "org.apache.sshd:sshd-sftp",
       "org.apache.sshd:sshd-sftp:jar:sources",
       "org.asciidoctor:asciidoctorj",
+      "org.asciidoctor:asciidoctorj-api",
+      "org.asciidoctor:asciidoctorj-api:jar:sources",
       "org.asciidoctor:asciidoctorj:jar:sources",
       "org.assertj:assertj-core",
       "org.assertj:assertj-core:jar:sources",
@@ -4888,6 +5545,8 @@
       "org.commonmark:commonmark-ext-yaml-front-matter",
       "org.commonmark:commonmark-ext-yaml-front-matter:jar:sources",
       "org.commonmark:commonmark:jar:sources",
+      "org.crac:crac",
+      "org.crac:crac:jar:sources",
       "org.eclipse.jetty.ee11:jetty-ee11-servlet",
       "org.eclipse.jetty.ee11:jetty-ee11-servlet:jar:sources",
       "org.eclipse.jetty.ee8:jetty-ee8-nested",
@@ -4918,8 +5577,21 @@
       "org.hamcrest:hamcrest-core",
       "org.hamcrest:hamcrest-core:jar:sources",
       "org.hamcrest:hamcrest:jar:sources",
-      "org.jruby:jruby-complete",
-      "org.jruby:jruby-complete:jar:sources",
+      "org.jruby.jcodings:jcodings",
+      "org.jruby.jcodings:jcodings:jar:sources",
+      "org.jruby.joni:joni",
+      "org.jruby.joni:joni:jar:sources",
+      "org.jruby:dirgra",
+      "org.jruby:dirgra:jar:sources",
+      "org.jruby:jruby",
+      "org.jruby:jruby-base",
+      "org.jruby:jruby-base:jar:sources",
+      "org.jruby:jruby-prism",
+      "org.jruby:jruby-prism:jar:sources",
+      "org.jruby:jruby-stdlib",
+      "org.jruby:jruby:jar:sources",
+      "org.jruby:jzlib",
+      "org.jruby:jzlib:jar:sources",
       "org.jsoup:jsoup",
       "org.jsoup:jsoup:jar:sources",
       "org.jspecify:jspecify",
@@ -4950,6 +5622,10 @@
       "org.roaringbitmap:RoaringBitmap:jar:sources",
       "org.roaringbitmap:shims",
       "org.roaringbitmap:shims:jar:sources",
+      "org.ruby-lang:prism-parser-api",
+      "org.ruby-lang:prism-parser-api:jar:sources",
+      "org.ruby-lang:prism-parser-wasm",
+      "org.ruby-lang:prism-parser-wasm:jar:sources",
       "org.slf4j:jcl-over-slf4j",
       "org.slf4j:jcl-over-slf4j:jar:sources",
       "org.slf4j:slf4j-api",
@@ -5023,6 +5699,16 @@
         "com.ryanharter.auto.value.gson.factory.AutoValueGsonAdapterFactoryProcessor"
       ]
     },
+    "io.roastedroot:redline-runner-jffi": {
+      "io.roastedroot.redline.api.RedlineMachineFactoryProvider": [
+        "io.roastedroot.redline.runner.JffiMachineFactoryProvider"
+      ]
+    },
+    "io.roastedroot:redline-runner-jffi:jar:sources": {
+      "io.roastedroot.redline.api.RedlineMachineFactoryProvider": [
+        "io.roastedroot.redline.runner.JffiMachineFactoryProvider"
+      ]
+    },
     "net.sourceforge.nekohtml:nekohtml:jar:sources": {
       "org.apache.xerces.xni.parser.XMLParserConfiguration": [
         "org.cyberneko.html.HTMLConfiguration"
@@ -5273,6 +5959,22 @@
         "org.apache.sshd.sftp.server.SftpSubsystemFactory"
       ]
     },
+    "org.asciidoctor:asciidoctorj": {
+      "org.asciidoctor.Asciidoctor": [
+        "org.asciidoctor.jruby.internal.JRubyAsciidoctor"
+      ],
+      "org.asciidoctor.extension.ProcessorFactory": [
+        "org.asciidoctor.jruby.internal.ProcessorFactoryImpl"
+      ]
+    },
+    "org.asciidoctor:asciidoctorj:jar:sources": {
+      "org.asciidoctor.Asciidoctor": [
+        "org.asciidoctor.jruby.internal.JRubyAsciidoctor"
+      ],
+      "org.asciidoctor.extension.ProcessorFactory": [
+        "org.asciidoctor.jruby.internal.ProcessorFactoryImpl"
+      ]
+    },
     "org.bouncycastle:bcprov-jdk18on": {
       "java.security.Provider": [
         "org.bouncycastle.jce.provider.BouncyCastleProvider",
@@ -5297,10 +5999,17 @@
         "org.eclipse.jetty.http.Http11FieldPreEncoder"
       ]
     },
-    "org.jruby:jruby-complete": {
+    "org.jruby.jcodings:jcodings": {
       "java.nio.charset.spi.CharsetProvider": [
         "org.jcodings.spi.Charsets"
-      ],
+      ]
+    },
+    "org.jruby.jcodings:jcodings:jar:sources": {
+      "java.nio.charset.spi.CharsetProvider": [
+        "org.jcodings.spi.Charsets"
+      ]
+    },
+    "org.jruby:jruby-base": {
       "java.nio.file.spi.FileTypeDetector": [
         "org.jruby.util.RubyFileTypeDetector"
       ],
@@ -5308,7 +6017,7 @@
         "org.jruby.embed.jsr223.JRubyEngineFactory"
       ]
     },
-    "org.jruby:jruby-complete:jar:sources": {
+    "org.jruby:jruby-base:jar:sources": {
       "java.nio.file.spi.FileTypeDetector": [
         "org.jruby.util.RubyFileTypeDetector"
       ],
@@ -5316,6 +6025,16 @@
         "org.jruby.embed.jsr223.JRubyEngineFactory"
       ]
     },
+    "org.jruby:jruby-prism": {
+      "org.jruby.parser.ParserProvider": [
+        "org.jruby.prism.ParserProviderPrism"
+      ]
+    },
+    "org.jruby:jruby-prism:jar:sources": {
+      "org.jruby.parser.ParserProvider": [
+        "org.jruby.prism.ParserProviderPrism"
+      ]
+    },
     "org.openjdk.jmh:jmh-generator-annprocess": {
       "javax.annotation.processing.Processor": [
         "org.openjdk.jmh.generators.BenchmarkProcessor"
diff --git a/java/com/google/gerrit/acceptance/AbstractDaemonTest.java b/java/com/google/gerrit/acceptance/AbstractDaemonTest.java
index a0d0907..e33aea6 100644
--- a/java/com/google/gerrit/acceptance/AbstractDaemonTest.java
+++ b/java/com/google/gerrit/acceptance/AbstractDaemonTest.java
@@ -306,7 +306,7 @@
 
   @Inject private AbstractChangeNotes.Args changeNotesArgs;
   @Inject private AccountIndexer accountIndexer;
-  @Inject private EventRecorder.Factory eventRecorderFactory;
+  @Inject protected EventRecorder.Factory eventRecorderFactory;
   @Inject private InProcessProtocol inProcessProtocol;
   @Inject private PluginGuiceEnvironment pluginGuiceEnvironment;
   @Inject private PluginUser.Factory pluginUserFactory;
diff --git a/java/com/google/gerrit/acceptance/AbstractNotificationTest.java b/java/com/google/gerrit/acceptance/AbstractNotificationTest.java
index cd66870..dac7e34 100644
--- a/java/com/google/gerrit/acceptance/AbstractNotificationTest.java
+++ b/java/com/google/gerrit/acceptance/AbstractNotificationTest.java
@@ -151,8 +151,8 @@
                     : header));
       }
       EmailHeader titleHeader = message.headers().get("Subject");
-      if (titleHeader instanceof StringEmailHeader) {
-        emailTitle = ((StringEmailHeader) titleHeader).getString();
+      if (titleHeader instanceof StringEmailHeader s) {
+        emailTitle = s.getString();
       }
 
       return this;
diff --git a/java/com/google/gerrit/acceptance/AbstractPluginFieldsTest.java b/java/com/google/gerrit/acceptance/AbstractPluginFieldsTest.java
index 1d3cfa1..3ccd615 100644
--- a/java/com/google/gerrit/acceptance/AbstractPluginFieldsTest.java
+++ b/java/com/google/gerrit/acceptance/AbstractPluginFieldsTest.java
@@ -64,10 +64,9 @@
 
     @Override
     public boolean equals(Object o) {
-      if (!(o instanceof MyInfo)) {
+      if (!(o instanceof MyInfo i)) {
         return false;
       }
-      MyInfo i = (MyInfo) o;
       return Objects.equals(name, i.name) && Objects.equals(theAttribute, i.theAttribute);
     }
 
@@ -187,8 +186,7 @@
     Map<Change.Id, List<PluginDefinedInfo>> pluginInfos = getter.call(id);
     assertThat(pluginInfos.get(id)).isNull();
 
-    try (AutoCloseable ignored =
-        installPlugin("my-plugin", PluginDefinedSimpleAttributeModule.class)) {
+    try (AutoCloseable _ = installPlugin("my-plugin", PluginDefinedSimpleAttributeModule.class)) {
       pluginInfos = getter.call(id);
       assertThat(pluginInfos.get(id)).containsExactly(new MyInfo("my-plugin", "change " + id));
     }
@@ -206,8 +204,7 @@
     assertThat(pluginInfos.get(id1)).isNull();
     assertThat(pluginInfos.get(id2)).isNull();
 
-    try (AutoCloseable ignored =
-        installPlugin("my-plugin", PluginDefinedSimpleAttributeModule.class)) {
+    try (AutoCloseable _ = installPlugin("my-plugin", PluginDefinedSimpleAttributeModule.class)) {
       pluginInfos = getter.call();
       assertThat(pluginInfos.get(id1)).containsExactly(new MyInfo("my-plugin", "change " + id1));
       assertThat(pluginInfos.get(id2)).containsExactly(new MyInfo("my-plugin", "change " + id2));
@@ -227,7 +224,7 @@
     assertThat(pluginInfos.get(changeWithNoInfo)).isNull();
     assertThat(pluginInfos.get(changeWithInfo)).isNull();
 
-    try (AutoCloseable ignored =
+    try (AutoCloseable _ =
         installPlugin("my-plugin", PluginDefinedChangesByCommitBulkAttributeModule.class)) {
       pluginInfos = getter.call();
       assertThat(pluginInfos.get(changeWithNoInfo)).isNull();
@@ -250,7 +247,7 @@
     assertThat(pluginInfos.get(id1)).isNull();
     assertThat(pluginInfos.get(id2)).isNull();
 
-    try (AutoCloseable ignored =
+    try (AutoCloseable _ =
         installPlugin("my-plugin", PluginDefinedSingleCallBulkAttributeModule.class)) {
       pluginInfos = getter.call();
       assertThat(pluginInfos.get(id1)).containsExactly(new MyInfo("my-plugin", "change " + id1));
@@ -270,8 +267,7 @@
     Change.Id id = createChange().getChange().getId();
     assertThat(getterWithoutOptions.call(id).get(id)).isNull();
 
-    try (AutoCloseable ignored =
-        installPlugin("my-plugin", PluginDefinedOptionAttributeModule.class)) {
+    try (AutoCloseable _ = installPlugin("my-plugin", PluginDefinedOptionAttributeModule.class)) {
       assertThat(getterWithoutOptions.call(id).get(id))
           .containsExactly(new MyInfo("my-plugin", "opt null"));
       assertThat(
@@ -287,8 +283,7 @@
     Change.Id id = createChange().getChange().getId();
     assertThat(getter.call(id).get(id)).isNull();
 
-    try (AutoCloseable ignored =
-        installPlugin("my-plugin", PluginDefinedBulkExceptionModule.class)) {
+    try (AutoCloseable _ = installPlugin("my-plugin", PluginDefinedBulkExceptionModule.class)) {
       List<PluginDefinedInfo> outputInfos = getter.call(id).get(id);
       assertThat(outputInfos).hasSize(1);
       assertThat(outputInfos.get(0).name).isEqualTo("my-plugin");
diff --git a/java/com/google/gerrit/acceptance/EventRecorder.java b/java/com/google/gerrit/acceptance/EventRecorder.java
index 702b3b4..d75a5e1 100644
--- a/java/com/google/gerrit/acceptance/EventRecorder.java
+++ b/java/com/google/gerrit/acceptance/EventRecorder.java
@@ -31,6 +31,7 @@
 import com.google.gerrit.server.events.Event;
 import com.google.gerrit.server.events.RefEvent;
 import com.google.gerrit.server.events.RefUpdatedEvent;
+import com.google.gerrit.server.events.ReviewerAddedEvent;
 import com.google.gerrit.server.events.ReviewerDeletedEvent;
 import com.google.gerrit.server.events.UserScopedEventListener;
 import com.google.inject.Inject;
@@ -38,7 +39,7 @@
 import org.eclipse.jgit.lib.ObjectId;
 import org.eclipse.jgit.revwalk.RevCommit;
 
-public class EventRecorder {
+public class EventRecorder implements AutoCloseable {
   private final RegistrationHandle eventListenerRegistration;
   private final ListMultimap<String, Event> recordedEvents;
 
@@ -69,12 +70,13 @@
             new UserScopedEventListener() {
               @Override
               public void onEvent(Event e) {
-                if (e instanceof ReviewerDeletedEvent) {
+                if (e instanceof ReviewerAddedEvent) {
+                  recordedEvents.put(ReviewerAddedEvent.TYPE, e);
+                } else if (e instanceof ReviewerDeletedEvent) {
                   recordedEvents.put(ReviewerDeletedEvent.TYPE, e);
                 } else if (e instanceof ChangeDeletedEvent) {
                   recordedEvents.put(ChangeDeletedEvent.TYPE, e);
-                } else if (e instanceof RefEvent) {
-                  RefEvent event = (RefEvent) e;
+                } else if (e instanceof RefEvent event) {
                   String key =
                       refEventKey(
                           event.getType(), event.getProjectNameKey().get(), event.getRefName());
@@ -130,6 +132,21 @@
     return events;
   }
 
+  private ImmutableList<ReviewerAddedEvent> getReviewerAddedEvents(int expectedSize) {
+    String key = ReviewerAddedEvent.TYPE;
+    if (expectedSize == 0) {
+      assertThat(recordedEvents).doesNotContainKey(key);
+      return ImmutableList.of();
+    }
+    assertThat(recordedEvents).containsKey(key);
+    ImmutableList<ReviewerAddedEvent> events =
+        FluentIterable.from(recordedEvents.get(key))
+            .transform(ReviewerAddedEvent.class::cast)
+            .toList();
+    assertThat(events).hasSize(expectedSize);
+    return events;
+  }
+
   private ImmutableList<ReviewerDeletedEvent> getReviewerDeletedEvents(int expectedSize) {
     String key = ReviewerDeletedEvent.TYPE;
     if (expectedSize == 0) {
@@ -172,8 +189,7 @@
   }
 
   public void assertNoRefUpdatedEvents(String project, String branch) throws Exception {
-    @SuppressWarnings("unused")
-    var unused = getRefUpdatedEvents(project, branch, 0);
+    var _ = getRefUpdatedEvents(project, branch, 0);
   }
 
   public void assertRefUpdatedEvents(String project, String branch, String... expected)
@@ -219,6 +235,22 @@
     }
   }
 
+  public void assertReviewerAddedEvents(String... expected) {
+    ImmutableList<ReviewerAddedEvent> events = getReviewerAddedEvents(expected.length / 2);
+    int i = 0;
+    for (ReviewerAddedEvent event : events) {
+      String id = event.change.get().id;
+      assertThat(id).isEqualTo(expected[i]);
+      String reviewer = event.reviewer.get().email;
+      assertThat(reviewer).isEqualTo(expected[i + 1]);
+      i += 2;
+    }
+  }
+
+  public void assertNoReviewerAddedEvents() {
+    var _ = getReviewerAddedEvents(0);
+  }
+
   public void assertReviewerDeletedEvents(String... expected) {
     ImmutableList<ReviewerDeletedEvent> events = getReviewerDeletedEvents(expected.length / 2);
     int i = 0;
@@ -243,6 +275,7 @@
     }
   }
 
+  @Override
   public void close() {
     eventListenerRegistration.remove();
   }
diff --git a/java/com/google/gerrit/acceptance/FakeGroupAuditService.java b/java/com/google/gerrit/acceptance/FakeGroupAuditService.java
index 433c149..f01db6b 100644
--- a/java/com/google/gerrit/acceptance/FakeGroupAuditService.java
+++ b/java/com/google/gerrit/acceptance/FakeGroupAuditService.java
@@ -73,8 +73,8 @@
   @Override
   public void dispatch(AuditEvent action) {
     super.dispatch(action);
-    if (action instanceof HttpAuditEvent) {
-      httpEvents.add((HttpAuditEvent) action);
+    if (action instanceof HttpAuditEvent e) {
+      httpEvents.add(e);
     }
   }
 
diff --git a/java/com/google/gerrit/acceptance/GerritServer.java b/java/com/google/gerrit/acceptance/GerritServer.java
index 31a0584..2364f05 100644
--- a/java/com/google/gerrit/acceptance/GerritServer.java
+++ b/java/com/google/gerrit/acceptance/GerritServer.java
@@ -123,6 +123,11 @@
   @BindingAnnotation
   public @interface TestSshServerAddress {}
 
+  /** Marker on {@link InetSocketAddress} for test HTTP server. */
+  @Retention(RUNTIME)
+  @BindingAnnotation
+  public @interface TestHttpServerAddress {}
+
   @AutoValue
   public abstract static class Description {
     public static Description forTestClass(
@@ -655,6 +660,14 @@
                 ? SocketUtil.resolve(cfg.getString("sshd", null, "listenAddress"), 0)
                 : null;
           }
+
+          @Provides
+          @Singleton
+          @TestHttpServerAddress
+          InetSocketAddress getHttpAddress(@GerritServerConfig Config cfg) {
+            URI uri = URI.create(cfg.getString("httpd", null, "listenUrl"));
+            return new InetSocketAddress(uri.getHost(), uri.getPort());
+          }
         };
     return sysInjector.createChildInjector(module);
   }
diff --git a/java/com/google/gerrit/acceptance/GerritServerTestRule.java b/java/com/google/gerrit/acceptance/GerritServerTestRule.java
index 951840c..0138324 100644
--- a/java/com/google/gerrit/acceptance/GerritServerTestRule.java
+++ b/java/com/google/gerrit/acceptance/GerritServerTestRule.java
@@ -95,15 +95,16 @@
           // disable them using the command line flag.
           assume().that(SshMode.useSsh()).isTrue();
         }
-        statement.evaluate();
-        afterTest();
+        try (AutoCloseable ignored = GerritServerTestRule.this::afterTest) {
+          statement.evaluate();
+        }
       }
     };
   }
 
   public void afterTest() throws Exception {
     closeSsh();
-    if (!identity().equivalent(server, commonServer)) {
+    if (server != null && !identity().equivalent(server, commonServer)) {
       server.close();
       server = null;
     }
diff --git a/java/com/google/gerrit/acceptance/InProcessProtocol.java b/java/com/google/gerrit/acceptance/InProcessProtocol.java
index f81e523..16d49b5 100644
--- a/java/com/google/gerrit/acceptance/InProcessProtocol.java
+++ b/java/com/google/gerrit/acceptance/InProcessProtocol.java
@@ -231,8 +231,7 @@
       // have an easy way to run code when this instance is done being used.
       // Each operation is run in its own thread, so we don't need to recover
       // its original context anyway.
-      @SuppressWarnings("unused")
-      var unused = threadContext.setContext(req);
+      var _ = threadContext.setContext(req);
 
       current.set(req);
 
@@ -303,8 +302,7 @@
       // have an easy way to run code when this instance is done being used.
       // Each operation is run in its own thread, so we don't need to recover
       // its original context anyway.
-      @SuppressWarnings("unused")
-      var unused = threadContext.setContext(req);
+      var _ = threadContext.setContext(req);
 
       current.set(req);
       try {
diff --git a/java/com/google/gerrit/acceptance/ProjectResetter.java b/java/com/google/gerrit/acceptance/ProjectResetter.java
index 0da9d30..a85da54 100644
--- a/java/com/google/gerrit/acceptance/ProjectResetter.java
+++ b/java/com/google/gerrit/acceptance/ProjectResetter.java
@@ -334,8 +334,7 @@
   }
 
   private void deleteNewlyCreatedProjects() {
-    if (deleteNewProjects && repoManager instanceof InMemoryRepositoryManager) {
-      InMemoryRepositoryManager inMemoryRepoManager = (InMemoryRepositoryManager) repoManager;
+    if (deleteNewProjects && repoManager instanceof InMemoryRepositoryManager inMemoryRepoManager) {
       Sets.difference(inMemoryRepoManager.list(), savedProjectSet)
           .forEach(
               project -> {
diff --git a/java/com/google/gerrit/acceptance/PushOneCommit.java b/java/com/google/gerrit/acceptance/PushOneCommit.java
index 783ad86..34eae12 100644
--- a/java/com/google/gerrit/acceptance/PushOneCommit.java
+++ b/java/com/google/gerrit/acceptance/PushOneCommit.java
@@ -64,23 +64,27 @@
   public static final String FILE_NAME = "a.txt";
   public static final String FILE_CONTENT = "some content";
   public static final String PATCH_FILE_ONLY =
-      "diff --git a/a.txt b/a.txt\n"
-          + "new file mode 100644\n"
-          + "index 0000000..f0eec86\n"
-          + "--- /dev/null\n"
-          + "+++ b/a.txt\n"
-          + "@@ -0,0 +1 @@\n"
-          + "+some content\n"
-          + "\\ No newline at end of file\n";
+      """
+      diff --git a/a.txt b/a.txt
+      new file mode 100644
+      index 0000000..f0eec86
+      --- /dev/null
+      +++ b/a.txt
+      @@ -0,0 +1 @@
+      +some content
+      \\ No newline at end of file
+      """;
   public static final String PATCH =
-      "From %s Mon Sep 17 00:00:00 2001\n"
-          + "From: Administrator <admin@example.com>\n"
-          + "Date: %s\n"
-          + "Subject: [PATCH] test commit\n"
-          + "\n"
-          + "Change-Id: %s\n"
-          + "---\n"
-          + "\n"
+      """
+      From %s Mon Sep 17 00:00:00 2001
+      From: Administrator <admin@example.com>
+      Date: %s
+      Subject: [PATCH] test commit
+
+      Change-Id: %s
+      ---
+
+      """
           + PATCH_FILE_ONLY;
 
   public static class Module extends FactoryModule {
@@ -407,8 +411,7 @@
     }
     if (tag != null) {
       TagCommand tagCommand = testRepo.git().tag().setName(tag.name);
-      if (tag instanceof AnnotatedTag) {
-        AnnotatedTag annotatedTag = (AnnotatedTag) tag;
+      if (tag instanceof AnnotatedTag annotatedTag) {
         tagCommand
             .setAnnotated(true)
             .setMessage(annotatedTag.message)
diff --git a/java/com/google/gerrit/acceptance/SshSessionMina.java b/java/com/google/gerrit/acceptance/SshSessionMina.java
index 21c816c..31eeec7 100644
--- a/java/com/google/gerrit/acceptance/SshSessionMina.java
+++ b/java/com/google/gerrit/acceptance/SshSessionMina.java
@@ -79,8 +79,7 @@
 
   @Override
   public void open() throws Exception {
-    @SuppressWarnings("unused")
-    var unused = getMinaSession();
+    var _ = getMinaSession();
   }
 
   @Override
diff --git a/java/com/google/gerrit/acceptance/StandaloneSiteTest.java b/java/com/google/gerrit/acceptance/StandaloneSiteTest.java
index 01e705c..8c18765 100644
--- a/java/com/google/gerrit/acceptance/StandaloneSiteTest.java
+++ b/java/com/google/gerrit/acceptance/StandaloneSiteTest.java
@@ -76,8 +76,7 @@
 
       try {
         // ServerContext ctor is called multiple times but the group can be only created once
-        @SuppressWarnings("unused")
-        var unused = gApi.groups().id("Group");
+        var _ = gApi.groups().id("Group");
       } catch (ResourceNotFoundException e) {
         GroupInput in = new GroupInput();
         in.members = Collections.singletonList("admin");
diff --git a/java/com/google/gerrit/acceptance/testsuite/change/ChangeOperationsImpl.java b/java/com/google/gerrit/acceptance/testsuite/change/ChangeOperationsImpl.java
index 85e2ee7..3949ef6 100644
--- a/java/com/google/gerrit/acceptance/testsuite/change/ChangeOperationsImpl.java
+++ b/java/com/google/gerrit/acceptance/testsuite/change/ChangeOperationsImpl.java
@@ -681,15 +681,17 @@
     private PersonIdent getCommitter(RevCommit oldPatchsetCommit, Instant now) {
       PersonIdent oldPatchsetCommitter =
           Optional.ofNullable(oldPatchsetCommit.getCommitterIdent()).orElse(serverIdent);
-      if (asSeconds(now) == asSeconds(oldPatchsetCommitter.getWhenAsInstant())) {
-        /* We need to ensure that the resulting commit SHA-1 is different from the old patchset.
-         * In real situations, this automatically happens as two patchsets won't have exactly the
-         * same commit timestamp even when the tree and commit message are the same. In tests,
-         * we can easily end up with the same timestamp as Git uses second precision for timestamps.
-         * We could of course require that tests must use TestTimeUtil#setClockStep but
-         * that would be an unnecessary nuisance for test writers. Hence, go with a simple solution
-         * here and simply add a second. */
-        now = now.plusSeconds(1);
+      Instant oldPatchsetTimestamp = oldPatchsetCommitter.getWhenAsInstant();
+      if (asSeconds(now) <= asSeconds(oldPatchsetTimestamp)) {
+        /* We need to ensure that the resulting commit SHA-1 is different from all previous
+         * patchsets. In real situations, this automatically happens as two patchsets won't have
+         * exactly the same commit timestamp even when the tree and commit message are the same. In
+         * tests, we can easily end up with the same timestamp as Git uses second precision for
+         * timestamps, and a previous patchset may already have been bumped ahead of wall-clock
+         * time. We could of course require that tests must use TestTimeUtil#setClockStep but that
+         * would be an unnecessary nuisance for test writers. Hence, go with a simple solution here
+         * and advance one second past the previous patchset's timestamp. */
+        now = oldPatchsetTimestamp.plusSeconds(1);
       }
       return new PersonIdent(oldPatchsetCommitter, now);
     }
diff --git a/java/com/google/gerrit/acceptance/testsuite/change/IndexOperations.java b/java/com/google/gerrit/acceptance/testsuite/change/IndexOperations.java
index cba9b15..2975fa4 100644
--- a/java/com/google/gerrit/acceptance/testsuite/change/IndexOperations.java
+++ b/java/com/google/gerrit/acceptance/testsuite/change/IndexOperations.java
@@ -62,9 +62,8 @@
 
       return () -> {
         ChangeIndex maybeEnabledSearchIndex = indices.getSearchIndex();
-        if (maybeEnabledSearchIndex instanceof DisabledChangeIndex) {
-          indices.setSearchIndex(
-              ((DisabledChangeIndex) maybeEnabledSearchIndex).unwrap(), /* closeOld */ false);
+        if (maybeEnabledSearchIndex instanceof DisabledChangeIndex disabledChangeIndex) {
+          indices.setSearchIndex(disabledChangeIndex.unwrap(), /* closeOld */ false);
         }
       };
     }
@@ -78,8 +77,8 @@
       }
       return () -> {
         for (ChangeIndex i : indices.getWriteIndexes()) {
-          if (i instanceof DisabledChangeIndex) {
-            indices.addWriteIndex(((DisabledChangeIndex) i).unwrap());
+          if (i instanceof DisabledChangeIndex disabledChangeIndex) {
+            indices.addWriteIndex(disabledChangeIndex.unwrap());
           }
         }
       };
@@ -99,9 +98,8 @@
 
       return () -> {
         AccountIndex maybeEnabledSearchIndex = indices.getSearchIndex();
-        if (maybeEnabledSearchIndex instanceof DisabledAccountIndex) {
-          indices.setSearchIndex(
-              ((DisabledAccountIndex) maybeEnabledSearchIndex).unwrap(), /* closeOld */ false);
+        if (maybeEnabledSearchIndex instanceof DisabledAccountIndex disabledAccountIndex) {
+          indices.setSearchIndex(disabledAccountIndex.unwrap(), /* closeOld */ false);
         }
       };
     }
@@ -115,8 +113,8 @@
       }
       return () -> {
         for (AccountIndex i : indices.getWriteIndexes()) {
-          if (i instanceof DisabledAccountIndex) {
-            indices.addWriteIndex(((DisabledAccountIndex) i).unwrap());
+          if (i instanceof DisabledAccountIndex disabledAccountIndex) {
+            indices.addWriteIndex(disabledAccountIndex.unwrap());
           }
         }
       };
@@ -136,9 +134,8 @@
 
       return () -> {
         ProjectIndex maybeEnabledSearchIndex = indices.getSearchIndex();
-        if (maybeEnabledSearchIndex instanceof DisabledProjectIndex) {
-          indices.setSearchIndex(
-              ((DisabledProjectIndex) maybeEnabledSearchIndex).unwrap(), /* closeOld */ false);
+        if (maybeEnabledSearchIndex instanceof DisabledProjectIndex disabledProjectIndex) {
+          indices.setSearchIndex(disabledProjectIndex.unwrap(), /* closeOld */ false);
         }
       };
     }
@@ -152,8 +149,8 @@
       }
       return () -> {
         for (ProjectIndex i : indices.getWriteIndexes()) {
-          if (i instanceof DisabledProjectIndex) {
-            indices.addWriteIndex(((DisabledProjectIndex) i).unwrap());
+          if (i instanceof DisabledProjectIndex disabledProjectIndex) {
+            indices.addWriteIndex(disabledProjectIndex.unwrap());
           }
         }
       };
diff --git a/java/com/google/gerrit/acceptance/testsuite/request/RequestScopeOperationsImpl.java b/java/com/google/gerrit/acceptance/testsuite/request/RequestScopeOperationsImpl.java
index 03336ca..472a8b9 100644
--- a/java/com/google/gerrit/acceptance/testsuite/request/RequestScopeOperationsImpl.java
+++ b/java/com/google/gerrit/acceptance/testsuite/request/RequestScopeOperationsImpl.java
@@ -104,13 +104,13 @@
     // The ManualRequestContext stores the previous context. When the close() method is called,
     // the old context is restored.
     RequestContext oldContext = localContext.getContext();
-    if (oldContext instanceof ManualRequestContext) {
-      ((ManualRequestContext) oldContext).close();
+    if (oldContext instanceof ManualRequestContext manualRequestContext) {
+      manualRequestContext.close();
     }
     // The created object is not used, because the constructor of the ManualRequestContext sets the
     // active context to itself. It is not needed to explicitly call localContext.setContext after
     // an instance is created.
-    var unused = new ManualRequestContext(newUser, localContext);
+    var _ = new ManualRequestContext(newUser, localContext);
   }
 
   private IdentifiedUser createIdentifiedUser(Account.Id accountId) {
diff --git a/java/com/google/gerrit/asciidoctor/AsciiDoctor.java b/java/com/google/gerrit/asciidoctor/AsciiDoctor.java
index 25ed813..709d68a 100644
--- a/java/com/google/gerrit/asciidoctor/AsciiDoctor.java
+++ b/java/com/google/gerrit/asciidoctor/AsciiDoctor.java
@@ -30,11 +30,11 @@
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipOutputStream;
 import org.asciidoctor.Asciidoctor;
+import org.asciidoctor.Attributes;
 import org.asciidoctor.AttributesBuilder;
 import org.asciidoctor.Options;
 import org.asciidoctor.OptionsBuilder;
 import org.asciidoctor.SafeMode;
-import org.asciidoctor.internal.JRubyAsciidoctor;
 import org.kohsuke.args4j.Argument;
 import org.kohsuke.args4j.CmdLineException;
 import org.kohsuke.args4j.CmdLineParser;
@@ -99,7 +99,7 @@
   }
 
   private Options createOptions(File base, File outputFile) {
-    OptionsBuilder optionsBuilder = OptionsBuilder.options();
+    OptionsBuilder optionsBuilder = Options.builder();
 
     optionsBuilder
         .backend(backend)
@@ -109,14 +109,14 @@
         .baseDir(base)
         .toFile(outputFile);
 
-    AttributesBuilder attributesBuilder = AttributesBuilder.attributes();
-    attributesBuilder.attributes(getAttributes());
+    AttributesBuilder attributesBuilder = Attributes.builder();
+    getAttributes().forEach(attributesBuilder::attribute);
     if (revnumber != null) {
       attributesBuilder.attribute(REVNUMBER_NAME, revnumber);
     }
-    optionsBuilder.attributes(attributesBuilder.get());
+    optionsBuilder.attributes(attributesBuilder.build());
 
-    return optionsBuilder.get();
+    return optionsBuilder.build();
   }
 
   private Map<String, Object> getAttributes() {
@@ -176,7 +176,7 @@
   }
 
   private void renderFiles(List<String> inputFiles, ZipOutputStream zip) throws IOException {
-    Asciidoctor asciidoctor = JRubyAsciidoctor.create();
+    Asciidoctor asciidoctor = Asciidoctor.Factory.create();
     for (String inputFile : inputFiles) {
       String outName = mapInFileToOutFile(inputFile, inExt, outExt);
       File out = bazel ? new File(outName) : new File(tmpdir, outName);
@@ -185,7 +185,7 @@
       }
       File input = new File(inputFile);
       Options options = createOptions(basedir != null ? basedir : input.getParentFile(), out);
-      asciidoctor.renderFile(input, options);
+      asciidoctor.convertFile(input, options);
       if (zip != null) {
         zipFile(out, outName, zip);
       }
diff --git a/java/com/google/gerrit/asciidoctor/BUILD b/java/com/google/gerrit/asciidoctor/BUILD
index a132095..7e77475 100644
--- a/java/com/google/gerrit/asciidoctor/BUILD
+++ b/java/com/google/gerrit/asciidoctor/BUILD
@@ -2,6 +2,10 @@
 
 java_binary(
     name = "asciidoc",
+    jvm_flags = [
+        "--enable-native-access=ALL-UNNAMED",
+        "--sun-misc-unsafe-memory-access=allow",
+    ],
     main_class = "com.google.gerrit.asciidoctor.AsciiDoctor",
     visibility = ["//visibility:public"],
     runtime_deps = [":asciidoc_lib"],
@@ -20,6 +24,10 @@
 
 java_binary(
     name = "doc_indexer",
+    jvm_flags = [
+        "--enable-native-access=ALL-UNNAMED",
+        "--sun-misc-unsafe-memory-access=allow",
+    ],
     main_class = "com.google.gerrit.asciidoctor.DocIndexer",
     visibility = ["//visibility:public"],
     runtime_deps = [":doc_indexer_lib"],
diff --git a/java/com/google/gerrit/auth/ldap/Helper.java b/java/com/google/gerrit/auth/ldap/Helper.java
index 53e8ac5..0cc81f0 100644
--- a/java/com/google/gerrit/auth/ldap/Helper.java
+++ b/java/com/google/gerrit/auth/ldap/Helper.java
@@ -36,8 +36,6 @@
 import com.google.inject.Singleton;
 import com.google.inject.name.Named;
 import java.io.IOException;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
@@ -45,6 +43,7 @@
 import java.util.List;
 import java.util.Properties;
 import java.util.Set;
+import java.util.concurrent.CompletionException;
 import java.util.concurrent.TimeUnit;
 import javax.naming.CompositeName;
 import javax.naming.Context;
@@ -229,18 +228,18 @@
   private DirContext kerberosOpen(Properties env)
       throws IOException, LoginException, NamingException {
     LoginContext ctx = new LoginContext("KerberosLogin");
-    try (Timer0.Context ignored = loginLatencyTimer.start()) {
+    try (Timer0.Context _ = loginLatencyTimer.start()) {
       ctx.login();
     }
     Subject subject = ctx.getSubject();
     try {
-      return Subject.doAs(
-          subject, (PrivilegedExceptionAction<DirContext>) () -> createContext(env));
-    } catch (PrivilegedActionException e) {
-      Throwables.throwIfInstanceOf(e.getException(), IOException.class);
-      Throwables.throwIfInstanceOf(e.getException(), NamingException.class);
-      Throwables.throwIfInstanceOf(e.getException(), RuntimeException.class);
-      logger.atWarning().withCause(e.getException()).log("Internal error");
+      return Subject.callAs(subject, () -> createContext(env));
+    } catch (CompletionException e) {
+      Throwable cause = e.getCause();
+      Throwables.throwIfInstanceOf(cause, IOException.class);
+      Throwables.throwIfInstanceOf(cause, NamingException.class);
+      Throwables.throwIfInstanceOf(cause, RuntimeException.class);
+      logger.atWarning().withCause(cause).log("Internal error");
       return null;
     } finally {
       ctx.logout();
@@ -249,7 +248,7 @@
 
   DirContext authenticate(String dn, String password) throws AccountException {
     final Properties env = createContextProperties();
-    try (Timer0.Context ignored = loginLatencyTimer.start()) {
+    try (Timer0.Context _ = loginLatencyTimer.start()) {
       env.put(Context.REFERRAL, referral);
 
       if (!supportAnonymous) {
@@ -331,7 +330,7 @@
 
       for (LdapQuery groupMemberQuery : schema.groupMemberQueryList) {
         for (LdapQuery.Result r : groupMemberQuery.query(ctx, params, groupSearchLatencyTimer)) {
-          try (Timer0.Context ignored = groupExpansionLatencyTimer.start()) {
+          try (Timer0.Context _ = groupExpansionLatencyTimer.start()) {
             recursivelyExpandGroups(groupDNs, schema, ctx, r.getDN());
           }
         }
@@ -353,7 +352,7 @@
         try {
           while (groups.hasMore()) {
             final String nextDN = (String) groups.next();
-            try (Timer0.Context ignored = groupExpansionLatencyTimer.start()) {
+            try (Timer0.Context _ = groupExpansionLatencyTimer.start()) {
               recursivelyExpandGroups(groupDNs, schema, ctx, nextDN);
             }
           }
@@ -374,6 +373,7 @@
     return ImmutableSet.copyOf(actual);
   }
 
+  @SuppressWarnings("BanJNDI") // LDAP access is inherently JNDI-based.
   private void recursivelyExpandGroups(
       final Set<String> groupDNs,
       final LdapSchema schema,
diff --git a/java/com/google/gerrit/auth/ldap/LdapQuery.java b/java/com/google/gerrit/auth/ldap/LdapQuery.java
index 71dc141..7b4ddec 100644
--- a/java/com/google/gerrit/auth/ldap/LdapQuery.java
+++ b/java/com/google/gerrit/auth/ldap/LdapQuery.java
@@ -63,6 +63,7 @@
     return pattern.getParameterNames();
   }
 
+  @SuppressWarnings("BanJNDI") // LDAP access is inherently JNDI-based.
   List<Result> query(DirContext ctx, Map<String, String> params, Timer0 queryTimer)
       throws NamingException {
     final SearchControls sc = new SearchControls();
@@ -70,7 +71,7 @@
 
     sc.setSearchScope(searchScope.scope());
     sc.setReturningAttributes(returnAttributes);
-    try (Timer0.Context ignored = queryTimer.start()) {
+    try (Timer0.Context _ = queryTimer.start()) {
       res = ctx.search(base, pattern.getRawPattern(), pattern.bind(params), sc);
     }
     try {
diff --git a/java/com/google/gerrit/auth/ldap/LdapRealm.java b/java/com/google/gerrit/auth/ldap/LdapRealm.java
index e33e5cb..de9b6b3 100644
--- a/java/com/google/gerrit/auth/ldap/LdapRealm.java
+++ b/java/com/google/gerrit/auth/ldap/LdapRealm.java
@@ -332,8 +332,7 @@
     try {
       Helper.LdapSchema schema = helper.getSchema(ctx);
 
-      @SuppressWarnings("unused")
-      var unused = helper.findAccount(schema, ctx, username, false);
+      var _ = helper.findAccount(schema, ctx, username, false);
 
       return true;
     } catch (NoSuchUserException e) {
@@ -407,6 +406,7 @@
       this.helper = helper;
     }
 
+    @SuppressWarnings("BanJNDI") // LDAP access is inherently JNDI-based.
     @Override
     public Boolean load(String groupDn) throws Exception {
       try (TraceTimer timer =
diff --git a/java/com/google/gerrit/auth/ldap/LdapType.java b/java/com/google/gerrit/auth/ldap/LdapType.java
index c486335..fbc0118 100644
--- a/java/com/google/gerrit/auth/ldap/LdapType.java
+++ b/java/com/google/gerrit/auth/ldap/LdapType.java
@@ -22,6 +22,7 @@
 abstract class LdapType {
   static final LdapType RFC_2307 = new Rfc2307();
 
+  @SuppressWarnings("BanJNDI") // LDAP access is inherently JNDI-based.
   static LdapType guessType(DirContext ctx) throws NamingException {
     final Attributes rootAtts = ctx.getAttributes("");
     Attribute supported = rootAtts.get("supportedCapabilities");
diff --git a/java/com/google/gerrit/auth/oauth/OAuthTokenRevoker.java b/java/com/google/gerrit/auth/oauth/OAuthTokenRevoker.java
index a614237..84f5899 100644
--- a/java/com/google/gerrit/auth/oauth/OAuthTokenRevoker.java
+++ b/java/com/google/gerrit/auth/oauth/OAuthTokenRevoker.java
@@ -140,7 +140,7 @@
     revokedListeners.runEach(OAuthTokenRevokedListener::onAllTokensRevoked);
     int processed = 0;
     for (Account.Id id : tokenCache.accountsWithCachedToken()) {
-      var unused = revoke(id, /* notifySingle= */ false);
+      var _ = revoke(id, /* notifySingle= */ false);
       processed++;
     }
     // Disk-only entries are not enumerated above; purge them locally (they cannot be revoked
diff --git a/java/com/google/gerrit/common/PluginData.java b/java/com/google/gerrit/common/PluginData.java
index 289d93a..0ad3074 100644
--- a/java/com/google/gerrit/common/PluginData.java
+++ b/java/com/google/gerrit/common/PluginData.java
@@ -30,8 +30,7 @@
 
   @Override
   public boolean equals(Object obj) {
-    if (obj instanceof PluginData) {
-      PluginData o = (PluginData) obj;
+    if (obj instanceof PluginData o) {
       return Objects.equals(name, o.name)
           && Objects.equals(version, o.version)
           && Objects.equals(pluginPath, o.pluginPath);
diff --git a/java/com/google/gerrit/entities/Address.java b/java/com/google/gerrit/entities/Address.java
index eb1da46..4e398fe 100644
--- a/java/com/google/gerrit/entities/Address.java
+++ b/java/com/google/gerrit/entities/Address.java
@@ -76,8 +76,8 @@
 
   @Override
   public final boolean equals(Object other) {
-    if (other instanceof Address) {
-      return email().equals(((Address) other).email());
+    if (other instanceof Address a) {
+      return email().equals(a.email());
     }
     return false;
   }
diff --git a/java/com/google/gerrit/entities/ChangeMessage.java b/java/com/google/gerrit/entities/ChangeMessage.java
index fab266c..5933ecf 100644
--- a/java/com/google/gerrit/entities/ChangeMessage.java
+++ b/java/com/google/gerrit/entities/ChangeMessage.java
@@ -126,10 +126,9 @@
 
   @Override
   public boolean equals(Object o) {
-    if (!(o instanceof ChangeMessage)) {
+    if (!(o instanceof ChangeMessage m)) {
       return false;
     }
-    ChangeMessage m = (ChangeMessage) o;
     return Objects.equals(key, m.key)
         && Objects.equals(author, m.author)
         && Objects.equals(writtenOn, m.writtenOn)
diff --git a/java/com/google/gerrit/entities/Comment.java b/java/com/google/gerrit/entities/Comment.java
index 3a331c3..9451278 100644
--- a/java/com/google/gerrit/entities/Comment.java
+++ b/java/com/google/gerrit/entities/Comment.java
@@ -89,8 +89,7 @@
 
     @Override
     public boolean equals(Object o) {
-      if (o instanceof Key) {
-        Key k = (Key) o;
+      if (o instanceof Key k) {
         return Objects.equals(uuid, k.uuid)
             && Objects.equals(filename, k.filename)
             && patchSetId == k.patchSetId;
@@ -117,8 +116,8 @@
 
     @Override
     public boolean equals(Object o) {
-      if (o instanceof Identity) {
-        return id == ((Identity) o).id;
+      if (o instanceof Identity identity) {
+        return id == identity.id;
       }
       return false;
     }
@@ -183,8 +182,7 @@
 
     @Override
     public boolean equals(Object o) {
-      if (o instanceof Range) {
-        Range r = (Range) o;
+      if (o instanceof Range r) {
         return startLine == r.startLine
             && startChar == r.startChar
             && endLine == r.endLine
@@ -365,10 +363,9 @@
 
   @Override
   public boolean equals(Object o) {
-    if (!(o instanceof Comment)) {
+    if (!(o instanceof Comment c)) {
       return false;
     }
-    Comment c = (Comment) o;
     return Objects.equals(key, c.key)
         && lineNbr == c.lineNbr
         && Objects.equals(author, c.author)
diff --git a/java/com/google/gerrit/entities/CommentRange.java b/java/com/google/gerrit/entities/CommentRange.java
index f58780f..111a22b 100644
--- a/java/com/google/gerrit/entities/CommentRange.java
+++ b/java/com/google/gerrit/entities/CommentRange.java
@@ -72,8 +72,7 @@
 
   @Override
   public boolean equals(Object obj) {
-    if (obj instanceof CommentRange) {
-      CommentRange other = (CommentRange) obj;
+    if (obj instanceof CommentRange other) {
       return startLine == other.startLine
           && startCharacter == other.startCharacter
           && endLine == other.endLine
diff --git a/java/com/google/gerrit/entities/ConfiguredMimeTypes.java b/java/com/google/gerrit/entities/ConfiguredMimeTypes.java
index 6ba89c9..b8ba9df 100644
--- a/java/com/google/gerrit/entities/ConfiguredMimeTypes.java
+++ b/java/com/google/gerrit/entities/ConfiguredMimeTypes.java
@@ -109,10 +109,9 @@
 
     @Override
     public boolean equals(Object o) {
-      if (!(o instanceof FnType)) {
+      if (!(o instanceof FnType other)) {
         return false;
       }
-      FnType other = (FnType) o;
       return Objects.equals(other.getType(), getType())
           && Objects.equals(other.getPattern(), getPattern());
     }
@@ -138,10 +137,9 @@
 
     @Override
     public boolean equals(Object o) {
-      if (!(o instanceof ReType)) {
+      if (!(o instanceof ReType other)) {
         return false;
       }
-      ReType other = (ReType) o;
       return Objects.equals(other.getType(), getType())
           && Objects.equals(other.getPattern(), getPattern());
     }
diff --git a/java/com/google/gerrit/entities/EmailHeader.java b/java/com/google/gerrit/entities/EmailHeader.java
index a9b6c80..a3f2dca 100644
--- a/java/com/google/gerrit/entities/EmailHeader.java
+++ b/java/com/google/gerrit/entities/EmailHeader.java
@@ -65,8 +65,7 @@
 
     @Override
     public boolean equals(Object o) {
-      return (o instanceof StringEmailHeader)
-          && Objects.equals(value, ((StringEmailHeader) o).value);
+      return (o instanceof StringEmailHeader h) && Objects.equals(value, h.value);
     }
 
     @Override
@@ -157,7 +156,7 @@
 
     @Override
     public boolean equals(Object o) {
-      return (o instanceof Date) && Objects.equals(value, ((Date) o).value);
+      return (o instanceof Date d) && Objects.equals(value, d.value);
     }
 
     @Override
@@ -223,7 +222,7 @@
 
     @Override
     public boolean equals(Object o) {
-      return (o instanceof AddressList) && Objects.equals(list, ((AddressList) o).list);
+      return (o instanceof AddressList a) && Objects.equals(list, a.list);
     }
 
     @Override
diff --git a/java/com/google/gerrit/entities/FixReplacement.java b/java/com/google/gerrit/entities/FixReplacement.java
index 7a51ac1..2bb7ef2 100644
--- a/java/com/google/gerrit/entities/FixReplacement.java
+++ b/java/com/google/gerrit/entities/FixReplacement.java
@@ -52,10 +52,9 @@
 
   @Override
   public boolean equals(Object o) {
-    if (!(o instanceof FixReplacement)) {
+    if (!(o instanceof FixReplacement f)) {
       return false;
     }
-    FixReplacement f = (FixReplacement) o;
     return Objects.equals(path, f.path)
         && Objects.equals(range, f.range)
         && Objects.equals(replacement, f.replacement);
diff --git a/java/com/google/gerrit/entities/FixSuggestion.java b/java/com/google/gerrit/entities/FixSuggestion.java
index 7190daf..80012ca 100644
--- a/java/com/google/gerrit/entities/FixSuggestion.java
+++ b/java/com/google/gerrit/entities/FixSuggestion.java
@@ -57,10 +57,9 @@
 
   @Override
   public boolean equals(Object o) {
-    if (!(o instanceof FixSuggestion)) {
+    if (!(o instanceof FixSuggestion fs)) {
       return false;
     }
-    FixSuggestion fs = (FixSuggestion) o;
     return Objects.equals(fixId, fs.fixId)
         && Objects.equals(description, fs.description)
         && Objects.equals(replacements, fs.replacements);
diff --git a/java/com/google/gerrit/entities/GroupReference.java b/java/com/google/gerrit/entities/GroupReference.java
index 125153e..aeca8b4 100644
--- a/java/com/google/gerrit/entities/GroupReference.java
+++ b/java/com/google/gerrit/entities/GroupReference.java
@@ -87,7 +87,7 @@
 
   @Override
   public final boolean equals(Object o) {
-    return o instanceof GroupReference && compareTo((GroupReference) o) == 0;
+    return o instanceof GroupReference g && compareTo(g) == 0;
   }
 
   @Override
diff --git a/java/com/google/gerrit/entities/HumanComment.java b/java/com/google/gerrit/entities/HumanComment.java
index 7ef9609..3b31c31 100644
--- a/java/com/google/gerrit/entities/HumanComment.java
+++ b/java/com/google/gerrit/entities/HumanComment.java
@@ -97,13 +97,12 @@
 
   @Override
   public boolean equals(Object otherObject) {
-    if (!(otherObject instanceof HumanComment)) {
+    if (!(otherObject instanceof HumanComment otherComment)) {
       return false;
     }
     if (!super.equals(otherObject)) {
       return false;
     }
-    HumanComment otherComment = (HumanComment) otherObject;
     return unresolved == otherComment.unresolved;
   }
 
diff --git a/java/com/google/gerrit/entities/ImmutableConfig.java b/java/com/google/gerrit/entities/ImmutableConfig.java
index 83a44d1..d92759f 100644
--- a/java/com/google/gerrit/entities/ImmutableConfig.java
+++ b/java/com/google/gerrit/entities/ImmutableConfig.java
@@ -78,10 +78,10 @@
 
   @Override
   public boolean equals(Object o) {
-    if (!(o instanceof ImmutableConfig)) {
+    if (!(o instanceof ImmutableConfig c)) {
       return false;
     }
-    return ((ImmutableConfig) o).stringCfg.equals(stringCfg);
+    return c.stringCfg.equals(stringCfg);
   }
 
   @Override
diff --git a/java/com/google/gerrit/entities/LabelTypes.java b/java/com/google/gerrit/entities/LabelTypes.java
index 5807190..f2593eb 100644
--- a/java/com/google/gerrit/entities/LabelTypes.java
+++ b/java/com/google/gerrit/entities/LabelTypes.java
@@ -98,8 +98,7 @@
     if (this == o) {
       return true;
     }
-    if (o instanceof LabelTypes) {
-      LabelTypes other = (LabelTypes) o;
+    if (o instanceof LabelTypes other) {
       return labelTypes.equals(other.labelTypes);
     }
     return false;
diff --git a/java/com/google/gerrit/entities/NotifyConfig.java b/java/com/google/gerrit/entities/NotifyConfig.java
index 42baebc..a970698 100644
--- a/java/com/google/gerrit/entities/NotifyConfig.java
+++ b/java/com/google/gerrit/entities/NotifyConfig.java
@@ -120,8 +120,8 @@
 
   @Override
   public final boolean equals(Object obj) {
-    if (obj instanceof NotifyConfig) {
-      return compareTo((NotifyConfig) obj) == 0;
+    if (obj instanceof NotifyConfig notifyConfig) {
+      return compareTo(notifyConfig) == 0;
     }
     return false;
   }
diff --git a/java/com/google/gerrit/entities/PatchSetApproval.java b/java/com/google/gerrit/entities/PatchSetApproval.java
index f78167b..bb124f7 100644
--- a/java/com/google/gerrit/entities/PatchSetApproval.java
+++ b/java/com/google/gerrit/entities/PatchSetApproval.java
@@ -72,7 +72,7 @@
   }
 
   public static Builder builder() {
-    return new AutoValue_PatchSetApproval.Builder().postSubmit(false).copied(false);
+    return new AutoValue_PatchSetApproval.Builder().postSubmit(false).copied(false).isAi(false);
   }
 
   @AutoValue.Builder
@@ -92,6 +92,8 @@
 
     public abstract Builder uuid(UUID uuid);
 
+    public abstract Optional<UUID> uuid();
+
     public abstract Builder value(short value);
 
     public Builder value(int value) {
@@ -112,6 +114,12 @@
 
     public abstract Builder copied(boolean isCopied);
 
+    public abstract boolean copied();
+
+    public abstract Builder isAi(boolean isAi);
+
+    public abstract boolean isAi();
+
     abstract PatchSetApproval autoBuild();
 
     public PatchSetApproval build() {
@@ -155,6 +163,8 @@
 
   public abstract boolean copied();
 
+  public abstract boolean isAi();
+
   public abstract Builder toBuilder();
 
   /**
diff --git a/java/com/google/gerrit/entities/Permission.java b/java/com/google/gerrit/entities/Permission.java
index c212f0c..36659f7 100644
--- a/java/com/google/gerrit/entities/Permission.java
+++ b/java/com/google/gerrit/entities/Permission.java
@@ -38,6 +38,7 @@
   public static final String CREATE_TAG = "createTag";
   public static final String DELETE = "delete";
   public static final String DELETE_CHANGES = "deleteChanges";
+  public static final String DELETE_COMMENT = "deleteComment";
   public static final String DELETE_OWN_CHANGES = "deleteOwnChanges";
   public static final String EDIT_CUSTOM_KEYED_VALUES = "editCustomKeyedValues";
   public static final String EDIT_HASHTAGS = "editHashtags";
@@ -60,7 +61,6 @@
   public static final String SUBMIT = "submit";
   public static final String SUBMIT_AS = "submitAs";
   public static final String TOGGLE_WORK_IN_PROGRESS_STATE = "toggleWipState";
-  public static final String POST_REVIEW_COMMENT = "postReviewComment";
   public static final String VIEW_PRIVATE_CHANGES = "viewPrivateChanges";
   public static final String AI_REVIEW = "aiReview";
 
@@ -80,6 +80,7 @@
     NAMES_LC.add(CREATE_TAG.toLowerCase(Locale.US));
     NAMES_LC.add(DELETE.toLowerCase(Locale.US));
     NAMES_LC.add(DELETE_CHANGES.toLowerCase(Locale.US));
+    NAMES_LC.add(DELETE_COMMENT.toLowerCase(Locale.US));
     NAMES_LC.add(DELETE_OWN_CHANGES.toLowerCase(Locale.US));
     NAMES_LC.add(EDIT_CUSTOM_KEYED_VALUES.toLowerCase(Locale.US));
     NAMES_LC.add(EDIT_HASHTAGS.toLowerCase(Locale.US));
@@ -100,7 +101,6 @@
     NAMES_LC.add(SUBMIT.toLowerCase(Locale.US));
     NAMES_LC.add(SUBMIT_AS.toLowerCase(Locale.US));
     NAMES_LC.add(TOGGLE_WORK_IN_PROGRESS_STATE.toLowerCase(Locale.US));
-    NAMES_LC.add(POST_REVIEW_COMMENT.toLowerCase(Locale.US));
     NAMES_LC.add(VIEW_PRIVATE_CHANGES.toLowerCase(Locale.US));
     NAMES_LC.add(AI_REVIEW.toLowerCase(Locale.US));
 
diff --git a/java/com/google/gerrit/entities/Project.java b/java/com/google/gerrit/entities/Project.java
index a1ccc18..fdfc2a5 100644
--- a/java/com/google/gerrit/entities/Project.java
+++ b/java/com/google/gerrit/entities/Project.java
@@ -84,8 +84,8 @@
     }
 
     default boolean projectNameEquals(Object b) {
-      if (b instanceof NameKey) {
-        return name().equals(((NameKey) b).get());
+      if (b instanceof NameKey nameKey) {
+        return name().equals(nameKey.get());
       }
       return false;
     }
diff --git a/java/com/google/gerrit/entities/SubmitRecord.java b/java/com/google/gerrit/entities/SubmitRecord.java
index 4142b42..d92041a 100644
--- a/java/com/google/gerrit/entities/SubmitRecord.java
+++ b/java/com/google/gerrit/entities/SubmitRecord.java
@@ -139,8 +139,7 @@
 
     @Override
     public boolean equals(Object o) {
-      if (o instanceof Label) {
-        Label l = (Label) o;
+      if (o instanceof Label l) {
         return Objects.equals(label, l.label)
             && Objects.equals(status, l.status)
             && Objects.equals(appliedBy, l.appliedBy);
@@ -201,8 +200,7 @@
 
   @Override
   public boolean equals(Object o) {
-    if (o instanceof SubmitRecord) {
-      SubmitRecord r = (SubmitRecord) o;
+    if (o instanceof SubmitRecord r) {
       return Objects.equals(status, r.status)
           && Objects.equals(labels, r.labels)
           && Objects.equals(errorMessage, r.errorMessage)
diff --git a/java/com/google/gerrit/entities/SubmoduleSubscription.java b/java/com/google/gerrit/entities/SubmoduleSubscription.java
index db26eb3..4f4d78d 100644
--- a/java/com/google/gerrit/entities/SubmoduleSubscription.java
+++ b/java/com/google/gerrit/entities/SubmoduleSubscription.java
@@ -55,8 +55,7 @@
 
   @Override
   public boolean equals(Object o) {
-    if (o instanceof SubmoduleSubscription) {
-      SubmoduleSubscription s = (SubmoduleSubscription) o;
+    if (o instanceof SubmoduleSubscription s) {
       return superProject.equals(s.superProject)
           && submodulePath.equals(s.submodulePath)
           && submodule.equals(s.submodule);
diff --git a/java/com/google/gerrit/entities/converter/PatchSetApprovalProtoConverter.java b/java/com/google/gerrit/entities/converter/PatchSetApprovalProtoConverter.java
index e8ef346..5ac5fcc 100644
--- a/java/com/google/gerrit/entities/converter/PatchSetApprovalProtoConverter.java
+++ b/java/com/google/gerrit/entities/converter/PatchSetApprovalProtoConverter.java
@@ -44,6 +44,9 @@
 
     patchSetApproval.uuid().ifPresent(uuid -> builder.setUuid(uuid.get()));
     patchSetApproval.tag().ifPresent(builder::setTag);
+    if (patchSetApproval.isAi()) {
+      builder.setIsAi(true);
+    }
     Account.Id realAccountId = patchSetApproval.realAccountId();
     // PatchSetApproval#getRealAccountId automatically delegates to PatchSetApproval#getAccountId if
     // the real author is not set. However, the previous protobuf representation kept
@@ -64,7 +67,8 @@
             .value(proto.getValue())
             .granted(Instant.ofEpochMilli(proto.getGranted()))
             .postSubmit(proto.getPostSubmit())
-            .copied(proto.getCopied());
+            .copied(proto.getCopied())
+            .isAi(proto.getIsAi());
     if (proto.hasUuid()) {
       builder.uuid(PatchSetApproval.uuid(proto.getUuid()));
     }
diff --git a/java/com/google/gerrit/extensions/BUILD b/java/com/google/gerrit/extensions/BUILD
index 9a7db2a..014d53d 100644
--- a/java/com/google/gerrit/extensions/BUILD
+++ b/java/com/google/gerrit/extensions/BUILD
@@ -5,7 +5,7 @@
 
 JGIT_DOC_URL = "https://archive.eclipse.org/jgit/site/" + _DOC_VERS + "/apidocs"
 
-GUAVA_VERSION = "33.5.0-jre"
+GUAVA_VERSION = "33.8.0-jre"
 
 GUAVA_DOC_URL = "https://guava.dev/releases/" + GUAVA_VERSION + "/api/docs/"
 
diff --git a/java/com/google/gerrit/extensions/api/access/AccessSectionInfo.java b/java/com/google/gerrit/extensions/api/access/AccessSectionInfo.java
index 7c47ec5..03a92ce 100644
--- a/java/com/google/gerrit/extensions/api/access/AccessSectionInfo.java
+++ b/java/com/google/gerrit/extensions/api/access/AccessSectionInfo.java
@@ -22,8 +22,8 @@
 
   @Override
   public boolean equals(Object obj) {
-    if (obj instanceof AccessSectionInfo) {
-      return Objects.equals(permissions, ((AccessSectionInfo) obj).permissions);
+    if (obj instanceof AccessSectionInfo accessSectionInfo) {
+      return Objects.equals(permissions, accessSectionInfo.permissions);
     }
     return false;
   }
diff --git a/java/com/google/gerrit/extensions/api/access/PermissionInfo.java b/java/com/google/gerrit/extensions/api/access/PermissionInfo.java
index c4808a5..0df7027 100644
--- a/java/com/google/gerrit/extensions/api/access/PermissionInfo.java
+++ b/java/com/google/gerrit/extensions/api/access/PermissionInfo.java
@@ -28,8 +28,7 @@
 
   @Override
   public boolean equals(Object obj) {
-    if (obj instanceof PermissionInfo) {
-      PermissionInfo p = (PermissionInfo) obj;
+    if (obj instanceof PermissionInfo p) {
       return Objects.equals(label, p.label)
           && Objects.equals(exclusive, p.exclusive)
           && Objects.equals(rules, p.rules);
diff --git a/java/com/google/gerrit/extensions/api/access/PermissionRuleInfo.java b/java/com/google/gerrit/extensions/api/access/PermissionRuleInfo.java
index f979039..a10771e 100644
--- a/java/com/google/gerrit/extensions/api/access/PermissionRuleInfo.java
+++ b/java/com/google/gerrit/extensions/api/access/PermissionRuleInfo.java
@@ -36,8 +36,7 @@
 
   @Override
   public boolean equals(Object obj) {
-    if (obj instanceof PermissionRuleInfo) {
-      PermissionRuleInfo p = (PermissionRuleInfo) obj;
+    if (obj instanceof PermissionRuleInfo p) {
       return Objects.equals(action, p.action)
           && Objects.equals(force, p.force)
           && Objects.equals(min, p.min)
diff --git a/java/com/google/gerrit/extensions/api/access/PluginPermission.java b/java/com/google/gerrit/extensions/api/access/PluginPermission.java
index f536b2c..5493eca 100644
--- a/java/com/google/gerrit/extensions/api/access/PluginPermission.java
+++ b/java/com/google/gerrit/extensions/api/access/PluginPermission.java
@@ -63,8 +63,7 @@
 
   @Override
   public boolean equals(Object other) {
-    if (other instanceof PluginPermission) {
-      PluginPermission b = (PluginPermission) other;
+    if (other instanceof PluginPermission b) {
       return pluginName.equals(b.pluginName) && capability.equals(b.capability);
     }
     return false;
diff --git a/java/com/google/gerrit/extensions/api/access/PluginProjectPermission.java b/java/com/google/gerrit/extensions/api/access/PluginProjectPermission.java
index 8fa1e55..8ec2a9d 100644
--- a/java/com/google/gerrit/extensions/api/access/PluginProjectPermission.java
+++ b/java/com/google/gerrit/extensions/api/access/PluginProjectPermission.java
@@ -65,8 +65,7 @@
 
   @Override
   public boolean equals(Object other) {
-    if (other instanceof PluginProjectPermission) {
-      PluginProjectPermission b = (PluginProjectPermission) other;
+    if (other instanceof PluginProjectPermission b) {
       return pluginName.equals(b.pluginName) && permission.equals(b.permission);
     }
     return false;
diff --git a/java/com/google/gerrit/extensions/api/accounts/AccountApi.java b/java/com/google/gerrit/extensions/api/accounts/AccountApi.java
index 2d260ea..1675e05 100644
--- a/java/com/google/gerrit/extensions/api/accounts/AccountApi.java
+++ b/java/com/google/gerrit/extensions/api/accounts/AccountApi.java
@@ -95,6 +95,9 @@
   @CanIgnoreReturnValue
   SshKeyInfo addSshKey(String key) throws RestApiException;
 
+  @CanIgnoreReturnValue
+  SshKeyInfo addSshKey(String key, String lifetime) throws RestApiException;
+
   void deleteSshKey(int seq) throws RestApiException;
 
   Map<String, GpgKeyInfo> listGpgKeys() throws RestApiException;
diff --git a/java/com/google/gerrit/extensions/api/accounts/SshKeyInput.java b/java/com/google/gerrit/extensions/api/accounts/SshKeyInput.java
index 46dd858..46887d2 100644
--- a/java/com/google/gerrit/extensions/api/accounts/SshKeyInput.java
+++ b/java/com/google/gerrit/extensions/api/accounts/SshKeyInput.java
@@ -18,4 +18,5 @@
 
 public class SshKeyInput {
   public RawInput raw;
+  public String lifetime;
 }
diff --git a/java/com/google/gerrit/extensions/api/changes/ChangeApi.java b/java/com/google/gerrit/extensions/api/changes/ChangeApi.java
index 02fe189..36084f1 100644
--- a/java/com/google/gerrit/extensions/api/changes/ChangeApi.java
+++ b/java/com/google/gerrit/extensions/api/changes/ChangeApi.java
@@ -529,6 +529,41 @@
    */
   ChangeMessageApi message(String id) throws RestApiException;
 
+  /** Returns the change-scoped permissions the calling user has on this change. */
+  default ChangePermissionsInfo permissions() throws RestApiException {
+    return permissionsRequest().get();
+  }
+
+  /** Returns a builder for the change-scoped permissions endpoint. */
+  PermissionsRequest permissionsRequest() throws RestApiException;
+
+  abstract class PermissionsRequest {
+    private boolean all;
+    private String account;
+
+    public abstract ChangePermissionsInfo get() throws RestApiException;
+
+    /** Report every change permission the user is granted, not only the scoped default. */
+    public PermissionsRequest withAllPermissions() {
+      this.all = true;
+      return this;
+    }
+
+    /** Report another account's permissions. Requires the Run As capability. */
+    public PermissionsRequest forAccount(String account) {
+      this.account = account;
+      return this;
+    }
+
+    public boolean getAll() {
+      return all;
+    }
+
+    public String getAccount() {
+      return account;
+    }
+  }
+
   abstract class CommentsRequest {
     private boolean enableContext;
     private int contextPadding;
diff --git a/java/com/google/gerrit/extensions/api/changes/ChangePermissionsInfo.java b/java/com/google/gerrit/extensions/api/changes/ChangePermissionsInfo.java
new file mode 100644
index 0000000..4062cad
--- /dev/null
+++ b/java/com/google/gerrit/extensions/api/changes/ChangePermissionsInfo.java
@@ -0,0 +1,42 @@
+// Copyright (C) 2026 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+package com.google.gerrit.extensions.api.changes;
+
+import com.google.common.base.MoreObjects;
+import java.util.Set;
+import java.util.TreeSet;
+
+/**
+ * Describes the change-scoped permissions the calling user has on a change.
+ *
+ * <p>By default it reports only permissions with no other channel (e.g. {@code aiReview}).
+ * Permissions carried by the {@code actions} map are omitted. The {@code o=ALL} option returns
+ * every granted change permission, and {@code account} reports another user's.
+ */
+public class ChangePermissionsInfo {
+
+  /**
+   * Names of the change-scoped permissions the calling user has on this change.
+   *
+   * <p>Granted change permission names (e.g. {@code aiReview}), using {@code
+   * DefaultPermissionMappings} names. Only permissions in the requested scope are reported, so an
+   * absent name says nothing about permissions outside it.
+   */
+  public Set<String> permissions = new TreeSet<>();
+
+  @Override
+  public String toString() {
+    return MoreObjects.toStringHelper(this).add("permissions", permissions).toString();
+  }
+}
diff --git a/java/com/google/gerrit/extensions/api/changes/NotifyInfo.java b/java/com/google/gerrit/extensions/api/changes/NotifyInfo.java
index 21bf886..456e323 100644
--- a/java/com/google/gerrit/extensions/api/changes/NotifyInfo.java
+++ b/java/com/google/gerrit/extensions/api/changes/NotifyInfo.java
@@ -34,10 +34,9 @@
 
   @Override
   public boolean equals(Object o) {
-    if (!(o instanceof NotifyInfo)) {
+    if (!(o instanceof NotifyInfo other)) {
       return false;
     }
-    NotifyInfo other = (NotifyInfo) o;
     return Objects.equals(other.accounts, accounts);
   }
 
diff --git a/java/com/google/gerrit/extensions/api/changes/ReviewInput.java b/java/com/google/gerrit/extensions/api/changes/ReviewInput.java
index 4f495a7..8e2fac18 100644
--- a/java/com/google/gerrit/extensions/api/changes/ReviewInput.java
+++ b/java/com/google/gerrit/extensions/api/changes/ReviewInput.java
@@ -36,6 +36,9 @@
 
   public String tag;
 
+  /** Whether the votes in this review were generated by an AI agent. */
+  public Boolean isAi;
+
   public Map<String, Short> labels;
   public Map<String, List<CommentInput>> comments;
 
diff --git a/java/com/google/gerrit/extensions/api/changes/SubmitInput.java b/java/com/google/gerrit/extensions/api/changes/SubmitInput.java
index f820318..a88690f 100644
--- a/java/com/google/gerrit/extensions/api/changes/SubmitInput.java
+++ b/java/com/google/gerrit/extensions/api/changes/SubmitInput.java
@@ -24,4 +24,5 @@
 
   public NotifyHandling notify = NotifyHandling.ALL;
   public Map<RecipientType, NotifyInfo> notifyDetails;
+  public boolean submitWholeTopic;
 }
diff --git a/java/com/google/gerrit/extensions/api/config/ConsistencyCheckInfo.java b/java/com/google/gerrit/extensions/api/config/ConsistencyCheckInfo.java
index 9fb57ad..88b62de 100644
--- a/java/com/google/gerrit/extensions/api/config/ConsistencyCheckInfo.java
+++ b/java/com/google/gerrit/extensions/api/config/ConsistencyCheckInfo.java
@@ -64,8 +64,7 @@
 
     @Override
     public boolean equals(Object o) {
-      if (o instanceof ConsistencyProblemInfo) {
-        ConsistencyProblemInfo other = ((ConsistencyProblemInfo) o);
+      if (o instanceof ConsistencyProblemInfo other) {
         return Objects.equals(status, other.status) && Objects.equals(message, other.message);
       }
       return false;
diff --git a/java/com/google/gerrit/extensions/api/projects/CommentLinkInfo.java b/java/com/google/gerrit/extensions/api/projects/CommentLinkInfo.java
index 5c47ac3..31979e6 100644
--- a/java/com/google/gerrit/extensions/api/projects/CommentLinkInfo.java
+++ b/java/com/google/gerrit/extensions/api/projects/CommentLinkInfo.java
@@ -33,8 +33,7 @@
     if (o == this) {
       return true;
     }
-    if (o instanceof CommentLinkInfo) {
-      CommentLinkInfo that = (CommentLinkInfo) o;
+    if (o instanceof CommentLinkInfo that) {
       return Objects.equals(this.match, that.match)
           && Objects.equals(this.link, that.link)
           && Objects.equals(this.prefix, that.prefix)
diff --git a/java/com/google/gerrit/extensions/api/projects/ConfigInfo.java b/java/com/google/gerrit/extensions/api/projects/ConfigInfo.java
index 1a51c15..6c62f0c 100644
--- a/java/com/google/gerrit/extensions/api/projects/ConfigInfo.java
+++ b/java/com/google/gerrit/extensions/api/projects/ConfigInfo.java
@@ -19,6 +19,7 @@
 import com.google.gerrit.common.Nullable;
 import com.google.gerrit.extensions.client.InheritableBoolean;
 import com.google.gerrit.extensions.client.ProjectState;
+import com.google.gerrit.extensions.client.RefStorage;
 import com.google.gerrit.extensions.client.SubmitType;
 import com.google.gerrit.extensions.common.ActionInfo;
 import java.util.List;
@@ -47,6 +48,10 @@
   public SubmitType submitType;
   public SubmitTypeInfo defaultSubmitType;
   public ProjectState state;
+
+  /** Current ref storage format of the project's repository. */
+  public RefStorage refStorage;
+
   public Map<String, Map<String, ConfigParameterInfo>> pluginConfig;
   public Map<String, ActionInfo> actions;
 
diff --git a/java/com/google/gerrit/extensions/api/projects/ProjectApi.java b/java/com/google/gerrit/extensions/api/projects/ProjectApi.java
index a8407d1..7a059e2 100644
--- a/java/com/google/gerrit/extensions/api/projects/ProjectApi.java
+++ b/java/com/google/gerrit/extensions/api/projects/ProjectApi.java
@@ -19,6 +19,7 @@
 import com.google.gerrit.extensions.api.access.ProjectAccessInput;
 import com.google.gerrit.extensions.api.config.AccessCheckInfo;
 import com.google.gerrit.extensions.api.config.AccessCheckInput;
+import com.google.gerrit.extensions.client.RefStorage;
 import com.google.gerrit.extensions.common.BatchLabelInput;
 import com.google.gerrit.extensions.common.BatchSubmitRequirementInput;
 import com.google.gerrit.extensions.common.ChangeInfo;
@@ -279,6 +280,18 @@
   /** Reindexes all changes of the project. */
   void indexChanges() throws RestApiException;
 
+  /**
+   * Converts the ref storage of the project's repository.
+   *
+   * <p>Requires the caller to be a server administrator. The conversion does not lock the
+   * repository, so concurrent writes during the conversion can leave the ref storage in an
+   * inconsistent state.
+   *
+   * @param input the target format and backup preference
+   * @return the resulting ref storage format
+   */
+  RefStorage convertRefStorage(RefStorageInput input) throws RestApiException;
+
   ListLabelsRequest labels() throws RestApiException;
 
   abstract class ListLabelsRequest {
diff --git a/java/com/google/gerrit/extensions/api/projects/ProjectInput.java b/java/com/google/gerrit/extensions/api/projects/ProjectInput.java
index cabb745..9f50815 100644
--- a/java/com/google/gerrit/extensions/api/projects/ProjectInput.java
+++ b/java/com/google/gerrit/extensions/api/projects/ProjectInput.java
@@ -15,6 +15,7 @@
 package com.google.gerrit.extensions.api.projects;
 
 import com.google.gerrit.extensions.client.InheritableBoolean;
+import com.google.gerrit.extensions.client.RefStorage;
 import com.google.gerrit.extensions.client.SubmitType;
 import java.util.List;
 import java.util.Map;
@@ -25,6 +26,7 @@
   public String description;
   public boolean permissionsOnly;
   public boolean createEmptyCommit;
+  public RefStorage refStorage;
   public SubmitType submitType;
   public List<String> branches;
   public List<String> owners;
diff --git a/java/com/google/gerrit/extensions/api/projects/RefStorageInput.java b/java/com/google/gerrit/extensions/api/projects/RefStorageInput.java
new file mode 100644
index 0000000..ed5e93b
--- /dev/null
+++ b/java/com/google/gerrit/extensions/api/projects/RefStorageInput.java
@@ -0,0 +1,36 @@
+// Copyright (C) 2026 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.google.gerrit.extensions.api.projects;
+
+import com.google.gerrit.extensions.client.RefStorage;
+import com.google.gerrit.extensions.restapi.DefaultInput;
+
+/** Input for converting a project's reference storage format. */
+public class RefStorageInput {
+  /**
+   * Target ref storage format ({@link RefStorage#FILES} or {@link RefStorage#REFTABLE}). Bound as
+   * the default input, so the request body may also be a bare JSON string such as {@code
+   * "REFTABLE"}.
+   */
+  @DefaultInput public String refStorage;
+
+  /**
+   * Whether to keep the previous ref storage as a backup. Defaults to {@code true}. When {@code
+   * true}, the superseded ref storage is retained (converting from files renames it with a {@code
+   * .old} suffix; converting from reftable leaves the {@code reftable} directory in place). When
+   * {@code false}, it is deleted.
+   */
+  public Boolean backup;
+}
diff --git a/java/com/google/gerrit/extensions/auth/AuthTokenInput.java b/java/com/google/gerrit/extensions/auth/AuthTokenInput.java
index c7e5f6e..ef27ca3 100644
--- a/java/com/google/gerrit/extensions/auth/AuthTokenInput.java
+++ b/java/com/google/gerrit/extensions/auth/AuthTokenInput.java
@@ -31,10 +31,9 @@
 
   @Override
   public boolean equals(Object obj) {
-    if (!(obj instanceof AuthTokenInput)) {
+    if (!(obj instanceof AuthTokenInput other)) {
       return false;
     }
-    AuthTokenInput other = (AuthTokenInput) obj;
     return Objects.equals(id, other.id)
         && Objects.equals(token, other.token)
         && Objects.equals(lifetime, other.lifetime);
diff --git a/java/com/google/gerrit/extensions/auth/oauth/OAuthToken.java b/java/com/google/gerrit/extensions/auth/oauth/OAuthToken.java
index c19f772..9d47a86 100644
--- a/java/com/google/gerrit/extensions/auth/oauth/OAuthToken.java
+++ b/java/com/google/gerrit/extensions/auth/oauth/OAuthToken.java
@@ -89,10 +89,9 @@
 
   @Override
   public boolean equals(Object o) {
-    if (!(o instanceof OAuthToken)) {
+    if (!(o instanceof OAuthToken t)) {
       return false;
     }
-    OAuthToken t = (OAuthToken) o;
     return token.equals(t.token)
         && secret.equals(t.secret)
         && raw.equals(t.raw)
diff --git a/java/com/google/gerrit/extensions/client/Comment.java b/java/com/google/gerrit/extensions/client/Comment.java
index 3f33713..b126812 100644
--- a/java/com/google/gerrit/extensions/client/Comment.java
+++ b/java/com/google/gerrit/extensions/client/Comment.java
@@ -94,8 +94,7 @@
 
     @Override
     public boolean equals(Object o) {
-      if (o instanceof Range) {
-        Range r = (Range) o;
+      if (o instanceof Range r) {
         return startLine == r.startLine
             && startCharacter == r.startCharacter
             && endLine == r.endLine
diff --git a/java/com/google/gerrit/extensions/client/DiffPreferencesInfo.java b/java/com/google/gerrit/extensions/client/DiffPreferencesInfo.java
index c6f0dc3..3b5a43d 100644
--- a/java/com/google/gerrit/extensions/client/DiffPreferencesInfo.java
+++ b/java/com/google/gerrit/extensions/client/DiffPreferencesInfo.java
@@ -76,10 +76,9 @@
 
   @Override
   public boolean equals(Object obj) {
-    if (!(obj instanceof DiffPreferencesInfo)) {
+    if (!(obj instanceof DiffPreferencesInfo other)) {
       return false;
     }
-    DiffPreferencesInfo other = (DiffPreferencesInfo) obj;
     return Objects.equals(this.context, other.context)
         && Objects.equals(this.tabSize, other.tabSize)
         && Objects.equals(this.fontSize, other.fontSize)
diff --git a/java/com/google/gerrit/extensions/client/EditPreferencesInfo.java b/java/com/google/gerrit/extensions/client/EditPreferencesInfo.java
index 6e3d097..666b19d3 100644
--- a/java/com/google/gerrit/extensions/client/EditPreferencesInfo.java
+++ b/java/com/google/gerrit/extensions/client/EditPreferencesInfo.java
@@ -40,10 +40,9 @@
 
   @Override
   public boolean equals(Object obj) {
-    if (!(obj instanceof EditPreferencesInfo)) {
+    if (!(obj instanceof EditPreferencesInfo other)) {
       return false;
     }
-    EditPreferencesInfo other = (EditPreferencesInfo) obj;
     return Objects.equals(this.tabSize, other.tabSize)
         && Objects.equals(this.lineLength, other.lineLength)
         && Objects.equals(this.indentUnit, other.indentUnit)
diff --git a/java/com/google/gerrit/extensions/client/GeneralPreferencesInfo.java b/java/com/google/gerrit/extensions/client/GeneralPreferencesInfo.java
index 9f5202d..d3f2bf4 100644
--- a/java/com/google/gerrit/extensions/client/GeneralPreferencesInfo.java
+++ b/java/com/google/gerrit/extensions/client/GeneralPreferencesInfo.java
@@ -197,10 +197,9 @@
 
   @Override
   public boolean equals(Object obj) {
-    if (!(obj instanceof GeneralPreferencesInfo)) {
+    if (!(obj instanceof GeneralPreferencesInfo other)) {
       return false;
     }
-    GeneralPreferencesInfo other = (GeneralPreferencesInfo) obj;
     return Objects.equals(this.changesPerPage, other.changesPerPage)
         && Objects.equals(this.downloadScheme, other.downloadScheme)
         && Objects.equals(this.theme, other.theme)
diff --git a/java/com/google/gerrit/extensions/client/MenuItem.java b/java/com/google/gerrit/extensions/client/MenuItem.java
index fea885b..5d778b5 100644
--- a/java/com/google/gerrit/extensions/client/MenuItem.java
+++ b/java/com/google/gerrit/extensions/client/MenuItem.java
@@ -41,8 +41,7 @@
 
   @Override
   public boolean equals(Object obj) {
-    if (obj instanceof MenuItem) {
-      MenuItem o = (MenuItem) obj;
+    if (obj instanceof MenuItem o) {
       return Objects.equals(url, o.url)
           && Objects.equals(name, o.name)
           && Objects.equals(target, o.target)
diff --git a/java/com/google/gerrit/extensions/client/ProjectWatchInfo.java b/java/com/google/gerrit/extensions/client/ProjectWatchInfo.java
index c446d87..0152c5f 100644
--- a/java/com/google/gerrit/extensions/client/ProjectWatchInfo.java
+++ b/java/com/google/gerrit/extensions/client/ProjectWatchInfo.java
@@ -29,8 +29,7 @@
 
   @Override
   public boolean equals(Object obj) {
-    if (obj instanceof ProjectWatchInfo) {
-      ProjectWatchInfo w = (ProjectWatchInfo) obj;
+    if (obj instanceof ProjectWatchInfo w) {
       return Objects.equals(project, w.project)
           && Objects.equals(filter, w.filter)
           && Objects.equals(problem, w.problem)
diff --git a/java/com/google/gerrit/extensions/client/RefStorage.java b/java/com/google/gerrit/extensions/client/RefStorage.java
new file mode 100644
index 0000000..534cde7
--- /dev/null
+++ b/java/com/google/gerrit/extensions/client/RefStorage.java
@@ -0,0 +1,24 @@
+// Copyright (C) 2026 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.google.gerrit.extensions.client;
+
+/** Reference storage format of a repository. */
+public enum RefStorage {
+  /** Loose refs and {@code packed-refs} (the default). */
+  FILES,
+
+  /** The reftable backend. */
+  REFTABLE
+}
diff --git a/java/com/google/gerrit/extensions/common/AccountExternalIdInfo.java b/java/com/google/gerrit/extensions/common/AccountExternalIdInfo.java
index b51e195..5f1c234 100644
--- a/java/com/google/gerrit/extensions/common/AccountExternalIdInfo.java
+++ b/java/com/google/gerrit/extensions/common/AccountExternalIdInfo.java
@@ -55,8 +55,7 @@
 
   @Override
   public boolean equals(Object o) {
-    if (o instanceof AccountExternalIdInfo) {
-      AccountExternalIdInfo a = (AccountExternalIdInfo) o;
+    if (o instanceof AccountExternalIdInfo a) {
       return Objects.equals(a.identity, identity)
           && Objects.equals(a.emailAddress, emailAddress)
           && Objects.equals(a.trusted, trusted)
diff --git a/java/com/google/gerrit/extensions/common/AccountInfo.java b/java/com/google/gerrit/extensions/common/AccountInfo.java
index 74d495c..6b4b9bf 100644
--- a/java/com/google/gerrit/extensions/common/AccountInfo.java
+++ b/java/com/google/gerrit/extensions/common/AccountInfo.java
@@ -109,8 +109,7 @@
 
   @Override
   public boolean equals(Object o) {
-    if (o instanceof AccountInfo) {
-      AccountInfo accountInfo = (AccountInfo) o;
+    if (o instanceof AccountInfo accountInfo) {
       return Objects.equals(_accountId, accountInfo._accountId)
           && Objects.equals(name, accountInfo.name)
           && Objects.equals(displayName, accountInfo.displayName)
diff --git a/java/com/google/gerrit/extensions/common/AccountsInfo.java b/java/com/google/gerrit/extensions/common/AccountsInfo.java
index d669578..2cc54e1 100644
--- a/java/com/google/gerrit/extensions/common/AccountsInfo.java
+++ b/java/com/google/gerrit/extensions/common/AccountsInfo.java
@@ -25,4 +25,7 @@
 
   /** The value of the {@code accounts.visibility} parameter in {@code gerrit.config}. */
   public AccountDefaultDisplayName defaultDisplayName;
+
+  /** The value of the {@code accounts.enableDelete} parameter in {@code gerrit.config}. */
+  public Boolean enableDelete;
 }
diff --git a/java/com/google/gerrit/extensions/common/ActionInfo.java b/java/com/google/gerrit/extensions/common/ActionInfo.java
index f148444..a7d6c3f 100644
--- a/java/com/google/gerrit/extensions/common/ActionInfo.java
+++ b/java/com/google/gerrit/extensions/common/ActionInfo.java
@@ -79,8 +79,7 @@
 
   @Override
   public boolean equals(Object o) {
-    if (o instanceof ActionInfo) {
-      ActionInfo actionInfo = (ActionInfo) o;
+    if (o instanceof ActionInfo actionInfo) {
       return Objects.equals(method, actionInfo.method)
           && Objects.equals(label, actionInfo.label)
           && Objects.equals(title, actionInfo.title)
diff --git a/java/com/google/gerrit/extensions/common/ApprovalInfo.java b/java/com/google/gerrit/extensions/common/ApprovalInfo.java
index 9147b51..39f82fa 100644
--- a/java/com/google/gerrit/extensions/common/ApprovalInfo.java
+++ b/java/com/google/gerrit/extensions/common/ApprovalInfo.java
@@ -51,6 +51,9 @@
   /** Whether this vote was made after the change was submitted. */
   public Boolean postSubmit;
 
+  /** Whether this vote was created by an AI agent. */
+  public Boolean isAi;
+
   /**
    * The range the user is authorized to vote on that label.
    *
@@ -100,13 +103,13 @@
 
   @Override
   public boolean equals(Object o) {
-    if (o instanceof ApprovalInfo) {
-      ApprovalInfo approvalInfo = (ApprovalInfo) o;
+    if (o instanceof ApprovalInfo approvalInfo) {
       return super.equals(o)
           && Objects.equals(tag, approvalInfo.tag)
           && Objects.equals(value, approvalInfo.value)
           && Objects.equals(date, approvalInfo.date)
           && Objects.equals(postSubmit, approvalInfo.postSubmit)
+          && Objects.equals(isAi, approvalInfo.isAi)
           && Objects.equals(permittedVotingRange, approvalInfo.permittedVotingRange);
     }
     return false;
@@ -119,6 +122,6 @@
 
   @Override
   public int hashCode() {
-    return Objects.hash(super.hashCode(), tag, value, date, postSubmit, permittedVotingRange);
+    return Objects.hash(super.hashCode(), tag, value, date, postSubmit, isAi, permittedVotingRange);
   }
 }
diff --git a/java/com/google/gerrit/extensions/common/AttentionSetInfo.java b/java/com/google/gerrit/extensions/common/AttentionSetInfo.java
index b220371..9cd1827 100644
--- a/java/com/google/gerrit/extensions/common/AttentionSetInfo.java
+++ b/java/com/google/gerrit/extensions/common/AttentionSetInfo.java
@@ -71,8 +71,7 @@
 
   @Override
   public boolean equals(Object o) {
-    if (o instanceof AttentionSetInfo) {
-      AttentionSetInfo attentionSetInfo = (AttentionSetInfo) o;
+    if (o instanceof AttentionSetInfo attentionSetInfo) {
       return Objects.equals(account, attentionSetInfo.account)
           && Objects.equals(lastUpdate, attentionSetInfo.lastUpdate)
           && Objects.equals(reason, attentionSetInfo.reason)
diff --git a/java/com/google/gerrit/extensions/common/AvatarInfo.java b/java/com/google/gerrit/extensions/common/AvatarInfo.java
index 55ae08f..794e198 100644
--- a/java/com/google/gerrit/extensions/common/AvatarInfo.java
+++ b/java/com/google/gerrit/extensions/common/AvatarInfo.java
@@ -40,8 +40,7 @@
 
   @Override
   public boolean equals(Object o) {
-    if (o instanceof AvatarInfo) {
-      AvatarInfo avatarInfo = (AvatarInfo) o;
+    if (o instanceof AvatarInfo avatarInfo) {
       return Objects.equals(url, avatarInfo.url) && Objects.equals(height, avatarInfo.height);
     }
     return false;
diff --git a/java/com/google/gerrit/extensions/common/BlameInfo.java b/java/com/google/gerrit/extensions/common/BlameInfo.java
index 6ee677e..7788bd8 100644
--- a/java/com/google/gerrit/extensions/common/BlameInfo.java
+++ b/java/com/google/gerrit/extensions/common/BlameInfo.java
@@ -28,10 +28,9 @@
     if (this == o) {
       return true;
     }
-    if (o == null || !(o instanceof BlameInfo)) {
+    if (o == null || !(o instanceof BlameInfo blameInfo)) {
       return false;
     }
-    BlameInfo blameInfo = (BlameInfo) o;
 
     return id.equals(blameInfo.id);
   }
diff --git a/java/com/google/gerrit/extensions/common/ChangeConfigInfo.java b/java/com/google/gerrit/extensions/common/ChangeConfigInfo.java
index c967946..03fd463 100644
--- a/java/com/google/gerrit/extensions/common/ChangeConfigInfo.java
+++ b/java/com/google/gerrit/extensions/common/ChangeConfigInfo.java
@@ -19,7 +19,17 @@
   public Boolean allowBlame;
   public Boolean disablePrivateChanges;
   public int updateDelay;
-  public Boolean submitWholeTopic;
+
+  /**
+   * Backward-compatible boolean
+   *
+   * @deprecated Use {@link #enforceWholeTopicSubmit} instead.
+   */
+  @Deprecated public Boolean submitWholeTopic;
+
+  /** Preferred alternative to {@link #submitWholeTopic}. */
+  public Boolean enforceWholeTopicSubmit;
+
   public String mergeabilityComputationBehavior;
   public Boolean conflictsPredicateEnabled;
   public Boolean allowMarkdownBase64ImagesInComments;
diff --git a/java/com/google/gerrit/extensions/common/ChangeInfoDiffer.java b/java/com/google/gerrit/extensions/common/ChangeInfoDiffer.java
index 308daf0..e5a2a17 100644
--- a/java/com/google/gerrit/extensions/common/ChangeInfoDiffer.java
+++ b/java/com/google/gerrit/extensions/common/ChangeInfoDiffer.java
@@ -74,14 +74,13 @@
 
   @SuppressWarnings("unchecked") // reflection is used to construct instances of T
   private static <T> T getAdded(T oldValue, T newValue) {
-    if (newValue instanceof Collection) {
-      ImmutableList<?> result =
-          getAddedForCollection((Collection<?>) oldValue, (Collection<?>) newValue);
+    if (newValue instanceof Collection<?> newCollection) {
+      ImmutableList<?> result = getAddedForCollection((Collection<?>) oldValue, newCollection);
       return (T) result;
     }
 
-    if (newValue instanceof Map) {
-      ImmutableMap<?, ?> result = getAddedForMap((Map<?, ?>) oldValue, (Map<?, ?>) newValue);
+    if (newValue instanceof Map<?, ?> newMap) {
+      ImmutableMap<?, ?> result = getAddedForMap((Map<?, ?>) oldValue, newMap);
       return (T) result;
     }
 
diff --git a/java/com/google/gerrit/extensions/common/ChangeMessageInfo.java b/java/com/google/gerrit/extensions/common/ChangeMessageInfo.java
index c128f36..940706e 100644
--- a/java/com/google/gerrit/extensions/common/ChangeMessageInfo.java
+++ b/java/com/google/gerrit/extensions/common/ChangeMessageInfo.java
@@ -50,8 +50,7 @@
 
   @Override
   public boolean equals(Object o) {
-    if (o instanceof ChangeMessageInfo) {
-      ChangeMessageInfo cmi = (ChangeMessageInfo) o;
+    if (o instanceof ChangeMessageInfo cmi) {
       return Objects.equals(id, cmi.id)
           && Objects.equals(tag, cmi.tag)
           && Objects.equals(author, cmi.author)
diff --git a/java/com/google/gerrit/extensions/common/CommitInfo.java b/java/com/google/gerrit/extensions/common/CommitInfo.java
index 202b829..f27d47c 100644
--- a/java/com/google/gerrit/extensions/common/CommitInfo.java
+++ b/java/com/google/gerrit/extensions/common/CommitInfo.java
@@ -33,10 +33,9 @@
 
   @Override
   public boolean equals(Object o) {
-    if (!(o instanceof CommitInfo)) {
+    if (!(o instanceof CommitInfo c)) {
       return false;
     }
-    CommitInfo c = (CommitInfo) o;
     return Objects.equals(commit, c.commit)
         && Objects.equals(parents, c.parents)
         && Objects.equals(author, c.author)
diff --git a/java/com/google/gerrit/extensions/common/ContextLineInfo.java b/java/com/google/gerrit/extensions/common/ContextLineInfo.java
index 3062e85..d56e8ea 100644
--- a/java/com/google/gerrit/extensions/common/ContextLineInfo.java
+++ b/java/com/google/gerrit/extensions/common/ContextLineInfo.java
@@ -33,8 +33,7 @@
 
   @Override
   public boolean equals(Object o) {
-    if (o instanceof ContextLineInfo) {
-      ContextLineInfo l = (ContextLineInfo) o;
+    if (o instanceof ContextLineInfo l) {
       return lineNumber == l.lineNumber && contextLine.equals(l.contextLine);
     }
     return false;
diff --git a/java/com/google/gerrit/extensions/common/FetchInfo.java b/java/com/google/gerrit/extensions/common/FetchInfo.java
index 4b1e941..b35aace 100644
--- a/java/com/google/gerrit/extensions/common/FetchInfo.java
+++ b/java/com/google/gerrit/extensions/common/FetchInfo.java
@@ -29,8 +29,7 @@
 
   @Override
   public boolean equals(Object o) {
-    if (o instanceof FetchInfo) {
-      FetchInfo fetchInfo = (FetchInfo) o;
+    if (o instanceof FetchInfo fetchInfo) {
       return Objects.equals(url, fetchInfo.url)
           && Objects.equals(ref, fetchInfo.ref)
           && Objects.equals(commands, fetchInfo.commands);
diff --git a/java/com/google/gerrit/extensions/common/FileInfo.java b/java/com/google/gerrit/extensions/common/FileInfo.java
index db85ac8..f960fc2 100644
--- a/java/com/google/gerrit/extensions/common/FileInfo.java
+++ b/java/com/google/gerrit/extensions/common/FileInfo.java
@@ -37,8 +37,7 @@
 
   @Override
   public boolean equals(Object o) {
-    if (o instanceof FileInfo) {
-      FileInfo fileInfo = (FileInfo) o;
+    if (o instanceof FileInfo fileInfo) {
       return Objects.equals(status, fileInfo.status)
           && Objects.equals(oldMode, fileInfo.oldMode)
           && Objects.equals(newMode, fileInfo.newMode)
diff --git a/java/com/google/gerrit/extensions/common/FixReplacementInfo.java b/java/com/google/gerrit/extensions/common/FixReplacementInfo.java
index 6df4fb9..6cdb850 100644
--- a/java/com/google/gerrit/extensions/common/FixReplacementInfo.java
+++ b/java/com/google/gerrit/extensions/common/FixReplacementInfo.java
@@ -24,10 +24,9 @@
 
   @Override
   public boolean equals(Object o) {
-    if (!(o instanceof FixReplacementInfo)) {
+    if (!(o instanceof FixReplacementInfo fs)) {
       return false;
     }
-    FixReplacementInfo fs = (FixReplacementInfo) o;
     return Objects.equals(path, fs.path)
         && Objects.equals(range, fs.range)
         && Objects.equals(replacement, fs.replacement);
diff --git a/java/com/google/gerrit/extensions/common/FixSuggestionInfo.java b/java/com/google/gerrit/extensions/common/FixSuggestionInfo.java
index 50df366..cf64979 100644
--- a/java/com/google/gerrit/extensions/common/FixSuggestionInfo.java
+++ b/java/com/google/gerrit/extensions/common/FixSuggestionInfo.java
@@ -24,10 +24,9 @@
 
   @Override
   public boolean equals(Object o) {
-    if (!(o instanceof FixSuggestionInfo)) {
+    if (!(o instanceof FixSuggestionInfo fs)) {
       return false;
     }
-    FixSuggestionInfo fs = (FixSuggestionInfo) o;
     return Objects.equals(fixId, fs.fixId)
         && Objects.equals(description, fs.description)
         && Objects.equals(replacements, fs.replacements);
diff --git a/java/com/google/gerrit/extensions/common/GitPerson.java b/java/com/google/gerrit/extensions/common/GitPerson.java
index 98481c5..a02734f 100644
--- a/java/com/google/gerrit/extensions/common/GitPerson.java
+++ b/java/com/google/gerrit/extensions/common/GitPerson.java
@@ -37,10 +37,9 @@
 
   @Override
   public boolean equals(Object o) {
-    if (!(o instanceof GitPerson)) {
+    if (!(o instanceof GitPerson p)) {
       return false;
     }
-    GitPerson p = (GitPerson) o;
     return Objects.equals(name, p.name)
         && Objects.equals(email, p.email)
         && Objects.equals(date, p.date)
diff --git a/java/com/google/gerrit/extensions/common/GpgKeyInfo.java b/java/com/google/gerrit/extensions/common/GpgKeyInfo.java
index d656f22..4f9e40f 100644
--- a/java/com/google/gerrit/extensions/common/GpgKeyInfo.java
+++ b/java/com/google/gerrit/extensions/common/GpgKeyInfo.java
@@ -47,8 +47,7 @@
 
   @Override
   public boolean equals(Object o) {
-    if (o instanceof GpgKeyInfo) {
-      GpgKeyInfo gpgKeyInfo = (GpgKeyInfo) o;
+    if (o instanceof GpgKeyInfo gpgKeyInfo) {
       return Objects.equals(id, gpgKeyInfo.id)
           && Objects.equals(fingerprint, gpgKeyInfo.fingerprint)
           && Objects.equals(userIds, gpgKeyInfo.userIds)
diff --git a/java/com/google/gerrit/extensions/common/LabelInfo.java b/java/com/google/gerrit/extensions/common/LabelInfo.java
index cdd3b18..cef7cd4 100644
--- a/java/com/google/gerrit/extensions/common/LabelInfo.java
+++ b/java/com/google/gerrit/extensions/common/LabelInfo.java
@@ -35,8 +35,7 @@
 
   @Override
   public boolean equals(Object o) {
-    if (o instanceof LabelInfo) {
-      LabelInfo labelInfo = (LabelInfo) o;
+    if (o instanceof LabelInfo labelInfo) {
       return Objects.equals(approved, labelInfo.approved)
           && Objects.equals(rejected, labelInfo.rejected)
           && Objects.equals(recommended, labelInfo.recommended)
diff --git a/java/com/google/gerrit/extensions/common/LegacySubmitRequirementInfo.java b/java/com/google/gerrit/extensions/common/LegacySubmitRequirementInfo.java
index adf01e1..c32c42f 100644
--- a/java/com/google/gerrit/extensions/common/LegacySubmitRequirementInfo.java
+++ b/java/com/google/gerrit/extensions/common/LegacySubmitRequirementInfo.java
@@ -33,10 +33,9 @@
     if (this == o) {
       return true;
     }
-    if (!(o instanceof LegacySubmitRequirementInfo)) {
+    if (!(o instanceof LegacySubmitRequirementInfo that)) {
       return false;
     }
-    LegacySubmitRequirementInfo that = (LegacySubmitRequirementInfo) o;
     return Objects.equals(status, that.status)
         && Objects.equals(fallbackText, that.fallbackText)
         && Objects.equals(type, that.type);
diff --git a/java/com/google/gerrit/extensions/common/MetadataInfo.java b/java/com/google/gerrit/extensions/common/MetadataInfo.java
index 2213191..dea41de 100644
--- a/java/com/google/gerrit/extensions/common/MetadataInfo.java
+++ b/java/com/google/gerrit/extensions/common/MetadataInfo.java
@@ -58,8 +58,7 @@
 
   @Override
   public boolean equals(Object o) {
-    if (o instanceof MetadataInfo) {
-      MetadataInfo metadata = (MetadataInfo) o;
+    if (o instanceof MetadataInfo metadata) {
       return Objects.equals(name, metadata.name)
           && Objects.equals(value, metadata.value)
           && Objects.equals(description, metadata.description)
diff --git a/java/com/google/gerrit/extensions/common/PluginDefinedInfo.java b/java/com/google/gerrit/extensions/common/PluginDefinedInfo.java
index e2b1c36..9b3069a 100644
--- a/java/com/google/gerrit/extensions/common/PluginDefinedInfo.java
+++ b/java/com/google/gerrit/extensions/common/PluginDefinedInfo.java
@@ -22,8 +22,7 @@
 
   @Override
   public boolean equals(Object o) {
-    if (o instanceof PluginDefinedInfo) {
-      PluginDefinedInfo pluginDefinedInfo = (PluginDefinedInfo) o;
+    if (o instanceof PluginDefinedInfo pluginDefinedInfo) {
       return Objects.equals(name, pluginDefinedInfo.name)
           && Objects.equals(message, pluginDefinedInfo.message);
     }
diff --git a/java/com/google/gerrit/extensions/common/ProblemInfo.java b/java/com/google/gerrit/extensions/common/ProblemInfo.java
index 59f9fc9..4b7db19 100644
--- a/java/com/google/gerrit/extensions/common/ProblemInfo.java
+++ b/java/com/google/gerrit/extensions/common/ProblemInfo.java
@@ -33,10 +33,9 @@
 
   @Override
   public boolean equals(Object o) {
-    if (!(o instanceof ProblemInfo)) {
+    if (!(o instanceof ProblemInfo p)) {
       return false;
     }
-    ProblemInfo p = (ProblemInfo) o;
     return Objects.equals(message, p.message)
         && Objects.equals(status, p.status)
         && Objects.equals(outcome, p.outcome);
diff --git a/java/com/google/gerrit/extensions/common/PushCertificateInfo.java b/java/com/google/gerrit/extensions/common/PushCertificateInfo.java
index 199dbd1..af4fe8d 100644
--- a/java/com/google/gerrit/extensions/common/PushCertificateInfo.java
+++ b/java/com/google/gerrit/extensions/common/PushCertificateInfo.java
@@ -22,8 +22,7 @@
 
   @Override
   public boolean equals(Object o) {
-    if (o instanceof PushCertificateInfo) {
-      PushCertificateInfo pushCertificateInfo = (PushCertificateInfo) o;
+    if (o instanceof PushCertificateInfo pushCertificateInfo) {
       return Objects.equals(certificate, pushCertificateInfo.certificate)
           && Objects.equals(key, pushCertificateInfo.key);
     }
diff --git a/java/com/google/gerrit/extensions/common/ReviewerUpdateInfo.java b/java/com/google/gerrit/extensions/common/ReviewerUpdateInfo.java
index e14da7c..47c124c 100644
--- a/java/com/google/gerrit/extensions/common/ReviewerUpdateInfo.java
+++ b/java/com/google/gerrit/extensions/common/ReviewerUpdateInfo.java
@@ -49,8 +49,7 @@
 
   @Override
   public boolean equals(Object o) {
-    if (o instanceof ReviewerUpdateInfo) {
-      ReviewerUpdateInfo reviewerUpdateInfo = (ReviewerUpdateInfo) o;
+    if (o instanceof ReviewerUpdateInfo reviewerUpdateInfo) {
       return Objects.equals(updated, reviewerUpdateInfo.updated)
           && Objects.equals(updatedBy, reviewerUpdateInfo.updatedBy)
           && Objects.equals(realUpdatedBy, reviewerUpdateInfo.realUpdatedBy)
diff --git a/java/com/google/gerrit/extensions/common/RevisionInfo.java b/java/com/google/gerrit/extensions/common/RevisionInfo.java
index 23e2a26..e85bc68 100644
--- a/java/com/google/gerrit/extensions/common/RevisionInfo.java
+++ b/java/com/google/gerrit/extensions/common/RevisionInfo.java
@@ -79,8 +79,7 @@
 
   @Override
   public boolean equals(Object o) {
-    if (o instanceof RevisionInfo) {
-      RevisionInfo revisionInfo = (RevisionInfo) o;
+    if (o instanceof RevisionInfo revisionInfo) {
       return isCurrent == revisionInfo.isCurrent
           && Objects.equals(kind, revisionInfo.kind)
           && _number == revisionInfo._number
@@ -158,8 +157,7 @@
 
     @Override
     public boolean equals(Object o) {
-      if (o instanceof ParentInfo) {
-        ParentInfo parentInfo = (ParentInfo) o;
+      if (o instanceof ParentInfo parentInfo) {
         return Objects.equals(branchName, parentInfo.branchName)
             && Objects.equals(commitId, parentInfo.commitId)
             && Objects.equals(isMergedInTargetBranch, parentInfo.isMergedInTargetBranch)
diff --git a/java/com/google/gerrit/extensions/common/SshKeyInfo.java b/java/com/google/gerrit/extensions/common/SshKeyInfo.java
index a20bcbf..e3a54bb 100644
--- a/java/com/google/gerrit/extensions/common/SshKeyInfo.java
+++ b/java/com/google/gerrit/extensions/common/SshKeyInfo.java
@@ -14,6 +14,9 @@
 
 package com.google.gerrit.extensions.common;
 
+import com.google.gerrit.common.Nullable;
+import java.sql.Timestamp;
+
 public class SshKeyInfo {
   public Integer seq;
   public String sshPublicKey;
@@ -21,4 +24,5 @@
   public String algorithm;
   public String comment;
   public Boolean valid;
+  @Nullable public Timestamp expiration;
 }
diff --git a/java/com/google/gerrit/extensions/common/SubmitRecordInfo.java b/java/com/google/gerrit/extensions/common/SubmitRecordInfo.java
index d957733..0f5c0af 100644
--- a/java/com/google/gerrit/extensions/common/SubmitRecordInfo.java
+++ b/java/com/google/gerrit/extensions/common/SubmitRecordInfo.java
@@ -45,10 +45,9 @@
       if (this == o) {
         return true;
       }
-      if (!(o instanceof Label)) {
+      if (!(o instanceof Label that)) {
         return false;
       }
-      Label that = (Label) o;
       return Objects.equals(label, that.label)
           && status == that.status
           && Objects.equals(appliedBy, that.appliedBy);
@@ -71,10 +70,9 @@
     if (this == o) {
       return true;
     }
-    if (!(o instanceof SubmitRecordInfo)) {
+    if (!(o instanceof SubmitRecordInfo that)) {
       return false;
     }
-    SubmitRecordInfo that = (SubmitRecordInfo) o;
     return Objects.equals(ruleName, that.ruleName)
         && status == that.status
         && Objects.equals(labels, that.labels)
diff --git a/java/com/google/gerrit/extensions/common/SubmitRequirementExpressionInfo.java b/java/com/google/gerrit/extensions/common/SubmitRequirementExpressionInfo.java
index 20ea4be..d40976b 100644
--- a/java/com/google/gerrit/extensions/common/SubmitRequirementExpressionInfo.java
+++ b/java/com/google/gerrit/extensions/common/SubmitRequirementExpressionInfo.java
@@ -87,10 +87,9 @@
     if (this == o) {
       return true;
     }
-    if (!(o instanceof SubmitRequirementExpressionInfo)) {
+    if (!(o instanceof SubmitRequirementExpressionInfo that)) {
       return false;
     }
-    SubmitRequirementExpressionInfo that = (SubmitRequirementExpressionInfo) o;
     return fulfilled == that.fulfilled
         && Objects.equals(expression, that.expression)
         && Objects.equals(passingAtoms, that.passingAtoms)
diff --git a/java/com/google/gerrit/extensions/common/SubmitRequirementResultInfo.java b/java/com/google/gerrit/extensions/common/SubmitRequirementResultInfo.java
index 07ab976..d96c334 100644
--- a/java/com/google/gerrit/extensions/common/SubmitRequirementResultInfo.java
+++ b/java/com/google/gerrit/extensions/common/SubmitRequirementResultInfo.java
@@ -82,10 +82,9 @@
     if (this == o) {
       return true;
     }
-    if (!(o instanceof SubmitRequirementResultInfo)) {
+    if (!(o instanceof SubmitRequirementResultInfo that)) {
       return false;
     }
-    SubmitRequirementResultInfo that = (SubmitRequirementResultInfo) o;
     return isLegacy == that.isLegacy
         && Objects.equals(name, that.name)
         && Objects.equals(description, that.description)
diff --git a/java/com/google/gerrit/extensions/common/TestSubmitRuleInfo.java b/java/com/google/gerrit/extensions/common/TestSubmitRuleInfo.java
index 2af9a767..e7f8e6e 100644
--- a/java/com/google/gerrit/extensions/common/TestSubmitRuleInfo.java
+++ b/java/com/google/gerrit/extensions/common/TestSubmitRuleInfo.java
@@ -37,8 +37,7 @@
 
   @Override
   public boolean equals(Object o) {
-    if (o instanceof TestSubmitRuleInfo) {
-      TestSubmitRuleInfo other = (TestSubmitRuleInfo) o;
+    if (o instanceof TestSubmitRuleInfo other) {
       return Objects.equals(status, other.status)
           && Objects.equals(errorMessage, other.errorMessage)
           && Objects.equals(ok, other.ok)
diff --git a/java/com/google/gerrit/extensions/common/TrackingIdInfo.java b/java/com/google/gerrit/extensions/common/TrackingIdInfo.java
index 3d35e08..74ef59e 100644
--- a/java/com/google/gerrit/extensions/common/TrackingIdInfo.java
+++ b/java/com/google/gerrit/extensions/common/TrackingIdInfo.java
@@ -27,8 +27,7 @@
 
   @Override
   public boolean equals(Object o) {
-    if (o instanceof TrackingIdInfo) {
-      TrackingIdInfo trackingIdInfo = (TrackingIdInfo) o;
+    if (o instanceof TrackingIdInfo trackingIdInfo) {
       return Objects.equals(system, trackingIdInfo.system) && Objects.equals(id, trackingIdInfo.id);
     }
     return false;
diff --git a/java/com/google/gerrit/extensions/common/ValidationOptionInfo.java b/java/com/google/gerrit/extensions/common/ValidationOptionInfo.java
index ccbd70f..bddb360 100644
--- a/java/com/google/gerrit/extensions/common/ValidationOptionInfo.java
+++ b/java/com/google/gerrit/extensions/common/ValidationOptionInfo.java
@@ -28,8 +28,7 @@
 
   @Override
   public boolean equals(Object o) {
-    if (o instanceof ValidationOptionInfo) {
-      ValidationOptionInfo validationInfo = (ValidationOptionInfo) o;
+    if (o instanceof ValidationOptionInfo validationInfo) {
       return Objects.equals(name, validationInfo.name)
           && Objects.equals(description, validationInfo.description);
     }
diff --git a/java/com/google/gerrit/extensions/common/VotingRangeInfo.java b/java/com/google/gerrit/extensions/common/VotingRangeInfo.java
index 2f7e9e4..1e37d80 100644
--- a/java/com/google/gerrit/extensions/common/VotingRangeInfo.java
+++ b/java/com/google/gerrit/extensions/common/VotingRangeInfo.java
@@ -27,8 +27,7 @@
 
   @Override
   public boolean equals(Object o) {
-    if (o instanceof VotingRangeInfo) {
-      VotingRangeInfo votingRangeInfo = (VotingRangeInfo) o;
+    if (o instanceof VotingRangeInfo votingRangeInfo) {
       return min == votingRangeInfo.min && max == votingRangeInfo.max;
     }
     return false;
diff --git a/java/com/google/gerrit/extensions/common/WebLinkInfo.java b/java/com/google/gerrit/extensions/common/WebLinkInfo.java
index fbd8d2f..60e6bd3 100644
--- a/java/com/google/gerrit/extensions/common/WebLinkInfo.java
+++ b/java/com/google/gerrit/extensions/common/WebLinkInfo.java
@@ -30,10 +30,9 @@
 
   @Override
   public boolean equals(Object o) {
-    if (!(o instanceof WebLinkInfo)) {
+    if (!(o instanceof WebLinkInfo i)) {
       return false;
     }
-    WebLinkInfo i = (WebLinkInfo) o;
     return Objects.equals(name, i.name)
         && Objects.equals(tooltip, i.tooltip)
         && Objects.equals(imageUrl, i.imageUrl)
diff --git a/java/com/google/gerrit/extensions/conditions/BooleanCondition.java b/java/com/google/gerrit/extensions/conditions/BooleanCondition.java
index fde4d23..3b88f81 100644
--- a/java/com/google/gerrit/extensions/conditions/BooleanCondition.java
+++ b/java/com/google/gerrit/extensions/conditions/BooleanCondition.java
@@ -143,8 +143,7 @@
 
     @Override
     public boolean equals(Object other) {
-      if (other instanceof And) {
-        And o = (And) other;
+      if (other instanceof And o) {
         return a.equals(o.a) && b.equals(o.b);
       }
       return false;
@@ -201,8 +200,7 @@
 
     @Override
     public boolean equals(Object other) {
-      if (other instanceof Or) {
-        Or o = (Or) other;
+      if (other instanceof Or o) {
         return a.equals(o.a) && b.equals(o.b);
       }
       return false;
@@ -253,7 +251,7 @@
 
     @Override
     public boolean equals(Object other) {
-      return other instanceof Not ? cond.equals(((Not) other).cond) : false;
+      return other instanceof Not n ? cond.equals(n.cond) : false;
     }
 
     @Override
@@ -296,7 +294,7 @@
 
     @Override
     public boolean equals(Object other) {
-      return other instanceof Value ? value == ((Value) other).value : false;
+      return other instanceof Value v ? value == v.value : false;
     }
 
     @Override
@@ -339,7 +337,7 @@
 
     @Override
     public boolean equals(Object other) {
-      return other instanceof Lazy && supplier.equals(((Lazy) other).supplier);
+      return other instanceof Lazy l && supplier.equals(l.supplier);
     }
 
     @Override
diff --git a/java/com/google/gerrit/extensions/events/NewProjectCreatedListener.java b/java/com/google/gerrit/extensions/events/NewProjectCreatedListener.java
index 82ea51d..004dcc7 100644
--- a/java/com/google/gerrit/extensions/events/NewProjectCreatedListener.java
+++ b/java/com/google/gerrit/extensions/events/NewProjectCreatedListener.java
@@ -14,6 +14,7 @@
 
 package com.google.gerrit.extensions.events;
 
+import com.google.gerrit.common.Nullable;
 import com.google.gerrit.extensions.annotations.ExtensionPoint;
 
 /** Notified whenever a project is created on the master. */
@@ -21,6 +22,15 @@
 public interface NewProjectCreatedListener {
   interface Event extends ProjectEvent {
     String getHeadName();
+
+    /**
+     * Returns the repository-local Git configuration in Git config file format, excluding inherited
+     * global and system configuration.
+     */
+    @Nullable
+    default String getGitConfig() {
+      return null;
+    }
   }
 
   void onNewProjectCreated(Event event);
diff --git a/java/com/google/gerrit/extensions/registration/DynamicMap.java b/java/com/google/gerrit/extensions/registration/DynamicMap.java
index 6fd2c03..3d90a7d 100644
--- a/java/com/google/gerrit/extensions/registration/DynamicMap.java
+++ b/java/com/google/gerrit/extensions/registration/DynamicMap.java
@@ -181,8 +181,7 @@
 
     @Override
     public boolean equals(Object other) {
-      if (other instanceof NamePair) {
-        NamePair np = (NamePair) other;
+      if (other instanceof NamePair np) {
         return pluginName.equals(np.pluginName) && exportName.equals(np.exportName);
       }
       return false;
diff --git a/java/com/google/gerrit/extensions/restapi/IdString.java b/java/com/google/gerrit/extensions/restapi/IdString.java
index a69919f..b18cf63 100644
--- a/java/com/google/gerrit/extensions/restapi/IdString.java
+++ b/java/com/google/gerrit/extensions/restapi/IdString.java
@@ -67,8 +67,8 @@
 
   @Override
   public boolean equals(Object other) {
-    if (other instanceof IdString) {
-      return urlEncoded.equals(((IdString) other).urlEncoded);
+    if (other instanceof IdString idString) {
+      return urlEncoded.equals(idString.urlEncoded);
     }
     return false;
   }
diff --git a/java/com/google/gerrit/extensions/restapi/Response.java b/java/com/google/gerrit/extensions/restapi/Response.java
index 851ec96..3503861 100644
--- a/java/com/google/gerrit/extensions/restapi/Response.java
+++ b/java/com/google/gerrit/extensions/restapi/Response.java
@@ -248,7 +248,7 @@
 
     @Override
     public boolean equals(Object o) {
-      return o instanceof Redirect && ((Redirect) o).location.equals(location);
+      return o instanceof Redirect r && r.location.equals(location);
     }
 
     @Override
@@ -306,7 +306,7 @@
 
     @Override
     public boolean equals(Object o) {
-      return o instanceof Accepted && ((Accepted) o).location.equals(location);
+      return o instanceof Accepted a && a.location.equals(location);
     }
 
     @Override
diff --git a/java/com/google/gerrit/gpg/Fingerprint.java b/java/com/google/gerrit/gpg/Fingerprint.java
index a0212ca..64868f4 100644
--- a/java/com/google/gerrit/gpg/Fingerprint.java
+++ b/java/com/google/gerrit/gpg/Fingerprint.java
@@ -108,7 +108,7 @@
 
   @Override
   public boolean equals(Object o) {
-    return (o instanceof Fingerprint) && equalsBytes(((Fingerprint) o).fp);
+    return (o instanceof Fingerprint f) && equalsBytes(f.fp);
   }
 
   @Override
diff --git a/java/com/google/gerrit/gpg/PublicKeyStore.java b/java/com/google/gerrit/gpg/PublicKeyStore.java
index 7659943..eced737 100644
--- a/java/com/google/gerrit/gpg/PublicKeyStore.java
+++ b/java/com/google/gerrit/gpg/PublicKeyStore.java
@@ -259,8 +259,7 @@
         }
         foundAtLeastOneKey = true;
         Object obj = it.next();
-        if (obj instanceof PGPPublicKeyRing) {
-          PGPPublicKeyRing kr = (PGPPublicKeyRing) obj;
+        if (obj instanceof PGPPublicKeyRing kr) {
           if (fp == null || Arrays.equals(fp, kr.getPublicKey().getFingerprint())) {
             keys.add(kr);
           }
diff --git a/java/com/google/gerrit/gpg/PushCertificateChecker.java b/java/com/google/gerrit/gpg/PushCertificateChecker.java
index b9ff50b..ac7f9e4 100644
--- a/java/com/google/gerrit/gpg/PushCertificateChecker.java
+++ b/java/com/google/gerrit/gpg/PushCertificateChecker.java
@@ -184,8 +184,7 @@
     PGPObjectFactory factory = new BcPGPObjectFactory(in);
     Object obj;
     while ((obj = factory.nextObject()) != null) {
-      if (obj instanceof PGPSignatureList) {
-        PGPSignatureList sigs = (PGPSignatureList) obj;
+      if (obj instanceof PGPSignatureList sigs) {
         if (!sigs.isEmpty()) {
           return sigs.get(0);
         }
diff --git a/java/com/google/gerrit/gpg/api/GpgKeyApiImpl.java b/java/com/google/gerrit/gpg/api/GpgKeyApiImpl.java
index 713db48..8e666d0 100644
--- a/java/com/google/gerrit/gpg/api/GpgKeyApiImpl.java
+++ b/java/com/google/gerrit/gpg/api/GpgKeyApiImpl.java
@@ -55,8 +55,7 @@
   @Override
   public void delete() throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = delete.apply(rsrc, new Input());
+      var _ = delete.apply(rsrc, new Input());
     } catch (RestApiException e) {
       throw e;
     } catch (PGPException | IOException | ConfigInvalidException e) {
diff --git a/java/com/google/gerrit/gpg/server/DeleteGpgKey.java b/java/com/google/gerrit/gpg/server/DeleteGpgKey.java
index 7f057e8..6933853 100644
--- a/java/com/google/gerrit/gpg/server/DeleteGpgKey.java
+++ b/java/com/google/gerrit/gpg/server/DeleteGpgKey.java
@@ -38,6 +38,7 @@
 import com.google.gerrit.server.mail.EmailFactories;
 import com.google.inject.Inject;
 import com.google.inject.Provider;
+import com.google.inject.Singleton;
 import java.io.IOException;
 import java.util.Optional;
 import org.bouncycastle.openpgp.PGPException;
@@ -46,6 +47,7 @@
 import org.eclipse.jgit.lib.PersonIdent;
 import org.eclipse.jgit.lib.RefUpdate;
 
+@Singleton
 public class DeleteGpgKey implements RestModifyView<GpgKey, Input> {
   private static final FluentLogger logger = FluentLogger.forEnclosingClass();
 
diff --git a/java/com/google/gerrit/gpg/testing/TestKeys.java b/java/com/google/gerrit/gpg/testing/TestKeys.java
index 0423474..9365577 100644
--- a/java/com/google/gerrit/gpg/testing/TestKeys.java
+++ b/java/com/google/gerrit/gpg/testing/TestKeys.java
@@ -35,93 +35,97 @@
    */
   public static TestKey validKeyWithoutExpiration() {
     return new TestKey(
-        "-----BEGIN PGP PUBLIC KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "mQENBFWdTIkBCADOaygDKjLuRX6LXAvBAYB91cmTf1MSlmEy+qsG3c9ijjQixPkr\n"
-            + "atdYkocrrT2S0R9UGjksTOI2WN5S0lQfLA1RSk63KURQE+OF+IfNqdD6nQdLBs1w\n"
-            + "va+GDj/uvuI05I0oXf/M7POdFphutrS4EUDBnFPj6ns/0C2sTRTxliD+Y9Y9a84V\n"
-            + "DfVVUbJB6wc3LP3L6ImT+cSM7dLq3hZHya+9FNeYPmPYnBrkJyqf2NDd38Sddsro\n"
-            + "7smw/GgCZHnnuVNS4C7NsHr6900VKC+JDtdx+fqptixcAEJWiGoQfWqU+hYmia3p\n"
-            + "9+Xw02+3FcjOT6ONUCmHX+xlz0pXW4iIYlPpABEBAAG0IFRlc3R1c2VyIE9uZSA8\n"
-            + "dGVzdDFAZXhhbXBsZS5jb20+iQE4BBMBAgAiBQJVnUyJAhsDBgsJCAcDAgYVCAIJ\n"
-            + "CgsEFgIDAQIeAQIXgAAKCRDtBiXcRjKKjHblB/9RaFO5+GTDIphAL/aVj2u+d8Lq\n"
-            + "yUpBrDp3P06QDGpKGFMAovBuh+NLH76VKNIzQLQC8rdTj651fLcLMuJ1enQ3Rblg\n"
-            + "RKr1oc+wqqtFHr4QyOQjE/N3C9GQjEzfqn4qnp5KtZxYFnlvU5NGehid7M1HTZMx\n"
-            + "jRcHbM9KQnsE5Z4fh4wmN5ynG+5nbaF4O9otPOpFzYRvIhxFmHscWyOgRaMZiYEX\n"
-            + "7Qkzze+scAlc9E/EWRJQIFcxnxV/SYIT4qCTT1g2aKA8OCBO/ZTOleH8SzvTODjy\n"
-            + "W0lGHnh/ZqH6XGVcGUaJZZ2uHTck1+czuVVShNcXPW1W20T6E9UqzHbJHN0guQEN\n"
-            + "BFWdTIkBCACoLVdPr3gpQwzI+2NGXjdtoyqYoPlgfeyI2M1XQD/7+rLZTbi14ZjN\n"
-            + "vYkS/+/oGtVEmiYOiAVTwmkjCYkKGDgNcCiJVekiPAN6JryVv488wRc999b5LpFE\n"
-            + "fhLGwI0YxjcS4KFFnpMC3wSb6tJUnHRLVoE5d8icdiaOpgYdp7uqWkSx2oxqHgIb\n"
-            + "nuyrk3ydEcS4ZeGD+w+taIxMc9F1DS9kiXALD7xWgUkmqZLEQoNgF6KlwCHXRd3m\n"
-            + "rBCo97sE95yKcq98ZMIWuQtTcEccZsN/6jlsei+9RI0tqs+FbZnIFm/go9zk11Vl\n"
-            + "IQ9QFSj6ruqoKrYvNZuDDLD1lHvZPD4/ABEBAAGJAR8EGAECAAkFAlWdTIkCGwwA\n"
-            + "CgkQ7QYl3EYyiox+HAf/Z/OCQO3jxALAcn3oUb1g/IlHm6qZv7RJOFUsj/16fGiF\n"
-            + "rRTP15zMXzyqV+L/LGV/owvOsdD/o7boZz4C/U98COx0Nl1jOrmPATOl+xqsgpEj\n"
-            + "Fhk+eAR7exO2XxW+u2g4cYoSMosIOX5w1GrdsxQeaZDwiSJMEOR2cVLs3YI19Ci/\n"
-            + "FuzActZ0wJNk0nlNF6l8CAbzwN6pM9OIc/iBIwDjz92KUco0NF8XKZnxqhH4wfHB\n"
-            + "PGkTx8RwOvELUTDMtvYnG5R0QtND0RbOnmp4ZVZmeOjKSLo1mZliUZB1H2PPSxrA\n"
-            + "0oLr8+wLntz1SU7uS4ddvhSQW+j2M/0pa352KUwmrw==\n"
-            + "=o/aU\n"
-            + "-----END PGP PUBLIC KEY BLOCK-----\n",
-        "-----BEGIN PGP PRIVATE KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "lQOYBFWdTIkBCADOaygDKjLuRX6LXAvBAYB91cmTf1MSlmEy+qsG3c9ijjQixPkr\n"
-            + "atdYkocrrT2S0R9UGjksTOI2WN5S0lQfLA1RSk63KURQE+OF+IfNqdD6nQdLBs1w\n"
-            + "va+GDj/uvuI05I0oXf/M7POdFphutrS4EUDBnFPj6ns/0C2sTRTxliD+Y9Y9a84V\n"
-            + "DfVVUbJB6wc3LP3L6ImT+cSM7dLq3hZHya+9FNeYPmPYnBrkJyqf2NDd38Sddsro\n"
-            + "7smw/GgCZHnnuVNS4C7NsHr6900VKC+JDtdx+fqptixcAEJWiGoQfWqU+hYmia3p\n"
-            + "9+Xw02+3FcjOT6ONUCmHX+xlz0pXW4iIYlPpABEBAAEAB/wLoOXEJ+Buo+OZHjpb\n"
-            + "SSZf8GdGs+mOJoKbSJvR6zT/rFsrikUvOPmgt8B9qWjKmJVXO5L09+/Wd/MuX0L1\n"
-            + "7plhdvowP1bl2/j5VyLvZx2qwKXkiCGStFzrBGp9nKtJp4Z8O69pb//ZXaiAtDJC\n"
-            + "HFa1kYT4VgFTevrXtg/z/C0np4Yjx0mZpw4nfISEeHCiYCyRa/B8R1+Pc4uIcoSo\n"
-            + "G3aq6Ow9m/LGvw0MRO5qHvqoF41TLPQpGKjKEsCBKHF1qh0tOOUHnLGrvbmdFnGr\n"
-            + "UXJpRkLdRTnj8ufvA4XVZhImzL+lD+ALtjlV14xh8nsNKYL42880GFl5Cl0OtBcE\n"
-            + "lgQBBADPJ6kHdvUYOe0zugRdukBSYLkZcYwRiphom7dZuavYICIu6B14ljEONzVD\n"
-            + "mPhi2lDOawZOURKwYd9S4K11XWLsTYe7XEwkc+1Fpvu4L/JqnJTTnnvbx05ZsqD5\n"
-            + "j9tybPlrTuLrf2ctfcC03Z55wfo6azsbf89yrr6QX0+l9dlkYQQA/xcMdQJ0Z5vm\n"
-            + "kvyaCPsQzJc/8noVO9PMv7xJm14gJWK7Px3y2eBidzpCbVVFnGWW6CPb3qKerB5U\n"
-            + "pwcF4gCFWyP9C2YtnB0hgqixIPfR+UO8gpqdY6MP8NPspoXouffRn+Zic/P6Cxje\n"
-            + "/MGxNQBeRtqb2IGh1xZ8v/8tmmmxHIkEAP74HkGETcXmlj3/6RlwTBUAovPARSn7\n"
-            + "LDtOCPezg6mQmble1BvnTnAwOHKJVqjx+3qsGqMe8OGGXAxZPSU1xSmOShBFrpDp\n"
-            + "xArE67arE17pT1lyD/gmHRuqnNMvgRrwz1mDm3G2ohWkCVixEiB+8vPQfbZrJBgQ\n"
-            + "WxOF4RCo2WWyRKa0IFRlc3R1c2VyIE9uZSA8dGVzdDFAZXhhbXBsZS5jb20+iQE4\n"
-            + "BBMBAgAiBQJVnUyJAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRDtBiXc\n"
-            + "RjKKjHblB/9RaFO5+GTDIphAL/aVj2u+d8LqyUpBrDp3P06QDGpKGFMAovBuh+NL\n"
-            + "H76VKNIzQLQC8rdTj651fLcLMuJ1enQ3RblgRKr1oc+wqqtFHr4QyOQjE/N3C9GQ\n"
-            + "jEzfqn4qnp5KtZxYFnlvU5NGehid7M1HTZMxjRcHbM9KQnsE5Z4fh4wmN5ynG+5n\n"
-            + "baF4O9otPOpFzYRvIhxFmHscWyOgRaMZiYEX7Qkzze+scAlc9E/EWRJQIFcxnxV/\n"
-            + "SYIT4qCTT1g2aKA8OCBO/ZTOleH8SzvTODjyW0lGHnh/ZqH6XGVcGUaJZZ2uHTck\n"
-            + "1+czuVVShNcXPW1W20T6E9UqzHbJHN0gnQOYBFWdTIkBCACoLVdPr3gpQwzI+2NG\n"
-            + "XjdtoyqYoPlgfeyI2M1XQD/7+rLZTbi14ZjNvYkS/+/oGtVEmiYOiAVTwmkjCYkK\n"
-            + "GDgNcCiJVekiPAN6JryVv488wRc999b5LpFEfhLGwI0YxjcS4KFFnpMC3wSb6tJU\n"
-            + "nHRLVoE5d8icdiaOpgYdp7uqWkSx2oxqHgIbnuyrk3ydEcS4ZeGD+w+taIxMc9F1\n"
-            + "DS9kiXALD7xWgUkmqZLEQoNgF6KlwCHXRd3mrBCo97sE95yKcq98ZMIWuQtTcEcc\n"
-            + "ZsN/6jlsei+9RI0tqs+FbZnIFm/go9zk11VlIQ9QFSj6ruqoKrYvNZuDDLD1lHvZ\n"
-            + "PD4/ABEBAAEAB/4kQnJauehcbRpqktjaqSGmP9HFSp+50CyZbLUJJM8m0uyQsZMr\n"
-            + "k9JQOZc+Q3RERNTKj7m41Fbhsj7c0Qd856/eJdp3kdBME0hko8lxN/X4EWGjeLYe\n"
-            + "z41+iPgfZhCF0Oa66TecPQ5RRihGPaDPoVPpkmMWMt9L7KVviBg1eJ6bobVIY5hu\n"
-            + "a7KFJHZQcCI1OvdJ0cx89KDSbnH8iMM6Kmw1bE3D2FEaWctuKLBo5PNRgyTJvdBd\n"
-            + "PSf56/Rc6csPqmOntQi2Yn8n47eCOTclHNuygSTJeHPpymVuWbhMq6fhJat/xA+V\n"
-            + "kyT8I2c45RQb0dKId+wEytjbKw8AI6Q3GXqhBADOhsr9M+JWc4MpD43mCDZACN4v\n"
-            + "RBRxSrJvO/V6HqQPmKYRmr9Gk3vxgF0zCf5zB1QeBiXpTpShxV87RIbUYReOyavp\n"
-            + "87zH6/SkRxQJiBEpQh5Fu5CoAaxGOivxbPqdWHrBY6jvqkrRoMPNiFJ6/ty5w9jx\n"
-            + "i9kGm9PelQGu2SdLNwQA0HbGo8sC8h5TSTEDCkFHRYzVYONx+32AlkCsJX9mEt0E\n"
-            + "nG8d97Ay24JsbnuXSq04FJrqzjOVyHLUffpXnAGELJZVNCIparSyqIaj43UG/oPc\n"
-            + "ICPmR7zI9G49ICUPSzI7+S2+BwjbiHRQcP0zmxbH92G4abYwKfk7dsDpGyVM+TkD\n"
-            + "/2nUiV0CRqnGipeiLWNjW/Md0ufkwqBvCWxrtxj0rQCyvBOVg3B6DocVNzgOOYa1\n"
-            + "ji3We5A9mSP40JBmMfk2veFrDdsGn4G+OpzMxKQtNfYemqjALfZ2zTdax0mXPXy6\n"
-            + "Gl0jUgSGrxGm8QnRLsrRx7G7ZKnvkcS+YsdQ8dbtzvJtQfiJAR8EGAECAAkFAlWd\n"
-            + "TIkCGwwACgkQ7QYl3EYyiox+HAf/Z/OCQO3jxALAcn3oUb1g/IlHm6qZv7RJOFUs\n"
-            + "j/16fGiFrRTP15zMXzyqV+L/LGV/owvOsdD/o7boZz4C/U98COx0Nl1jOrmPATOl\n"
-            + "+xqsgpEjFhk+eAR7exO2XxW+u2g4cYoSMosIOX5w1GrdsxQeaZDwiSJMEOR2cVLs\n"
-            + "3YI19Ci/FuzActZ0wJNk0nlNF6l8CAbzwN6pM9OIc/iBIwDjz92KUco0NF8XKZnx\n"
-            + "qhH4wfHBPGkTx8RwOvELUTDMtvYnG5R0QtND0RbOnmp4ZVZmeOjKSLo1mZliUZB1\n"
-            + "H2PPSxrA0oLr8+wLntz1SU7uS4ddvhSQW+j2M/0pa352KUwmrw==\n"
-            + "=MuAn\n"
-            + "-----END PGP PRIVATE KEY BLOCK-----\n");
+        """
+        -----BEGIN PGP PUBLIC KEY BLOCK-----
+        Version: GnuPG v1
+
+        mQENBFWdTIkBCADOaygDKjLuRX6LXAvBAYB91cmTf1MSlmEy+qsG3c9ijjQixPkr
+        atdYkocrrT2S0R9UGjksTOI2WN5S0lQfLA1RSk63KURQE+OF+IfNqdD6nQdLBs1w
+        va+GDj/uvuI05I0oXf/M7POdFphutrS4EUDBnFPj6ns/0C2sTRTxliD+Y9Y9a84V
+        DfVVUbJB6wc3LP3L6ImT+cSM7dLq3hZHya+9FNeYPmPYnBrkJyqf2NDd38Sddsro
+        7smw/GgCZHnnuVNS4C7NsHr6900VKC+JDtdx+fqptixcAEJWiGoQfWqU+hYmia3p
+        9+Xw02+3FcjOT6ONUCmHX+xlz0pXW4iIYlPpABEBAAG0IFRlc3R1c2VyIE9uZSA8
+        dGVzdDFAZXhhbXBsZS5jb20+iQE4BBMBAgAiBQJVnUyJAhsDBgsJCAcDAgYVCAIJ
+        CgsEFgIDAQIeAQIXgAAKCRDtBiXcRjKKjHblB/9RaFO5+GTDIphAL/aVj2u+d8Lq
+        yUpBrDp3P06QDGpKGFMAovBuh+NLH76VKNIzQLQC8rdTj651fLcLMuJ1enQ3Rblg
+        RKr1oc+wqqtFHr4QyOQjE/N3C9GQjEzfqn4qnp5KtZxYFnlvU5NGehid7M1HTZMx
+        jRcHbM9KQnsE5Z4fh4wmN5ynG+5nbaF4O9otPOpFzYRvIhxFmHscWyOgRaMZiYEX
+        7Qkzze+scAlc9E/EWRJQIFcxnxV/SYIT4qCTT1g2aKA8OCBO/ZTOleH8SzvTODjy
+        W0lGHnh/ZqH6XGVcGUaJZZ2uHTck1+czuVVShNcXPW1W20T6E9UqzHbJHN0guQEN
+        BFWdTIkBCACoLVdPr3gpQwzI+2NGXjdtoyqYoPlgfeyI2M1XQD/7+rLZTbi14ZjN
+        vYkS/+/oGtVEmiYOiAVTwmkjCYkKGDgNcCiJVekiPAN6JryVv488wRc999b5LpFE
+        fhLGwI0YxjcS4KFFnpMC3wSb6tJUnHRLVoE5d8icdiaOpgYdp7uqWkSx2oxqHgIb
+        nuyrk3ydEcS4ZeGD+w+taIxMc9F1DS9kiXALD7xWgUkmqZLEQoNgF6KlwCHXRd3m
+        rBCo97sE95yKcq98ZMIWuQtTcEccZsN/6jlsei+9RI0tqs+FbZnIFm/go9zk11Vl
+        IQ9QFSj6ruqoKrYvNZuDDLD1lHvZPD4/ABEBAAGJAR8EGAECAAkFAlWdTIkCGwwA
+        CgkQ7QYl3EYyiox+HAf/Z/OCQO3jxALAcn3oUb1g/IlHm6qZv7RJOFUsj/16fGiF
+        rRTP15zMXzyqV+L/LGV/owvOsdD/o7boZz4C/U98COx0Nl1jOrmPATOl+xqsgpEj
+        Fhk+eAR7exO2XxW+u2g4cYoSMosIOX5w1GrdsxQeaZDwiSJMEOR2cVLs3YI19Ci/
+        FuzActZ0wJNk0nlNF6l8CAbzwN6pM9OIc/iBIwDjz92KUco0NF8XKZnxqhH4wfHB
+        PGkTx8RwOvELUTDMtvYnG5R0QtND0RbOnmp4ZVZmeOjKSLo1mZliUZB1H2PPSxrA
+        0oLr8+wLntz1SU7uS4ddvhSQW+j2M/0pa352KUwmrw==
+        =o/aU
+        -----END PGP PUBLIC KEY BLOCK-----
+        """,
+        """
+        -----BEGIN PGP PRIVATE KEY BLOCK-----
+        Version: GnuPG v1
+
+        lQOYBFWdTIkBCADOaygDKjLuRX6LXAvBAYB91cmTf1MSlmEy+qsG3c9ijjQixPkr
+        atdYkocrrT2S0R9UGjksTOI2WN5S0lQfLA1RSk63KURQE+OF+IfNqdD6nQdLBs1w
+        va+GDj/uvuI05I0oXf/M7POdFphutrS4EUDBnFPj6ns/0C2sTRTxliD+Y9Y9a84V
+        DfVVUbJB6wc3LP3L6ImT+cSM7dLq3hZHya+9FNeYPmPYnBrkJyqf2NDd38Sddsro
+        7smw/GgCZHnnuVNS4C7NsHr6900VKC+JDtdx+fqptixcAEJWiGoQfWqU+hYmia3p
+        9+Xw02+3FcjOT6ONUCmHX+xlz0pXW4iIYlPpABEBAAEAB/wLoOXEJ+Buo+OZHjpb
+        SSZf8GdGs+mOJoKbSJvR6zT/rFsrikUvOPmgt8B9qWjKmJVXO5L09+/Wd/MuX0L1
+        7plhdvowP1bl2/j5VyLvZx2qwKXkiCGStFzrBGp9nKtJp4Z8O69pb//ZXaiAtDJC
+        HFa1kYT4VgFTevrXtg/z/C0np4Yjx0mZpw4nfISEeHCiYCyRa/B8R1+Pc4uIcoSo
+        G3aq6Ow9m/LGvw0MRO5qHvqoF41TLPQpGKjKEsCBKHF1qh0tOOUHnLGrvbmdFnGr
+        UXJpRkLdRTnj8ufvA4XVZhImzL+lD+ALtjlV14xh8nsNKYL42880GFl5Cl0OtBcE
+        lgQBBADPJ6kHdvUYOe0zugRdukBSYLkZcYwRiphom7dZuavYICIu6B14ljEONzVD
+        mPhi2lDOawZOURKwYd9S4K11XWLsTYe7XEwkc+1Fpvu4L/JqnJTTnnvbx05ZsqD5
+        j9tybPlrTuLrf2ctfcC03Z55wfo6azsbf89yrr6QX0+l9dlkYQQA/xcMdQJ0Z5vm
+        kvyaCPsQzJc/8noVO9PMv7xJm14gJWK7Px3y2eBidzpCbVVFnGWW6CPb3qKerB5U
+        pwcF4gCFWyP9C2YtnB0hgqixIPfR+UO8gpqdY6MP8NPspoXouffRn+Zic/P6Cxje
+        /MGxNQBeRtqb2IGh1xZ8v/8tmmmxHIkEAP74HkGETcXmlj3/6RlwTBUAovPARSn7
+        LDtOCPezg6mQmble1BvnTnAwOHKJVqjx+3qsGqMe8OGGXAxZPSU1xSmOShBFrpDp
+        xArE67arE17pT1lyD/gmHRuqnNMvgRrwz1mDm3G2ohWkCVixEiB+8vPQfbZrJBgQ
+        WxOF4RCo2WWyRKa0IFRlc3R1c2VyIE9uZSA8dGVzdDFAZXhhbXBsZS5jb20+iQE4
+        BBMBAgAiBQJVnUyJAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRDtBiXc
+        RjKKjHblB/9RaFO5+GTDIphAL/aVj2u+d8LqyUpBrDp3P06QDGpKGFMAovBuh+NL
+        H76VKNIzQLQC8rdTj651fLcLMuJ1enQ3RblgRKr1oc+wqqtFHr4QyOQjE/N3C9GQ
+        jEzfqn4qnp5KtZxYFnlvU5NGehid7M1HTZMxjRcHbM9KQnsE5Z4fh4wmN5ynG+5n
+        baF4O9otPOpFzYRvIhxFmHscWyOgRaMZiYEX7Qkzze+scAlc9E/EWRJQIFcxnxV/
+        SYIT4qCTT1g2aKA8OCBO/ZTOleH8SzvTODjyW0lGHnh/ZqH6XGVcGUaJZZ2uHTck
+        1+czuVVShNcXPW1W20T6E9UqzHbJHN0gnQOYBFWdTIkBCACoLVdPr3gpQwzI+2NG
+        XjdtoyqYoPlgfeyI2M1XQD/7+rLZTbi14ZjNvYkS/+/oGtVEmiYOiAVTwmkjCYkK
+        GDgNcCiJVekiPAN6JryVv488wRc999b5LpFEfhLGwI0YxjcS4KFFnpMC3wSb6tJU
+        nHRLVoE5d8icdiaOpgYdp7uqWkSx2oxqHgIbnuyrk3ydEcS4ZeGD+w+taIxMc9F1
+        DS9kiXALD7xWgUkmqZLEQoNgF6KlwCHXRd3mrBCo97sE95yKcq98ZMIWuQtTcEcc
+        ZsN/6jlsei+9RI0tqs+FbZnIFm/go9zk11VlIQ9QFSj6ruqoKrYvNZuDDLD1lHvZ
+        PD4/ABEBAAEAB/4kQnJauehcbRpqktjaqSGmP9HFSp+50CyZbLUJJM8m0uyQsZMr
+        k9JQOZc+Q3RERNTKj7m41Fbhsj7c0Qd856/eJdp3kdBME0hko8lxN/X4EWGjeLYe
+        z41+iPgfZhCF0Oa66TecPQ5RRihGPaDPoVPpkmMWMt9L7KVviBg1eJ6bobVIY5hu
+        a7KFJHZQcCI1OvdJ0cx89KDSbnH8iMM6Kmw1bE3D2FEaWctuKLBo5PNRgyTJvdBd
+        PSf56/Rc6csPqmOntQi2Yn8n47eCOTclHNuygSTJeHPpymVuWbhMq6fhJat/xA+V
+        kyT8I2c45RQb0dKId+wEytjbKw8AI6Q3GXqhBADOhsr9M+JWc4MpD43mCDZACN4v
+        RBRxSrJvO/V6HqQPmKYRmr9Gk3vxgF0zCf5zB1QeBiXpTpShxV87RIbUYReOyavp
+        87zH6/SkRxQJiBEpQh5Fu5CoAaxGOivxbPqdWHrBY6jvqkrRoMPNiFJ6/ty5w9jx
+        i9kGm9PelQGu2SdLNwQA0HbGo8sC8h5TSTEDCkFHRYzVYONx+32AlkCsJX9mEt0E
+        nG8d97Ay24JsbnuXSq04FJrqzjOVyHLUffpXnAGELJZVNCIparSyqIaj43UG/oPc
+        ICPmR7zI9G49ICUPSzI7+S2+BwjbiHRQcP0zmxbH92G4abYwKfk7dsDpGyVM+TkD
+        /2nUiV0CRqnGipeiLWNjW/Md0ufkwqBvCWxrtxj0rQCyvBOVg3B6DocVNzgOOYa1
+        ji3We5A9mSP40JBmMfk2veFrDdsGn4G+OpzMxKQtNfYemqjALfZ2zTdax0mXPXy6
+        Gl0jUgSGrxGm8QnRLsrRx7G7ZKnvkcS+YsdQ8dbtzvJtQfiJAR8EGAECAAkFAlWd
+        TIkCGwwACgkQ7QYl3EYyiox+HAf/Z/OCQO3jxALAcn3oUb1g/IlHm6qZv7RJOFUs
+        j/16fGiFrRTP15zMXzyqV+L/LGV/owvOsdD/o7boZz4C/U98COx0Nl1jOrmPATOl
+        +xqsgpEjFhk+eAR7exO2XxW+u2g4cYoSMosIOX5w1GrdsxQeaZDwiSJMEOR2cVLs
+        3YI19Ci/FuzActZ0wJNk0nlNF6l8CAbzwN6pM9OIc/iBIwDjz92KUco0NF8XKZnx
+        qhH4wfHBPGkTx8RwOvELUTDMtvYnG5R0QtND0RbOnmp4ZVZmeOjKSLo1mZliUZB1
+        H2PPSxrA0oLr8+wLntz1SU7uS4ddvhSQW+j2M/0pa352KUwmrw==
+        =MuAn
+        -----END PGP PRIVATE KEY BLOCK-----
+        """);
   }
 
   /**
@@ -136,94 +140,98 @@
    */
   public static final TestKey validKeyWithExpiration() {
     return new TestKey(
-        "-----BEGIN PGP PUBLIC KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "mQENBFWdTP8BCADRxNpasIv0jtNXTK6VYIS2VJ2Xk0ZD6gtxeoXCpjQ+TsB9fxh3\n"
-            + "vAMPt2Zu5LqoGwygKOJj1zquG8xk7GUCCHJk3+qG8xxB1xGtSz2vLyfRm7fOZmHj\n"
-            + "3W/C/25lynSPDrfvcwvwA4PN8iP5EWbWU10L6WOZGMwwwtVDUSEouSOw2LEepxLV\n"
-            + "rkKuZcyHaivheDbUlZliwe9rGXd4hh1h4qyNQWG3q+ytlL28sVkOzUh6IMBTvqhe\n"
-            + "IRsvxvaVSLV8jRVKfUTqw0g57ft4ZD2/L46yUTXzr9aUCBjTNxvWLlyboqql/D8P\n"
-            + "inp51h3cvAg7NW5RdG1GEYmylH8SygT5utPxABEBAAG0IFRlc3R1c2VyIFR3byA8\n"
-            + "dGVzdDJAZXhhbXBsZS5jb20+iQE+BBMBAgAoBQJVnUz/AhsDBQld/A8ABgsJCAcD\n"
-            + "AgYVCAIJCgsEFgIDAQIeAQIXgAAKCRBFMRpvN4oK7UZqCACWwQL/YvBK4b0m+R0d\n"
-            + "UdvAXeBx7DwOAnAodis9ZVqChb7RxcZQxF1Ti9mtCBPPQGuEs5wE2Ocrrq+L13r6\n"
-            + "bgW+1WOB1tZSDVxwL1PnZFw/SyADRIDCZrOHiAkp82UnZwWAkk39GzNJtt1wTYDZ\n"
-            + "FMTFUr2SPscXk1k7muS+ZfEFwNPD4tODo/poJKDYEJ80Z5UXXFQLDtsfdeIXMFIT\n"
-            + "449CYoq8XBMBfvyWl/LLpw0r3JI6pV/YdH3Oeuz8XkkEVzRxaxB6Zmeo5jSwjR/T\n"
-            + "8TKDGwwiuwiiT3SfkFSVdcjKulRuXSRNs1Ouf7/UC3cq4bG2WXWa85X1+HQRm7iu\n"
-            + "RHSOuQENBFWdTP8BCADhhGxAA0pX5yBHwIgM1j0gw2h5nSsopDrO6t/sbRUcNxnR\n"
-            + "tBScgKZnP0sjRTYEUIwmZuseHMBohtVCuMaDt06qyZDvDk/98j3AeE5t2dgFnOIe\n"
-            + "qCrm/6aejbFcQOpxe6U29KJRCAxuwNtB15X1VH1Kj7B0gRSTu13n/5sUsi2lunoZ\n"
-            + "oIvpIe9tZH4aXitCY2MCQH+hTyCyNBzlEa44kWz6LxUsPdo7I6rXkTr6Ot7wQh+9\n"
-            + "7HCe042GIq65h0apgujyjhJidjch5ur1mngaSNSEyvbji2MGC+cd3wAIstG5a7xP\n"
-            + "d9MncY5Q/eH+hn96694k5bckottSyGm/3f2Ihfj1ABEBAAGJASUEGAECAA8FAlWd\n"
-            + "TP8CGwwFCV38DwAACgkQRTEabzeKCu1FNwgAif4eK2v7R3QubL2S6wmb1nsgRMgV\n"
-            + "YoxGBeUk2EK6WZ5IPor93ySd0ixRVNMRmJ8BLH3EMjZQTzkDG+BH6zFyxo6lLHw9\n"
-            + "NxQjI06tqQWgyyK0mEweVwB/zqtxiB4lNUpsNbqOZWnBJ3d6o1SsnD2Q3uwvP5fb\n"
-            + "fSIgdmUk3c0VMdgA+KzWjPD/PJIPujE+ckHhjn5cbDNw35/FuyhkLJfqlOG7SPvM\n"
-            + "NmCdJ1Pcqju9t7sf6b0BGPDOCL4gpuWKK7HJz9WxngNb3FSziLbyPLk13ynADO+v\n"
-            + "EOR44LPyXE9kVxPusazsXlt9ayTOhELhwzw7sGFFu8E17Cpn7GnVj3tN9A==\n"
-            + "=1e/A\n"
-            + "-----END PGP PUBLIC KEY BLOCK-----\n",
-        "-----BEGIN PGP PRIVATE KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "lQOYBFWdTP8BCADRxNpasIv0jtNXTK6VYIS2VJ2Xk0ZD6gtxeoXCpjQ+TsB9fxh3\n"
-            + "vAMPt2Zu5LqoGwygKOJj1zquG8xk7GUCCHJk3+qG8xxB1xGtSz2vLyfRm7fOZmHj\n"
-            + "3W/C/25lynSPDrfvcwvwA4PN8iP5EWbWU10L6WOZGMwwwtVDUSEouSOw2LEepxLV\n"
-            + "rkKuZcyHaivheDbUlZliwe9rGXd4hh1h4qyNQWG3q+ytlL28sVkOzUh6IMBTvqhe\n"
-            + "IRsvxvaVSLV8jRVKfUTqw0g57ft4ZD2/L46yUTXzr9aUCBjTNxvWLlyboqql/D8P\n"
-            + "inp51h3cvAg7NW5RdG1GEYmylH8SygT5utPxABEBAAEAB/0WW33OVqzEBwj9b/3X\n"
-            + "i+75I/Gb+yVtDZ/km2NwSJie33PirE4mTNKitTBkt1oxmphw5Yqji4gEkI/rXcqy\n"
-            + "OcY/fCIZ+gVT+yE2MCPF7Se4Tnl7tSvPxoUn6mOQ09AygyYVjlSCY02EAL/WxwUH\n"
-            + "6OCs6VYlNiBlPg7O2vHGzlzAd1aMmlG3ytlhb0SIbilaJn/wlQ2SEGySjIAP1qRH\n"
-            + "UXsTfW7oAjdqAY1CbCWg/0FnMBF+DnChH634dbLrS2OefcB70l61trEfRcHbMNTv\n"
-            + "9nVxDDCpaIdxsOfgWpe0GMG1qddRAxBIOVjNUFOL22xEFyaXnt/uagUtKQ7yejci\n"
-            + "bgTFBADcuhsfQaBX1G095iG2qr8Rx2T5GqNf9oZA+rbweWegqIH7MUXHI1KKwwJx\n"
-            + "C+rR5AgnxTSP614XI/AWB/txdelm8z0jLobpS6B1vzM2vRQ7hpwjJ3UvUkoQ5uYL\n"
-            + "DjaBqQi0w1cPJA79H0Yujc1zgdhATymz0uDL1BC2bHLIMuhelwQA80p07G1w8HLQ\n"
-            + "bTdgNwtDBMKIw39/ZyQy8ppxmpD4J6zf25r95g3er0r+njrHsa+72LnvexbedpKA\n"
-            + "4eiDJPN+l5jJOEWfL2WtGcqJ01bdFBPcl73tuwDJJtieUlKZH0jRjykuuUX8F+tJ\n"
-            + "yrmVoIGtawoeLKq3hMMOK4xi+sh3OrcD+wXIU24eO3YfUde5bhyaQplNMU5smIU0\n"
-            + "+looOEmFsZcTONgoN+FKrnm2TY9d4FHZ+QgtnksWHmmLxQJPtp9rHJ5BgdxMBPcK\n"
-            + "3w5GXRuWlOmqmnAb6vp0Q0yzVDLKCcwba0S23m3tbjZsLDcI7MG/knsp9gtL676D\n"
-            + "AsrpeF2+Apj0OwG0IFRlc3R1c2VyIFR3byA8dGVzdDJAZXhhbXBsZS5jb20+iQE+\n"
-            + "BBMBAgAoBQJVnUz/AhsDBQld/A8ABgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAK\n"
-            + "CRBFMRpvN4oK7UZqCACWwQL/YvBK4b0m+R0dUdvAXeBx7DwOAnAodis9ZVqChb7R\n"
-            + "xcZQxF1Ti9mtCBPPQGuEs5wE2Ocrrq+L13r6bgW+1WOB1tZSDVxwL1PnZFw/SyAD\n"
-            + "RIDCZrOHiAkp82UnZwWAkk39GzNJtt1wTYDZFMTFUr2SPscXk1k7muS+ZfEFwNPD\n"
-            + "4tODo/poJKDYEJ80Z5UXXFQLDtsfdeIXMFIT449CYoq8XBMBfvyWl/LLpw0r3JI6\n"
-            + "pV/YdH3Oeuz8XkkEVzRxaxB6Zmeo5jSwjR/T8TKDGwwiuwiiT3SfkFSVdcjKulRu\n"
-            + "XSRNs1Ouf7/UC3cq4bG2WXWa85X1+HQRm7iuRHSOnQOYBFWdTP8BCADhhGxAA0pX\n"
-            + "5yBHwIgM1j0gw2h5nSsopDrO6t/sbRUcNxnRtBScgKZnP0sjRTYEUIwmZuseHMBo\n"
-            + "htVCuMaDt06qyZDvDk/98j3AeE5t2dgFnOIeqCrm/6aejbFcQOpxe6U29KJRCAxu\n"
-            + "wNtB15X1VH1Kj7B0gRSTu13n/5sUsi2lunoZoIvpIe9tZH4aXitCY2MCQH+hTyCy\n"
-            + "NBzlEa44kWz6LxUsPdo7I6rXkTr6Ot7wQh+97HCe042GIq65h0apgujyjhJidjch\n"
-            + "5ur1mngaSNSEyvbji2MGC+cd3wAIstG5a7xPd9MncY5Q/eH+hn96694k5bckottS\n"
-            + "yGm/3f2Ihfj1ABEBAAEAB/wP5H+mcTTrhe+57sEHuo9bQDocG+3fMtesHlRCept6\n"
-            + "vg1VQG4Va2GOtCCs7yMz4aNGz4jxOdB7bUkZJyFiRehG0+ahWi5b9JbSegf46Nm2\n"
-            + "54vt4icH2WtaEB04JaD/91k4yrunnzwVEAVDmhhIzjf4KbEjPLeBA7rF7zb0Gexq\n"
-            + "mdxEGO/6KdeQ6KOxkpWEqIIdl/mAGsYCprHeKL/XL+KXYr92nEbUcltmt59TTnoo\n"
-            + "00BQCPuHCdpcUd5nuaxpCZLM+BEpxtj0sinz0ofuWU9RI4K00R01MKXWMucdOhTZ\n"
-            + "kUy5dMx8wA07xbjkE/nH86N76Mty133OB7G3lBBDfO4PBADulfLzbjXUnS1kTKeP\n"
-            + "j/HF1E9qafzTDS/QD55OVajDq66A6zaOazKbURHNZmIqpLO4715+iNtrZQUEP3e1\n"
-            + "mwngeizvAv9luA9kJ1YDTCfsS5H5cYzavhfwuqBu7fQBm/PQqZplQuPCxgXEIBaY\n"
-            + "M0uvR0I/FSwFrepRN2IA6dAkrwQA8fpJEg8C9OLFzDf0rxV3eWwEelemN4E50Obu\n"
-            + "nxtg9IJWZ+QIWkRVLJ8if5+p85s2ieCw8hzEF0FyNfWUnfW5eoN4/j50loR4EbZS\n"
-            + "qOpUJGwr8ezyQN8PpduDOe9OQnUYAv9FY9Rk46L4937GDF2w5gdxyNdKO8yG+Z3A\n"
-            + "6/0DLZsEAOQsRUXIl1XLjkdugfFQ8V9Fv3AYWJt+8zknwcQ+Z3uOtyY2muCi9hX2\n"
-            + "BtuPojjwmN6x8wntMaUkzYHVSdz/cdx+na7VNS2kZHfnECWZGR6IHyRTJN5612yi\n"
-            + "e4MIdTE+BgL1HPq+VIPlMBehEksC5qM0WSq8baMsacGMYeAL8ntoRuyJASUEGAEC\n"
-            + "AA8FAlWdTP8CGwwFCV38DwAACgkQRTEabzeKCu1FNwgAif4eK2v7R3QubL2S6wmb\n"
-            + "1nsgRMgVYoxGBeUk2EK6WZ5IPor93ySd0ixRVNMRmJ8BLH3EMjZQTzkDG+BH6zFy\n"
-            + "xo6lLHw9NxQjI06tqQWgyyK0mEweVwB/zqtxiB4lNUpsNbqOZWnBJ3d6o1SsnD2Q\n"
-            + "3uwvP5fbfSIgdmUk3c0VMdgA+KzWjPD/PJIPujE+ckHhjn5cbDNw35/FuyhkLJfq\n"
-            + "lOG7SPvMNmCdJ1Pcqju9t7sf6b0BGPDOCL4gpuWKK7HJz9WxngNb3FSziLbyPLk1\n"
-            + "3ynADO+vEOR44LPyXE9kVxPusazsXlt9ayTOhELhwzw7sGFFu8E17Cpn7GnVj3tN\n"
-            + "9A==\n"
-            + "=qbV3\n"
-            + "-----END PGP PRIVATE KEY BLOCK-----\n");
+        """
+        -----BEGIN PGP PUBLIC KEY BLOCK-----
+        Version: GnuPG v1
+
+        mQENBFWdTP8BCADRxNpasIv0jtNXTK6VYIS2VJ2Xk0ZD6gtxeoXCpjQ+TsB9fxh3
+        vAMPt2Zu5LqoGwygKOJj1zquG8xk7GUCCHJk3+qG8xxB1xGtSz2vLyfRm7fOZmHj
+        3W/C/25lynSPDrfvcwvwA4PN8iP5EWbWU10L6WOZGMwwwtVDUSEouSOw2LEepxLV
+        rkKuZcyHaivheDbUlZliwe9rGXd4hh1h4qyNQWG3q+ytlL28sVkOzUh6IMBTvqhe
+        IRsvxvaVSLV8jRVKfUTqw0g57ft4ZD2/L46yUTXzr9aUCBjTNxvWLlyboqql/D8P
+        inp51h3cvAg7NW5RdG1GEYmylH8SygT5utPxABEBAAG0IFRlc3R1c2VyIFR3byA8
+        dGVzdDJAZXhhbXBsZS5jb20+iQE+BBMBAgAoBQJVnUz/AhsDBQld/A8ABgsJCAcD
+        AgYVCAIJCgsEFgIDAQIeAQIXgAAKCRBFMRpvN4oK7UZqCACWwQL/YvBK4b0m+R0d
+        UdvAXeBx7DwOAnAodis9ZVqChb7RxcZQxF1Ti9mtCBPPQGuEs5wE2Ocrrq+L13r6
+        bgW+1WOB1tZSDVxwL1PnZFw/SyADRIDCZrOHiAkp82UnZwWAkk39GzNJtt1wTYDZ
+        FMTFUr2SPscXk1k7muS+ZfEFwNPD4tODo/poJKDYEJ80Z5UXXFQLDtsfdeIXMFIT
+        449CYoq8XBMBfvyWl/LLpw0r3JI6pV/YdH3Oeuz8XkkEVzRxaxB6Zmeo5jSwjR/T
+        8TKDGwwiuwiiT3SfkFSVdcjKulRuXSRNs1Ouf7/UC3cq4bG2WXWa85X1+HQRm7iu
+        RHSOuQENBFWdTP8BCADhhGxAA0pX5yBHwIgM1j0gw2h5nSsopDrO6t/sbRUcNxnR
+        tBScgKZnP0sjRTYEUIwmZuseHMBohtVCuMaDt06qyZDvDk/98j3AeE5t2dgFnOIe
+        qCrm/6aejbFcQOpxe6U29KJRCAxuwNtB15X1VH1Kj7B0gRSTu13n/5sUsi2lunoZ
+        oIvpIe9tZH4aXitCY2MCQH+hTyCyNBzlEa44kWz6LxUsPdo7I6rXkTr6Ot7wQh+9
+        7HCe042GIq65h0apgujyjhJidjch5ur1mngaSNSEyvbji2MGC+cd3wAIstG5a7xP
+        d9MncY5Q/eH+hn96694k5bckottSyGm/3f2Ihfj1ABEBAAGJASUEGAECAA8FAlWd
+        TP8CGwwFCV38DwAACgkQRTEabzeKCu1FNwgAif4eK2v7R3QubL2S6wmb1nsgRMgV
+        YoxGBeUk2EK6WZ5IPor93ySd0ixRVNMRmJ8BLH3EMjZQTzkDG+BH6zFyxo6lLHw9
+        NxQjI06tqQWgyyK0mEweVwB/zqtxiB4lNUpsNbqOZWnBJ3d6o1SsnD2Q3uwvP5fb
+        fSIgdmUk3c0VMdgA+KzWjPD/PJIPujE+ckHhjn5cbDNw35/FuyhkLJfqlOG7SPvM
+        NmCdJ1Pcqju9t7sf6b0BGPDOCL4gpuWKK7HJz9WxngNb3FSziLbyPLk13ynADO+v
+        EOR44LPyXE9kVxPusazsXlt9ayTOhELhwzw7sGFFu8E17Cpn7GnVj3tN9A==
+        =1e/A
+        -----END PGP PUBLIC KEY BLOCK-----
+        """,
+        """
+        -----BEGIN PGP PRIVATE KEY BLOCK-----
+        Version: GnuPG v1
+
+        lQOYBFWdTP8BCADRxNpasIv0jtNXTK6VYIS2VJ2Xk0ZD6gtxeoXCpjQ+TsB9fxh3
+        vAMPt2Zu5LqoGwygKOJj1zquG8xk7GUCCHJk3+qG8xxB1xGtSz2vLyfRm7fOZmHj
+        3W/C/25lynSPDrfvcwvwA4PN8iP5EWbWU10L6WOZGMwwwtVDUSEouSOw2LEepxLV
+        rkKuZcyHaivheDbUlZliwe9rGXd4hh1h4qyNQWG3q+ytlL28sVkOzUh6IMBTvqhe
+        IRsvxvaVSLV8jRVKfUTqw0g57ft4ZD2/L46yUTXzr9aUCBjTNxvWLlyboqql/D8P
+        inp51h3cvAg7NW5RdG1GEYmylH8SygT5utPxABEBAAEAB/0WW33OVqzEBwj9b/3X
+        i+75I/Gb+yVtDZ/km2NwSJie33PirE4mTNKitTBkt1oxmphw5Yqji4gEkI/rXcqy
+        OcY/fCIZ+gVT+yE2MCPF7Se4Tnl7tSvPxoUn6mOQ09AygyYVjlSCY02EAL/WxwUH
+        6OCs6VYlNiBlPg7O2vHGzlzAd1aMmlG3ytlhb0SIbilaJn/wlQ2SEGySjIAP1qRH
+        UXsTfW7oAjdqAY1CbCWg/0FnMBF+DnChH634dbLrS2OefcB70l61trEfRcHbMNTv
+        9nVxDDCpaIdxsOfgWpe0GMG1qddRAxBIOVjNUFOL22xEFyaXnt/uagUtKQ7yejci
+        bgTFBADcuhsfQaBX1G095iG2qr8Rx2T5GqNf9oZA+rbweWegqIH7MUXHI1KKwwJx
+        C+rR5AgnxTSP614XI/AWB/txdelm8z0jLobpS6B1vzM2vRQ7hpwjJ3UvUkoQ5uYL
+        DjaBqQi0w1cPJA79H0Yujc1zgdhATymz0uDL1BC2bHLIMuhelwQA80p07G1w8HLQ
+        bTdgNwtDBMKIw39/ZyQy8ppxmpD4J6zf25r95g3er0r+njrHsa+72LnvexbedpKA
+        4eiDJPN+l5jJOEWfL2WtGcqJ01bdFBPcl73tuwDJJtieUlKZH0jRjykuuUX8F+tJ
+        yrmVoIGtawoeLKq3hMMOK4xi+sh3OrcD+wXIU24eO3YfUde5bhyaQplNMU5smIU0
+        +looOEmFsZcTONgoN+FKrnm2TY9d4FHZ+QgtnksWHmmLxQJPtp9rHJ5BgdxMBPcK
+        3w5GXRuWlOmqmnAb6vp0Q0yzVDLKCcwba0S23m3tbjZsLDcI7MG/knsp9gtL676D
+        AsrpeF2+Apj0OwG0IFRlc3R1c2VyIFR3byA8dGVzdDJAZXhhbXBsZS5jb20+iQE+
+        BBMBAgAoBQJVnUz/AhsDBQld/A8ABgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAK
+        CRBFMRpvN4oK7UZqCACWwQL/YvBK4b0m+R0dUdvAXeBx7DwOAnAodis9ZVqChb7R
+        xcZQxF1Ti9mtCBPPQGuEs5wE2Ocrrq+L13r6bgW+1WOB1tZSDVxwL1PnZFw/SyAD
+        RIDCZrOHiAkp82UnZwWAkk39GzNJtt1wTYDZFMTFUr2SPscXk1k7muS+ZfEFwNPD
+        4tODo/poJKDYEJ80Z5UXXFQLDtsfdeIXMFIT449CYoq8XBMBfvyWl/LLpw0r3JI6
+        pV/YdH3Oeuz8XkkEVzRxaxB6Zmeo5jSwjR/T8TKDGwwiuwiiT3SfkFSVdcjKulRu
+        XSRNs1Ouf7/UC3cq4bG2WXWa85X1+HQRm7iuRHSOnQOYBFWdTP8BCADhhGxAA0pX
+        5yBHwIgM1j0gw2h5nSsopDrO6t/sbRUcNxnRtBScgKZnP0sjRTYEUIwmZuseHMBo
+        htVCuMaDt06qyZDvDk/98j3AeE5t2dgFnOIeqCrm/6aejbFcQOpxe6U29KJRCAxu
+        wNtB15X1VH1Kj7B0gRSTu13n/5sUsi2lunoZoIvpIe9tZH4aXitCY2MCQH+hTyCy
+        NBzlEa44kWz6LxUsPdo7I6rXkTr6Ot7wQh+97HCe042GIq65h0apgujyjhJidjch
+        5ur1mngaSNSEyvbji2MGC+cd3wAIstG5a7xPd9MncY5Q/eH+hn96694k5bckottS
+        yGm/3f2Ihfj1ABEBAAEAB/wP5H+mcTTrhe+57sEHuo9bQDocG+3fMtesHlRCept6
+        vg1VQG4Va2GOtCCs7yMz4aNGz4jxOdB7bUkZJyFiRehG0+ahWi5b9JbSegf46Nm2
+        54vt4icH2WtaEB04JaD/91k4yrunnzwVEAVDmhhIzjf4KbEjPLeBA7rF7zb0Gexq
+        mdxEGO/6KdeQ6KOxkpWEqIIdl/mAGsYCprHeKL/XL+KXYr92nEbUcltmt59TTnoo
+        00BQCPuHCdpcUd5nuaxpCZLM+BEpxtj0sinz0ofuWU9RI4K00R01MKXWMucdOhTZ
+        kUy5dMx8wA07xbjkE/nH86N76Mty133OB7G3lBBDfO4PBADulfLzbjXUnS1kTKeP
+        j/HF1E9qafzTDS/QD55OVajDq66A6zaOazKbURHNZmIqpLO4715+iNtrZQUEP3e1
+        mwngeizvAv9luA9kJ1YDTCfsS5H5cYzavhfwuqBu7fQBm/PQqZplQuPCxgXEIBaY
+        M0uvR0I/FSwFrepRN2IA6dAkrwQA8fpJEg8C9OLFzDf0rxV3eWwEelemN4E50Obu
+        nxtg9IJWZ+QIWkRVLJ8if5+p85s2ieCw8hzEF0FyNfWUnfW5eoN4/j50loR4EbZS
+        qOpUJGwr8ezyQN8PpduDOe9OQnUYAv9FY9Rk46L4937GDF2w5gdxyNdKO8yG+Z3A
+        6/0DLZsEAOQsRUXIl1XLjkdugfFQ8V9Fv3AYWJt+8zknwcQ+Z3uOtyY2muCi9hX2
+        BtuPojjwmN6x8wntMaUkzYHVSdz/cdx+na7VNS2kZHfnECWZGR6IHyRTJN5612yi
+        e4MIdTE+BgL1HPq+VIPlMBehEksC5qM0WSq8baMsacGMYeAL8ntoRuyJASUEGAEC
+        AA8FAlWdTP8CGwwFCV38DwAACgkQRTEabzeKCu1FNwgAif4eK2v7R3QubL2S6wmb
+        1nsgRMgVYoxGBeUk2EK6WZ5IPor93ySd0ixRVNMRmJ8BLH3EMjZQTzkDG+BH6zFy
+        xo6lLHw9NxQjI06tqQWgyyK0mEweVwB/zqtxiB4lNUpsNbqOZWnBJ3d6o1SsnD2Q
+        3uwvP5fbfSIgdmUk3c0VMdgA+KzWjPD/PJIPujE+ckHhjn5cbDNw35/FuyhkLJfq
+        lOG7SPvMNmCdJ1Pcqju9t7sf6b0BGPDOCL4gpuWKK7HJz9WxngNb3FSziLbyPLk1
+        3ynADO+vEOR44LPyXE9kVxPusazsXlt9ayTOhELhwzw7sGFFu8E17Cpn7GnVj3tN
+        9A==
+        =qbV3
+        -----END PGP PRIVATE KEY BLOCK-----
+        """);
   }
 
   /**
@@ -237,94 +245,98 @@
    */
   public static final TestKey expiredKey() {
     return new TestKey(
-        "-----BEGIN PGP PUBLIC KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "mQENBELOp0UBCACxholOPWuKhK+TYb88nvLUSCMvTLIFEpb5u3Eavr0wiluEzq6H\n"
-            + "55nswAD3dQm8DWxA7yUlEYjPr5btpw7V9441bb1+qtgZMJ10RTdEb/WjyctdGA99\n"
-            + "uOKBEarWbt8W+w6lyJ9NXy5bS/x5EwHHfoTFp4ff6ffHI5hbx1a00K8oxmitgd0X\n"
-            + "Mx86UmauFNJYupZOZG9gEcP4RbRp7e2pm4Jy1WLEOeg9Fdgm5e5Hj2nMkCSZ9BKV\n"
-            + "cxuOllSVzM/Zp0/4+RS9R57jKo3/V74Whwh9yQNgL9UxdNk7L0eGqvaT3EjXxjOc\n"
-            + "RCeJiucGN/0W2iq+V01/QGspp4SKtAogWBozABEBAAG0IlRlc3R1c2VyIFRocmVl\n"
-            + "IDx0ZXN0M0BleGFtcGxlLmNvbT6JAT4EEwECACgFAkLOp0UCGwMFCQHhM4AGCwkI\n"
-            + "BwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEDzseBsX3hrNYg0H/2CMm5/JDQNSuRFC\n"
-            + "ECWLrcOeimuvwbmkonNzOkvKbGXl73GStISAksRWAHBQED1rEPC0NkFCDeVZO7df\n"
-            + "SYLlsqKwV6uSh05Ra0F5XeniC12YpAyzoQyCGRS2wLaS822j0zUPXA8XLaO2blCu\n"
-            + "R+8sNu/oecMRcFK4S9NaApi3vdqBNhLiN1/Lpqn1LfB8uIO+eaUf4PmCWbaPgzSk\n"
-            + "qcPfKZmocNXdgLV5Q80n3hc2y2nrl+vDW2M+eVZuDHAok2BOD9uGKFfLAbaXLbX5\n"
-            + "btBW2L0UHtoEyiqkRfD6lX2laSLQmA6+eup7e4GS+s0vXBuVh8XEYddV6Yjt8H7/\n"
-            + "2thO41K5AQ0EQs6nRQEIAM/833UHK1DuFlOm7/n18dRMvs7BkXvg+hPquKWMG3be\n"
-            + "eE4sh1NG5DbRCdo6iacZLarWr3FDz7J9+wswRhtHCh3pGHEuaJk52vRjQxlkNh5F\n"
-            + "p5u2R4WF546bWqX45xPdLfHVTPyWB9q7aVxE+6Q+MHa6lMoyTVnTVCOy3nshiihw\n"
-            + "dxLsxaga+QmaL0bAR+dRcO6ucj7TDQXz1AJAVp26c0LXV9iErhFuuybUZKT0a9Aj\n"
-            + "FoumMZ6l+k30sSdjSjpBMsNvPos0dTPPRXUMu77o5sj+pHa4o8WctgB3o7BHQELp\n"
-            + "KgujZ2sKC9Nm395u6Q4cqUWihzb/Y7rIRuNHJarI7vUAEQEAAYkBJQQYAQIADwUC\n"
-            + "Qs6nRQIbDAUJAeEzgAAKCRA87HgbF94azRiBB/4vAyOOjUjK3lDWjHGs7mvEWJI/\n"
-            + "1MeLlGPswCSInJBa+HMiMI4tzq+hu5ejGThojNbmnL96GdzfDkMlP4Feyxb2rjtb\n"
-            + "NrD/R5tlXHmjX/QLzep4LCeMziP80fu8qUeiOej/Ecdny0w365PlMdt10RaYR8VE\n"
-            + "ZX/DAie6JfElnfQcG5q8TIOH3i71qxV+kIoPqKWfQ0MXrNEJ3BYFfDGdUt8U1Kq9\n"
-            + "OuIHVRgGS7mMSyjgNqqp7MBeMY+PFFZaZel5yoYVjb9d3L8XvVv2eoa/jPj5FUEU\n"
-            + "kE9uxNmwaD1PiV8DvBTYI+eQL4qzfu+3NTG2SfgQYtj5oiGHw8aL3U6QHDJb\n"
-            + "=d/Xp\n"
-            + "-----END PGP PUBLIC KEY BLOCK-----\n",
-        "-----BEGIN PGP PRIVATE KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "lQOYBELOp0UBCACxholOPWuKhK+TYb88nvLUSCMvTLIFEpb5u3Eavr0wiluEzq6H\n"
-            + "55nswAD3dQm8DWxA7yUlEYjPr5btpw7V9441bb1+qtgZMJ10RTdEb/WjyctdGA99\n"
-            + "uOKBEarWbt8W+w6lyJ9NXy5bS/x5EwHHfoTFp4ff6ffHI5hbx1a00K8oxmitgd0X\n"
-            + "Mx86UmauFNJYupZOZG9gEcP4RbRp7e2pm4Jy1WLEOeg9Fdgm5e5Hj2nMkCSZ9BKV\n"
-            + "cxuOllSVzM/Zp0/4+RS9R57jKo3/V74Whwh9yQNgL9UxdNk7L0eGqvaT3EjXxjOc\n"
-            + "RCeJiucGN/0W2iq+V01/QGspp4SKtAogWBozABEBAAEAB/4hGI3ckkLMTjRVa7G1\n"
-            + "YYSv4sr8dHXz0CVpZXKOo+Stef3Z4pZTK/BcXOdROvaXooD+EheAs6Yn4fpnT+/K\n"
-            + "IB7ZAx6C0OL8vz17gbPuBFltMZ/COUwaCi/gFCUfWQgqRp/SdHaOfCIuTxpAkDSS\n"
-            + "tpmWJ8eDDSFudMpgweb+SrF9DkCwp+FgUbzDRzO1aqzuu8PGihCHQt/pkhNHQ63/\n"
-            + "srDDqk6lIxxZHhv9+ucr3plDuijkvAa5/QDudQlucKDLtTPSD40UcqYnpg/V/RJU\n"
-            + "eBK0ZXmCIHpG9beHW/xdlwrK3eY4Z2sVDMm9TeeHmRYOCr5wQCyeLpMdAt0Ijk6a\n"
-            + "nINhBADI2lRodgnLvUKbOvVocz8WQjG1IXlL8iXSNuuHONijPXZiWh7XdkNxr9fm\n"
-            + "jRqzvZzYsWGT6MnirX2eXaEWJsWJHxTxJuiuOk0V/iGnV/d+jFduoKXNmB5k/ZB3\n"
-            + "6zySi7+STKNyIvnMATVsRoI/cNUwfmx53m6trFg581CnSiA82QQA4kSPw9OXmTKj\n"
-            + "ctlHrWsapWu+66pDVZw62lW6lvrd7t+m8liNb6VJuTnwIKVXJOQtUo1+GSMs0+YK\n"
-            + "wnd9FGq4jT8l0qBO4K/8B1HxppLC2S0ntC+CusxWMUDbdC2xg+G2W3oLwq3iamgz\n"
-            + "LvPTy1Pzs9PqDd6FXIdzieFy6J8W1+sEAKS3vjh7Z/PIVULZhdaohAd5Igd67S/Z\n"
-            + "BMWYNbBuJTnnb7DiOllLZSd2lR7IAKPKsUd6UY8uskOxI81hI116zNx17mIGFIIq\n"
-            + "DdDgRbvzMNEgNlOxg/BD01kXOS4fhnT2F6ca3VGTgUtOdcdF3M9MtePWQLBzEDPz\n"
-            + "8nx3O20HDupuQmG0IlRlc3R1c2VyIFRocmVlIDx0ZXN0M0BleGFtcGxlLmNvbT6J\n"
-            + "AT4EEwECACgFAkLOp0UCGwMFCQHhM4AGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheA\n"
-            + "AAoJEDzseBsX3hrNYg0H/2CMm5/JDQNSuRFCECWLrcOeimuvwbmkonNzOkvKbGXl\n"
-            + "73GStISAksRWAHBQED1rEPC0NkFCDeVZO7dfSYLlsqKwV6uSh05Ra0F5XeniC12Y\n"
-            + "pAyzoQyCGRS2wLaS822j0zUPXA8XLaO2blCuR+8sNu/oecMRcFK4S9NaApi3vdqB\n"
-            + "NhLiN1/Lpqn1LfB8uIO+eaUf4PmCWbaPgzSkqcPfKZmocNXdgLV5Q80n3hc2y2nr\n"
-            + "l+vDW2M+eVZuDHAok2BOD9uGKFfLAbaXLbX5btBW2L0UHtoEyiqkRfD6lX2laSLQ\n"
-            + "mA6+eup7e4GS+s0vXBuVh8XEYddV6Yjt8H7/2thO41KdA5gEQs6nRQEIAM/833UH\n"
-            + "K1DuFlOm7/n18dRMvs7BkXvg+hPquKWMG3beeE4sh1NG5DbRCdo6iacZLarWr3FD\n"
-            + "z7J9+wswRhtHCh3pGHEuaJk52vRjQxlkNh5Fp5u2R4WF546bWqX45xPdLfHVTPyW\n"
-            + "B9q7aVxE+6Q+MHa6lMoyTVnTVCOy3nshiihwdxLsxaga+QmaL0bAR+dRcO6ucj7T\n"
-            + "DQXz1AJAVp26c0LXV9iErhFuuybUZKT0a9AjFoumMZ6l+k30sSdjSjpBMsNvPos0\n"
-            + "dTPPRXUMu77o5sj+pHa4o8WctgB3o7BHQELpKgujZ2sKC9Nm395u6Q4cqUWihzb/\n"
-            + "Y7rIRuNHJarI7vUAEQEAAQAH+gNBKDf7FDzwdM37Sz8Ej7OsPcIbekzPcOpV3mzM\n"
-            + "u/NIuOY0QSvW7KRE8hwFlXjVZocJU/Z4Qqw+12pN55LusiRUrOq8eKuJIbl4QikI\n"
-            + "Dea8XUqM+CKJPV3YZXs6YVdIuzrRBSLgsB/Glff5JlzkEjsRYVmmnto8edETL/MK\n"
-            + "S9ClJqQiFKE4b01+Eh9oB/DfxzsiEf/a+rdRnWRh/jtpEwgeXcfmjhf+0zrzChu2\n"
-            + "ylQQ5QOuwQNKJP6DvRu/W5pOaKH9tPDR31SccDJDdnDUzBD7oSsXl06DcfMNEa8q\n"
-            + "PaNHLDDRNnqTEhwYSJ4r2emDFMxg7Kky+aatUNjAYk9vkgMEANnvumgr6/KCLWKc\n"
-            + "D3fZE09N7BveGBBDQBYNGPFtx60WbKrSY3e2RSfgWbyEXkzwm1VlB2869T1we0rL\n"
-            + "z6eV/TK5rrJQxJFHZ/anMxbQY0sCiOgqi6PKT03RTpA2N803hTym+oypy+5T6BFM\n"
-            + "rtjXvwIZN/BgAE2JjA70crTAd1mvBAD0UFNAU9oE7K7sgDbni4EhxmDyaviBHfxV\n"
-            + "PJP1ICUXAcEzAsz2T/L5TqZUD+LfYIkbf8wk2/mPZFfrCrQgCrzWn7KV1SHXkhf4\n"
-            + "4Sg6Y6p0g0Jl3mWRPiQ6ALlOVQIkp5V8z4b0hTF2c4oct1Pzaeq+ZkahyvrhW06P\n"
-            + "iaucRZb+mwP/aVTpkd4n/FyKCcbf9/KniYJ+Ou1OunsBQr/jzN+r0PKCb8l/ksig\n"
-            + "i/M0NGetemq9CxYsJDAyJs1aO4SWgx5LbfcMmyXDuJ3sL0ztFLOES31Mih3ZJebg\n"
-            + "xPpj2bB/67i2zeYRcjxQ116y23gOa2TWM8EE4TW7F/mQjw4fIPJ93ClBMIkBJQQY\n"
-            + "AQIADwUCQs6nRQIbDAUJAeEzgAAKCRA87HgbF94azRiBB/4vAyOOjUjK3lDWjHGs\n"
-            + "7mvEWJI/1MeLlGPswCSInJBa+HMiMI4tzq+hu5ejGThojNbmnL96GdzfDkMlP4Fe\n"
-            + "yxb2rjtbNrD/R5tlXHmjX/QLzep4LCeMziP80fu8qUeiOej/Ecdny0w365PlMdt1\n"
-            + "0RaYR8VEZX/DAie6JfElnfQcG5q8TIOH3i71qxV+kIoPqKWfQ0MXrNEJ3BYFfDGd\n"
-            + "Ut8U1Kq9OuIHVRgGS7mMSyjgNqqp7MBeMY+PFFZaZel5yoYVjb9d3L8XvVv2eoa/\n"
-            + "jPj5FUEUkE9uxNmwaD1PiV8DvBTYI+eQL4qzfu+3NTG2SfgQYtj5oiGHw8aL3U6Q\n"
-            + "HDJb\n"
-            + "=RrXv\n"
-            + "-----END PGP PRIVATE KEY BLOCK-----\n");
+        """
+        -----BEGIN PGP PUBLIC KEY BLOCK-----
+        Version: GnuPG v1
+
+        mQENBELOp0UBCACxholOPWuKhK+TYb88nvLUSCMvTLIFEpb5u3Eavr0wiluEzq6H
+        55nswAD3dQm8DWxA7yUlEYjPr5btpw7V9441bb1+qtgZMJ10RTdEb/WjyctdGA99
+        uOKBEarWbt8W+w6lyJ9NXy5bS/x5EwHHfoTFp4ff6ffHI5hbx1a00K8oxmitgd0X
+        Mx86UmauFNJYupZOZG9gEcP4RbRp7e2pm4Jy1WLEOeg9Fdgm5e5Hj2nMkCSZ9BKV
+        cxuOllSVzM/Zp0/4+RS9R57jKo3/V74Whwh9yQNgL9UxdNk7L0eGqvaT3EjXxjOc
+        RCeJiucGN/0W2iq+V01/QGspp4SKtAogWBozABEBAAG0IlRlc3R1c2VyIFRocmVl
+        IDx0ZXN0M0BleGFtcGxlLmNvbT6JAT4EEwECACgFAkLOp0UCGwMFCQHhM4AGCwkI
+        BwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEDzseBsX3hrNYg0H/2CMm5/JDQNSuRFC
+        ECWLrcOeimuvwbmkonNzOkvKbGXl73GStISAksRWAHBQED1rEPC0NkFCDeVZO7df
+        SYLlsqKwV6uSh05Ra0F5XeniC12YpAyzoQyCGRS2wLaS822j0zUPXA8XLaO2blCu
+        R+8sNu/oecMRcFK4S9NaApi3vdqBNhLiN1/Lpqn1LfB8uIO+eaUf4PmCWbaPgzSk
+        qcPfKZmocNXdgLV5Q80n3hc2y2nrl+vDW2M+eVZuDHAok2BOD9uGKFfLAbaXLbX5
+        btBW2L0UHtoEyiqkRfD6lX2laSLQmA6+eup7e4GS+s0vXBuVh8XEYddV6Yjt8H7/
+        2thO41K5AQ0EQs6nRQEIAM/833UHK1DuFlOm7/n18dRMvs7BkXvg+hPquKWMG3be
+        eE4sh1NG5DbRCdo6iacZLarWr3FDz7J9+wswRhtHCh3pGHEuaJk52vRjQxlkNh5F
+        p5u2R4WF546bWqX45xPdLfHVTPyWB9q7aVxE+6Q+MHa6lMoyTVnTVCOy3nshiihw
+        dxLsxaga+QmaL0bAR+dRcO6ucj7TDQXz1AJAVp26c0LXV9iErhFuuybUZKT0a9Aj
+        FoumMZ6l+k30sSdjSjpBMsNvPos0dTPPRXUMu77o5sj+pHa4o8WctgB3o7BHQELp
+        KgujZ2sKC9Nm395u6Q4cqUWihzb/Y7rIRuNHJarI7vUAEQEAAYkBJQQYAQIADwUC
+        Qs6nRQIbDAUJAeEzgAAKCRA87HgbF94azRiBB/4vAyOOjUjK3lDWjHGs7mvEWJI/
+        1MeLlGPswCSInJBa+HMiMI4tzq+hu5ejGThojNbmnL96GdzfDkMlP4Feyxb2rjtb
+        NrD/R5tlXHmjX/QLzep4LCeMziP80fu8qUeiOej/Ecdny0w365PlMdt10RaYR8VE
+        ZX/DAie6JfElnfQcG5q8TIOH3i71qxV+kIoPqKWfQ0MXrNEJ3BYFfDGdUt8U1Kq9
+        OuIHVRgGS7mMSyjgNqqp7MBeMY+PFFZaZel5yoYVjb9d3L8XvVv2eoa/jPj5FUEU
+        kE9uxNmwaD1PiV8DvBTYI+eQL4qzfu+3NTG2SfgQYtj5oiGHw8aL3U6QHDJb
+        =d/Xp
+        -----END PGP PUBLIC KEY BLOCK-----
+        """,
+        """
+        -----BEGIN PGP PRIVATE KEY BLOCK-----
+        Version: GnuPG v1
+
+        lQOYBELOp0UBCACxholOPWuKhK+TYb88nvLUSCMvTLIFEpb5u3Eavr0wiluEzq6H
+        55nswAD3dQm8DWxA7yUlEYjPr5btpw7V9441bb1+qtgZMJ10RTdEb/WjyctdGA99
+        uOKBEarWbt8W+w6lyJ9NXy5bS/x5EwHHfoTFp4ff6ffHI5hbx1a00K8oxmitgd0X
+        Mx86UmauFNJYupZOZG9gEcP4RbRp7e2pm4Jy1WLEOeg9Fdgm5e5Hj2nMkCSZ9BKV
+        cxuOllSVzM/Zp0/4+RS9R57jKo3/V74Whwh9yQNgL9UxdNk7L0eGqvaT3EjXxjOc
+        RCeJiucGN/0W2iq+V01/QGspp4SKtAogWBozABEBAAEAB/4hGI3ckkLMTjRVa7G1
+        YYSv4sr8dHXz0CVpZXKOo+Stef3Z4pZTK/BcXOdROvaXooD+EheAs6Yn4fpnT+/K
+        IB7ZAx6C0OL8vz17gbPuBFltMZ/COUwaCi/gFCUfWQgqRp/SdHaOfCIuTxpAkDSS
+        tpmWJ8eDDSFudMpgweb+SrF9DkCwp+FgUbzDRzO1aqzuu8PGihCHQt/pkhNHQ63/
+        srDDqk6lIxxZHhv9+ucr3plDuijkvAa5/QDudQlucKDLtTPSD40UcqYnpg/V/RJU
+        eBK0ZXmCIHpG9beHW/xdlwrK3eY4Z2sVDMm9TeeHmRYOCr5wQCyeLpMdAt0Ijk6a
+        nINhBADI2lRodgnLvUKbOvVocz8WQjG1IXlL8iXSNuuHONijPXZiWh7XdkNxr9fm
+        jRqzvZzYsWGT6MnirX2eXaEWJsWJHxTxJuiuOk0V/iGnV/d+jFduoKXNmB5k/ZB3
+        6zySi7+STKNyIvnMATVsRoI/cNUwfmx53m6trFg581CnSiA82QQA4kSPw9OXmTKj
+        ctlHrWsapWu+66pDVZw62lW6lvrd7t+m8liNb6VJuTnwIKVXJOQtUo1+GSMs0+YK
+        wnd9FGq4jT8l0qBO4K/8B1HxppLC2S0ntC+CusxWMUDbdC2xg+G2W3oLwq3iamgz
+        LvPTy1Pzs9PqDd6FXIdzieFy6J8W1+sEAKS3vjh7Z/PIVULZhdaohAd5Igd67S/Z
+        BMWYNbBuJTnnb7DiOllLZSd2lR7IAKPKsUd6UY8uskOxI81hI116zNx17mIGFIIq
+        DdDgRbvzMNEgNlOxg/BD01kXOS4fhnT2F6ca3VGTgUtOdcdF3M9MtePWQLBzEDPz
+        8nx3O20HDupuQmG0IlRlc3R1c2VyIFRocmVlIDx0ZXN0M0BleGFtcGxlLmNvbT6J
+        AT4EEwECACgFAkLOp0UCGwMFCQHhM4AGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheA
+        AAoJEDzseBsX3hrNYg0H/2CMm5/JDQNSuRFCECWLrcOeimuvwbmkonNzOkvKbGXl
+        73GStISAksRWAHBQED1rEPC0NkFCDeVZO7dfSYLlsqKwV6uSh05Ra0F5XeniC12Y
+        pAyzoQyCGRS2wLaS822j0zUPXA8XLaO2blCuR+8sNu/oecMRcFK4S9NaApi3vdqB
+        NhLiN1/Lpqn1LfB8uIO+eaUf4PmCWbaPgzSkqcPfKZmocNXdgLV5Q80n3hc2y2nr
+        l+vDW2M+eVZuDHAok2BOD9uGKFfLAbaXLbX5btBW2L0UHtoEyiqkRfD6lX2laSLQ
+        mA6+eup7e4GS+s0vXBuVh8XEYddV6Yjt8H7/2thO41KdA5gEQs6nRQEIAM/833UH
+        K1DuFlOm7/n18dRMvs7BkXvg+hPquKWMG3beeE4sh1NG5DbRCdo6iacZLarWr3FD
+        z7J9+wswRhtHCh3pGHEuaJk52vRjQxlkNh5Fp5u2R4WF546bWqX45xPdLfHVTPyW
+        B9q7aVxE+6Q+MHa6lMoyTVnTVCOy3nshiihwdxLsxaga+QmaL0bAR+dRcO6ucj7T
+        DQXz1AJAVp26c0LXV9iErhFuuybUZKT0a9AjFoumMZ6l+k30sSdjSjpBMsNvPos0
+        dTPPRXUMu77o5sj+pHa4o8WctgB3o7BHQELpKgujZ2sKC9Nm395u6Q4cqUWihzb/
+        Y7rIRuNHJarI7vUAEQEAAQAH+gNBKDf7FDzwdM37Sz8Ej7OsPcIbekzPcOpV3mzM
+        u/NIuOY0QSvW7KRE8hwFlXjVZocJU/Z4Qqw+12pN55LusiRUrOq8eKuJIbl4QikI
+        Dea8XUqM+CKJPV3YZXs6YVdIuzrRBSLgsB/Glff5JlzkEjsRYVmmnto8edETL/MK
+        S9ClJqQiFKE4b01+Eh9oB/DfxzsiEf/a+rdRnWRh/jtpEwgeXcfmjhf+0zrzChu2
+        ylQQ5QOuwQNKJP6DvRu/W5pOaKH9tPDR31SccDJDdnDUzBD7oSsXl06DcfMNEa8q
+        PaNHLDDRNnqTEhwYSJ4r2emDFMxg7Kky+aatUNjAYk9vkgMEANnvumgr6/KCLWKc
+        D3fZE09N7BveGBBDQBYNGPFtx60WbKrSY3e2RSfgWbyEXkzwm1VlB2869T1we0rL
+        z6eV/TK5rrJQxJFHZ/anMxbQY0sCiOgqi6PKT03RTpA2N803hTym+oypy+5T6BFM
+        rtjXvwIZN/BgAE2JjA70crTAd1mvBAD0UFNAU9oE7K7sgDbni4EhxmDyaviBHfxV
+        PJP1ICUXAcEzAsz2T/L5TqZUD+LfYIkbf8wk2/mPZFfrCrQgCrzWn7KV1SHXkhf4
+        4Sg6Y6p0g0Jl3mWRPiQ6ALlOVQIkp5V8z4b0hTF2c4oct1Pzaeq+ZkahyvrhW06P
+        iaucRZb+mwP/aVTpkd4n/FyKCcbf9/KniYJ+Ou1OunsBQr/jzN+r0PKCb8l/ksig
+        i/M0NGetemq9CxYsJDAyJs1aO4SWgx5LbfcMmyXDuJ3sL0ztFLOES31Mih3ZJebg
+        xPpj2bB/67i2zeYRcjxQ116y23gOa2TWM8EE4TW7F/mQjw4fIPJ93ClBMIkBJQQY
+        AQIADwUCQs6nRQIbDAUJAeEzgAAKCRA87HgbF94azRiBB/4vAyOOjUjK3lDWjHGs
+        7mvEWJI/1MeLlGPswCSInJBa+HMiMI4tzq+hu5ejGThojNbmnL96GdzfDkMlP4Fe
+        yxb2rjtbNrD/R5tlXHmjX/QLzep4LCeMziP80fu8qUeiOej/Ecdny0w365PlMdt1
+        0RaYR8VEZX/DAie6JfElnfQcG5q8TIOH3i71qxV+kIoPqKWfQ0MXrNEJ3BYFfDGd
+        Ut8U1Kq9OuIHVRgGS7mMSyjgNqqp7MBeMY+PFFZaZel5yoYVjb9d3L8XvVv2eoa/
+        jPj5FUEUkE9uxNmwaD1PiV8DvBTYI+eQL4qzfu+3NTG2SfgQYtj5oiGHw8aL3U6Q
+        HDJb
+        =RrXv
+        -----END PGP PRIVATE KEY BLOCK-----
+        """);
   }
 
   /**
@@ -338,99 +350,103 @@
    */
   public static final TestKey selfRevokedKey() {
     return new TestKey(
-        "-----BEGIN PGP PUBLIC KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "mQENBFWdTZwBCAC1jukp5mlitfq2sAmdtx1s1VbWh+buDbBY2kWcxbbssczozFUP\n"
-            + "Ii67wPwjRbn3GM5+jY3GMsqKIrdyDlxeTxGWoU/qa2YkCQzgFGD/XJBqkVpP6osm\n"
-            + "qFYSP0xST1iBkatkMHq5KMjrX2q2bGVLlchLF9eHrWSefMcfff1Vs/Y8F2RCo38y\n"
-            + "gH88mbcvgyC+zq6Q2T3h5RiLK2IaZDNsn3uUoIMYHxI6oYtXXMSXRJlLJvamXVrB\n"
-            + "7QAq8L8cNikJjZMz+bHtLtGDyVVp9tqo4yvMrHe6BYmBUte3tPYQlDVdEo7UqepR\n"
-            + "uT7JbBOGBoD+9ngDrDggPUBAoa0h3VNOTyoDABEBAAGJAR8EIAECAAkFAlWdVXkC\n"
-            + "HQIACgkQCFUqF3yoeCH4lgf/aBdTYqnwL1lreHbQaUXI0/B2zlMuoptoi/x+xjIB\n"
-            + "7RszzaN3w0n4/87kUN2koNtgNymv2ccKTR1PiX+obscJhsWzNbz3/Cjtr/IpEQRd\n"
-            + "E6qRptHDk0U2cHW4BYDSltndOktICdhWCWYLDxJHGjdyXqqqdEEFJ24u2fUJ3yF3\n"
-            + "NF2Bxa6llrmLb2fVeVYBzQSztQopKRWP9nt3ySoeJQqRWjNBN2j7cC93nrLHZTvB\n"
-            + "L/sWuTq5ecbXeeNVzxoBd21jmGrIUPNwGdDKdbTB0CjpLpVHOTwGByeRKQXhMlQB\n"
-            + "pK96wUpxxtShtOjNjN1s9GEyLHwDiHSuHNYs/AxxFzf9nbQhVGVzdHVzZXIgRm91\n"
-            + "ciA8dGVzdDRAZXhhbXBsZS5jb20+iQE4BBMBAgAiBQJVnU2cAhsDBgsJCAcDAgYV\n"
-            + "CAIJCgsEFgIDAQIeAQIXgAAKCRAIVSoXfKh4IXsHCACSm9RIdxxqibAaxh+nm6w5\n"
-            + "F5a6Hju5cdmkk9albDoQYh2eM8E5NdDq+r0qSSe2+ujDaQ4C95DZNJQESvIcHHHb\n"
-            + "9AECrBfS8Yk86rX8hxVeYQczMkB9LdBHximTSoOr8L/eAxBE/VXDwust6EAe6Q1A\n"
-            + "a3tlTTvCfcmw4PipvtP7F6UzFaq+QU6fvARpBATOcvVc2JU4JQOrxuNEQ2PKrSti\n"
-            + "75S5mnVWm0pRebM+EorWBtlA0eOAeLNqCp87UwLdvUyOTRZT4DJ51eTxfrFADXrI\n"
-            + "9/ejs3/YxCPYxaPicAlcldduuajU/s+9ifrUn0Npg2ILl8mQkNzqeerlBeecUV4E\n"
-            + "uQENBFWdTZwBCADEOsK+mFQ/2uds9znkmAqrk24waVBpyPGrTTXtXX0dKhtQAsh6\n"
-            + "QkZGkjLTnKxEsa9syqVckw+1JtCh44SP1gjqDUoShpBz5wIuksZ7q96Hx+F0TVG/\n"
-            + "njS6GrWvwKhL2Lb9hYfdlrZiYtOOi0iiOzud25H/Ms15kC8tuQm7NWtANJJF4Sxo\n"
-            + "Bxor6L/F4zunEkTL0L9/dp4qVrw23fJVKE38cSdxjB0u1qSDzLV/u0QJqlYxJAiE\n"
-            + "ciwQN2uVnTY1/XSpouMy6LvbYU7B2uU/WohNmH3RiN/fQ6jJm4x+fCZ8+zqXMiZn\n"
-            + "G2fPkwmxxK9cl64YnNGcTwsVt6BMbCHk9jHxABEBAAGJAR8EGAECAAkFAlWdTZwC\n"
-            + "GwwACgkQCFUqF3yoeCGOdwf/TmoxH3pFBm/MDhY5Ct5FO0KvsgQk2ZgDa68HyQ8j\n"
-            + "QYi1FUCtyDjsxf5KTfyvzpzcTpS7cyOwcJNtTj6UixwATkcivvYWYoOXghAsTo4f\n"
-            + "1+j/x6ECq1+nYE6NpcAN7VRJpYMk2UO2qlhHCesTPGzsHchL7mwiYdhGrdiWGTpd\n"
-            + "KI9WfOYDZZ9ZSw/QINJUyTRxrDnauOvVbhbAXc7jdKCkRQRZpsNlF//1Stg6nstj\n"
-            + "FJ7SrjVdsMJNlihT6fG5ujmrty1/6b1VCLkIQfW5cWvzRzTBFytq7i4PVKh3u7Oz\n"
-            + "tt9lf8s50zt2uBE/AKMkyE6IJLsBWpJPk7iFKkHGDx044Q==\n"
-            + "=477N\n"
-            + "-----END PGP PUBLIC KEY BLOCK-----\n",
-        "-----BEGIN PGP PRIVATE KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "lQOYBFWdTZwBCAC1jukp5mlitfq2sAmdtx1s1VbWh+buDbBY2kWcxbbssczozFUP\n"
-            + "Ii67wPwjRbn3GM5+jY3GMsqKIrdyDlxeTxGWoU/qa2YkCQzgFGD/XJBqkVpP6osm\n"
-            + "qFYSP0xST1iBkatkMHq5KMjrX2q2bGVLlchLF9eHrWSefMcfff1Vs/Y8F2RCo38y\n"
-            + "gH88mbcvgyC+zq6Q2T3h5RiLK2IaZDNsn3uUoIMYHxI6oYtXXMSXRJlLJvamXVrB\n"
-            + "7QAq8L8cNikJjZMz+bHtLtGDyVVp9tqo4yvMrHe6BYmBUte3tPYQlDVdEo7UqepR\n"
-            + "uT7JbBOGBoD+9ngDrDggPUBAoa0h3VNOTyoDABEBAAEAB/4jqeZoOiACaV/Nygeh\n"
-            + "iOpJSiDsNDbrFRpKYdnhwT69APIQ2q5sshi+/dopbZVpkeBiIJk0UR7TAp3JVEPV\n"
-            + "rK92SMqjcCRYuMRkMeyZzMt7e4DjiN17ov6BSBjMZFSs4vnpTNKWk4ngHlaebe15\n"
-            + "6vq0sYK/XpKQxU7yAzQjxR190P/F+QEL98zVG/9uqM8PupfdSm4Smp2cIpfta+JD\n"
-            + "mO23HC6jAEm2RFwklovzgK3rbIjyiMuowIkAKx5xxRvpxMHf1l566b9zJrRi0xau\n"
-            + "vp4J/lnBJtTMzCbsaaFxhrj23xvTXaWR+UkaGPCv7wheXQ9K7NAHwmH8YrR+cZx7\n"
-            + "KbDlBADUTHZ+OhNslx/rkjRWrFuK9p49x7qxQc26kcqlGPbW6KOAMdUpwneQbhCG\n"
-            + "a36E/GAZgsgQ4SUqn37EVCtd2Y9Dp0inPAujcZXSwgDHev6ea7fzbxT9KLtEgvQN\n"
-            + "0vrFJDCPIt0wzGqNDw4wgFjF2rAafBO//Wu5K5QLW4hfzSguRQQA2u6DpVja/FYY\n"
-            + "UHVh2HLiB8th4T+qogOsBe5mKEsGRPXtAh7QzJu36C4PJyHeNlmlMx+15cCFnovj\n"
-            + "6cLpGn6ZP4okLyq2+VsW7wh/Vir+UZHoAO/cZRlOc1PsaQconcxxq30SsbaRQrAd\n"
-            + "YargKlXU7HMFiK34nkidBV6vVW0+P6cD/jYRInM983KXqX5bYvqsM1Zyvvlu6otD\n"
-            + "nG0F/nQYT7oaKKR46quDa+xHMxK8/Vu1+TabzY8XapnoYFaFvrl/d2rUBEZSoury\n"
-            + "z2yfTyeomft9MGGQsCGAJ95bVDT+jBoohnYwfwdC7HG3qk0aK/TxFyUqvMOX7SFe\n"
-            + "YT55n3HlD9InST+0IVRlc3R1c2VyIEZvdXIgPHRlc3Q0QGV4YW1wbGUuY29tPokB\n"
-            + "OAQTAQIAIgUCVZ1NnAIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQCFUq\n"
-            + "F3yoeCF7BwgAkpvUSHccaomwGsYfp5usOReWuh47uXHZpJPWpWw6EGIdnjPBOTXQ\n"
-            + "6vq9Kkkntvrow2kOAveQ2TSUBEryHBxx2/QBAqwX0vGJPOq1/IcVXmEHMzJAfS3Q\n"
-            + "R8Ypk0qDq/C/3gMQRP1Vw8LrLehAHukNQGt7ZU07wn3JsOD4qb7T+xelMxWqvkFO\n"
-            + "n7wEaQQEznL1XNiVOCUDq8bjRENjyq0rYu+UuZp1VptKUXmzPhKK1gbZQNHjgHiz\n"
-            + "agqfO1MC3b1Mjk0WU+AyedXk8X6xQA16yPf3o7N/2MQj2MWj4nAJXJXXbrmo1P7P\n"
-            + "vYn61J9DaYNiC5fJkJDc6nnq5QXnnFFeBJ0DmARVnU2cAQgAxDrCvphUP9rnbPc5\n"
-            + "5JgKq5NuMGlQacjxq0017V19HSobUALIekJGRpIy05ysRLGvbMqlXJMPtSbQoeOE\n"
-            + "j9YI6g1KEoaQc+cCLpLGe6veh8fhdE1Rv540uhq1r8CoS9i2/YWH3Za2YmLTjotI\n"
-            + "ojs7nduR/zLNeZAvLbkJuzVrQDSSReEsaAcaK+i/xeM7pxJEy9C/f3aeKla8Nt3y\n"
-            + "VShN/HEncYwdLtakg8y1f7tECapWMSQIhHIsEDdrlZ02Nf10qaLjMui722FOwdrl\n"
-            + "P1qITZh90Yjf30OoyZuMfnwmfPs6lzImZxtnz5MJscSvXJeuGJzRnE8LFbegTGwh\n"
-            + "5PYx8QARAQABAAf8CeTumd6jbN7USXXDyQdzjkguR6mfwN29dcY8YF4U52oOm3+w\n"
-            + "bR23XmqTvoDJXONatZEYOm093wP4hBktP3Vq2KZX5Ew9r2JoBUIoWOcHHvCQqSUW\n"
-            + "6KMJBJNBMv3zXnOscmcPvTgStS5HfYn/XRLAhEqkd2ov2x/OiS8p0vM0F7YYSOdu\n"
-            + "X6/nHeBCM5QSJl00kgcaeQYdIGL0bPv9DnoeAC2/yITEvtvs+MHZ7FjH8A45QjWn\n"
-            + "DwfVoLg7WOc3wJtqJ55/r/2pylrWz0YYM8s6I3gbDilCF+Wb8tEIOaWJEwY73J1/\n"
-            + "KQG5qlO3/hBlO80DtzNmi3ylRUuzGhTxQfvemwQA3EuZ+E48LJ3dwtdJhh5mFlWI\n"
-            + "Ket21e5v1mqMxuLhf5/2CYcifM08u3EsEUdIr7egF25Sea8otqmCYcG8FuB37VY/\n"
-            + "Hd4G/+YVVaaAB8EU6u64YfSswhzr0R2qWVLtkJr0EAephzdPdoUEtKDSdTxnXiDV\n"
-            + "3vSqLWtZekScLa979uMEAOQIodJwxSvveKQWILjK67ZJr56X8YQZWA6rFsr1xMY0\n"
-            + "N0GH+5k0k+tr4wT3H9uk9ZM1Z11G3c01mhzCNg5roFoKtftKUZRKxmbfjjDmAofl\n"
-            + "bA6EZ0WHLdOwDLLTuXK09IsjjSHq0YHOxIlgFzIreuoxtz27bEEGhVFQg7xb0Lgb\n"
-            + "A/9LP8i32L7/CHsuN0q4YjhJkkaB6JWUQMFqWwoAXALG3rnw/CGRYHmHpiAuSeHR\n"
-            + "dSlZzndVi5poNC/d27msTx7ZuWlN7nOyywHBCTWV/nstm2I9rDhrHK7Axgq0Vv0y\n"
-            + "bWAurUmEgDJHU3ZpsNVt4e30FooXIDLR4cnpRM7tILv39D4giQEfBBgBAgAJBQJV\n"
-            + "nU2cAhsMAAoJEAhVKhd8qHghjncH/05qMR96RQZvzA4WOQreRTtCr7IEJNmYA2uv\n"
-            + "B8kPI0GItRVArcg47MX+Sk38r86c3E6Uu3MjsHCTbU4+lIscAE5HIr72FmKDl4IQ\n"
-            + "LE6OH9fo/8ehAqtfp2BOjaXADe1USaWDJNlDtqpYRwnrEzxs7B3IS+5sImHYRq3Y\n"
-            + "lhk6XSiPVnzmA2WfWUsP0CDSVMk0caw52rjr1W4WwF3O43SgpEUEWabDZRf/9UrY\n"
-            + "Op7LYxSe0q41XbDCTZYoU+nxubo5q7ctf+m9VQi5CEH1uXFr80c0wRcrau4uD1So\n"
-            + "d7uzs7bfZX/LOdM7drgRPwCjJMhOiCS7AVqST5O4hSpBxg8dOOE=\n"
-            + "=5aNq\n"
-            + "-----END PGP PRIVATE KEY BLOCK-----\n");
+        """
+        -----BEGIN PGP PUBLIC KEY BLOCK-----
+        Version: GnuPG v1
+
+        mQENBFWdTZwBCAC1jukp5mlitfq2sAmdtx1s1VbWh+buDbBY2kWcxbbssczozFUP
+        Ii67wPwjRbn3GM5+jY3GMsqKIrdyDlxeTxGWoU/qa2YkCQzgFGD/XJBqkVpP6osm
+        qFYSP0xST1iBkatkMHq5KMjrX2q2bGVLlchLF9eHrWSefMcfff1Vs/Y8F2RCo38y
+        gH88mbcvgyC+zq6Q2T3h5RiLK2IaZDNsn3uUoIMYHxI6oYtXXMSXRJlLJvamXVrB
+        7QAq8L8cNikJjZMz+bHtLtGDyVVp9tqo4yvMrHe6BYmBUte3tPYQlDVdEo7UqepR
+        uT7JbBOGBoD+9ngDrDggPUBAoa0h3VNOTyoDABEBAAGJAR8EIAECAAkFAlWdVXkC
+        HQIACgkQCFUqF3yoeCH4lgf/aBdTYqnwL1lreHbQaUXI0/B2zlMuoptoi/x+xjIB
+        7RszzaN3w0n4/87kUN2koNtgNymv2ccKTR1PiX+obscJhsWzNbz3/Cjtr/IpEQRd
+        E6qRptHDk0U2cHW4BYDSltndOktICdhWCWYLDxJHGjdyXqqqdEEFJ24u2fUJ3yF3
+        NF2Bxa6llrmLb2fVeVYBzQSztQopKRWP9nt3ySoeJQqRWjNBN2j7cC93nrLHZTvB
+        L/sWuTq5ecbXeeNVzxoBd21jmGrIUPNwGdDKdbTB0CjpLpVHOTwGByeRKQXhMlQB
+        pK96wUpxxtShtOjNjN1s9GEyLHwDiHSuHNYs/AxxFzf9nbQhVGVzdHVzZXIgRm91
+        ciA8dGVzdDRAZXhhbXBsZS5jb20+iQE4BBMBAgAiBQJVnU2cAhsDBgsJCAcDAgYV
+        CAIJCgsEFgIDAQIeAQIXgAAKCRAIVSoXfKh4IXsHCACSm9RIdxxqibAaxh+nm6w5
+        F5a6Hju5cdmkk9albDoQYh2eM8E5NdDq+r0qSSe2+ujDaQ4C95DZNJQESvIcHHHb
+        9AECrBfS8Yk86rX8hxVeYQczMkB9LdBHximTSoOr8L/eAxBE/VXDwust6EAe6Q1A
+        a3tlTTvCfcmw4PipvtP7F6UzFaq+QU6fvARpBATOcvVc2JU4JQOrxuNEQ2PKrSti
+        75S5mnVWm0pRebM+EorWBtlA0eOAeLNqCp87UwLdvUyOTRZT4DJ51eTxfrFADXrI
+        9/ejs3/YxCPYxaPicAlcldduuajU/s+9ifrUn0Npg2ILl8mQkNzqeerlBeecUV4E
+        uQENBFWdTZwBCADEOsK+mFQ/2uds9znkmAqrk24waVBpyPGrTTXtXX0dKhtQAsh6
+        QkZGkjLTnKxEsa9syqVckw+1JtCh44SP1gjqDUoShpBz5wIuksZ7q96Hx+F0TVG/
+        njS6GrWvwKhL2Lb9hYfdlrZiYtOOi0iiOzud25H/Ms15kC8tuQm7NWtANJJF4Sxo
+        Bxor6L/F4zunEkTL0L9/dp4qVrw23fJVKE38cSdxjB0u1qSDzLV/u0QJqlYxJAiE
+        ciwQN2uVnTY1/XSpouMy6LvbYU7B2uU/WohNmH3RiN/fQ6jJm4x+fCZ8+zqXMiZn
+        G2fPkwmxxK9cl64YnNGcTwsVt6BMbCHk9jHxABEBAAGJAR8EGAECAAkFAlWdTZwC
+        GwwACgkQCFUqF3yoeCGOdwf/TmoxH3pFBm/MDhY5Ct5FO0KvsgQk2ZgDa68HyQ8j
+        QYi1FUCtyDjsxf5KTfyvzpzcTpS7cyOwcJNtTj6UixwATkcivvYWYoOXghAsTo4f
+        1+j/x6ECq1+nYE6NpcAN7VRJpYMk2UO2qlhHCesTPGzsHchL7mwiYdhGrdiWGTpd
+        KI9WfOYDZZ9ZSw/QINJUyTRxrDnauOvVbhbAXc7jdKCkRQRZpsNlF//1Stg6nstj
+        FJ7SrjVdsMJNlihT6fG5ujmrty1/6b1VCLkIQfW5cWvzRzTBFytq7i4PVKh3u7Oz
+        tt9lf8s50zt2uBE/AKMkyE6IJLsBWpJPk7iFKkHGDx044Q==
+        =477N
+        -----END PGP PUBLIC KEY BLOCK-----
+        """,
+        """
+        -----BEGIN PGP PRIVATE KEY BLOCK-----
+        Version: GnuPG v1
+
+        lQOYBFWdTZwBCAC1jukp5mlitfq2sAmdtx1s1VbWh+buDbBY2kWcxbbssczozFUP
+        Ii67wPwjRbn3GM5+jY3GMsqKIrdyDlxeTxGWoU/qa2YkCQzgFGD/XJBqkVpP6osm
+        qFYSP0xST1iBkatkMHq5KMjrX2q2bGVLlchLF9eHrWSefMcfff1Vs/Y8F2RCo38y
+        gH88mbcvgyC+zq6Q2T3h5RiLK2IaZDNsn3uUoIMYHxI6oYtXXMSXRJlLJvamXVrB
+        7QAq8L8cNikJjZMz+bHtLtGDyVVp9tqo4yvMrHe6BYmBUte3tPYQlDVdEo7UqepR
+        uT7JbBOGBoD+9ngDrDggPUBAoa0h3VNOTyoDABEBAAEAB/4jqeZoOiACaV/Nygeh
+        iOpJSiDsNDbrFRpKYdnhwT69APIQ2q5sshi+/dopbZVpkeBiIJk0UR7TAp3JVEPV
+        rK92SMqjcCRYuMRkMeyZzMt7e4DjiN17ov6BSBjMZFSs4vnpTNKWk4ngHlaebe15
+        6vq0sYK/XpKQxU7yAzQjxR190P/F+QEL98zVG/9uqM8PupfdSm4Smp2cIpfta+JD
+        mO23HC6jAEm2RFwklovzgK3rbIjyiMuowIkAKx5xxRvpxMHf1l566b9zJrRi0xau
+        vp4J/lnBJtTMzCbsaaFxhrj23xvTXaWR+UkaGPCv7wheXQ9K7NAHwmH8YrR+cZx7
+        KbDlBADUTHZ+OhNslx/rkjRWrFuK9p49x7qxQc26kcqlGPbW6KOAMdUpwneQbhCG
+        a36E/GAZgsgQ4SUqn37EVCtd2Y9Dp0inPAujcZXSwgDHev6ea7fzbxT9KLtEgvQN
+        0vrFJDCPIt0wzGqNDw4wgFjF2rAafBO//Wu5K5QLW4hfzSguRQQA2u6DpVja/FYY
+        UHVh2HLiB8th4T+qogOsBe5mKEsGRPXtAh7QzJu36C4PJyHeNlmlMx+15cCFnovj
+        6cLpGn6ZP4okLyq2+VsW7wh/Vir+UZHoAO/cZRlOc1PsaQconcxxq30SsbaRQrAd
+        YargKlXU7HMFiK34nkidBV6vVW0+P6cD/jYRInM983KXqX5bYvqsM1Zyvvlu6otD
+        nG0F/nQYT7oaKKR46quDa+xHMxK8/Vu1+TabzY8XapnoYFaFvrl/d2rUBEZSoury
+        z2yfTyeomft9MGGQsCGAJ95bVDT+jBoohnYwfwdC7HG3qk0aK/TxFyUqvMOX7SFe
+        YT55n3HlD9InST+0IVRlc3R1c2VyIEZvdXIgPHRlc3Q0QGV4YW1wbGUuY29tPokB
+        OAQTAQIAIgUCVZ1NnAIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQCFUq
+        F3yoeCF7BwgAkpvUSHccaomwGsYfp5usOReWuh47uXHZpJPWpWw6EGIdnjPBOTXQ
+        6vq9Kkkntvrow2kOAveQ2TSUBEryHBxx2/QBAqwX0vGJPOq1/IcVXmEHMzJAfS3Q
+        R8Ypk0qDq/C/3gMQRP1Vw8LrLehAHukNQGt7ZU07wn3JsOD4qb7T+xelMxWqvkFO
+        n7wEaQQEznL1XNiVOCUDq8bjRENjyq0rYu+UuZp1VptKUXmzPhKK1gbZQNHjgHiz
+        agqfO1MC3b1Mjk0WU+AyedXk8X6xQA16yPf3o7N/2MQj2MWj4nAJXJXXbrmo1P7P
+        vYn61J9DaYNiC5fJkJDc6nnq5QXnnFFeBJ0DmARVnU2cAQgAxDrCvphUP9rnbPc5
+        5JgKq5NuMGlQacjxq0017V19HSobUALIekJGRpIy05ysRLGvbMqlXJMPtSbQoeOE
+        j9YI6g1KEoaQc+cCLpLGe6veh8fhdE1Rv540uhq1r8CoS9i2/YWH3Za2YmLTjotI
+        ojs7nduR/zLNeZAvLbkJuzVrQDSSReEsaAcaK+i/xeM7pxJEy9C/f3aeKla8Nt3y
+        VShN/HEncYwdLtakg8y1f7tECapWMSQIhHIsEDdrlZ02Nf10qaLjMui722FOwdrl
+        P1qITZh90Yjf30OoyZuMfnwmfPs6lzImZxtnz5MJscSvXJeuGJzRnE8LFbegTGwh
+        5PYx8QARAQABAAf8CeTumd6jbN7USXXDyQdzjkguR6mfwN29dcY8YF4U52oOm3+w
+        bR23XmqTvoDJXONatZEYOm093wP4hBktP3Vq2KZX5Ew9r2JoBUIoWOcHHvCQqSUW
+        6KMJBJNBMv3zXnOscmcPvTgStS5HfYn/XRLAhEqkd2ov2x/OiS8p0vM0F7YYSOdu
+        X6/nHeBCM5QSJl00kgcaeQYdIGL0bPv9DnoeAC2/yITEvtvs+MHZ7FjH8A45QjWn
+        DwfVoLg7WOc3wJtqJ55/r/2pylrWz0YYM8s6I3gbDilCF+Wb8tEIOaWJEwY73J1/
+        KQG5qlO3/hBlO80DtzNmi3ylRUuzGhTxQfvemwQA3EuZ+E48LJ3dwtdJhh5mFlWI
+        Ket21e5v1mqMxuLhf5/2CYcifM08u3EsEUdIr7egF25Sea8otqmCYcG8FuB37VY/
+        Hd4G/+YVVaaAB8EU6u64YfSswhzr0R2qWVLtkJr0EAephzdPdoUEtKDSdTxnXiDV
+        3vSqLWtZekScLa979uMEAOQIodJwxSvveKQWILjK67ZJr56X8YQZWA6rFsr1xMY0
+        N0GH+5k0k+tr4wT3H9uk9ZM1Z11G3c01mhzCNg5roFoKtftKUZRKxmbfjjDmAofl
+        bA6EZ0WHLdOwDLLTuXK09IsjjSHq0YHOxIlgFzIreuoxtz27bEEGhVFQg7xb0Lgb
+        A/9LP8i32L7/CHsuN0q4YjhJkkaB6JWUQMFqWwoAXALG3rnw/CGRYHmHpiAuSeHR
+        dSlZzndVi5poNC/d27msTx7ZuWlN7nOyywHBCTWV/nstm2I9rDhrHK7Axgq0Vv0y
+        bWAurUmEgDJHU3ZpsNVt4e30FooXIDLR4cnpRM7tILv39D4giQEfBBgBAgAJBQJV
+        nU2cAhsMAAoJEAhVKhd8qHghjncH/05qMR96RQZvzA4WOQreRTtCr7IEJNmYA2uv
+        B8kPI0GItRVArcg47MX+Sk38r86c3E6Uu3MjsHCTbU4+lIscAE5HIr72FmKDl4IQ
+        LE6OH9fo/8ehAqtfp2BOjaXADe1USaWDJNlDtqpYRwnrEzxs7B3IS+5sImHYRq3Y
+        lhk6XSiPVnzmA2WfWUsP0CDSVMk0caw52rjr1W4WwF3O43SgpEUEWabDZRf/9UrY
+        Op7LYxSe0q41XbDCTZYoU+nxubo5q7ctf+m9VQi5CEH1uXFr80c0wRcrau4uD1So
+        d7uzs7bfZX/LOdM7drgRPwCjJMhOiCS7AVqST5O4hSpBxg8dOOE=
+        =5aNq
+        -----END PGP PRIVATE KEY BLOCK-----
+        """);
   }
 
   /**
@@ -446,100 +462,104 @@
    */
   public static TestKey validKeyWithSecondUserId() {
     return new TestKey(
-        "-----BEGIN PGP PUBLIC KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "mQENBFW6jd4BCACrf+BZS3lntuWq2DWPOG07/BUWhx3RSoiS3JBuKEDmlsjswKcp\n"
-            + "JHT+p2tqH52XbujMlzNjAQcZjJwfOMt6Fg7zd3F8cwYQdCE/W5dpMs/mqdeEz6GL\n"
-            + "VJDZ0Y5wwz54ZQHp91Xq6uejxt5qffeTQk5cToQZ0RVx3iwBc+2P3iYJqMFmJzj8\n"
-            + "djabEoF4D50iI5tY8moE83VcXJ5Y4xn+5Z5AThmlfrMP6gIdG0b4lEe1tsnJC6AG\n"
-            + "GUU6VkzK6E1Tp93Y0brtWpJKi9Gt6eUqvWhZtPEdFVCFbLTpezUdRFEuaFbGg5pn\n"
-            + "9K/DceahFmquDJOHVgawt6erlq/ie7QEEld/ABEBAAG0IVRlc3R1c2VyIEZpdmUg\n"
-            + "PHRlc3Q1QGV4YW1wbGUuY29tPokBOAQTAQIAIgUCVbqN3gIbAwYLCQgHAwIGFQgC\n"
-            + "CQoLBBYCAwECHgECF4AACgkQUCS7RJjFHb+/MAf9FKZatGcuOIoYqwGQQneyc63v\n"
-            + "3H/PyhvYF1nuKNftmhqIiUHec9RaUHQkgam6LRoonkDfIpNlQVRv2XBV2VOAOFVO\n"
-            + "RyQ/Tv7/xtpqGZqivV0yn2ZXbCceA627Vz7gP4gkO0ZJ0JsYJTc/5wO+nVG5Lohu\n"
-            + "/zdUofEbFAvcXs+Z1uXnUDdeGn47Lf1xZ2XOHOI0aQW4DdNaFoAd+AOTe0W3iB6W\n"
-            + "paCIGno69CyNHNnWjJCSD33oLVaXyvbgw5UoyITvSqRnPyLGIc6dsqDLT59ok0Fk\n"
-            + "t4jtiGu9aze4n59GbtSjmWQgzbLCQWhK9K7UCcSLYNKXVyMha2WapBO156V027QI\n"
-            + "Zm9vOm15SWSJATgEEwECACIFAlW6jwYCGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4B\n"
-            + "AheAAAoJEFAku0SYxR2/zZUH/1BwPsResHLDSmo6UdQyQGxvV0NcwBqGAPSLHr+S\n"
-            + "PHEaHEIYvOywNfWXquYrECa/5iIrXuTQmCH0q8WRcz1UapDCeD8Ui82r+3O8m6gk\n"
-            + "hIR5VAeza+x/fGWhG342PvtpDU7JycDA3KMCTWtcAM89tFhffzuEQ3f5p5cMTtZk\n"
-            + "/23iegXbHd61vojYO17QYEj+qp9l0VNiyFymPL3qr5bVj/xn/mXFj+asj0L2ypIj\n"
-            + "zC36FkhzW5EX2xgV9Cl9zu7kLMTm+yM+jxbMLskYkG8z/D+xBQsoX8tEIPlxHLhB\n"
-            + "miEmVuZrp91ArRMWa3B7PYz7hQzs+M/bxKXcmWxacggTOvy5AQ0EVbqN3gEIAOlq\n"
-            + "mwdiXW0BQP/iQvIweP1taNypAvdjI2fpnXkUfBT5X/+E/RjYOHQEAzy8nEkS+Y0l\n"
-            + "MLwKt3S0IVRvdeXxlpL6Tl+P8DkcD5H+uvACrg9rtgbbNSoQtc9/3bknG9hea6xi\n"
-            + "6SBH1k9Y2RInIrwWslfKmuNkyZVhxPKypasBsvyhOWLlpCngGiCa74KJ1th1WKa2\n"
-            + "aaDqcbieBTc1mtsXR6kBhJZqK+JYBoHriUQMs7nyXxn2qyv6Lehs/tHlrBZ7j16S\n"
-            + "faQzYoBi1edVrpFr/CuGk6RNKxG9vi/uAA9q2cLCMjjyfMH4g0G2l0HuDPQLA9wi\n"
-            + "BfusEC+OceaeFKtS9ykAEQEAAYkBHwQYAQIACQUCVbqN3gIbDAAKCRBQJLtEmMUd\n"
-            + "vw/DB/9Qx9m1eSdddqz/fk16wJf7Ncr2teVvdQOjRf/qo43KDKxEzeepjgypG1br\n"
-            + "St7U4/MlPygJLBDB4pXp0kaKt+S/aqLpEGSGzQ1FysM8oY6K0e1Kbf6nMaQS8ATG\n"
-            + "aD377FrUJ42NV4JS+NGlwaM9PhpRVm5n8iCzRs9HtlTyfCBkNGDjGOSdWcah2m6T\n"
-            + "fEQdD+XVDN1ZC8zAnc8FW28YOTeTjX079okP6ZCjLJ16VZ7eiHFkrNbS9Dl4SPNK\n"
-            + "eElvsZLBaf8t4RQXFFKwRq4BW+zS8zm9E2H6bZ9yGrmgIREzyRPpwU98g8yrabu0\n"
-            + "54w16Vp/SVViJs7nTMSug0WREyd2\n"
-            + "=ldwB\n"
-            + "-----END PGP PUBLIC KEY BLOCK-----\n",
-        "-----BEGIN PGP PRIVATE KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "lQOYBFW6jd4BCACrf+BZS3lntuWq2DWPOG07/BUWhx3RSoiS3JBuKEDmlsjswKcp\n"
-            + "JHT+p2tqH52XbujMlzNjAQcZjJwfOMt6Fg7zd3F8cwYQdCE/W5dpMs/mqdeEz6GL\n"
-            + "VJDZ0Y5wwz54ZQHp91Xq6uejxt5qffeTQk5cToQZ0RVx3iwBc+2P3iYJqMFmJzj8\n"
-            + "djabEoF4D50iI5tY8moE83VcXJ5Y4xn+5Z5AThmlfrMP6gIdG0b4lEe1tsnJC6AG\n"
-            + "GUU6VkzK6E1Tp93Y0brtWpJKi9Gt6eUqvWhZtPEdFVCFbLTpezUdRFEuaFbGg5pn\n"
-            + "9K/DceahFmquDJOHVgawt6erlq/ie7QEEld/ABEBAAEAB/9MIlrQiWb+Gf3fWFh+\n"
-            + "mkg0Bva9p4IfNX1n5S7hGFGnjGzqXaRX6W1e16gh1qM5ZO1IVh9j5kLmnrt4SNhb\n"
-            + "/Irqnq3s14trpoJUBC81bm9JMUESHrLSjdo4OIWJncOP4xd0bG7h+SKYXGLE1+Me\n"
-            + "pqLu65RNebqRcFYM1xAxfCdaxatcz+LrW5ZX+6T/Gh/VCHRkkzzVIZO1dDBbyU2C\n"
-            + "JrNcfHSvNrjzfqYHtwfsk/lwcuY9pqkYcuwZ2IM+iWKit+WyCR2BzOpG/Sva1t8b\n"
-            + "7B7ituQCFMCv5IiaAoaSKX/t/0ucWCoT1ttih8LdwgEE0kgij/ZUfRxCiL9HmtLy\n"
-            + "ad9BBADBGYWv6NiTQiBG7+MZ+twCjlSL7vq8iENhQYZShGHF9z+ju7m8U1dteLny\n"
-            + "pC3NcNfCgWyy+8lRn1e6Oe6m7xL83LL3HJT5nIy9mpsCw/TIrrkzkoE+VpkEIL/o\n"
-            + "Yeoxauah4SU7laVD29aAQZ3TqwSwx0sJwPjsj73WjjqtzJfFkQQA410ghqMbQZN1\n"
-            + "yJzXgVAj162ZwTi961N5iYmqTiBtqGz1UfaNBJWdJMkCmhMTsiOtm1h4zUQRuEH+\n"
-            + "yq1xhKOGf15dB/cLSMj2KpVVlvgLoVmYDugSER8Q23juilY7iaf0bqo9q1sTHpn9\n"
-            + "O7Oin/9J3sz+ic45vDh4aa74sOzfhA8EAJwAFEWLrGSxtnYJR5vQNstHIH1wtQ5G\n"
-            + "ZUZ57y9CbDkKrfCQvd0JOBjfUDz+N8qiamNIqfhQBtlhIDYgtswiG+iGP/2G0l6S\n"
-            + "j9DHNe2CYPUKgy+zQiRnyNGE2XUfcE+HuNDfu3AryPqaD8vLLw8TnsAgis3bRGg+\n"
-            + "hhrAC1NyKfDXTg20IVRlc3R1c2VyIEZpdmUgPHRlc3Q1QGV4YW1wbGUuY29tPokB\n"
-            + "OAQTAQIAIgUCVbqN3gIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQUCS7\n"
-            + "RJjFHb+/MAf9FKZatGcuOIoYqwGQQneyc63v3H/PyhvYF1nuKNftmhqIiUHec9Ra\n"
-            + "UHQkgam6LRoonkDfIpNlQVRv2XBV2VOAOFVORyQ/Tv7/xtpqGZqivV0yn2ZXbCce\n"
-            + "A627Vz7gP4gkO0ZJ0JsYJTc/5wO+nVG5Lohu/zdUofEbFAvcXs+Z1uXnUDdeGn47\n"
-            + "Lf1xZ2XOHOI0aQW4DdNaFoAd+AOTe0W3iB6WpaCIGno69CyNHNnWjJCSD33oLVaX\n"
-            + "yvbgw5UoyITvSqRnPyLGIc6dsqDLT59ok0Fkt4jtiGu9aze4n59GbtSjmWQgzbLC\n"
-            + "QWhK9K7UCcSLYNKXVyMha2WapBO156V0250DmARVuo3eAQgA6WqbB2JdbQFA/+JC\n"
-            + "8jB4/W1o3KkC92MjZ+mdeRR8FPlf/4T9GNg4dAQDPLycSRL5jSUwvAq3dLQhVG91\n"
-            + "5fGWkvpOX4/wORwPkf668AKuD2u2Bts1KhC1z3/duScb2F5rrGLpIEfWT1jZEici\n"
-            + "vBayV8qa42TJlWHE8rKlqwGy/KE5YuWkKeAaIJrvgonW2HVYprZpoOpxuJ4FNzWa\n"
-            + "2xdHqQGElmor4lgGgeuJRAyzufJfGfarK/ot6Gz+0eWsFnuPXpJ9pDNigGLV51Wu\n"
-            + "kWv8K4aTpE0rEb2+L+4AD2rZwsIyOPJ8wfiDQbaXQe4M9AsD3CIF+6wQL45x5p4U\n"
-            + "q1L3KQARAQABAAf8C+2DsJPpPEnFHY5dZ2zssd6mbihA2414YLYCcw6F7Lh1nGQa\n"
-            + "XuulruAJnk/xGJbco8bTv7g4ecE+tsbfWnnG/QnHeYCsgO6bKRXATcWFSYpyidUn\n"
-            + "2VdzQwBAv1ZtSNhCXlPLn/erzvA2X4QadUwfnvbehWJAHt8ZJmHUr3FtyRUHEdCK\n"
-            + "2EXsBWnzPCcqHZOMvcbSINSqBFGzVXkOZsMFvPTNIUYRHz8NbJT/OPiOmyBshXpS\n"
-            + "t8w3QqZhBcTT3NZo3kgxN1RygaTa10ytB2cxTCVuD8hmUBaV9gakdfMYkVJds7/T\n"
-            + "ZY3It68F0vitBnqpppZQ+NFgr/vwVg0p3gbmAQQA79zsWPvyIqYvyJhmiKvLIpev\n"
-            + "569ho8tC9xx+IZ5WnjN8ZADlb9brAdA9cqGfBgZkpZUhngCRVOYUIco+m2NYkEJm\n"
-            + "BsSTTM77dqU55DRloJ3FtBwCPXHkwg9P/FHMMYYGyLpQTSB92hXk8yomo+ozX7kx\n"
-            + "DtUHZIrir/rr0lQe+GkEAPkep9V5jBmfHMArnfji7Nfb1/ZjrSAaK+rtqczgm+6j\n"
-            + "ubY/0DpM/6gm+/8X27WFw2m45ncH3qNvOe4Qm40EmgmHkXsdQyU0Fv7uXc9nBYoo\n"
-            + "G6s7DWLY4VAqWwPsvbqgpSp/qdGn9nlcJjjY1HtfU7HM3xysT7TJ2YVhYHlJdjDB\n"
-            + "A/0alBcYtHvaCJaRLWX4UiashbfETWAf/4oHlERjkXj64qOdsGnD6CD99t9x91Ue\n"
-            + "pClPsLDFvY8/HxWX7STA9pQZAa2ZdJd8b58Rgy9TBShw2mbz2S6Cbw77pP/WEjtJ\n"
-            + "pJuS2gDp70H01fYRaw7YH32CfUr1VeEv7hTjk/SNVteIZkkOiQEfBBgBAgAJBQJV\n"
-            + "uo3eAhsMAAoJEFAku0SYxR2/D8MH/1DH2bV5J112rP9+TXrAl/s1yva15W91A6NF\n"
-            + "/+qjjcoMrETN56mODKkbVutK3tTj8yU/KAksEMHilenSRoq35L9qoukQZIbNDUXK\n"
-            + "wzyhjorR7Upt/qcxpBLwBMZoPfvsWtQnjY1XglL40aXBoz0+GlFWbmfyILNGz0e2\n"
-            + "VPJ8IGQ0YOMY5J1ZxqHabpN8RB0P5dUM3VkLzMCdzwVbbxg5N5ONfTv2iQ/pkKMs\n"
-            + "nXpVnt6IcWSs1tL0OXhI80p4SW+xksFp/y3hFBcUUrBGrgFb7NLzOb0TYfptn3Ia\n"
-            + "uaAhETPJE+nBT3yDzKtpu7TnjDXpWn9JVWImzudMxK6DRZETJ3Y=\n"
-            + "=uND5\n"
-            + "-----END PGP PRIVATE KEY BLOCK-----\n");
+        """
+        -----BEGIN PGP PUBLIC KEY BLOCK-----
+        Version: GnuPG v1
+
+        mQENBFW6jd4BCACrf+BZS3lntuWq2DWPOG07/BUWhx3RSoiS3JBuKEDmlsjswKcp
+        JHT+p2tqH52XbujMlzNjAQcZjJwfOMt6Fg7zd3F8cwYQdCE/W5dpMs/mqdeEz6GL
+        VJDZ0Y5wwz54ZQHp91Xq6uejxt5qffeTQk5cToQZ0RVx3iwBc+2P3iYJqMFmJzj8
+        djabEoF4D50iI5tY8moE83VcXJ5Y4xn+5Z5AThmlfrMP6gIdG0b4lEe1tsnJC6AG
+        GUU6VkzK6E1Tp93Y0brtWpJKi9Gt6eUqvWhZtPEdFVCFbLTpezUdRFEuaFbGg5pn
+        9K/DceahFmquDJOHVgawt6erlq/ie7QEEld/ABEBAAG0IVRlc3R1c2VyIEZpdmUg
+        PHRlc3Q1QGV4YW1wbGUuY29tPokBOAQTAQIAIgUCVbqN3gIbAwYLCQgHAwIGFQgC
+        CQoLBBYCAwECHgECF4AACgkQUCS7RJjFHb+/MAf9FKZatGcuOIoYqwGQQneyc63v
+        3H/PyhvYF1nuKNftmhqIiUHec9RaUHQkgam6LRoonkDfIpNlQVRv2XBV2VOAOFVO
+        RyQ/Tv7/xtpqGZqivV0yn2ZXbCceA627Vz7gP4gkO0ZJ0JsYJTc/5wO+nVG5Lohu
+        /zdUofEbFAvcXs+Z1uXnUDdeGn47Lf1xZ2XOHOI0aQW4DdNaFoAd+AOTe0W3iB6W
+        paCIGno69CyNHNnWjJCSD33oLVaXyvbgw5UoyITvSqRnPyLGIc6dsqDLT59ok0Fk
+        t4jtiGu9aze4n59GbtSjmWQgzbLCQWhK9K7UCcSLYNKXVyMha2WapBO156V027QI
+        Zm9vOm15SWSJATgEEwECACIFAlW6jwYCGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4B
+        AheAAAoJEFAku0SYxR2/zZUH/1BwPsResHLDSmo6UdQyQGxvV0NcwBqGAPSLHr+S
+        PHEaHEIYvOywNfWXquYrECa/5iIrXuTQmCH0q8WRcz1UapDCeD8Ui82r+3O8m6gk
+        hIR5VAeza+x/fGWhG342PvtpDU7JycDA3KMCTWtcAM89tFhffzuEQ3f5p5cMTtZk
+        /23iegXbHd61vojYO17QYEj+qp9l0VNiyFymPL3qr5bVj/xn/mXFj+asj0L2ypIj
+        zC36FkhzW5EX2xgV9Cl9zu7kLMTm+yM+jxbMLskYkG8z/D+xBQsoX8tEIPlxHLhB
+        miEmVuZrp91ArRMWa3B7PYz7hQzs+M/bxKXcmWxacggTOvy5AQ0EVbqN3gEIAOlq
+        mwdiXW0BQP/iQvIweP1taNypAvdjI2fpnXkUfBT5X/+E/RjYOHQEAzy8nEkS+Y0l
+        MLwKt3S0IVRvdeXxlpL6Tl+P8DkcD5H+uvACrg9rtgbbNSoQtc9/3bknG9hea6xi
+        6SBH1k9Y2RInIrwWslfKmuNkyZVhxPKypasBsvyhOWLlpCngGiCa74KJ1th1WKa2
+        aaDqcbieBTc1mtsXR6kBhJZqK+JYBoHriUQMs7nyXxn2qyv6Lehs/tHlrBZ7j16S
+        faQzYoBi1edVrpFr/CuGk6RNKxG9vi/uAA9q2cLCMjjyfMH4g0G2l0HuDPQLA9wi
+        BfusEC+OceaeFKtS9ykAEQEAAYkBHwQYAQIACQUCVbqN3gIbDAAKCRBQJLtEmMUd
+        vw/DB/9Qx9m1eSdddqz/fk16wJf7Ncr2teVvdQOjRf/qo43KDKxEzeepjgypG1br
+        St7U4/MlPygJLBDB4pXp0kaKt+S/aqLpEGSGzQ1FysM8oY6K0e1Kbf6nMaQS8ATG
+        aD377FrUJ42NV4JS+NGlwaM9PhpRVm5n8iCzRs9HtlTyfCBkNGDjGOSdWcah2m6T
+        fEQdD+XVDN1ZC8zAnc8FW28YOTeTjX079okP6ZCjLJ16VZ7eiHFkrNbS9Dl4SPNK
+        eElvsZLBaf8t4RQXFFKwRq4BW+zS8zm9E2H6bZ9yGrmgIREzyRPpwU98g8yrabu0
+        54w16Vp/SVViJs7nTMSug0WREyd2
+        =ldwB
+        -----END PGP PUBLIC KEY BLOCK-----
+        """,
+        """
+        -----BEGIN PGP PRIVATE KEY BLOCK-----
+        Version: GnuPG v1
+
+        lQOYBFW6jd4BCACrf+BZS3lntuWq2DWPOG07/BUWhx3RSoiS3JBuKEDmlsjswKcp
+        JHT+p2tqH52XbujMlzNjAQcZjJwfOMt6Fg7zd3F8cwYQdCE/W5dpMs/mqdeEz6GL
+        VJDZ0Y5wwz54ZQHp91Xq6uejxt5qffeTQk5cToQZ0RVx3iwBc+2P3iYJqMFmJzj8
+        djabEoF4D50iI5tY8moE83VcXJ5Y4xn+5Z5AThmlfrMP6gIdG0b4lEe1tsnJC6AG
+        GUU6VkzK6E1Tp93Y0brtWpJKi9Gt6eUqvWhZtPEdFVCFbLTpezUdRFEuaFbGg5pn
+        9K/DceahFmquDJOHVgawt6erlq/ie7QEEld/ABEBAAEAB/9MIlrQiWb+Gf3fWFh+
+        mkg0Bva9p4IfNX1n5S7hGFGnjGzqXaRX6W1e16gh1qM5ZO1IVh9j5kLmnrt4SNhb
+        /Irqnq3s14trpoJUBC81bm9JMUESHrLSjdo4OIWJncOP4xd0bG7h+SKYXGLE1+Me
+        pqLu65RNebqRcFYM1xAxfCdaxatcz+LrW5ZX+6T/Gh/VCHRkkzzVIZO1dDBbyU2C
+        JrNcfHSvNrjzfqYHtwfsk/lwcuY9pqkYcuwZ2IM+iWKit+WyCR2BzOpG/Sva1t8b
+        7B7ituQCFMCv5IiaAoaSKX/t/0ucWCoT1ttih8LdwgEE0kgij/ZUfRxCiL9HmtLy
+        ad9BBADBGYWv6NiTQiBG7+MZ+twCjlSL7vq8iENhQYZShGHF9z+ju7m8U1dteLny
+        pC3NcNfCgWyy+8lRn1e6Oe6m7xL83LL3HJT5nIy9mpsCw/TIrrkzkoE+VpkEIL/o
+        Yeoxauah4SU7laVD29aAQZ3TqwSwx0sJwPjsj73WjjqtzJfFkQQA410ghqMbQZN1
+        yJzXgVAj162ZwTi961N5iYmqTiBtqGz1UfaNBJWdJMkCmhMTsiOtm1h4zUQRuEH+
+        yq1xhKOGf15dB/cLSMj2KpVVlvgLoVmYDugSER8Q23juilY7iaf0bqo9q1sTHpn9
+        O7Oin/9J3sz+ic45vDh4aa74sOzfhA8EAJwAFEWLrGSxtnYJR5vQNstHIH1wtQ5G
+        ZUZ57y9CbDkKrfCQvd0JOBjfUDz+N8qiamNIqfhQBtlhIDYgtswiG+iGP/2G0l6S
+        j9DHNe2CYPUKgy+zQiRnyNGE2XUfcE+HuNDfu3AryPqaD8vLLw8TnsAgis3bRGg+
+        hhrAC1NyKfDXTg20IVRlc3R1c2VyIEZpdmUgPHRlc3Q1QGV4YW1wbGUuY29tPokB
+        OAQTAQIAIgUCVbqN3gIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQUCS7
+        RJjFHb+/MAf9FKZatGcuOIoYqwGQQneyc63v3H/PyhvYF1nuKNftmhqIiUHec9Ra
+        UHQkgam6LRoonkDfIpNlQVRv2XBV2VOAOFVORyQ/Tv7/xtpqGZqivV0yn2ZXbCce
+        A627Vz7gP4gkO0ZJ0JsYJTc/5wO+nVG5Lohu/zdUofEbFAvcXs+Z1uXnUDdeGn47
+        Lf1xZ2XOHOI0aQW4DdNaFoAd+AOTe0W3iB6WpaCIGno69CyNHNnWjJCSD33oLVaX
+        yvbgw5UoyITvSqRnPyLGIc6dsqDLT59ok0Fkt4jtiGu9aze4n59GbtSjmWQgzbLC
+        QWhK9K7UCcSLYNKXVyMha2WapBO156V0250DmARVuo3eAQgA6WqbB2JdbQFA/+JC
+        8jB4/W1o3KkC92MjZ+mdeRR8FPlf/4T9GNg4dAQDPLycSRL5jSUwvAq3dLQhVG91
+        5fGWkvpOX4/wORwPkf668AKuD2u2Bts1KhC1z3/duScb2F5rrGLpIEfWT1jZEici
+        vBayV8qa42TJlWHE8rKlqwGy/KE5YuWkKeAaIJrvgonW2HVYprZpoOpxuJ4FNzWa
+        2xdHqQGElmor4lgGgeuJRAyzufJfGfarK/ot6Gz+0eWsFnuPXpJ9pDNigGLV51Wu
+        kWv8K4aTpE0rEb2+L+4AD2rZwsIyOPJ8wfiDQbaXQe4M9AsD3CIF+6wQL45x5p4U
+        q1L3KQARAQABAAf8C+2DsJPpPEnFHY5dZ2zssd6mbihA2414YLYCcw6F7Lh1nGQa
+        XuulruAJnk/xGJbco8bTv7g4ecE+tsbfWnnG/QnHeYCsgO6bKRXATcWFSYpyidUn
+        2VdzQwBAv1ZtSNhCXlPLn/erzvA2X4QadUwfnvbehWJAHt8ZJmHUr3FtyRUHEdCK
+        2EXsBWnzPCcqHZOMvcbSINSqBFGzVXkOZsMFvPTNIUYRHz8NbJT/OPiOmyBshXpS
+        t8w3QqZhBcTT3NZo3kgxN1RygaTa10ytB2cxTCVuD8hmUBaV9gakdfMYkVJds7/T
+        ZY3It68F0vitBnqpppZQ+NFgr/vwVg0p3gbmAQQA79zsWPvyIqYvyJhmiKvLIpev
+        569ho8tC9xx+IZ5WnjN8ZADlb9brAdA9cqGfBgZkpZUhngCRVOYUIco+m2NYkEJm
+        BsSTTM77dqU55DRloJ3FtBwCPXHkwg9P/FHMMYYGyLpQTSB92hXk8yomo+ozX7kx
+        DtUHZIrir/rr0lQe+GkEAPkep9V5jBmfHMArnfji7Nfb1/ZjrSAaK+rtqczgm+6j
+        ubY/0DpM/6gm+/8X27WFw2m45ncH3qNvOe4Qm40EmgmHkXsdQyU0Fv7uXc9nBYoo
+        G6s7DWLY4VAqWwPsvbqgpSp/qdGn9nlcJjjY1HtfU7HM3xysT7TJ2YVhYHlJdjDB
+        A/0alBcYtHvaCJaRLWX4UiashbfETWAf/4oHlERjkXj64qOdsGnD6CD99t9x91Ue
+        pClPsLDFvY8/HxWX7STA9pQZAa2ZdJd8b58Rgy9TBShw2mbz2S6Cbw77pP/WEjtJ
+        pJuS2gDp70H01fYRaw7YH32CfUr1VeEv7hTjk/SNVteIZkkOiQEfBBgBAgAJBQJV
+        uo3eAhsMAAoJEFAku0SYxR2/D8MH/1DH2bV5J112rP9+TXrAl/s1yva15W91A6NF
+        /+qjjcoMrETN56mODKkbVutK3tTj8yU/KAksEMHilenSRoq35L9qoukQZIbNDUXK
+        wzyhjorR7Upt/qcxpBLwBMZoPfvsWtQnjY1XglL40aXBoz0+GlFWbmfyILNGz0e2
+        VPJ8IGQ0YOMY5J1ZxqHabpN8RB0P5dUM3VkLzMCdzwVbbxg5N5ONfTv2iQ/pkKMs
+        nXpVnt6IcWSs1tL0OXhI80p4SW+xksFp/y3hFBcUUrBGrgFb7NLzOb0TYfptn3Ia
+        uaAhETPJE+nBT3yDzKtpu7TnjDXpWn9JVWImzudMxK6DRZETJ3Y=
+        =uND5
+        -----END PGP PRIVATE KEY BLOCK-----
+        """);
   }
 
   /**
@@ -555,113 +575,117 @@
    */
   public static TestKey revokedCompromisedKey() throws Exception {
     return new TestKey(
-        "-----BEGIN PGP PUBLIC KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "mQENBFYmpXkBCACqaLz51DcWQmfOJnat9iHSySfSHwbKfVvoN43Ba2cf/D/PadRc\n"
-            + "HLgc+91k2yk1kV1LnMdvUGj5zZ84ZqrQx3f1WeItnzZpqxtmQS/GSxCp9EY/s7w6\n"
-            + "5i86R/k9Tzgvk0B7dKZJXbM/OWxxDkkxHWE3Un9wreX7bDU5b9D2knHRiNFqH9ZJ\n"
-            + "KqDIFZqH9WTUxNZcHz20sTCRIMfvsAwf2vRU5N5xTu4Mbk6JFc7BAj7h1f/mYEPo\n"
-            + "CTyB1jV/DSDVdn1FjJVocSg6W/CvsYF9hKFYjJHl4VXdePTpnOjHhJLL0QWk0TMe\n"
-            + "xYeUi/xDr5DeMxTmi7F7BFaQEF+KmUM46e+9ABEBAAGJATAEIAECABoFAlYmq1gT\n"
-            + "HQJ0ZXN0NiBjb21wcm9taXNlZAAKCRDtBiXcRjKKjIm6B/9YwkyG4w+9KUNESywM\n"
-            + "bxC2WWGWrFcQGoKxixzt0uT251UY8qxa1IED0wnLsIQmffTQcnrK3B9svd4HhQlk\n"
-            + "pheKQ3w5iluLeGmGljhDBdAVyS07jYoFUGTXjwzPAgJ3Dxzul8Q8Zj+fOmRcfsP9\n"
-            + "72kl6g2yEEbevnydWIiOj/vWHVLFb54G8bwXTNwH/FXQsHuPYxXZifwyDwdwEQMq\n"
-            + "0VTZcrukgeJ+VbSSuq+uX4I3+kJw5hL49KYAQltQBmTo3yhuY/Q+LkgcBv/umtY/\n"
-            + "DrUqSCBV1bTnfq5SfaObkUu22HWjrtSFSjnXYyh+wyTG3AXG3N9VPrjGQIJIW1j6\n"
-            + "9QM0iQE3BB8BAgAhBQJWJqYUFwyAAQSup+0vghEz5bEo0e0GJdxGMoqMAgcAAAoJ\n"
-            + "EIxP0o40NLOfYd4H/3GpfxfJ+nMzBChn1JqFrKOqqYiOO4sUwubXzpRO33V2jUrU\n"
-            + "V75PTWG/6NlgDbPfKFcU0qZud6M2EQxSS9/I20i/MpRB7qJnWMM/6HxdMDJ0o/pN\n"
-            + "4ImIGj38QTIWx0DS9n3bwlcobl7ZlM8g2N1kv5jQPEuurffeJRS4ny4pEvCCm2IS\n"
-            + "SGOuB0DVtYHGDrJLQ0k4mDkEJuU8fP5un8mN8I8eAINlsTFpsTswMXMiptZTm5SI\n"
-            + "5QZlG3m5MvvckngYdhynvCWc6JHGt1EHXlI4A5Qetr/4FbNE4uYcEEhyzBy4WQfi\n"
-            + "QCPiIzzm3O4cMnr9N+5HzYqRhu2OveYm86G2Rxq0IFRlc3R1c2VyIFNpeCA8dGVz\n"
-            + "dDZAZXhhbXBsZS5jb20+iQE4BBMBAgAiBQJWJqV5AhsDBgsJCAcDAgYVCAIJCgsE\n"
-            + "FgIDAQIeAQIXgAAKCRCMT9KONDSzn2XtB/4wl4ctc3cW9Fwp17cktFi6md8fjRiR\n"
-            + "wE/ruVKIKmAHzeMLBoZn4LZVunyNCRGLZfP+MUs4JhLkp8ioTzUB7xPl9k94FXel\n"
-            + "bObn9F0T7htjFLiFAOMeykneylk2kalTt6IBKtaOPn+V6onBwO+YHbwt+xLMhAWj\n"
-            + "Z/WA0TIC1RIukdzWErhd+9lG8B9kupGC5bPo/AgCPoajPhS1qLrth+lCsNJXT/Rt\n"
-            + "k6Jx5omypxMXPzgzNtULMFONszaRnHnrCHQg/yJZDCw3ffW5ShfyfWdFM65jgEKo\n"
-            + "nMKLzy9XV+BM6IJQlgHCBAP8WHKSf4qMG4/hEWLrwA/bTQ7w0DSV88msuQENBFYm\n"
-            + "pXkBCACzIMFDC6kcV58uvF3XwOrS3DmKNPDNzO/4Ay/iOxZbm+9NP8QWEEm+AzCt\n"
-            + "ZMfYdZ8C3DjuzxkhcacI/E5agZICds6bs0+VS7VKEeNYp/UrTF9pkZNXseCrJPgr\n"
-            + "U31eoGVc5bE5c0TGLhAjbMKtR5LZFMpAXgpA7hXJSSuAXGs8gjkJkYSJYnJwIOyd\n"
-            + "xOi5jmnE/U5QuMjBG0bwxFXxkaDa5mcebJ/6C8mgkKyATbQkCe7YJGl1JLK4vY28\n"
-            + "ybSMhMDtZiwgvKzd+HcQr+xUQvmgSMApJaMxKPHRA1IrP/STXUEAjcGfk/HCz/0j\n"
-            + "7mJG2cvCxeOMAmp/pTzhSoXiqUNlABEBAAGJAR8EGAECAAkFAlYmpXkCGwwACgkQ\n"
-            + "jE/SjjQ0s5/kVAf/QvHOhuoBSlSxPcgvnvCl8V3zbNR1P9lgjYGwMsvLhwCT7Wvm\n"
-            + "mkUKvtT913uER93N8xJD2svGhKabpiPj9/eo0p3p64dicijsP1UQfpmWKPa/V9sv\n"
-            + "zep08cpDl/eczSiLqgcTXCoZeewWXoQGqqoXnwa4lwQv4Zvj7TTCN2wRzoGwbRcm\n"
-            + "G2hmc27uOwA+hXbF+bLe6HOZR/7U93j8a22g2X9OgST/QCsLgyiUSw3YYaEan9tn\n"
-            + "wuEgAEY/rchOvgeXe5Sl0wTFLHH6OS4BBGgc1LRKnSCM2dgZqvhOOxOvuuieBWY6\n"
-            + "tULvIEIjNNP8Qizfc4u2O8h7HP2b3yYSrp9MMQ==\n"
-            + "=Dxr7\n"
-            + "-----END PGP PUBLIC KEY BLOCK-----\n",
-        "-----BEGIN PGP PRIVATE KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "lQOYBFYmpXkBCACqaLz51DcWQmfOJnat9iHSySfSHwbKfVvoN43Ba2cf/D/PadRc\n"
-            + "HLgc+91k2yk1kV1LnMdvUGj5zZ84ZqrQx3f1WeItnzZpqxtmQS/GSxCp9EY/s7w6\n"
-            + "5i86R/k9Tzgvk0B7dKZJXbM/OWxxDkkxHWE3Un9wreX7bDU5b9D2knHRiNFqH9ZJ\n"
-            + "KqDIFZqH9WTUxNZcHz20sTCRIMfvsAwf2vRU5N5xTu4Mbk6JFc7BAj7h1f/mYEPo\n"
-            + "CTyB1jV/DSDVdn1FjJVocSg6W/CvsYF9hKFYjJHl4VXdePTpnOjHhJLL0QWk0TMe\n"
-            + "xYeUi/xDr5DeMxTmi7F7BFaQEF+KmUM46e+9ABEBAAEAB/wOspbuA1A3AsY6QRYG\n"
-            + "Xg6/w+rD1Do9N7+4ESaQUqej2hlU1d9jjHSSx2RqgP6WaLG/xkdrQeez9/iuICjG\n"
-            + "dhXSGw0He05xobjswl2RAENxLSjr8KAhAl57a97C23TQoaYzn7WB6Wt+3gCM5bsJ\n"
-            + "WevbHinwuYb2/ve+OvcudSYM+Nhtpv0DoTaizhi9wzc3g/XLbturlpdCffbw4y+h\n"
-            + "gBPd/t3cc/0Ams8Wi2RlmDOoe73ls23nBHcNomgydyIYBn7U5Z3v3YkPNp9VBiXx\n"
-            + "rC4mDtB1ugucMhqjRNAYqinaLP35CiBTU/IB0WLu7ZyytnjY5frly1ShAG8wFL0B\n"
-            + "MOMxBADJjGy1NwGSd/7eMeYyYThyhXDxo5so91/O1+RLnSUVv/Nz6VOPp2TtuVN5\n"
-            + "uTJkpSXtUFyWbf8mkQiFz4++vHW5E/Q6+KomXRalK7JeBzeFMtax64ykQHID9cSu\n"
-            + "TaSHBhOEEeZZuf6BlulYEJEBHYK6EFlPJn+cpZtTFaqDoKh22QQA2HKjfyeppNre\n"
-            + "WRFJ9h1x1hBlSRR+XIPYmDmZUjL37jQUlw8iF+txPclfyNBw2I2Om+Jhcf25peOx\n"
-            + "ow4yvjt8r3qDjNhI2zLE9u4zrQ9xU8CUingT0t4k3NO2vigpKlmp1/w2IHSMctry\n"
-            + "v1v3+BAS8qGIYDY1lgI7QBvle5hxGYUD/00zMyHOIgYg/cM5sR0qafesoj9kRff5\n"
-            + "UMnSy1dw+pGMv6GqKGbcZDoC060hUO9GhQRPZXF8PlYzD30lOLS2Uw4mPXjOmQVv\n"
-            + "lDiyl/vLkfkVfP/alYH0FW6mErDrjtHhrZewqDm3iPLGMVGfGCJsL+N37VBSe+jr\n"
-            + "4rZCnjk/Jo5JRoKJATcEHwECACEFAlYmphQXDIABBK6n7S+CETPlsSjR7QYl3EYy\n"
-            + "iowCBwAACgkQjE/SjjQ0s59h3gf/cal/F8n6czMEKGfUmoWso6qpiI47ixTC5tfO\n"
-            + "lE7fdXaNStRXvk9NYb/o2WANs98oVxTSpm53ozYRDFJL38jbSL8ylEHuomdYwz/o\n"
-            + "fF0wMnSj+k3giYgaPfxBMhbHQNL2fdvCVyhuXtmUzyDY3WS/mNA8S66t994lFLif\n"
-            + "LikS8IKbYhJIY64HQNW1gcYOsktDSTiYOQQm5Tx8/m6fyY3wjx4Ag2WxMWmxOzAx\n"
-            + "cyKm1lOblIjlBmUbebky+9ySeBh2HKe8JZzokca3UQdeUjgDlB62v/gVs0Ti5hwQ\n"
-            + "SHLMHLhZB+JAI+IjPObc7hwyev037kfNipGG7Y695ibzobZHGrQgVGVzdHVzZXIg\n"
-            + "U2l4IDx0ZXN0NkBleGFtcGxlLmNvbT6JATgEEwECACIFAlYmpXkCGwMGCwkIBwMC\n"
-            + "BhUIAgkKCwQWAgMBAh4BAheAAAoJEIxP0o40NLOfZe0H/jCXhy1zdxb0XCnXtyS0\n"
-            + "WLqZ3x+NGJHAT+u5UogqYAfN4wsGhmfgtlW6fI0JEYtl8/4xSzgmEuSnyKhPNQHv\n"
-            + "E+X2T3gVd6Vs5uf0XRPuG2MUuIUA4x7KSd7KWTaRqVO3ogEq1o4+f5XqicHA75gd\n"
-            + "vC37EsyEBaNn9YDRMgLVEi6R3NYSuF372UbwH2S6kYLls+j8CAI+hqM+FLWouu2H\n"
-            + "6UKw0ldP9G2TonHmibKnExc/ODM21QswU42zNpGceesIdCD/IlkMLDd99blKF/J9\n"
-            + "Z0UzrmOAQqicwovPL1dX4EzoglCWAcIEA/xYcpJ/iowbj+ERYuvAD9tNDvDQNJXz\n"
-            + "yaydA5gEVialeQEIALMgwUMLqRxXny68XdfA6tLcOYo08M3M7/gDL+I7Flub700/\n"
-            + "xBYQSb4DMK1kx9h1nwLcOO7PGSFxpwj8TlqBkgJ2zpuzT5VLtUoR41in9StMX2mR\n"
-            + "k1ex4Ksk+CtTfV6gZVzlsTlzRMYuECNswq1HktkUykBeCkDuFclJK4BcazyCOQmR\n"
-            + "hIlicnAg7J3E6LmOacT9TlC4yMEbRvDEVfGRoNrmZx5sn/oLyaCQrIBNtCQJ7tgk\n"
-            + "aXUksri9jbzJtIyEwO1mLCC8rN34dxCv7FRC+aBIwCklozEo8dEDUis/9JNdQQCN\n"
-            + "wZ+T8cLP/SPuYkbZy8LF44wCan+lPOFKheKpQ2UAEQEAAQAH/A1Os+Tb9yiGnuoN\n"
-            + "LuiSKa/YEgNBOxmC7dnuPK6xJpBQNZc200WzWJMf8AwVpl4foNxIyYb+Rjbsl1Ts\n"
-            + "z5JcOWFq+57oE5O7D+EMkqf5tFZO4nC4kqprac41HSW02mW/A0DDRKcIt/WEIwlK\n"
-            + "sWzHmjJ736moAtl/holRYQS0ePgB8bUPDQcFovH6X3SUxlPGTYD1DEX+WNvYRk3r\n"
-            + "pa9YXH65qbG9CEJIFTmwZIRDl+CBtBlN/fKadyMJr9fXtv7Fu9hNsK1K1pUtLqCa\n"
-            + "nc22Zak+o+LCPlZ8vmw/UmOGtp2iZlEragmh2rOywp0dHF7gsdlgoafQf8Q4NIag\n"
-            + "TFyHf1kEAMSOKUUwLBEmPnDVfoEOt5spQLVtlF8sh/Okk9zVazWmw0n/b1Ef72z6\n"
-            + "EZqCW9/XhH5pXfKJeV+08hroHI6a5UESa7/xOIx50TaQdRqjwGciMnH2LJcpIU/L\n"
-            + "f0cGXcnTLKt4Z2GeSPKFTj4VzwmwH5F/RYdc5eiVb7VNoy9DC5RZBADpTVH5pklS\n"
-            + "44VDJIcwSNy1LBEU3oj+Nu+sufCimJ5B7HLokoJtm6q8VQRga5hN1TZkdQcLy+b2\n"
-            + "wzxHYoIsIsYFfG/mqLZ3LJNDFqze1/Kj987DYSUGeNYexMN2Fkzbo35Jf0cpOiao\n"
-            + "390JFOS7qecUak5/yJ/V4xy8/nds37617QP9GWlFBykDoESBC2AIz8wXcpUBVNeH\n"
-            + "BNSthmC+PJPhsS6jTQuipqtXUZBgZBrMHp/bA8gTOkI4rPXycH3+ACbuQMAjbFny\n"
-            + "Kt69lPHD8VWw/82E4EY2J9LmHli+2BcATz89ouC4kqC5zF90qJseviSZPihpnFxA\n"
-            + "1UqMU2ZjsPb4CM9C/YkBHwQYAQIACQUCVialeQIbDAAKCRCMT9KONDSzn+RUB/9C\n"
-            + "8c6G6gFKVLE9yC+e8KXxXfNs1HU/2WCNgbAyy8uHAJPta+aaRQq+1P3Xe4RH3c3z\n"
-            + "EkPay8aEppumI+P396jSnenrh2JyKOw/VRB+mZYo9r9X2y/N6nTxykOX95zNKIuq\n"
-            + "BxNcKhl57BZehAaqqhefBriXBC/hm+PtNMI3bBHOgbBtFyYbaGZzbu47AD6FdsX5\n"
-            + "st7oc5lH/tT3ePxrbaDZf06BJP9AKwuDKJRLDdhhoRqf22fC4SAARj+tyE6+B5d7\n"
-            + "lKXTBMUscfo5LgEEaBzUtEqdIIzZ2Bmq+E47E6+66J4FZjq1Qu8gQiM00/xCLN9z\n"
-            + "i7Y7yHsc/ZvfJhKun0wx\n"
-            + "=M/kw\n"
-            + "-----END PGP PRIVATE KEY BLOCK-----\n");
+        """
+        -----BEGIN PGP PUBLIC KEY BLOCK-----
+        Version: GnuPG v1
+
+        mQENBFYmpXkBCACqaLz51DcWQmfOJnat9iHSySfSHwbKfVvoN43Ba2cf/D/PadRc
+        HLgc+91k2yk1kV1LnMdvUGj5zZ84ZqrQx3f1WeItnzZpqxtmQS/GSxCp9EY/s7w6
+        5i86R/k9Tzgvk0B7dKZJXbM/OWxxDkkxHWE3Un9wreX7bDU5b9D2knHRiNFqH9ZJ
+        KqDIFZqH9WTUxNZcHz20sTCRIMfvsAwf2vRU5N5xTu4Mbk6JFc7BAj7h1f/mYEPo
+        CTyB1jV/DSDVdn1FjJVocSg6W/CvsYF9hKFYjJHl4VXdePTpnOjHhJLL0QWk0TMe
+        xYeUi/xDr5DeMxTmi7F7BFaQEF+KmUM46e+9ABEBAAGJATAEIAECABoFAlYmq1gT
+        HQJ0ZXN0NiBjb21wcm9taXNlZAAKCRDtBiXcRjKKjIm6B/9YwkyG4w+9KUNESywM
+        bxC2WWGWrFcQGoKxixzt0uT251UY8qxa1IED0wnLsIQmffTQcnrK3B9svd4HhQlk
+        pheKQ3w5iluLeGmGljhDBdAVyS07jYoFUGTXjwzPAgJ3Dxzul8Q8Zj+fOmRcfsP9
+        72kl6g2yEEbevnydWIiOj/vWHVLFb54G8bwXTNwH/FXQsHuPYxXZifwyDwdwEQMq
+        0VTZcrukgeJ+VbSSuq+uX4I3+kJw5hL49KYAQltQBmTo3yhuY/Q+LkgcBv/umtY/
+        DrUqSCBV1bTnfq5SfaObkUu22HWjrtSFSjnXYyh+wyTG3AXG3N9VPrjGQIJIW1j6
+        9QM0iQE3BB8BAgAhBQJWJqYUFwyAAQSup+0vghEz5bEo0e0GJdxGMoqMAgcAAAoJ
+        EIxP0o40NLOfYd4H/3GpfxfJ+nMzBChn1JqFrKOqqYiOO4sUwubXzpRO33V2jUrU
+        V75PTWG/6NlgDbPfKFcU0qZud6M2EQxSS9/I20i/MpRB7qJnWMM/6HxdMDJ0o/pN
+        4ImIGj38QTIWx0DS9n3bwlcobl7ZlM8g2N1kv5jQPEuurffeJRS4ny4pEvCCm2IS
+        SGOuB0DVtYHGDrJLQ0k4mDkEJuU8fP5un8mN8I8eAINlsTFpsTswMXMiptZTm5SI
+        5QZlG3m5MvvckngYdhynvCWc6JHGt1EHXlI4A5Qetr/4FbNE4uYcEEhyzBy4WQfi
+        QCPiIzzm3O4cMnr9N+5HzYqRhu2OveYm86G2Rxq0IFRlc3R1c2VyIFNpeCA8dGVz
+        dDZAZXhhbXBsZS5jb20+iQE4BBMBAgAiBQJWJqV5AhsDBgsJCAcDAgYVCAIJCgsE
+        FgIDAQIeAQIXgAAKCRCMT9KONDSzn2XtB/4wl4ctc3cW9Fwp17cktFi6md8fjRiR
+        wE/ruVKIKmAHzeMLBoZn4LZVunyNCRGLZfP+MUs4JhLkp8ioTzUB7xPl9k94FXel
+        bObn9F0T7htjFLiFAOMeykneylk2kalTt6IBKtaOPn+V6onBwO+YHbwt+xLMhAWj
+        Z/WA0TIC1RIukdzWErhd+9lG8B9kupGC5bPo/AgCPoajPhS1qLrth+lCsNJXT/Rt
+        k6Jx5omypxMXPzgzNtULMFONszaRnHnrCHQg/yJZDCw3ffW5ShfyfWdFM65jgEKo
+        nMKLzy9XV+BM6IJQlgHCBAP8WHKSf4qMG4/hEWLrwA/bTQ7w0DSV88msuQENBFYm
+        pXkBCACzIMFDC6kcV58uvF3XwOrS3DmKNPDNzO/4Ay/iOxZbm+9NP8QWEEm+AzCt
+        ZMfYdZ8C3DjuzxkhcacI/E5agZICds6bs0+VS7VKEeNYp/UrTF9pkZNXseCrJPgr
+        U31eoGVc5bE5c0TGLhAjbMKtR5LZFMpAXgpA7hXJSSuAXGs8gjkJkYSJYnJwIOyd
+        xOi5jmnE/U5QuMjBG0bwxFXxkaDa5mcebJ/6C8mgkKyATbQkCe7YJGl1JLK4vY28
+        ybSMhMDtZiwgvKzd+HcQr+xUQvmgSMApJaMxKPHRA1IrP/STXUEAjcGfk/HCz/0j
+        7mJG2cvCxeOMAmp/pTzhSoXiqUNlABEBAAGJAR8EGAECAAkFAlYmpXkCGwwACgkQ
+        jE/SjjQ0s5/kVAf/QvHOhuoBSlSxPcgvnvCl8V3zbNR1P9lgjYGwMsvLhwCT7Wvm
+        mkUKvtT913uER93N8xJD2svGhKabpiPj9/eo0p3p64dicijsP1UQfpmWKPa/V9sv
+        zep08cpDl/eczSiLqgcTXCoZeewWXoQGqqoXnwa4lwQv4Zvj7TTCN2wRzoGwbRcm
+        G2hmc27uOwA+hXbF+bLe6HOZR/7U93j8a22g2X9OgST/QCsLgyiUSw3YYaEan9tn
+        wuEgAEY/rchOvgeXe5Sl0wTFLHH6OS4BBGgc1LRKnSCM2dgZqvhOOxOvuuieBWY6
+        tULvIEIjNNP8Qizfc4u2O8h7HP2b3yYSrp9MMQ==
+        =Dxr7
+        -----END PGP PUBLIC KEY BLOCK-----
+        """,
+        """
+        -----BEGIN PGP PRIVATE KEY BLOCK-----
+        Version: GnuPG v1
+
+        lQOYBFYmpXkBCACqaLz51DcWQmfOJnat9iHSySfSHwbKfVvoN43Ba2cf/D/PadRc
+        HLgc+91k2yk1kV1LnMdvUGj5zZ84ZqrQx3f1WeItnzZpqxtmQS/GSxCp9EY/s7w6
+        5i86R/k9Tzgvk0B7dKZJXbM/OWxxDkkxHWE3Un9wreX7bDU5b9D2knHRiNFqH9ZJ
+        KqDIFZqH9WTUxNZcHz20sTCRIMfvsAwf2vRU5N5xTu4Mbk6JFc7BAj7h1f/mYEPo
+        CTyB1jV/DSDVdn1FjJVocSg6W/CvsYF9hKFYjJHl4VXdePTpnOjHhJLL0QWk0TMe
+        xYeUi/xDr5DeMxTmi7F7BFaQEF+KmUM46e+9ABEBAAEAB/wOspbuA1A3AsY6QRYG
+        Xg6/w+rD1Do9N7+4ESaQUqej2hlU1d9jjHSSx2RqgP6WaLG/xkdrQeez9/iuICjG
+        dhXSGw0He05xobjswl2RAENxLSjr8KAhAl57a97C23TQoaYzn7WB6Wt+3gCM5bsJ
+        WevbHinwuYb2/ve+OvcudSYM+Nhtpv0DoTaizhi9wzc3g/XLbturlpdCffbw4y+h
+        gBPd/t3cc/0Ams8Wi2RlmDOoe73ls23nBHcNomgydyIYBn7U5Z3v3YkPNp9VBiXx
+        rC4mDtB1ugucMhqjRNAYqinaLP35CiBTU/IB0WLu7ZyytnjY5frly1ShAG8wFL0B
+        MOMxBADJjGy1NwGSd/7eMeYyYThyhXDxo5so91/O1+RLnSUVv/Nz6VOPp2TtuVN5
+        uTJkpSXtUFyWbf8mkQiFz4++vHW5E/Q6+KomXRalK7JeBzeFMtax64ykQHID9cSu
+        TaSHBhOEEeZZuf6BlulYEJEBHYK6EFlPJn+cpZtTFaqDoKh22QQA2HKjfyeppNre
+        WRFJ9h1x1hBlSRR+XIPYmDmZUjL37jQUlw8iF+txPclfyNBw2I2Om+Jhcf25peOx
+        ow4yvjt8r3qDjNhI2zLE9u4zrQ9xU8CUingT0t4k3NO2vigpKlmp1/w2IHSMctry
+        v1v3+BAS8qGIYDY1lgI7QBvle5hxGYUD/00zMyHOIgYg/cM5sR0qafesoj9kRff5
+        UMnSy1dw+pGMv6GqKGbcZDoC060hUO9GhQRPZXF8PlYzD30lOLS2Uw4mPXjOmQVv
+        lDiyl/vLkfkVfP/alYH0FW6mErDrjtHhrZewqDm3iPLGMVGfGCJsL+N37VBSe+jr
+        4rZCnjk/Jo5JRoKJATcEHwECACEFAlYmphQXDIABBK6n7S+CETPlsSjR7QYl3EYy
+        iowCBwAACgkQjE/SjjQ0s59h3gf/cal/F8n6czMEKGfUmoWso6qpiI47ixTC5tfO
+        lE7fdXaNStRXvk9NYb/o2WANs98oVxTSpm53ozYRDFJL38jbSL8ylEHuomdYwz/o
+        fF0wMnSj+k3giYgaPfxBMhbHQNL2fdvCVyhuXtmUzyDY3WS/mNA8S66t994lFLif
+        LikS8IKbYhJIY64HQNW1gcYOsktDSTiYOQQm5Tx8/m6fyY3wjx4Ag2WxMWmxOzAx
+        cyKm1lOblIjlBmUbebky+9ySeBh2HKe8JZzokca3UQdeUjgDlB62v/gVs0Ti5hwQ
+        SHLMHLhZB+JAI+IjPObc7hwyev037kfNipGG7Y695ibzobZHGrQgVGVzdHVzZXIg
+        U2l4IDx0ZXN0NkBleGFtcGxlLmNvbT6JATgEEwECACIFAlYmpXkCGwMGCwkIBwMC
+        BhUIAgkKCwQWAgMBAh4BAheAAAoJEIxP0o40NLOfZe0H/jCXhy1zdxb0XCnXtyS0
+        WLqZ3x+NGJHAT+u5UogqYAfN4wsGhmfgtlW6fI0JEYtl8/4xSzgmEuSnyKhPNQHv
+        E+X2T3gVd6Vs5uf0XRPuG2MUuIUA4x7KSd7KWTaRqVO3ogEq1o4+f5XqicHA75gd
+        vC37EsyEBaNn9YDRMgLVEi6R3NYSuF372UbwH2S6kYLls+j8CAI+hqM+FLWouu2H
+        6UKw0ldP9G2TonHmibKnExc/ODM21QswU42zNpGceesIdCD/IlkMLDd99blKF/J9
+        Z0UzrmOAQqicwovPL1dX4EzoglCWAcIEA/xYcpJ/iowbj+ERYuvAD9tNDvDQNJXz
+        yaydA5gEVialeQEIALMgwUMLqRxXny68XdfA6tLcOYo08M3M7/gDL+I7Flub700/
+        xBYQSb4DMK1kx9h1nwLcOO7PGSFxpwj8TlqBkgJ2zpuzT5VLtUoR41in9StMX2mR
+        k1ex4Ksk+CtTfV6gZVzlsTlzRMYuECNswq1HktkUykBeCkDuFclJK4BcazyCOQmR
+        hIlicnAg7J3E6LmOacT9TlC4yMEbRvDEVfGRoNrmZx5sn/oLyaCQrIBNtCQJ7tgk
+        aXUksri9jbzJtIyEwO1mLCC8rN34dxCv7FRC+aBIwCklozEo8dEDUis/9JNdQQCN
+        wZ+T8cLP/SPuYkbZy8LF44wCan+lPOFKheKpQ2UAEQEAAQAH/A1Os+Tb9yiGnuoN
+        LuiSKa/YEgNBOxmC7dnuPK6xJpBQNZc200WzWJMf8AwVpl4foNxIyYb+Rjbsl1Ts
+        z5JcOWFq+57oE5O7D+EMkqf5tFZO4nC4kqprac41HSW02mW/A0DDRKcIt/WEIwlK
+        sWzHmjJ736moAtl/holRYQS0ePgB8bUPDQcFovH6X3SUxlPGTYD1DEX+WNvYRk3r
+        pa9YXH65qbG9CEJIFTmwZIRDl+CBtBlN/fKadyMJr9fXtv7Fu9hNsK1K1pUtLqCa
+        nc22Zak+o+LCPlZ8vmw/UmOGtp2iZlEragmh2rOywp0dHF7gsdlgoafQf8Q4NIag
+        TFyHf1kEAMSOKUUwLBEmPnDVfoEOt5spQLVtlF8sh/Okk9zVazWmw0n/b1Ef72z6
+        EZqCW9/XhH5pXfKJeV+08hroHI6a5UESa7/xOIx50TaQdRqjwGciMnH2LJcpIU/L
+        f0cGXcnTLKt4Z2GeSPKFTj4VzwmwH5F/RYdc5eiVb7VNoy9DC5RZBADpTVH5pklS
+        44VDJIcwSNy1LBEU3oj+Nu+sufCimJ5B7HLokoJtm6q8VQRga5hN1TZkdQcLy+b2
+        wzxHYoIsIsYFfG/mqLZ3LJNDFqze1/Kj987DYSUGeNYexMN2Fkzbo35Jf0cpOiao
+        390JFOS7qecUak5/yJ/V4xy8/nds37617QP9GWlFBykDoESBC2AIz8wXcpUBVNeH
+        BNSthmC+PJPhsS6jTQuipqtXUZBgZBrMHp/bA8gTOkI4rPXycH3+ACbuQMAjbFny
+        Kt69lPHD8VWw/82E4EY2J9LmHli+2BcATz89ouC4kqC5zF90qJseviSZPihpnFxA
+        1UqMU2ZjsPb4CM9C/YkBHwQYAQIACQUCVialeQIbDAAKCRCMT9KONDSzn+RUB/9C
+        8c6G6gFKVLE9yC+e8KXxXfNs1HU/2WCNgbAyy8uHAJPta+aaRQq+1P3Xe4RH3c3z
+        EkPay8aEppumI+P396jSnenrh2JyKOw/VRB+mZYo9r9X2y/N6nTxykOX95zNKIuq
+        BxNcKhl57BZehAaqqhefBriXBC/hm+PtNMI3bBHOgbBtFyYbaGZzbu47AD6FdsX5
+        st7oc5lH/tT3ePxrbaDZf06BJP9AKwuDKJRLDdhhoRqf22fC4SAARj+tyE6+B5d7
+        lKXTBMUscfo5LgEEaBzUtEqdIIzZ2Bmq+E47E6+66J4FZjq1Qu8gQiM00/xCLN9z
+        i7Y7yHsc/ZvfJhKun0wx
+        =M/kw
+        -----END PGP PRIVATE KEY BLOCK-----
+        """);
   }
 
   /**
@@ -677,113 +701,117 @@
    */
   public static TestKey revokedNoLongerUsedKey() throws Exception {
     return new TestKey(
-        "-----BEGIN PGP PUBLIC KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "mQENBFYmq3EBCAC9ssY6QhFsnZqKEPlQrx8Zomblj8qV93/B448isOT2L6OVY7UC\n"
-            + "kKPj6afW5UDkYeyZSmLZfTrpePcbAB8FB3uvd/AS9mHC+6zuBlwlkl9xIXlwUXQP\n"
-            + "KER4LKYNTP21AM+/vTJm4+u26tlZECIZlez31KEeqM30EAm+/pO8VkEp8+1ImfLv\n"
-            + "otndIjMoq9gxJvn6KZeexJT2eKCsSa20vVsmAhuFjLZitU3lEjIROfDiyHUZ2cZ+\n"
-            + "qynfppJCKlHJRu/T9L/yxDFVUFDFSajNzSfjG1g3FEveDITyAhRetVfZbhyJptnV\n"
-            + "jfiHSQkLamPsBmMoKfP+aO5SfsTHTJvxgLUdABEBAAGJAS0EIAECABcFAlYmq8AQ\n"
-            + "HQN0ZXN0NyBub3QgdXNlZAAKCRDtBiXcRjKKjPKqB/sF+ypJZaZ5M4jFdoH/YA3s\n"
-            + "4+VkA/NbLKcrlMI0lbnIrax02jdyTo7rBUJfTwuBs5QeQ25+VfaBcz9fWSv4Z8Bk\n"
-            + "9+w61bQZLQkExZ9W7hnhaapyR0aT0rY48KGtHOPNoMQu9Si+RnRiI024jMUUjrau\n"
-            + "w/exgCteY261VtCPRgyZOlpbX43rsBhF8ott0ZzSfLwaNTHhsjFsD1uH6TSFO8La\n"
-            + "/H1nO31sORlY3+rCGiQVuYIJD1qI7bEjDHYO0nq/f7JjfYKmVBg9grwLsX3h1qZ2\n"
-            + "L3Yz+0eCi7/6T/Sm7PavQ+EGL7+WBXX3qJpwc+EFNHs6VxQp86k6csba0c5mNcaQ\n"
-            + "iQE3BB8BAgAhBQJWJqusFwyAAQSup+0vghEz5bEo0e0GJdxGMoqMAgcAAAoJEPrS\n"
-            + "q+I9bFLQ2BYH/jm+t7pZuv8WqZdb8FiBa9CFfhcSKjYarMHjBw7GxWZJMd5VR4DC\n"
-            + "r4T/ZSAGRKBRKQ2uXrkm9H0NPDp0c/UKCHtQMFDnqTk7B63mwSR1d7W0qaRPXYQ1\n"
-            + "bbatnzkEDOj0e+rX6aiqVRMo/q6uMNUFl6UMrUZPSNB5PVRQWPnQ7K11mw3vg0e5\n"
-            + "ycqJbyFvER6EtyDUXGBo8a5/4bK8VBNBMTAIy6GeGpeSM5b7cpQk7/j4dXugCJAV\n"
-            + "fhFNUOgLduoIKM4u+VcFjk3Km/YxOtGi1dLqCbTX/0LiCRA9mgQpyNVyA+Sm48LM\n"
-            + "LUkbcrN/F3SHX1ao/5lm19r8Biu1ziQnLgC0IlRlc3R1c2VyIFNldmVuIDx0ZXN0\n"
-            + "N0BleGFtcGxlLmNvbT6JATgEEwECACIFAlYmq3ECGwMGCwkIBwMCBhUIAgkKCwQW\n"
-            + "AgMBAh4BAheAAAoJEPrSq+I9bFLQvjQH/0K7aBsGU2U/rm4I+u+uPa6BnFTYQJqg\n"
-            + "034pwdD0WfM3M/XgVh7ERjnR9ZViCMVej+K3kW5d2DNaXu5vVpcD6L6jjWwiJHBw\n"
-            + "LIcmpqQrL0TdoCr4F4FKQnBbcH1fNvP8A/hLDHB3k3ERPvEFIo1AkVuK4s/v7yZY\n"
-            + "HAowX0r4ok4ndu/wAc0HI1FkApkAfh18JDTuui53dkKhnkDp7Xnfm/ElAZYjB7Se\n"
-            + "ivxOD9vdhViWSx1VhttPZo5hSyJrEYaJ5u9hsXNUN85DxgLqCmS1v8n3pN1lVY/Q\n"
-            + "TYXtgocakQgHGEG0Tl6a3xpNkn9ihnyCr80mHCxXTyUUBGfygccelB+5AQ0EViar\n"
-            + "cQEIAKxwXb6HGV9QjepADyWW7GMxc2JVZ7pZM2sdf8wrgnQqV2G1rc9gAgwTX4jt\n"
-            + "OY0vSKT1vBq09ZXS3qpYHi/Wwft0KkaX/a7e6vKabDSfhilxC2LuGz2+56f6UOzj\n"
-            + "ggwf5k4LFTQvkDUZumwPjoeC2hqQO3Q/9PW39C6GnvsCr5L0MRdO3PbVJM7lJaOk\n"
-            + "MbGwgysErWgiZXKlxMpIvffIsLC4BAxnjXaCy6zHuBcPMPaRMs7sDRBzeuTV2wnX\n"
-            + "Sd+IXZgdpd1hF7VkuXenzwOqvBGS66C3ILW0ZTFaOtgrloIkTvtYEcJFWvxqWl2F\n"
-            + "+JQ5V6eu2aJ3HIGyr9L1R8MUA6EAEQEAAYkBHwQYAQIACQUCViarcQIbDAAKCRD6\n"
-            + "0qviPWxS0M0PB/9Rbk4/pNW67+uE1lwtaIG7uFiMbJqu8jK6MkD8GdayflroWEZA\n"
-            + "x0Xow9HL8UaRfeRPTZMrDRpjl+fJIXT5qnlB0FPmzSXAKr3piC8migBcbp5m6hWh\n"
-            + "c3ScAqWOeMt9j0TTWHh4hKS8Q+lK392ht65cI/kpFhxm9EEaXmajplNL/2G3PVrl\n"
-            + "fFUgCdOn2DYdVSgJsfBhkcoiy17G3vqtb+We6ulhziae4SIrkUSqdYmRjiFyvqZz\n"
-            + "tmMEoF6CQNCUb1NK0TsSDeIdDacYjUwyq0Qj6TaXrWcbC3kW0GtWoFTNIiX4q9bN\n"
-            + "+B6paw/s8P7XCWznTBRdlFWWgrhcpzQ8fefC\n"
-            + "=CHer\n"
-            + "-----END PGP PUBLIC KEY BLOCK-----\n",
-        "-----BEGIN PGP PRIVATE KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "lQOYBFYmq3EBCAC9ssY6QhFsnZqKEPlQrx8Zomblj8qV93/B448isOT2L6OVY7UC\n"
-            + "kKPj6afW5UDkYeyZSmLZfTrpePcbAB8FB3uvd/AS9mHC+6zuBlwlkl9xIXlwUXQP\n"
-            + "KER4LKYNTP21AM+/vTJm4+u26tlZECIZlez31KEeqM30EAm+/pO8VkEp8+1ImfLv\n"
-            + "otndIjMoq9gxJvn6KZeexJT2eKCsSa20vVsmAhuFjLZitU3lEjIROfDiyHUZ2cZ+\n"
-            + "qynfppJCKlHJRu/T9L/yxDFVUFDFSajNzSfjG1g3FEveDITyAhRetVfZbhyJptnV\n"
-            + "jfiHSQkLamPsBmMoKfP+aO5SfsTHTJvxgLUdABEBAAEAB/9AdCtFJSidcolNKwpC\n"
-            + "/1V+VL9IdYxcWx02CDccjuUkvrgCrL+WcQW2jS/hZMChOKJ2zR78DcBEDr1LF8Xy\n"
-            + "ZAIC8yoHj15VLUUrFM8fVvYFzt1fq9VWxxRIjscW0teLNgzgdYzYB84RtwcFa2Vi\n"
-            + "sx2ycTUTYUClEgP1uLMCtX3rnibJh4vR+lVgnDtKSoh4CLAlW6grAAVdw5sSuV7Q\n"
-            + "i9EJcPezGw1RvBU5PooqNDG6kyw/QqsAS4q3WP4uVJKK1e7S9oqXFEN8k/zfllI0\n"
-            + "SSkoyP2flzz71rJF/wQMfJ8uf/CelKXd+gPO4FbCWiZSTLe20JR23qiOyvZkfCwg\n"
-            + "eFmzBADIJUzspDrg5yaqE+HMc8U3O9G9FHoDSweZTbhiq3aK0BqMAn34u0ps6chy\n"
-            + "VMO6aPWVzgcSHNfTlzpjuN9lwDoimYBH5vZa1HlCHt5eeqTORixkxSerOmILabTi\n"
-            + "QWq5JPdJwYZiSvK45G5k3G37RTd6/QyhTlRYXj59RXYajrYngwQA8qMZRkRYcTop\n"
-            + "aG+5M0x44k6NgIyH7Ap+2vRPpDdUlHs+z+6iRvoutkSfKHeZUYBQjgt+tScfn1hM\n"
-            + "BRB+x146ecmSVh/Dh8yu6uCrhitFlKpyJqNptZo5o+sH41zjefpMd/bc8rtHTw3n\n"
-            + "GiFl57ZbXbze2O8UimUVgRI2DtOebt8EAJHM/8vZahzF0chzL4sNVAb8FcNYxAyn\n"
-            + "95VpnWeAtKX7f0bqUvIN4BNV++o6JdMNvBoYEQpKeQIda7QM59hNiS8f/bxkRikF\n"
-            + "OiHB5YGy2zRX5T1G5rVQ0YqrOu959eEwdGZmOQ8GOqq5B/NoHXUtotV6SGE3R+Tl\n"
-            + "grlV4U5/PT0fM3KJATcEHwECACEFAlYmq6wXDIABBK6n7S+CETPlsSjR7QYl3EYy\n"
-            + "iowCBwAACgkQ+tKr4j1sUtDYFgf+Ob63ulm6/xapl1vwWIFr0IV+FxIqNhqsweMH\n"
-            + "DsbFZkkx3lVHgMKvhP9lIAZEoFEpDa5euSb0fQ08OnRz9QoIe1AwUOepOTsHrebB\n"
-            + "JHV3tbSppE9dhDVttq2fOQQM6PR76tfpqKpVEyj+rq4w1QWXpQytRk9I0Hk9VFBY\n"
-            + "+dDsrXWbDe+DR7nJyolvIW8RHoS3INRcYGjxrn/hsrxUE0ExMAjLoZ4al5Izlvty\n"
-            + "lCTv+Ph1e6AIkBV+EU1Q6At26ggozi75VwWOTcqb9jE60aLV0uoJtNf/QuIJED2a\n"
-            + "BCnI1XID5KbjwswtSRtys38XdIdfVqj/mWbX2vwGK7XOJCcuALQiVGVzdHVzZXIg\n"
-            + "U2V2ZW4gPHRlc3Q3QGV4YW1wbGUuY29tPokBOAQTAQIAIgUCViarcQIbAwYLCQgH\n"
-            + "AwIGFQgCCQoLBBYCAwECHgECF4AACgkQ+tKr4j1sUtC+NAf/QrtoGwZTZT+ubgj6\n"
-            + "7649roGcVNhAmqDTfinB0PRZ8zcz9eBWHsRGOdH1lWIIxV6P4reRbl3YM1pe7m9W\n"
-            + "lwPovqONbCIkcHAshyampCsvRN2gKvgXgUpCcFtwfV828/wD+EsMcHeTcRE+8QUi\n"
-            + "jUCRW4riz+/vJlgcCjBfSviiTid27/ABzQcjUWQCmQB+HXwkNO66Lnd2QqGeQOnt\n"
-            + "ed+b8SUBliMHtJ6K/E4P292FWJZLHVWG209mjmFLImsRhonm72Gxc1Q3zkPGAuoK\n"
-            + "ZLW/yfek3WVVj9BNhe2ChxqRCAcYQbROXprfGk2Sf2KGfIKvzSYcLFdPJRQEZ/KB\n"
-            + "xx6UH50DmARWJqtxAQgArHBdvocZX1CN6kAPJZbsYzFzYlVnulkzax1/zCuCdCpX\n"
-            + "YbWtz2ACDBNfiO05jS9IpPW8GrT1ldLeqlgeL9bB+3QqRpf9rt7q8ppsNJ+GKXEL\n"
-            + "Yu4bPb7np/pQ7OOCDB/mTgsVNC+QNRm6bA+Oh4LaGpA7dD/09bf0Loae+wKvkvQx\n"
-            + "F07c9tUkzuUlo6QxsbCDKwStaCJlcqXEyki998iwsLgEDGeNdoLLrMe4Fw8w9pEy\n"
-            + "zuwNEHN65NXbCddJ34hdmB2l3WEXtWS5d6fPA6q8EZLroLcgtbRlMVo62CuWgiRO\n"
-            + "+1gRwkVa/GpaXYX4lDlXp67ZonccgbKv0vVHwxQDoQARAQABAAf5Ae8xa1mPns1E\n"
-            + "B5yCrvzDl79Dw0F1rED46IWIW/ghpVTzmFHV6ngcvcRFM5TZquxHXSuxLv7YVxRq\n"
-            + "UVszXNJaEwyJYYkDRwAS1E2IKN+gknwapm2eWkchySAajUsQt+XEYHFpDPtQRlA3\n"
-            + "Z6PrCOPJDOLmT9Zcf0R6KurGrhvTGrZkKU6ZCFqZWETfZy5cPfq2qxtw3YEUI+eT\n"
-            + "09AgMmPJ9nDPI3cA69tvy/phVFgpglsS76qgd6uFJ5kcDoIB+YepmJoHnzJeowYt\n"
-            + "lvnmmyGqmVS/KCgvILaD0c73Dp2X0BN64hSZHa3nUU67WbKJzo2OXr+yr0hvofcf\n"
-            + "8vhKJe5+2wQAy+rRKSAOPaFiKT8ZenRucx1pTJLoB8JdediOdR4dtXB2Z59Ze7N3\n"
-            + "sedfrJn1ao+jJEpnKeudlDq7oa9THd7ZojN4gBF/lz0duzfertuQ/MrHaTPeK8YI\n"
-            + "dEPg3SgYVOLDBptaKmo0xr2f6aslGLPHgxCgzOcLuuUNGKJSigZvhdMEANh7VKsX\n"
-            + "nb5shZh+KRET84us/uu74q4iIfc8Q10oXuN9+IPlqfAIclo4uMhvo5rtI9ApFtxs\n"
-            + "oZzqqc+gt+OAbn/fHeb61eT36BA+r61Ka+erxkpWU5r1BPVIqq+biTY/HHchqroJ\n"
-            + "aw81qWudO9h5a0yP1alDiBSwhZWIMCKzp6Q7A/472amrSzgs7u8ToQ/2THDxaMf3\n"
-            + "Se0HgMrIT1/+5es2CWiEoZGSZTXlimDYXJULu/DFC7ia7kXOLrMsO85bEi7SHagA\n"
-            + "eO+mAw3xP3OuNkZDt9x4qtal28fNIz22DH5qg2wtsGdCWXz5C6OdcrtQ736kNxa2\n"
-            + "5QemZ/0VWxHPnvXz40RtiQEfBBgBAgAJBQJWJqtxAhsMAAoJEPrSq+I9bFLQzQ8H\n"
-            + "/1FuTj+k1brv64TWXC1ogbu4WIxsmq7yMroyQPwZ1rJ+WuhYRkDHRejD0cvxRpF9\n"
-            + "5E9NkysNGmOX58khdPmqeUHQU+bNJcAqvemILyaKAFxunmbqFaFzdJwCpY54y32P\n"
-            + "RNNYeHiEpLxD6Urf3aG3rlwj+SkWHGb0QRpeZqOmU0v/Ybc9WuV8VSAJ06fYNh1V\n"
-            + "KAmx8GGRyiLLXsbe+q1v5Z7q6WHOJp7hIiuRRKp1iZGOIXK+pnO2YwSgXoJA0JRv\n"
-            + "U0rROxIN4h0NpxiNTDKrRCPpNpetZxsLeRbQa1agVM0iJfir1s34HqlrD+zw/tcJ\n"
-            + "bOdMFF2UVZaCuFynNDx958I=\n"
-            + "=aoJv\n"
-            + "-----END PGP PRIVATE KEY BLOCK-----\n");
+        """
+        -----BEGIN PGP PUBLIC KEY BLOCK-----
+        Version: GnuPG v1
+
+        mQENBFYmq3EBCAC9ssY6QhFsnZqKEPlQrx8Zomblj8qV93/B448isOT2L6OVY7UC
+        kKPj6afW5UDkYeyZSmLZfTrpePcbAB8FB3uvd/AS9mHC+6zuBlwlkl9xIXlwUXQP
+        KER4LKYNTP21AM+/vTJm4+u26tlZECIZlez31KEeqM30EAm+/pO8VkEp8+1ImfLv
+        otndIjMoq9gxJvn6KZeexJT2eKCsSa20vVsmAhuFjLZitU3lEjIROfDiyHUZ2cZ+
+        qynfppJCKlHJRu/T9L/yxDFVUFDFSajNzSfjG1g3FEveDITyAhRetVfZbhyJptnV
+        jfiHSQkLamPsBmMoKfP+aO5SfsTHTJvxgLUdABEBAAGJAS0EIAECABcFAlYmq8AQ
+        HQN0ZXN0NyBub3QgdXNlZAAKCRDtBiXcRjKKjPKqB/sF+ypJZaZ5M4jFdoH/YA3s
+        4+VkA/NbLKcrlMI0lbnIrax02jdyTo7rBUJfTwuBs5QeQ25+VfaBcz9fWSv4Z8Bk
+        9+w61bQZLQkExZ9W7hnhaapyR0aT0rY48KGtHOPNoMQu9Si+RnRiI024jMUUjrau
+        w/exgCteY261VtCPRgyZOlpbX43rsBhF8ott0ZzSfLwaNTHhsjFsD1uH6TSFO8La
+        /H1nO31sORlY3+rCGiQVuYIJD1qI7bEjDHYO0nq/f7JjfYKmVBg9grwLsX3h1qZ2
+        L3Yz+0eCi7/6T/Sm7PavQ+EGL7+WBXX3qJpwc+EFNHs6VxQp86k6csba0c5mNcaQ
+        iQE3BB8BAgAhBQJWJqusFwyAAQSup+0vghEz5bEo0e0GJdxGMoqMAgcAAAoJEPrS
+        q+I9bFLQ2BYH/jm+t7pZuv8WqZdb8FiBa9CFfhcSKjYarMHjBw7GxWZJMd5VR4DC
+        r4T/ZSAGRKBRKQ2uXrkm9H0NPDp0c/UKCHtQMFDnqTk7B63mwSR1d7W0qaRPXYQ1
+        bbatnzkEDOj0e+rX6aiqVRMo/q6uMNUFl6UMrUZPSNB5PVRQWPnQ7K11mw3vg0e5
+        ycqJbyFvER6EtyDUXGBo8a5/4bK8VBNBMTAIy6GeGpeSM5b7cpQk7/j4dXugCJAV
+        fhFNUOgLduoIKM4u+VcFjk3Km/YxOtGi1dLqCbTX/0LiCRA9mgQpyNVyA+Sm48LM
+        LUkbcrN/F3SHX1ao/5lm19r8Biu1ziQnLgC0IlRlc3R1c2VyIFNldmVuIDx0ZXN0
+        N0BleGFtcGxlLmNvbT6JATgEEwECACIFAlYmq3ECGwMGCwkIBwMCBhUIAgkKCwQW
+        AgMBAh4BAheAAAoJEPrSq+I9bFLQvjQH/0K7aBsGU2U/rm4I+u+uPa6BnFTYQJqg
+        034pwdD0WfM3M/XgVh7ERjnR9ZViCMVej+K3kW5d2DNaXu5vVpcD6L6jjWwiJHBw
+        LIcmpqQrL0TdoCr4F4FKQnBbcH1fNvP8A/hLDHB3k3ERPvEFIo1AkVuK4s/v7yZY
+        HAowX0r4ok4ndu/wAc0HI1FkApkAfh18JDTuui53dkKhnkDp7Xnfm/ElAZYjB7Se
+        ivxOD9vdhViWSx1VhttPZo5hSyJrEYaJ5u9hsXNUN85DxgLqCmS1v8n3pN1lVY/Q
+        TYXtgocakQgHGEG0Tl6a3xpNkn9ihnyCr80mHCxXTyUUBGfygccelB+5AQ0EViar
+        cQEIAKxwXb6HGV9QjepADyWW7GMxc2JVZ7pZM2sdf8wrgnQqV2G1rc9gAgwTX4jt
+        OY0vSKT1vBq09ZXS3qpYHi/Wwft0KkaX/a7e6vKabDSfhilxC2LuGz2+56f6UOzj
+        ggwf5k4LFTQvkDUZumwPjoeC2hqQO3Q/9PW39C6GnvsCr5L0MRdO3PbVJM7lJaOk
+        MbGwgysErWgiZXKlxMpIvffIsLC4BAxnjXaCy6zHuBcPMPaRMs7sDRBzeuTV2wnX
+        Sd+IXZgdpd1hF7VkuXenzwOqvBGS66C3ILW0ZTFaOtgrloIkTvtYEcJFWvxqWl2F
+        +JQ5V6eu2aJ3HIGyr9L1R8MUA6EAEQEAAYkBHwQYAQIACQUCViarcQIbDAAKCRD6
+        0qviPWxS0M0PB/9Rbk4/pNW67+uE1lwtaIG7uFiMbJqu8jK6MkD8GdayflroWEZA
+        x0Xow9HL8UaRfeRPTZMrDRpjl+fJIXT5qnlB0FPmzSXAKr3piC8migBcbp5m6hWh
+        c3ScAqWOeMt9j0TTWHh4hKS8Q+lK392ht65cI/kpFhxm9EEaXmajplNL/2G3PVrl
+        fFUgCdOn2DYdVSgJsfBhkcoiy17G3vqtb+We6ulhziae4SIrkUSqdYmRjiFyvqZz
+        tmMEoF6CQNCUb1NK0TsSDeIdDacYjUwyq0Qj6TaXrWcbC3kW0GtWoFTNIiX4q9bN
+        +B6paw/s8P7XCWznTBRdlFWWgrhcpzQ8fefC
+        =CHer
+        -----END PGP PUBLIC KEY BLOCK-----
+        """,
+        """
+        -----BEGIN PGP PRIVATE KEY BLOCK-----
+        Version: GnuPG v1
+
+        lQOYBFYmq3EBCAC9ssY6QhFsnZqKEPlQrx8Zomblj8qV93/B448isOT2L6OVY7UC
+        kKPj6afW5UDkYeyZSmLZfTrpePcbAB8FB3uvd/AS9mHC+6zuBlwlkl9xIXlwUXQP
+        KER4LKYNTP21AM+/vTJm4+u26tlZECIZlez31KEeqM30EAm+/pO8VkEp8+1ImfLv
+        otndIjMoq9gxJvn6KZeexJT2eKCsSa20vVsmAhuFjLZitU3lEjIROfDiyHUZ2cZ+
+        qynfppJCKlHJRu/T9L/yxDFVUFDFSajNzSfjG1g3FEveDITyAhRetVfZbhyJptnV
+        jfiHSQkLamPsBmMoKfP+aO5SfsTHTJvxgLUdABEBAAEAB/9AdCtFJSidcolNKwpC
+        /1V+VL9IdYxcWx02CDccjuUkvrgCrL+WcQW2jS/hZMChOKJ2zR78DcBEDr1LF8Xy
+        ZAIC8yoHj15VLUUrFM8fVvYFzt1fq9VWxxRIjscW0teLNgzgdYzYB84RtwcFa2Vi
+        sx2ycTUTYUClEgP1uLMCtX3rnibJh4vR+lVgnDtKSoh4CLAlW6grAAVdw5sSuV7Q
+        i9EJcPezGw1RvBU5PooqNDG6kyw/QqsAS4q3WP4uVJKK1e7S9oqXFEN8k/zfllI0
+        SSkoyP2flzz71rJF/wQMfJ8uf/CelKXd+gPO4FbCWiZSTLe20JR23qiOyvZkfCwg
+        eFmzBADIJUzspDrg5yaqE+HMc8U3O9G9FHoDSweZTbhiq3aK0BqMAn34u0ps6chy
+        VMO6aPWVzgcSHNfTlzpjuN9lwDoimYBH5vZa1HlCHt5eeqTORixkxSerOmILabTi
+        QWq5JPdJwYZiSvK45G5k3G37RTd6/QyhTlRYXj59RXYajrYngwQA8qMZRkRYcTop
+        aG+5M0x44k6NgIyH7Ap+2vRPpDdUlHs+z+6iRvoutkSfKHeZUYBQjgt+tScfn1hM
+        BRB+x146ecmSVh/Dh8yu6uCrhitFlKpyJqNptZo5o+sH41zjefpMd/bc8rtHTw3n
+        GiFl57ZbXbze2O8UimUVgRI2DtOebt8EAJHM/8vZahzF0chzL4sNVAb8FcNYxAyn
+        95VpnWeAtKX7f0bqUvIN4BNV++o6JdMNvBoYEQpKeQIda7QM59hNiS8f/bxkRikF
+        OiHB5YGy2zRX5T1G5rVQ0YqrOu959eEwdGZmOQ8GOqq5B/NoHXUtotV6SGE3R+Tl
+        grlV4U5/PT0fM3KJATcEHwECACEFAlYmq6wXDIABBK6n7S+CETPlsSjR7QYl3EYy
+        iowCBwAACgkQ+tKr4j1sUtDYFgf+Ob63ulm6/xapl1vwWIFr0IV+FxIqNhqsweMH
+        DsbFZkkx3lVHgMKvhP9lIAZEoFEpDa5euSb0fQ08OnRz9QoIe1AwUOepOTsHrebB
+        JHV3tbSppE9dhDVttq2fOQQM6PR76tfpqKpVEyj+rq4w1QWXpQytRk9I0Hk9VFBY
+        +dDsrXWbDe+DR7nJyolvIW8RHoS3INRcYGjxrn/hsrxUE0ExMAjLoZ4al5Izlvty
+        lCTv+Ph1e6AIkBV+EU1Q6At26ggozi75VwWOTcqb9jE60aLV0uoJtNf/QuIJED2a
+        BCnI1XID5KbjwswtSRtys38XdIdfVqj/mWbX2vwGK7XOJCcuALQiVGVzdHVzZXIg
+        U2V2ZW4gPHRlc3Q3QGV4YW1wbGUuY29tPokBOAQTAQIAIgUCViarcQIbAwYLCQgH
+        AwIGFQgCCQoLBBYCAwECHgECF4AACgkQ+tKr4j1sUtC+NAf/QrtoGwZTZT+ubgj6
+        7649roGcVNhAmqDTfinB0PRZ8zcz9eBWHsRGOdH1lWIIxV6P4reRbl3YM1pe7m9W
+        lwPovqONbCIkcHAshyampCsvRN2gKvgXgUpCcFtwfV828/wD+EsMcHeTcRE+8QUi
+        jUCRW4riz+/vJlgcCjBfSviiTid27/ABzQcjUWQCmQB+HXwkNO66Lnd2QqGeQOnt
+        ed+b8SUBliMHtJ6K/E4P292FWJZLHVWG209mjmFLImsRhonm72Gxc1Q3zkPGAuoK
+        ZLW/yfek3WVVj9BNhe2ChxqRCAcYQbROXprfGk2Sf2KGfIKvzSYcLFdPJRQEZ/KB
+        xx6UH50DmARWJqtxAQgArHBdvocZX1CN6kAPJZbsYzFzYlVnulkzax1/zCuCdCpX
+        YbWtz2ACDBNfiO05jS9IpPW8GrT1ldLeqlgeL9bB+3QqRpf9rt7q8ppsNJ+GKXEL
+        Yu4bPb7np/pQ7OOCDB/mTgsVNC+QNRm6bA+Oh4LaGpA7dD/09bf0Loae+wKvkvQx
+        F07c9tUkzuUlo6QxsbCDKwStaCJlcqXEyki998iwsLgEDGeNdoLLrMe4Fw8w9pEy
+        zuwNEHN65NXbCddJ34hdmB2l3WEXtWS5d6fPA6q8EZLroLcgtbRlMVo62CuWgiRO
+        +1gRwkVa/GpaXYX4lDlXp67ZonccgbKv0vVHwxQDoQARAQABAAf5Ae8xa1mPns1E
+        B5yCrvzDl79Dw0F1rED46IWIW/ghpVTzmFHV6ngcvcRFM5TZquxHXSuxLv7YVxRq
+        UVszXNJaEwyJYYkDRwAS1E2IKN+gknwapm2eWkchySAajUsQt+XEYHFpDPtQRlA3
+        Z6PrCOPJDOLmT9Zcf0R6KurGrhvTGrZkKU6ZCFqZWETfZy5cPfq2qxtw3YEUI+eT
+        09AgMmPJ9nDPI3cA69tvy/phVFgpglsS76qgd6uFJ5kcDoIB+YepmJoHnzJeowYt
+        lvnmmyGqmVS/KCgvILaD0c73Dp2X0BN64hSZHa3nUU67WbKJzo2OXr+yr0hvofcf
+        8vhKJe5+2wQAy+rRKSAOPaFiKT8ZenRucx1pTJLoB8JdediOdR4dtXB2Z59Ze7N3
+        sedfrJn1ao+jJEpnKeudlDq7oa9THd7ZojN4gBF/lz0duzfertuQ/MrHaTPeK8YI
+        dEPg3SgYVOLDBptaKmo0xr2f6aslGLPHgxCgzOcLuuUNGKJSigZvhdMEANh7VKsX
+        nb5shZh+KRET84us/uu74q4iIfc8Q10oXuN9+IPlqfAIclo4uMhvo5rtI9ApFtxs
+        oZzqqc+gt+OAbn/fHeb61eT36BA+r61Ka+erxkpWU5r1BPVIqq+biTY/HHchqroJ
+        aw81qWudO9h5a0yP1alDiBSwhZWIMCKzp6Q7A/472amrSzgs7u8ToQ/2THDxaMf3
+        Se0HgMrIT1/+5es2CWiEoZGSZTXlimDYXJULu/DFC7ia7kXOLrMsO85bEi7SHagA
+        eO+mAw3xP3OuNkZDt9x4qtal28fNIz22DH5qg2wtsGdCWXz5C6OdcrtQ736kNxa2
+        5QemZ/0VWxHPnvXz40RtiQEfBBgBAgAJBQJWJqtxAhsMAAoJEPrSq+I9bFLQzQ8H
+        /1FuTj+k1brv64TWXC1ogbu4WIxsmq7yMroyQPwZ1rJ+WuhYRkDHRejD0cvxRpF9
+        5E9NkysNGmOX58khdPmqeUHQU+bNJcAqvemILyaKAFxunmbqFaFzdJwCpY54y32P
+        RNNYeHiEpLxD6Urf3aG3rlwj+SkWHGb0QRpeZqOmU0v/Ybc9WuV8VSAJ06fYNh1V
+        KAmx8GGRyiLLXsbe+q1v5Z7q6WHOJp7hIiuRRKp1iZGOIXK+pnO2YwSgXoJA0JRv
+        U0rROxIN4h0NpxiNTDKrRCPpNpetZxsLeRbQa1agVM0iJfir1s34HqlrD+zw/tcJ
+        bOdMFF2UVZaCuFynNDx958I=
+        =aoJv
+        -----END PGP PRIVATE KEY BLOCK-----
+        """);
   }
 
   /**
@@ -799,113 +827,117 @@
    */
   public static TestKey keyRevokedByExpiredKeyAfterExpiration() throws Exception {
     return new TestKey(
-        "-----BEGIN PGP PUBLIC KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "mQENBELuRwABCAC56yhFKybBtuKT4nyb7RdLE98pZR54aGjcDcKH3VKVyBF8Z4Kx\n"
-            + "ptd7Sre0mLPCQiNWVOmCT+JG7GKVE6YeFmyXDUnhX9w4+HAeDEh23S4u9JvwWaF+\n"
-            + "wlJ6jLq/oe5gdT1F6Y2yqNpQ6CztOw52Ko9KSYz7/1zBMPcCkl/4k15ee4iebVdq\n"
-            + "c7qT5Qt49Poiozh0DI5prPQ624uckHkz2mXshjWQVuHWwrkIkCJZ2I/KQN2kBjKw\n"
-            + "/ALxumaWmiB9lQ0nIwLuGzHCh0Xg5RxuCrK8fJp47Aza3ikVuYlNzSxhJVav3OtK\n"
-            + "gftBihQXUlY3Uy/4QTCeH/BdVs5OALtXL3VhABEBAAGJAS0EIAECABcFAlYmr4kQ\n"
-            + "HQN0ZXN0OCBub3QgdXNlZAAKCRA87HgbF94azQJ5B/0TeQk7TSChNp+NqCKPTuw0\n"
-            + "wpflDyc+5ru/Gcs4r358cWzgiLUb3M0Q1+M8CF13BFQdrxT05vjheI9o5PCn3b//\n"
-            + "AHV8m+QFSnRi2J3QslbvuOqOnipz7vc7lyZ7q1sWNC33YN+ZcGZiMuu5HJi9iadf\n"
-            + "ZL7AdInpUb4Zb+XKphbMokDcN3yw7rqSMMcx+rKytUAqUnt9qvaSLrIH/zeazxlp\n"
-            + "YG4jaN53WPfLCcGG+Rw56mW+eCQD2rmzaNHCw8Qr+19sokXLB7OML+rd1wNwZT4q\n"
-            + "stWnL+nOj8ZkbFV0w3zClDYaARr7H+vTckwVStyDVRbnpRitSAtJwbRDzZBaS4Vx\n"
-            + "iQE3BB8BAgAhBQJC7lUQFwyAAR2e63ndOLBJk52crzzseBsX3hrNAgcAAAoJEAAa\n"
-            + "34t4v31+AS4H/0x3Y9E3q9DR5FCuYTXG4BHyrALo2WKoP0CfUWL98Fw9Txl0hF+9\n"
-            + "5wriNlnmd2zvM0quHs78x4/xehQO88cw0lqPx3RARq/ju5/VbOjoNlcHvfGYZiEd\n"
-            + "yWOwHu7O8sZrenFDjeDglD6NArrjncOcC51XIPSSTLvVQpSauQ1FS4tan5Q4aWMb\n"
-            + "s4DzE+Vqu2xMkO/X9toYAZKzyWP29OckpouMbt3GUnS6/o0A8Z7jVX+XOIk3XolP\n"
-            + "Li9tzTQB12Xl23mgFvearDoguR2Bu2SbmTJtdiXz8L3S54kGvxVqak5uOP2dagzU\n"
-            + "vBiqR4SVoAdGoXt6TI6mpA+qdYmPMG8v21S0IlRlc3R1c2VyIEVpZ2h0IDx0ZXN0\n"
-            + "OEBleGFtcGxlLmNvbT6JATgEEwECACIFAkLuRwACGwMGCwkIBwMCBhUIAgkKCwQW\n"
-            + "AgMBAh4BAheAAAoJEAAa34t4v31+8/sIAIuqd+dU8k9c5VQ12k7IfZGGYQHF2Mk/\n"
-            + "8FNuP7hFP/VOXBK3QIxIfGEOHbDX6uIxudYMaDmn2UJbdIqJd8NuQByh1gqXdX/x\n"
-            + "nteUa+4e7U6uTjkp/Ij5UzRed8suINA3NzVOy6qwCu3DTOXIZcjiOZtOA5GTqG6Z\n"
-            + "naDP0hwDssJp+LXIYTJgsvneJQFGSdQhhJSv19oV0JPSbb6Zc7gEIHtPcaJHjuZQ\n"
-            + "Ev+TRcRrI9HPTF0MvgOYgIDo2sbcSFV+8moKsHMC+j1Hmuuqgm/1yKGIZrt0V75s\n"
-            + "D9HYu0tiS3+Wlsry3y1hg/2XBQbwgh6sT/jWkpWar7+uzNxO5GdFYrC5AQ0EQu5H\n"
-            + "AAEIALPFTedbfyK+9B35Uo9cPsmFa3mT3qp/bAQtnOjiTTTiIO3tu0ALnaBjf6On\n"
-            + "fAV1HmGz6hRMRK4LGyHkNTaGDNNPoXO7+t9DWycSHmsCL5d5zp7VevQE8MPR8zHK\n"
-            + "Il2YQlCzdy5TWSUhunKd4guDNZ9GiOS6NQ9feYZ9DQ1kzC8nnu7jLkR2zNT02sYU\n"
-            + "kuOCZUktQhVNszUlavdIFjvToZo3RPcdb/E3kTTy2R9xi89AXjWZf3lSAZe3igkL\n"
-            + "jhwsd+u3RRx0ptOJym7zYl5ZdUZk4QrS7FPI6zEBpjawbS4/r6uEW89P3QAkanDI\n"
-            + "ridIAZP8awLZU3uSPtMwPIJpao0AEQEAAYkBHwQYAQIACQUCQu5HAAIbDAAKCRAA\n"
-            + "Gt+LeL99fqpHB/wOXhdMNtgeVW38bLk8YhcEB23FW6fDjFjBJb9m/yqRTh5CIeG2\n"
-            + "bm29ofT4PTamPb8Gt+YuDLnQQ3K2jURakxNDcYwiurvR/oHVdxsBRU7Px7UPeZk3\n"
-            + "BG5VnIJRT198dF7MWFJ+x5wHbNXwM8DDvUwTjXLH/TlGl1XIheSTHCYd9Pra4ejE\n"
-            + "ockkrDaZlPCQdTwY+P7K2ieb5tsqNpJkQeBrglF2bemY/CtQHnM9qwa6ZJqkyYNR\n"
-            + "F1nkSYn36BPuNpytYw1CaQV9GbePugPHtshECLwA160QzqISQUcJlKXttUqUGnoO\n"
-            + "0d0PyzZT3676mQwmFoebMR9vACAeHjvDxD4F\n"
-            + "=ihWb\n"
-            + "-----END PGP PUBLIC KEY BLOCK-----\n",
-        "-----BEGIN PGP PRIVATE KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "lQOYBELuRwABCAC56yhFKybBtuKT4nyb7RdLE98pZR54aGjcDcKH3VKVyBF8Z4Kx\n"
-            + "ptd7Sre0mLPCQiNWVOmCT+JG7GKVE6YeFmyXDUnhX9w4+HAeDEh23S4u9JvwWaF+\n"
-            + "wlJ6jLq/oe5gdT1F6Y2yqNpQ6CztOw52Ko9KSYz7/1zBMPcCkl/4k15ee4iebVdq\n"
-            + "c7qT5Qt49Poiozh0DI5prPQ624uckHkz2mXshjWQVuHWwrkIkCJZ2I/KQN2kBjKw\n"
-            + "/ALxumaWmiB9lQ0nIwLuGzHCh0Xg5RxuCrK8fJp47Aza3ikVuYlNzSxhJVav3OtK\n"
-            + "gftBihQXUlY3Uy/4QTCeH/BdVs5OALtXL3VhABEBAAEAB/wLr88oGuxsoqIHRQZL\n"
-            + "eGm9jc4aQGmcDMcjpwdGilhrwyfrO6f84hWbQdD+rJcnI8hsH7oOd5ZMGkWfpJyt\n"
-            + "eUAh9iNB5ChYGfDVSLUg6KojqDtprj6vNMihvLkr/OI6xL/hZksikwfnLFMPpgXU\n"
-            + "knwPocQ3nn+egsUSL7CR8/SLiIm4MC0brer6jhDxB5LKweExNlfTe4c0MDeYTsWt\n"
-            + "0WGzNPlvRZQXRotJzqemt3wdNZXUnCKR0n7pSQ8EhZr2O6NXr+mUgp6PIOE/3un2\n"
-            + "YGiBEf5uy3qEFe7FjEGIHz+Z3ySRdUDfHOk82TKAzynoJIxRUvLIYVNw4eFB3l5U\n"
-            + "s1w5BADUzfciG7RVLa8UFKJfqQ/5M06QmdS1v1/hMQXg38+3vKe8RgfSSnMJ08Sc\n"
-            + "eAEsmugwpNXAxgRKHcmWzN3NMBHhE3KiyiogWaMGqmSo6swFpu0+dwMvZSxMlfD+\n"
-            + "ka/BWt8YsUdrqW06ow39aTgCV+icbNRV81C7NKe7u0X1JDx2CQQA36gbdo62h/Wd\n"
-            + "gJI8kdz/se3xrt8x6RoWvOnWPNmsZR5XkDqAMTL1dWiEEA/dQTphMcgAe9z3WaP+\n"
-            + "F1TPAfounbiurGCcS3kxJ5tY7ojyU7nYz4DA/V2OU0C/LUoLXhttG5HM+m/i3qn4\n"
-            + "K9bBoWIQY1ijliS7cTSwNqd6IHaQGpkEAMnp5GwSGhY+kUuLw06hmH4xnsuf6agz\n"
-            + "AfhbPylB2nf/ZaX6dt6/mFEAkvQNahcoWEskfS3LGCD8jHm8PvF8K0mciXPDweq2\n"
-            + "gW3/irE0RXNwn3Oa222VSvcgUlocBm9InkfvpFXh20OYFe3dFH7uYkwUqIHJeXjw\n"
-            + "TjpXUX/vC5QJQOyJATcEHwECACEFAkLuVRAXDIABHZ7red04sEmTnZyvPOx4Gxfe\n"
-            + "Gs0CBwAACgkQABrfi3i/fX4BLgf/THdj0Ter0NHkUK5hNcbgEfKsAujZYqg/QJ9R\n"
-            + "Yv3wXD1PGXSEX73nCuI2WeZ3bO8zSq4ezvzHj/F6FA7zxzDSWo/HdEBGr+O7n9Vs\n"
-            + "6Og2Vwe98ZhmIR3JY7Ae7s7yxmt6cUON4OCUPo0CuuOdw5wLnVcg9JJMu9VClJq5\n"
-            + "DUVLi1qflDhpYxuzgPMT5Wq7bEyQ79f22hgBkrPJY/b05ySmi4xu3cZSdLr+jQDx\n"
-            + "nuNVf5c4iTdeiU8uL23NNAHXZeXbeaAW95qsOiC5HYG7ZJuZMm12JfPwvdLniQa/\n"
-            + "FWpqTm44/Z1qDNS8GKpHhJWgB0ahe3pMjqakD6p1iY8wby/bVLQiVGVzdHVzZXIg\n"
-            + "RWlnaHQgPHRlc3Q4QGV4YW1wbGUuY29tPokBOAQTAQIAIgUCQu5HAAIbAwYLCQgH\n"
-            + "AwIGFQgCCQoLBBYCAwECHgECF4AACgkQABrfi3i/fX7z+wgAi6p351TyT1zlVDXa\n"
-            + "Tsh9kYZhAcXYyT/wU24/uEU/9U5cErdAjEh8YQ4dsNfq4jG51gxoOafZQlt0iol3\n"
-            + "w25AHKHWCpd1f/Ge15Rr7h7tTq5OOSn8iPlTNF53yy4g0Dc3NU7LqrAK7cNM5chl\n"
-            + "yOI5m04DkZOobpmdoM/SHAOywmn4tchhMmCy+d4lAUZJ1CGElK/X2hXQk9Jtvplz\n"
-            + "uAQge09xokeO5lAS/5NFxGsj0c9MXQy+A5iAgOjaxtxIVX7yagqwcwL6PUea66qC\n"
-            + "b/XIoYhmu3RXvmwP0di7S2JLf5aWyvLfLWGD/ZcFBvCCHqxP+NaSlZqvv67M3E7k\n"
-            + "Z0VisJ0DmARC7kcAAQgAs8VN51t/Ir70HflSj1w+yYVreZPeqn9sBC2c6OJNNOIg\n"
-            + "7e27QAudoGN/o6d8BXUeYbPqFExErgsbIeQ1NoYM00+hc7v630NbJxIeawIvl3nO\n"
-            + "ntV69ATww9HzMcoiXZhCULN3LlNZJSG6cp3iC4M1n0aI5Lo1D195hn0NDWTMLyee\n"
-            + "7uMuRHbM1PTaxhSS44JlSS1CFU2zNSVq90gWO9OhmjdE9x1v8TeRNPLZH3GLz0Be\n"
-            + "NZl/eVIBl7eKCQuOHCx367dFHHSm04nKbvNiXll1RmThCtLsU8jrMQGmNrBtLj+v\n"
-            + "q4Rbz0/dACRqcMiuJ0gBk/xrAtlTe5I+0zA8gmlqjQARAQABAAf+JNVkZOcGYaQm\n"
-            + "eI3BMMaBxuCjaMG3ec+p3iFKaR0VHKTIgneXSkQXA+nfGTUT4DpjAznN2GLYH6D+\n"
-            + "6i7MCGPm9NT4C7KUcHJoltTLjrlf7vVyNHEhRCZO/pBh9+2mpO6xh799x+wj88u5\n"
-            + "XAqlah50OjJFkjfk70VsrPWqWvgwLejkaQpGbE+pdL+vjy+ol5FHzidzmJvsXDR1\n"
-            + "I1as0vBu5g2XPpexyVanmHJglZdZX07OPYQBhxQKuPXT/2/IRnXsXEpitk4IyJT0\n"
-            + "U5D/iedEUldhBByep1lBcJnAap0CP7iuu2CYhRp6V2wVvdweNPng5Eo7f7LNyjnX\n"
-            + "UMAeaeCjAQQA1A0iKtg3Grxc9+lpFl1znc2/kO3p6ixM13uUvci+yGFNJJninnxo\n"
-            + "99KXEzqqVD0zerjiyyegQmzpITE/+hFIOJZInxEH08WQwZstV/KYeRSJkXf0Um48\n"
-            + "E+Zrh8fpJVW1w3ZCw9Ee2yE6fEhAA4w66+50pM+vBXanWOrG1HDrkxEEANkHc2Rz\n"
-            + "YJsO4v63xo/7/njLSQ31miOglb99ACKBA0Yl/jvj2KqLcomKILqvK3DKP+BHNq86\n"
-            + "LUBUglyKjKuj0wkSWT0tCnfgLzysUpowcoyFhJ36KzAz8hjqIn3TQpMF21HvkZdG\n"
-            + "Mtkcyhu5UDvbfOuWOBaKIeNQWCWv1rNzMme9A/9zU1+esEhKwGWEqa3/B/Te/xQh\n"
-            + "alk180n74sTZid6lXD8o8cEei0CUq7zBSV0P8v6kk8PP9/XyLRl3Rqa95fESUWrL\n"
-            + "xD6TBY1JlHBZS+N6rN/7Ilf5EXSELmnbDFsVxkNGp4elKxajvZxC6uEWYBu62AYy\n"
-            + "wS0dj8mZR3faCEps90YXiQEfBBgBAgAJBQJC7kcAAhsMAAoJEAAa34t4v31+qkcH\n"
-            + "/A5eF0w22B5VbfxsuTxiFwQHbcVbp8OMWMElv2b/KpFOHkIh4bZubb2h9Pg9NqY9\n"
-            + "vwa35i4MudBDcraNRFqTE0NxjCK6u9H+gdV3GwFFTs/HtQ95mTcEblWcglFPX3x0\n"
-            + "XsxYUn7HnAds1fAzwMO9TBONcsf9OUaXVciF5JMcJh30+trh6MShySSsNpmU8JB1\n"
-            + "PBj4/sraJ5vm2yo2kmRB4GuCUXZt6Zj8K1Aecz2rBrpkmqTJg1EXWeRJiffoE+42\n"
-            + "nK1jDUJpBX0Zt4+6A8e2yEQIvADXrRDOohJBRwmUpe21SpQaeg7R3Q/LNlPfrvqZ\n"
-            + "DCYWh5sxH28AIB4eO8PEPgU=\n"
-            + "=cSfw\n"
-            + "-----END PGP PRIVATE KEY BLOCK-----\n");
+        """
+        -----BEGIN PGP PUBLIC KEY BLOCK-----
+        Version: GnuPG v1
+
+        mQENBELuRwABCAC56yhFKybBtuKT4nyb7RdLE98pZR54aGjcDcKH3VKVyBF8Z4Kx
+        ptd7Sre0mLPCQiNWVOmCT+JG7GKVE6YeFmyXDUnhX9w4+HAeDEh23S4u9JvwWaF+
+        wlJ6jLq/oe5gdT1F6Y2yqNpQ6CztOw52Ko9KSYz7/1zBMPcCkl/4k15ee4iebVdq
+        c7qT5Qt49Poiozh0DI5prPQ624uckHkz2mXshjWQVuHWwrkIkCJZ2I/KQN2kBjKw
+        /ALxumaWmiB9lQ0nIwLuGzHCh0Xg5RxuCrK8fJp47Aza3ikVuYlNzSxhJVav3OtK
+        gftBihQXUlY3Uy/4QTCeH/BdVs5OALtXL3VhABEBAAGJAS0EIAECABcFAlYmr4kQ
+        HQN0ZXN0OCBub3QgdXNlZAAKCRA87HgbF94azQJ5B/0TeQk7TSChNp+NqCKPTuw0
+        wpflDyc+5ru/Gcs4r358cWzgiLUb3M0Q1+M8CF13BFQdrxT05vjheI9o5PCn3b//
+        AHV8m+QFSnRi2J3QslbvuOqOnipz7vc7lyZ7q1sWNC33YN+ZcGZiMuu5HJi9iadf
+        ZL7AdInpUb4Zb+XKphbMokDcN3yw7rqSMMcx+rKytUAqUnt9qvaSLrIH/zeazxlp
+        YG4jaN53WPfLCcGG+Rw56mW+eCQD2rmzaNHCw8Qr+19sokXLB7OML+rd1wNwZT4q
+        stWnL+nOj8ZkbFV0w3zClDYaARr7H+vTckwVStyDVRbnpRitSAtJwbRDzZBaS4Vx
+        iQE3BB8BAgAhBQJC7lUQFwyAAR2e63ndOLBJk52crzzseBsX3hrNAgcAAAoJEAAa
+        34t4v31+AS4H/0x3Y9E3q9DR5FCuYTXG4BHyrALo2WKoP0CfUWL98Fw9Txl0hF+9
+        5wriNlnmd2zvM0quHs78x4/xehQO88cw0lqPx3RARq/ju5/VbOjoNlcHvfGYZiEd
+        yWOwHu7O8sZrenFDjeDglD6NArrjncOcC51XIPSSTLvVQpSauQ1FS4tan5Q4aWMb
+        s4DzE+Vqu2xMkO/X9toYAZKzyWP29OckpouMbt3GUnS6/o0A8Z7jVX+XOIk3XolP
+        Li9tzTQB12Xl23mgFvearDoguR2Bu2SbmTJtdiXz8L3S54kGvxVqak5uOP2dagzU
+        vBiqR4SVoAdGoXt6TI6mpA+qdYmPMG8v21S0IlRlc3R1c2VyIEVpZ2h0IDx0ZXN0
+        OEBleGFtcGxlLmNvbT6JATgEEwECACIFAkLuRwACGwMGCwkIBwMCBhUIAgkKCwQW
+        AgMBAh4BAheAAAoJEAAa34t4v31+8/sIAIuqd+dU8k9c5VQ12k7IfZGGYQHF2Mk/
+        8FNuP7hFP/VOXBK3QIxIfGEOHbDX6uIxudYMaDmn2UJbdIqJd8NuQByh1gqXdX/x
+        nteUa+4e7U6uTjkp/Ij5UzRed8suINA3NzVOy6qwCu3DTOXIZcjiOZtOA5GTqG6Z
+        naDP0hwDssJp+LXIYTJgsvneJQFGSdQhhJSv19oV0JPSbb6Zc7gEIHtPcaJHjuZQ
+        Ev+TRcRrI9HPTF0MvgOYgIDo2sbcSFV+8moKsHMC+j1Hmuuqgm/1yKGIZrt0V75s
+        D9HYu0tiS3+Wlsry3y1hg/2XBQbwgh6sT/jWkpWar7+uzNxO5GdFYrC5AQ0EQu5H
+        AAEIALPFTedbfyK+9B35Uo9cPsmFa3mT3qp/bAQtnOjiTTTiIO3tu0ALnaBjf6On
+        fAV1HmGz6hRMRK4LGyHkNTaGDNNPoXO7+t9DWycSHmsCL5d5zp7VevQE8MPR8zHK
+        Il2YQlCzdy5TWSUhunKd4guDNZ9GiOS6NQ9feYZ9DQ1kzC8nnu7jLkR2zNT02sYU
+        kuOCZUktQhVNszUlavdIFjvToZo3RPcdb/E3kTTy2R9xi89AXjWZf3lSAZe3igkL
+        jhwsd+u3RRx0ptOJym7zYl5ZdUZk4QrS7FPI6zEBpjawbS4/r6uEW89P3QAkanDI
+        ridIAZP8awLZU3uSPtMwPIJpao0AEQEAAYkBHwQYAQIACQUCQu5HAAIbDAAKCRAA
+        Gt+LeL99fqpHB/wOXhdMNtgeVW38bLk8YhcEB23FW6fDjFjBJb9m/yqRTh5CIeG2
+        bm29ofT4PTamPb8Gt+YuDLnQQ3K2jURakxNDcYwiurvR/oHVdxsBRU7Px7UPeZk3
+        BG5VnIJRT198dF7MWFJ+x5wHbNXwM8DDvUwTjXLH/TlGl1XIheSTHCYd9Pra4ejE
+        ockkrDaZlPCQdTwY+P7K2ieb5tsqNpJkQeBrglF2bemY/CtQHnM9qwa6ZJqkyYNR
+        F1nkSYn36BPuNpytYw1CaQV9GbePugPHtshECLwA160QzqISQUcJlKXttUqUGnoO
+        0d0PyzZT3676mQwmFoebMR9vACAeHjvDxD4F
+        =ihWb
+        -----END PGP PUBLIC KEY BLOCK-----
+        """,
+        """
+        -----BEGIN PGP PRIVATE KEY BLOCK-----
+        Version: GnuPG v1
+
+        lQOYBELuRwABCAC56yhFKybBtuKT4nyb7RdLE98pZR54aGjcDcKH3VKVyBF8Z4Kx
+        ptd7Sre0mLPCQiNWVOmCT+JG7GKVE6YeFmyXDUnhX9w4+HAeDEh23S4u9JvwWaF+
+        wlJ6jLq/oe5gdT1F6Y2yqNpQ6CztOw52Ko9KSYz7/1zBMPcCkl/4k15ee4iebVdq
+        c7qT5Qt49Poiozh0DI5prPQ624uckHkz2mXshjWQVuHWwrkIkCJZ2I/KQN2kBjKw
+        /ALxumaWmiB9lQ0nIwLuGzHCh0Xg5RxuCrK8fJp47Aza3ikVuYlNzSxhJVav3OtK
+        gftBihQXUlY3Uy/4QTCeH/BdVs5OALtXL3VhABEBAAEAB/wLr88oGuxsoqIHRQZL
+        eGm9jc4aQGmcDMcjpwdGilhrwyfrO6f84hWbQdD+rJcnI8hsH7oOd5ZMGkWfpJyt
+        eUAh9iNB5ChYGfDVSLUg6KojqDtprj6vNMihvLkr/OI6xL/hZksikwfnLFMPpgXU
+        knwPocQ3nn+egsUSL7CR8/SLiIm4MC0brer6jhDxB5LKweExNlfTe4c0MDeYTsWt
+        0WGzNPlvRZQXRotJzqemt3wdNZXUnCKR0n7pSQ8EhZr2O6NXr+mUgp6PIOE/3un2
+        YGiBEf5uy3qEFe7FjEGIHz+Z3ySRdUDfHOk82TKAzynoJIxRUvLIYVNw4eFB3l5U
+        s1w5BADUzfciG7RVLa8UFKJfqQ/5M06QmdS1v1/hMQXg38+3vKe8RgfSSnMJ08Sc
+        eAEsmugwpNXAxgRKHcmWzN3NMBHhE3KiyiogWaMGqmSo6swFpu0+dwMvZSxMlfD+
+        ka/BWt8YsUdrqW06ow39aTgCV+icbNRV81C7NKe7u0X1JDx2CQQA36gbdo62h/Wd
+        gJI8kdz/se3xrt8x6RoWvOnWPNmsZR5XkDqAMTL1dWiEEA/dQTphMcgAe9z3WaP+
+        F1TPAfounbiurGCcS3kxJ5tY7ojyU7nYz4DA/V2OU0C/LUoLXhttG5HM+m/i3qn4
+        K9bBoWIQY1ijliS7cTSwNqd6IHaQGpkEAMnp5GwSGhY+kUuLw06hmH4xnsuf6agz
+        AfhbPylB2nf/ZaX6dt6/mFEAkvQNahcoWEskfS3LGCD8jHm8PvF8K0mciXPDweq2
+        gW3/irE0RXNwn3Oa222VSvcgUlocBm9InkfvpFXh20OYFe3dFH7uYkwUqIHJeXjw
+        TjpXUX/vC5QJQOyJATcEHwECACEFAkLuVRAXDIABHZ7red04sEmTnZyvPOx4Gxfe
+        Gs0CBwAACgkQABrfi3i/fX4BLgf/THdj0Ter0NHkUK5hNcbgEfKsAujZYqg/QJ9R
+        Yv3wXD1PGXSEX73nCuI2WeZ3bO8zSq4ezvzHj/F6FA7zxzDSWo/HdEBGr+O7n9Vs
+        6Og2Vwe98ZhmIR3JY7Ae7s7yxmt6cUON4OCUPo0CuuOdw5wLnVcg9JJMu9VClJq5
+        DUVLi1qflDhpYxuzgPMT5Wq7bEyQ79f22hgBkrPJY/b05ySmi4xu3cZSdLr+jQDx
+        nuNVf5c4iTdeiU8uL23NNAHXZeXbeaAW95qsOiC5HYG7ZJuZMm12JfPwvdLniQa/
+        FWpqTm44/Z1qDNS8GKpHhJWgB0ahe3pMjqakD6p1iY8wby/bVLQiVGVzdHVzZXIg
+        RWlnaHQgPHRlc3Q4QGV4YW1wbGUuY29tPokBOAQTAQIAIgUCQu5HAAIbAwYLCQgH
+        AwIGFQgCCQoLBBYCAwECHgECF4AACgkQABrfi3i/fX7z+wgAi6p351TyT1zlVDXa
+        Tsh9kYZhAcXYyT/wU24/uEU/9U5cErdAjEh8YQ4dsNfq4jG51gxoOafZQlt0iol3
+        w25AHKHWCpd1f/Ge15Rr7h7tTq5OOSn8iPlTNF53yy4g0Dc3NU7LqrAK7cNM5chl
+        yOI5m04DkZOobpmdoM/SHAOywmn4tchhMmCy+d4lAUZJ1CGElK/X2hXQk9Jtvplz
+        uAQge09xokeO5lAS/5NFxGsj0c9MXQy+A5iAgOjaxtxIVX7yagqwcwL6PUea66qC
+        b/XIoYhmu3RXvmwP0di7S2JLf5aWyvLfLWGD/ZcFBvCCHqxP+NaSlZqvv67M3E7k
+        Z0VisJ0DmARC7kcAAQgAs8VN51t/Ir70HflSj1w+yYVreZPeqn9sBC2c6OJNNOIg
+        7e27QAudoGN/o6d8BXUeYbPqFExErgsbIeQ1NoYM00+hc7v630NbJxIeawIvl3nO
+        ntV69ATww9HzMcoiXZhCULN3LlNZJSG6cp3iC4M1n0aI5Lo1D195hn0NDWTMLyee
+        7uMuRHbM1PTaxhSS44JlSS1CFU2zNSVq90gWO9OhmjdE9x1v8TeRNPLZH3GLz0Be
+        NZl/eVIBl7eKCQuOHCx367dFHHSm04nKbvNiXll1RmThCtLsU8jrMQGmNrBtLj+v
+        q4Rbz0/dACRqcMiuJ0gBk/xrAtlTe5I+0zA8gmlqjQARAQABAAf+JNVkZOcGYaQm
+        eI3BMMaBxuCjaMG3ec+p3iFKaR0VHKTIgneXSkQXA+nfGTUT4DpjAznN2GLYH6D+
+        6i7MCGPm9NT4C7KUcHJoltTLjrlf7vVyNHEhRCZO/pBh9+2mpO6xh799x+wj88u5
+        XAqlah50OjJFkjfk70VsrPWqWvgwLejkaQpGbE+pdL+vjy+ol5FHzidzmJvsXDR1
+        I1as0vBu5g2XPpexyVanmHJglZdZX07OPYQBhxQKuPXT/2/IRnXsXEpitk4IyJT0
+        U5D/iedEUldhBByep1lBcJnAap0CP7iuu2CYhRp6V2wVvdweNPng5Eo7f7LNyjnX
+        UMAeaeCjAQQA1A0iKtg3Grxc9+lpFl1znc2/kO3p6ixM13uUvci+yGFNJJninnxo
+        99KXEzqqVD0zerjiyyegQmzpITE/+hFIOJZInxEH08WQwZstV/KYeRSJkXf0Um48
+        E+Zrh8fpJVW1w3ZCw9Ee2yE6fEhAA4w66+50pM+vBXanWOrG1HDrkxEEANkHc2Rz
+        YJsO4v63xo/7/njLSQ31miOglb99ACKBA0Yl/jvj2KqLcomKILqvK3DKP+BHNq86
+        LUBUglyKjKuj0wkSWT0tCnfgLzysUpowcoyFhJ36KzAz8hjqIn3TQpMF21HvkZdG
+        Mtkcyhu5UDvbfOuWOBaKIeNQWCWv1rNzMme9A/9zU1+esEhKwGWEqa3/B/Te/xQh
+        alk180n74sTZid6lXD8o8cEei0CUq7zBSV0P8v6kk8PP9/XyLRl3Rqa95fESUWrL
+        xD6TBY1JlHBZS+N6rN/7Ilf5EXSELmnbDFsVxkNGp4elKxajvZxC6uEWYBu62AYy
+        wS0dj8mZR3faCEps90YXiQEfBBgBAgAJBQJC7kcAAhsMAAoJEAAa34t4v31+qkcH
+        /A5eF0w22B5VbfxsuTxiFwQHbcVbp8OMWMElv2b/KpFOHkIh4bZubb2h9Pg9NqY9
+        vwa35i4MudBDcraNRFqTE0NxjCK6u9H+gdV3GwFFTs/HtQ95mTcEblWcglFPX3x0
+        XsxYUn7HnAds1fAzwMO9TBONcsf9OUaXVciF5JMcJh30+trh6MShySSsNpmU8JB1
+        PBj4/sraJ5vm2yo2kmRB4GuCUXZt6Zj8K1Aecz2rBrpkmqTJg1EXWeRJiffoE+42
+        nK1jDUJpBX0Zt4+6A8e2yEQIvADXrRDOohJBRwmUpe21SpQaeg7R3Q/LNlPfrvqZ
+        DCYWh5sxH28AIB4eO8PEPgU=
+        =cSfw
+        -----END PGP PRIVATE KEY BLOCK-----
+        """);
   }
 
   /**
@@ -921,113 +953,117 @@
    */
   public static TestKey keyRevokedByExpiredKeyBeforeExpiration() throws Exception {
     return new TestKey(
-        "-----BEGIN PGP PUBLIC KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "mQENBELuRwABCADnf2z5dqp3BMFlpd6iUs5dhROrslfzswak1LmbGirK2IPIl4NX\n"
-            + "arAi76xXK9BcF/Cqcj/X/WqFKBd/qMGxwdvwbSN6PVBP6T1jvuVgrPTjd4x5xPUD\n"
-            + "xZ5VPy9hgQXs+1mugTkHYVTU8GI1eGpZ8Oj3PJIgVyqGxGkjWmcz5APbVIRan6L1\n"
-            + "482bZTidH9Nd9YnYlXNgiJcaOPAVBwO/j/myocQCIohvIo4IT8vc/ODhRgfwA0gD\n"
-            + "GVK+tXwT4f4x3qjG/YRpOOZZjBS09B/gJ9QfEnR6WNxg/Tm3T0uipoISOhR+cP/V\n"
-            + "e5o/73SM+w+WlILk/xpbbOfyCxD4Q3lb8EZFABEBAAGJAS0EIAECABcFAkLuYyAQ\n"
-            + "HQN0ZXN0OSBub3QgdXNlZAAKCRA87HgbF94azV2BB/9Rc1j3XOxKbDyUFAORAGnE\n"
-            + "ezQtpOmQhaSUhFC35GFOdTg4eX53FTFSXLJQleTVzvE+eVkQI5tvUZ+SqHoyjnhU\n"
-            + "DpWlmfRUQy4GTUjUTkpFOK07TVTjhUQwaAxN13UZgByopVKc7hLf+uh1xkRJIqAJ\n"
-            + "Tx6LIFZiSIGwStDO6TJlhl1e8h45J3rAV4N+DsGpMy9S4uYOU7erJDupdXK739/l\n"
-            + "VBsP2SeT85iuAv+4A9Jq3+iq+cjK9q3QZCw1O6iI2v3seAWCI6HH3tVw4THr+M6T\n"
-            + "EdTGmyESjdAl+f7/uK0QNfqIMpvUf+AvMakrLi7WOeDs8mpUIjonpeQVLfz6I0Zo\n"
-            + "iQE3BB8BAgAhBQJC7lUQFwyAAR2e63ndOLBJk52crzzseBsX3hrNAgcAAAoJEGBA\n"
-            + "hmHEO/LhHjUH/R/7+iNBLAfKYbpprkWy/8eXVEJhxfh6DI/ppsKLIA+687gX74R9\n"
-            + "6CM5k6fZDjeND26ZEA0rDZmYrbnGUfsu55aeM0/+jiSOZJ2uTlrLXiHMurbNY0pT\n"
-            + "xv215muhumPBzuL1jsAK2Kc/4oE7Z46jaStsPCvDOcx9PW76wR8/uCPvHVz5H/A7\n"
-            + "3erXAloC43jupXwZB32VZq8L0kZNVfuEsjHUcu3GUoZdGfTb4/Qq5a1FK+CGhwWC\n"
-            + "OwpUWZEIUImwUv4FNE4iNFYEHaHLU9fotmIxIkH8TC4NcO+GvkEyMyJ6NVkBBDP2\n"
-            + "EarncWAJxDBlx1CO4ET+/ULvzDnAcYuTc6G0IVRlc3R1c2VyIE5pbmUgPHRlc3Q5\n"
-            + "QGV4YW1wbGUuY29tPokBOAQTAQIAIgUCQu5HAAIbAwYLCQgHAwIGFQgCCQoLBBYC\n"
-            + "AwECHgECF4AACgkQYECGYcQ78uG78ggA1TjeOZtaXjXNG8Bx2sl4W+ypylWWB6yc\n"
-            + "IeR0suLhVlisZ33yOtV4MsvZw0TJNyYmFXiskPTyOcP8RJjS+a41IHc33i13MUnN\n"
-            + "RI5cqhqsWRhf9chlm7XqXtqv57IjojG9vgSUeZdXSTMdHIDDHAjJ/ryBXflzprSw\n"
-            + "2Sab8OXjLkyo9z6ZytFyfXSc8TNiWU6Duollh/bWIsgPETIe2wGn8LcFiVMfPpsI\n"
-            + "RhkphOdTJb+W/zQwLHUcS22A4xsJtBxIXTH/QSG3lAaw8IRbl25EIpaEAF+gExCr\n"
-            + "QM0haAVMmGgYYWpMHXrDhB7ff3kAiqD2qmhSySA6NLmTO+6qGPYJg7kBDQRC7kcA\n"
-            + "AQgA2wqE3DypQhTcYl26dXc9DZzABRQa6KFRqQbhmUBz95cQpAamQjrwOyl2fg84\n"
-            + "b9o9t+DuZcdLzLF/gPVSznOcNUV9mJNdLAxBPPOMUrP/+Snb83FkNpCscrXhIqSf\n"
-            + "BU5D+FOb3bEI2WTJ7lLe8oCrWPE3JIDVCrpAWgZk9puAk1Z7ZFaHsS6ezsZP0YIM\n"
-            + "qTWdoX0zHMPMnr9GG08c0mniXtvfcgtOCeIRU4WZws28sGYCoLeQXsHVDal+gcLp\n"
-            + "1enPh6dfEWBJuhhBBajzm53fzV2a7khEdffggVVylHPLpvms2nIqoearDQtVNpSK\n"
-            + "uhNiykJSMIUn/Y6g5LMySmL+MwARAQABiQEfBBgBAgAJBQJC7kcAAhsMAAoJEGBA\n"
-            + "hmHEO/LhdwcH/0wAxT1NGaR2boMjpTouVUcnEcEzHc0dSwuu+06mLRggSdAfBC8C\n"
-            + "9fdlAYHQ5tp1sRuPwLfQZjo8wLxJ+wLASnIPLaGrtpEHkIKvDwHqwkOXvXeGD/Bh\n"
-            + "40NbJUa7Ec3Jpo+FPFlM8hDsUyHf8IhUAdRd4d+znOVEaZ6S7c1RrtoVTUqzi59n\n"
-            + "nC6ZewL/Jp+znKZlMTM3X1onAGhd+/XdrS52LM8pE3xRjbTLTYWcjnjyLbm0yoO8\n"
-            + "G3yCfIibAaII4a/jGON2X9ZUwaFNIqJ4iIc8Nme86rD/flXsu6Zv+NXVQWylrIG/\n"
-            + "REW68wsnWjwTtrPG8bqo6cCsOzqGYVt81eU=\n"
-            + "=FnZg\n"
-            + "-----END PGP PUBLIC KEY BLOCK-----\n",
-        "-----BEGIN PGP PRIVATE KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "lQOYBELuRwABCADnf2z5dqp3BMFlpd6iUs5dhROrslfzswak1LmbGirK2IPIl4NX\n"
-            + "arAi76xXK9BcF/Cqcj/X/WqFKBd/qMGxwdvwbSN6PVBP6T1jvuVgrPTjd4x5xPUD\n"
-            + "xZ5VPy9hgQXs+1mugTkHYVTU8GI1eGpZ8Oj3PJIgVyqGxGkjWmcz5APbVIRan6L1\n"
-            + "482bZTidH9Nd9YnYlXNgiJcaOPAVBwO/j/myocQCIohvIo4IT8vc/ODhRgfwA0gD\n"
-            + "GVK+tXwT4f4x3qjG/YRpOOZZjBS09B/gJ9QfEnR6WNxg/Tm3T0uipoISOhR+cP/V\n"
-            + "e5o/73SM+w+WlILk/xpbbOfyCxD4Q3lb8EZFABEBAAEAB/9GTcWLkUU9tf0B4LjX\n"
-            + "NSyk7ChIKXZadVEcN9pSR0Udq1mCTrk9kBID2iPNqWmyvjaBnQbUkoqJ+93/EAIa\n"
-            + "+NPRlWOD2SEN07ioFS5WCNCqUAEibfU2+woVu4WpJ+TjzoWy4F2wZxe7P3Gj6Xjq\n"
-            + "7aXih8uc9Lveh8GiUe8rrCCbt+BH1RzuV/khZw+2ZDPMCx7yfcfKobc3NWx75WLh\n"
-            + "pki512fawSC6eJHRI50ilPrqAmmhcccfwPji9P+oPj2S6wlhe5kp3R5yU85fWy3b\n"
-            + "C8AtLTfZIn4v6NAtBaurGEjRjzeNEGMJHxnRPWvFc4iD+xvPg6SNPJM/bbTE+yZ3\n"
-            + "16W1BADxjAQLMuGpemaVmOpZ3K02hcNjwniEK2QPp11BnfoQCIwegON+sUD/6AuZ\n"
-            + "S1vOVvS3//eGbPaMM45FK/SQAVHpC9IOL4Tql0C8B6csRhFL824yPfc3WDb4kayQ\n"
-            + "T5oLjlJ0W2r7tWcBcREEzZT6gNi4KI7C4oFF6tU9lsQJuQyAbwQA9Vl6VW/7oG0W\n"
-            + "CC+lcHJc+4rxUB3yak7d4mEccTNb+crOBRH/7dKZOe7A6Fz+ra++MmucDUzsAx0K\n"
-            + "MGT9Xoi5+CBBaNr+Y2lB9fF20N7eRNzQ3Xrz2OPl4cmU4gfECTZ1vZaKlmB+Vt8C\n"
-            + "E/nn49QGRI+BNBOdW+2aEpPoENczFosEAJXi5Cn2l0jOswDD7FU2PER1wfVY629i\n"
-            + "bICunudOSo64GKQslKkQWktc57DgdOQnH15qW1nVO7Z4H0GBxjSTRCu7Z7q08/qM\n"
-            + "ueWIvJ85HcFhOCl+vITOn0fZV0p8/IwsWz8G9h5bb2QgMAwDSdhnLuK/cXaGM09w\n"
-            + "n6k8O2rCvDtXRjqJATcEHwECACEFAkLuVRAXDIABHZ7red04sEmTnZyvPOx4Gxfe\n"
-            + "Gs0CBwAACgkQYECGYcQ78uEeNQf9H/v6I0EsB8phummuRbL/x5dUQmHF+HoMj+mm\n"
-            + "wosgD7rzuBfvhH3oIzmTp9kON40PbpkQDSsNmZitucZR+y7nlp4zT/6OJI5kna5O\n"
-            + "WsteIcy6ts1jSlPG/bXma6G6Y8HO4vWOwArYpz/igTtnjqNpK2w8K8M5zH09bvrB\n"
-            + "Hz+4I+8dXPkf8Dvd6tcCWgLjeO6lfBkHfZVmrwvSRk1V+4SyMdRy7cZShl0Z9Nvj\n"
-            + "9CrlrUUr4IaHBYI7ClRZkQhQibBS/gU0TiI0VgQdoctT1+i2YjEiQfxMLg1w74a+\n"
-            + "QTIzIno1WQEEM/YRqudxYAnEMGXHUI7gRP79Qu/MOcBxi5NzobQhVGVzdHVzZXIg\n"
-            + "TmluZSA8dGVzdDlAZXhhbXBsZS5jb20+iQE4BBMBAgAiBQJC7kcAAhsDBgsJCAcD\n"
-            + "AgYVCAIJCgsEFgIDAQIeAQIXgAAKCRBgQIZhxDvy4bvyCADVON45m1peNc0bwHHa\n"
-            + "yXhb7KnKVZYHrJwh5HSy4uFWWKxnffI61Xgyy9nDRMk3JiYVeKyQ9PI5w/xEmNL5\n"
-            + "rjUgdzfeLXcxSc1EjlyqGqxZGF/1yGWbtepe2q/nsiOiMb2+BJR5l1dJMx0cgMMc\n"
-            + "CMn+vIFd+XOmtLDZJpvw5eMuTKj3PpnK0XJ9dJzxM2JZToO6iWWH9tYiyA8RMh7b\n"
-            + "AafwtwWJUx8+mwhGGSmE51Mlv5b/NDAsdRxLbYDjGwm0HEhdMf9BIbeUBrDwhFuX\n"
-            + "bkQiloQAX6ATEKtAzSFoBUyYaBhhakwdesOEHt9/eQCKoPaqaFLJIDo0uZM77qoY\n"
-            + "9gmDnQOYBELuRwABCADbCoTcPKlCFNxiXbp1dz0NnMAFFBrooVGpBuGZQHP3lxCk\n"
-            + "BqZCOvA7KXZ+Dzhv2j234O5lx0vMsX+A9VLOc5w1RX2Yk10sDEE884xSs//5Kdvz\n"
-            + "cWQ2kKxyteEipJ8FTkP4U5vdsQjZZMnuUt7ygKtY8TckgNUKukBaBmT2m4CTVntk\n"
-            + "VoexLp7Oxk/RggypNZ2hfTMcw8yev0YbTxzSaeJe299yC04J4hFThZnCzbywZgKg\n"
-            + "t5BewdUNqX6BwunV6c+Hp18RYEm6GEEFqPObnd/NXZruSER19+CBVXKUc8um+aza\n"
-            + "ciqh5qsNC1U2lIq6E2LKQlIwhSf9jqDkszJKYv4zABEBAAEAB/0c76POOw6aazUT\n"
-            + "TZHUnhQ+WHHJefbKuoeWI7w+dD7y+02NzaRoZW7XnJ+fAZW8Dlb5k/O1FayUIEgE\n"
-            + "GjnT336dpE4g5NQkfdifG7Fy5NKGRkWx6viJI3g/OHsYX3+ebNDFMmO0gq7067/9\n"
-            + "WuHsTpvUMRwkF1zi1j4AETjZ7IBXdjuSCSu8OhEwr3d+WXibEmY5ec/d24l/APJx\n"
-            + "c3RMHw9PiDQeAKrByS6N10/yFgRpnouVx3wC7zFmhVewNV476Nyg34OvRoc+lCtk\n"
-            + "ixKdua6KuUJzGRWxgw+q2JD4goXxe0v2qU2KSU63gOYi0kg9tpwpn98lDNQykgmJ\n"
-            + "aQYdNIZJBADdlbkg9qbH1DREs7UF4jXN/SoYRbTh9639GfA4zkbfPmh/RmVIIEKd\n"
-            + "QN7qWK/Xy1bUS9vDzRfFgmoYGtqMmygOOFsVtfm8Y18lSXopN/3vhtai+dn+04Ef\n"
-            + "dl1irmGvm3p7y9Jh3s6uYTEJok0MywA7qBHvgSTVtc1PcZc6j6Bz1QQA/Q+nqyZY\n"
-            + "fLimt4KVYO1y6kSHgEqzggLTxyfGMW5RplTA0V1zCwjM6S+QWNqRxVNdB9Kkzn+S\n"
-            + "YDKHLYs8lXO2zvf8Yk9M7glgqvT4rJ51Zn2rc6lg1YUwFBXup5idTsuZwtqkvvKJ\n"
-            + "eS7L3cSBCqJMRjk47Y3V8zkrrN/HcYmyFecD/A+HPf4eSweUS025Bb+eCk4gTHbR\n"
-            + "uwmnKq7npk2XY4m0A/QdYF9dEWlpadsAr+ZwNQB3f21nQgKG0BudfL4FmpeW9RMt\n"
-            + "35aSIaV7RkxYOt5HEvjFRvLbeL1YYaj+D0dvz8SP1AUPvpWIVlQ03OjRlPyrPW50\n"
-            + "LoqyP8PTb6svnHvmQseJAR8EGAECAAkFAkLuRwACGwwACgkQYECGYcQ78uF3Bwf/\n"
-            + "TADFPU0ZpHZugyOlOi5VRycRwTMdzR1LC677TqYtGCBJ0B8ELwL192UBgdDm2nWx\n"
-            + "G4/At9BmOjzAvEn7AsBKcg8toau2kQeQgq8PAerCQ5e9d4YP8GHjQ1slRrsRzcmm\n"
-            + "j4U8WUzyEOxTId/wiFQB1F3h37Oc5URpnpLtzVGu2hVNSrOLn2ecLpl7Av8mn7Oc\n"
-            + "pmUxMzdfWicAaF379d2tLnYszykTfFGNtMtNhZyOePItubTKg7wbfIJ8iJsBogjh\n"
-            + "r+MY43Zf1lTBoU0ioniIhzw2Z7zqsP9+Vey7pm/41dVBbKWsgb9ERbrzCydaPBO2\n"
-            + "s8bxuqjpwKw7OoZhW3zV5Q==\n"
-            + "=JxsF\n"
-            + "-----END PGP PRIVATE KEY BLOCK-----\n");
+        """
+        -----BEGIN PGP PUBLIC KEY BLOCK-----
+        Version: GnuPG v1
+
+        mQENBELuRwABCADnf2z5dqp3BMFlpd6iUs5dhROrslfzswak1LmbGirK2IPIl4NX
+        arAi76xXK9BcF/Cqcj/X/WqFKBd/qMGxwdvwbSN6PVBP6T1jvuVgrPTjd4x5xPUD
+        xZ5VPy9hgQXs+1mugTkHYVTU8GI1eGpZ8Oj3PJIgVyqGxGkjWmcz5APbVIRan6L1
+        482bZTidH9Nd9YnYlXNgiJcaOPAVBwO/j/myocQCIohvIo4IT8vc/ODhRgfwA0gD
+        GVK+tXwT4f4x3qjG/YRpOOZZjBS09B/gJ9QfEnR6WNxg/Tm3T0uipoISOhR+cP/V
+        e5o/73SM+w+WlILk/xpbbOfyCxD4Q3lb8EZFABEBAAGJAS0EIAECABcFAkLuYyAQ
+        HQN0ZXN0OSBub3QgdXNlZAAKCRA87HgbF94azV2BB/9Rc1j3XOxKbDyUFAORAGnE
+        ezQtpOmQhaSUhFC35GFOdTg4eX53FTFSXLJQleTVzvE+eVkQI5tvUZ+SqHoyjnhU
+        DpWlmfRUQy4GTUjUTkpFOK07TVTjhUQwaAxN13UZgByopVKc7hLf+uh1xkRJIqAJ
+        Tx6LIFZiSIGwStDO6TJlhl1e8h45J3rAV4N+DsGpMy9S4uYOU7erJDupdXK739/l
+        VBsP2SeT85iuAv+4A9Jq3+iq+cjK9q3QZCw1O6iI2v3seAWCI6HH3tVw4THr+M6T
+        EdTGmyESjdAl+f7/uK0QNfqIMpvUf+AvMakrLi7WOeDs8mpUIjonpeQVLfz6I0Zo
+        iQE3BB8BAgAhBQJC7lUQFwyAAR2e63ndOLBJk52crzzseBsX3hrNAgcAAAoJEGBA
+        hmHEO/LhHjUH/R/7+iNBLAfKYbpprkWy/8eXVEJhxfh6DI/ppsKLIA+687gX74R9
+        6CM5k6fZDjeND26ZEA0rDZmYrbnGUfsu55aeM0/+jiSOZJ2uTlrLXiHMurbNY0pT
+        xv215muhumPBzuL1jsAK2Kc/4oE7Z46jaStsPCvDOcx9PW76wR8/uCPvHVz5H/A7
+        3erXAloC43jupXwZB32VZq8L0kZNVfuEsjHUcu3GUoZdGfTb4/Qq5a1FK+CGhwWC
+        OwpUWZEIUImwUv4FNE4iNFYEHaHLU9fotmIxIkH8TC4NcO+GvkEyMyJ6NVkBBDP2
+        EarncWAJxDBlx1CO4ET+/ULvzDnAcYuTc6G0IVRlc3R1c2VyIE5pbmUgPHRlc3Q5
+        QGV4YW1wbGUuY29tPokBOAQTAQIAIgUCQu5HAAIbAwYLCQgHAwIGFQgCCQoLBBYC
+        AwECHgECF4AACgkQYECGYcQ78uG78ggA1TjeOZtaXjXNG8Bx2sl4W+ypylWWB6yc
+        IeR0suLhVlisZ33yOtV4MsvZw0TJNyYmFXiskPTyOcP8RJjS+a41IHc33i13MUnN
+        RI5cqhqsWRhf9chlm7XqXtqv57IjojG9vgSUeZdXSTMdHIDDHAjJ/ryBXflzprSw
+        2Sab8OXjLkyo9z6ZytFyfXSc8TNiWU6Duollh/bWIsgPETIe2wGn8LcFiVMfPpsI
+        RhkphOdTJb+W/zQwLHUcS22A4xsJtBxIXTH/QSG3lAaw8IRbl25EIpaEAF+gExCr
+        QM0haAVMmGgYYWpMHXrDhB7ff3kAiqD2qmhSySA6NLmTO+6qGPYJg7kBDQRC7kcA
+        AQgA2wqE3DypQhTcYl26dXc9DZzABRQa6KFRqQbhmUBz95cQpAamQjrwOyl2fg84
+        b9o9t+DuZcdLzLF/gPVSznOcNUV9mJNdLAxBPPOMUrP/+Snb83FkNpCscrXhIqSf
+        BU5D+FOb3bEI2WTJ7lLe8oCrWPE3JIDVCrpAWgZk9puAk1Z7ZFaHsS6ezsZP0YIM
+        qTWdoX0zHMPMnr9GG08c0mniXtvfcgtOCeIRU4WZws28sGYCoLeQXsHVDal+gcLp
+        1enPh6dfEWBJuhhBBajzm53fzV2a7khEdffggVVylHPLpvms2nIqoearDQtVNpSK
+        uhNiykJSMIUn/Y6g5LMySmL+MwARAQABiQEfBBgBAgAJBQJC7kcAAhsMAAoJEGBA
+        hmHEO/LhdwcH/0wAxT1NGaR2boMjpTouVUcnEcEzHc0dSwuu+06mLRggSdAfBC8C
+        9fdlAYHQ5tp1sRuPwLfQZjo8wLxJ+wLASnIPLaGrtpEHkIKvDwHqwkOXvXeGD/Bh
+        40NbJUa7Ec3Jpo+FPFlM8hDsUyHf8IhUAdRd4d+znOVEaZ6S7c1RrtoVTUqzi59n
+        nC6ZewL/Jp+znKZlMTM3X1onAGhd+/XdrS52LM8pE3xRjbTLTYWcjnjyLbm0yoO8
+        G3yCfIibAaII4a/jGON2X9ZUwaFNIqJ4iIc8Nme86rD/flXsu6Zv+NXVQWylrIG/
+        REW68wsnWjwTtrPG8bqo6cCsOzqGYVt81eU=
+        =FnZg
+        -----END PGP PUBLIC KEY BLOCK-----
+        """,
+        """
+        -----BEGIN PGP PRIVATE KEY BLOCK-----
+        Version: GnuPG v1
+
+        lQOYBELuRwABCADnf2z5dqp3BMFlpd6iUs5dhROrslfzswak1LmbGirK2IPIl4NX
+        arAi76xXK9BcF/Cqcj/X/WqFKBd/qMGxwdvwbSN6PVBP6T1jvuVgrPTjd4x5xPUD
+        xZ5VPy9hgQXs+1mugTkHYVTU8GI1eGpZ8Oj3PJIgVyqGxGkjWmcz5APbVIRan6L1
+        482bZTidH9Nd9YnYlXNgiJcaOPAVBwO/j/myocQCIohvIo4IT8vc/ODhRgfwA0gD
+        GVK+tXwT4f4x3qjG/YRpOOZZjBS09B/gJ9QfEnR6WNxg/Tm3T0uipoISOhR+cP/V
+        e5o/73SM+w+WlILk/xpbbOfyCxD4Q3lb8EZFABEBAAEAB/9GTcWLkUU9tf0B4LjX
+        NSyk7ChIKXZadVEcN9pSR0Udq1mCTrk9kBID2iPNqWmyvjaBnQbUkoqJ+93/EAIa
+        +NPRlWOD2SEN07ioFS5WCNCqUAEibfU2+woVu4WpJ+TjzoWy4F2wZxe7P3Gj6Xjq
+        7aXih8uc9Lveh8GiUe8rrCCbt+BH1RzuV/khZw+2ZDPMCx7yfcfKobc3NWx75WLh
+        pki512fawSC6eJHRI50ilPrqAmmhcccfwPji9P+oPj2S6wlhe5kp3R5yU85fWy3b
+        C8AtLTfZIn4v6NAtBaurGEjRjzeNEGMJHxnRPWvFc4iD+xvPg6SNPJM/bbTE+yZ3
+        16W1BADxjAQLMuGpemaVmOpZ3K02hcNjwniEK2QPp11BnfoQCIwegON+sUD/6AuZ
+        S1vOVvS3//eGbPaMM45FK/SQAVHpC9IOL4Tql0C8B6csRhFL824yPfc3WDb4kayQ
+        T5oLjlJ0W2r7tWcBcREEzZT6gNi4KI7C4oFF6tU9lsQJuQyAbwQA9Vl6VW/7oG0W
+        CC+lcHJc+4rxUB3yak7d4mEccTNb+crOBRH/7dKZOe7A6Fz+ra++MmucDUzsAx0K
+        MGT9Xoi5+CBBaNr+Y2lB9fF20N7eRNzQ3Xrz2OPl4cmU4gfECTZ1vZaKlmB+Vt8C
+        E/nn49QGRI+BNBOdW+2aEpPoENczFosEAJXi5Cn2l0jOswDD7FU2PER1wfVY629i
+        bICunudOSo64GKQslKkQWktc57DgdOQnH15qW1nVO7Z4H0GBxjSTRCu7Z7q08/qM
+        ueWIvJ85HcFhOCl+vITOn0fZV0p8/IwsWz8G9h5bb2QgMAwDSdhnLuK/cXaGM09w
+        n6k8O2rCvDtXRjqJATcEHwECACEFAkLuVRAXDIABHZ7red04sEmTnZyvPOx4Gxfe
+        Gs0CBwAACgkQYECGYcQ78uEeNQf9H/v6I0EsB8phummuRbL/x5dUQmHF+HoMj+mm
+        wosgD7rzuBfvhH3oIzmTp9kON40PbpkQDSsNmZitucZR+y7nlp4zT/6OJI5kna5O
+        WsteIcy6ts1jSlPG/bXma6G6Y8HO4vWOwArYpz/igTtnjqNpK2w8K8M5zH09bvrB
+        Hz+4I+8dXPkf8Dvd6tcCWgLjeO6lfBkHfZVmrwvSRk1V+4SyMdRy7cZShl0Z9Nvj
+        9CrlrUUr4IaHBYI7ClRZkQhQibBS/gU0TiI0VgQdoctT1+i2YjEiQfxMLg1w74a+
+        QTIzIno1WQEEM/YRqudxYAnEMGXHUI7gRP79Qu/MOcBxi5NzobQhVGVzdHVzZXIg
+        TmluZSA8dGVzdDlAZXhhbXBsZS5jb20+iQE4BBMBAgAiBQJC7kcAAhsDBgsJCAcD
+        AgYVCAIJCgsEFgIDAQIeAQIXgAAKCRBgQIZhxDvy4bvyCADVON45m1peNc0bwHHa
+        yXhb7KnKVZYHrJwh5HSy4uFWWKxnffI61Xgyy9nDRMk3JiYVeKyQ9PI5w/xEmNL5
+        rjUgdzfeLXcxSc1EjlyqGqxZGF/1yGWbtepe2q/nsiOiMb2+BJR5l1dJMx0cgMMc
+        CMn+vIFd+XOmtLDZJpvw5eMuTKj3PpnK0XJ9dJzxM2JZToO6iWWH9tYiyA8RMh7b
+        AafwtwWJUx8+mwhGGSmE51Mlv5b/NDAsdRxLbYDjGwm0HEhdMf9BIbeUBrDwhFuX
+        bkQiloQAX6ATEKtAzSFoBUyYaBhhakwdesOEHt9/eQCKoPaqaFLJIDo0uZM77qoY
+        9gmDnQOYBELuRwABCADbCoTcPKlCFNxiXbp1dz0NnMAFFBrooVGpBuGZQHP3lxCk
+        BqZCOvA7KXZ+Dzhv2j234O5lx0vMsX+A9VLOc5w1RX2Yk10sDEE884xSs//5Kdvz
+        cWQ2kKxyteEipJ8FTkP4U5vdsQjZZMnuUt7ygKtY8TckgNUKukBaBmT2m4CTVntk
+        VoexLp7Oxk/RggypNZ2hfTMcw8yev0YbTxzSaeJe299yC04J4hFThZnCzbywZgKg
+        t5BewdUNqX6BwunV6c+Hp18RYEm6GEEFqPObnd/NXZruSER19+CBVXKUc8um+aza
+        ciqh5qsNC1U2lIq6E2LKQlIwhSf9jqDkszJKYv4zABEBAAEAB/0c76POOw6aazUT
+        TZHUnhQ+WHHJefbKuoeWI7w+dD7y+02NzaRoZW7XnJ+fAZW8Dlb5k/O1FayUIEgE
+        GjnT336dpE4g5NQkfdifG7Fy5NKGRkWx6viJI3g/OHsYX3+ebNDFMmO0gq7067/9
+        WuHsTpvUMRwkF1zi1j4AETjZ7IBXdjuSCSu8OhEwr3d+WXibEmY5ec/d24l/APJx
+        c3RMHw9PiDQeAKrByS6N10/yFgRpnouVx3wC7zFmhVewNV476Nyg34OvRoc+lCtk
+        ixKdua6KuUJzGRWxgw+q2JD4goXxe0v2qU2KSU63gOYi0kg9tpwpn98lDNQykgmJ
+        aQYdNIZJBADdlbkg9qbH1DREs7UF4jXN/SoYRbTh9639GfA4zkbfPmh/RmVIIEKd
+        QN7qWK/Xy1bUS9vDzRfFgmoYGtqMmygOOFsVtfm8Y18lSXopN/3vhtai+dn+04Ef
+        dl1irmGvm3p7y9Jh3s6uYTEJok0MywA7qBHvgSTVtc1PcZc6j6Bz1QQA/Q+nqyZY
+        fLimt4KVYO1y6kSHgEqzggLTxyfGMW5RplTA0V1zCwjM6S+QWNqRxVNdB9Kkzn+S
+        YDKHLYs8lXO2zvf8Yk9M7glgqvT4rJ51Zn2rc6lg1YUwFBXup5idTsuZwtqkvvKJ
+        eS7L3cSBCqJMRjk47Y3V8zkrrN/HcYmyFecD/A+HPf4eSweUS025Bb+eCk4gTHbR
+        uwmnKq7npk2XY4m0A/QdYF9dEWlpadsAr+ZwNQB3f21nQgKG0BudfL4FmpeW9RMt
+        35aSIaV7RkxYOt5HEvjFRvLbeL1YYaj+D0dvz8SP1AUPvpWIVlQ03OjRlPyrPW50
+        LoqyP8PTb6svnHvmQseJAR8EGAECAAkFAkLuRwACGwwACgkQYECGYcQ78uF3Bwf/
+        TADFPU0ZpHZugyOlOi5VRycRwTMdzR1LC677TqYtGCBJ0B8ELwL192UBgdDm2nWx
+        G4/At9BmOjzAvEn7AsBKcg8toau2kQeQgq8PAerCQ5e9d4YP8GHjQ1slRrsRzcmm
+        j4U8WUzyEOxTId/wiFQB1F3h37Oc5URpnpLtzVGu2hVNSrOLn2ecLpl7Av8mn7Oc
+        pmUxMzdfWicAaF379d2tLnYszykTfFGNtMtNhZyOePItubTKg7wbfIJ8iJsBogjh
+        r+MY43Zf1lTBoU0ioniIhzw2Z7zqsP9+Vey7pm/41dVBbKWsgb9ERbrzCydaPBO2
+        s8bxuqjpwKw7OoZhW3zV5Q==
+        =JxsF
+        -----END PGP PRIVATE KEY BLOCK-----
+        """);
   }
 
   /**
@@ -1043,67 +1079,71 @@
    */
   public static TestKey validKeyWithoutExpirationWithSubkeyWithExpiration() throws Exception {
     return new TestKey(
-        "-----BEGIN PGP PUBLIC KEY BLOCK-----\n"
-            + "\n"
-            + "mI0EW+98GgEEALLn87xX++daic3AzKwM7nY50Mx2eTaEZPlnaDAVvFlhbZuPG+n5\n"
-            + "g93vYX3wEfnFxI7IBEe7VMT1AyszLZgpFmbzW8eGQxCGpRd1hYrUUlC0IkGAwG9v\n"
-            + "LQB85GDDZUUH4p+A4oHX0yUm8iCpbO9+D82xzNDe/D8Xbw1foWMWGonLABEBAAG0\n"
-            + "JFRlc3R1c2VyIDEwIDx0ZXN0dXNlcjEwQGV4YW1wbGUuY29tPojOBBMBCAA4FiEE\n"
-            + "VzQsN5gqhDsZwGIraq8tJrSBAtsFAlvvfBoCGwEFCwkIBwIGFQoJCAsCBBYCAwEC\n"
-            + "HgECF4AACgkQaq8tJrSBAtvfFAP/VqV77KQZp9rjSGStDpxxlatr4Y5nrRBZfV5v\n"
-            + "jpAjwusIHRjr0OWXLxX7NDLYd+oIjhLFn26Lux1UXOQT+rGRPwnxoJZWrpDQidP7\n"
-            + "fDgfqnNa5UQGvoBPSIVEK1l0DlYAOUuciwz3HdMkeMuvEVEdyg7nOiVd1bF9V9i/\n"
-            + "8v7ABV24jQRb73xXAQQAssv5gwxWx5J0q4gGcqMIaJKzBaHAjiK3ryH6qnFQpsf1\n"
-            + "ODtU+a4NxFJsXGOd6jHEhBEHPgWAaaKZ7PEJVnwA/XOhPG+q9YimAbbZS0qmC/LH\n"
-            + "DpFtFbsJsMKZbIC69j9OcbmalIowspFQBVeAankGFReZVhh99Z/o81Y+Twm9eisA\n"
-            + "EQEAAYkBcQQYAQgAJhYhBFc0LDeYKoQ7GcBiK2qvLSa0gQLbBQJb73xXAhsCBQlY\n"
-            + "WHSAAL8JEGqvLSa0gQLbtCAEGQEIAB0WIQQKSpZgG5Yt/OiY5oZDBckuYm60hQUC\n"
-            + "W+98VwAKCRBDBckuYm60hafuBACSkvwXAYfxvAf7IOK6+Sp3oWkrq6vsjH5K7oup\n"
-            + "TimR1cVgN1CEAWh82UBCg3zR5Q5BAnvnjeugdQVrAY+sftkaoy8qO5YYHCPtHtQK\n"
-            + "mXGWM7Q33hU1E7IfgU06qkFLhIOL3Vwr8jOuOzHv0M3PbLNr7lOCaIJ7uCjPBZuo\n"
-            + "qRwqjHt2BACuXwA8RHbRGAxC65YgoSjGNu/da3q2J26E57KfSFprQ4TzAg33U4Ws\n"
-            + "qdx2vbbJxy1bfTYxb0AYXe/+k23W7EIdBtMGOYwrX01oTfSIKbM+gDrHswSYXdOy\n"
-            + "ziatLaUBSQfyG656lGGZO/aArLZb4dgGeBHBwhXTufFDIYl3X94zfQ==\n"
-            + "=BG9Z\n"
-            + "-----END PGP PUBLIC KEY BLOCK-----",
-        "-----BEGIN PGP PRIVATE KEY BLOCK-----\n"
-            + "\n"
-            + "lQIGBFvvfBoBBACy5/O8V/vnWonNwMysDO52OdDMdnk2hGT5Z2gwFbxZYW2bjxvp\n"
-            + "+YPd72F98BH5xcSOyARHu1TE9QMrMy2YKRZm81vHhkMQhqUXdYWK1FJQtCJBgMBv\n"
-            + "by0AfORgw2VFB+KfgOKB19MlJvIgqWzvfg/NsczQ3vw/F28NX6FjFhqJywARAQAB\n"
-            + "/gcDAmvJS+mrsxlf7D58lnhHw8gBjP5JkY9anTgVhIdieJEIlitV4PyRQYPAGZZd\n"
-            + "asUC7bC7WnLCygiU59kXS5z63Ue/RM0tVwWy0FsigpseC90Mtwb4wjL2jTeebszD\n"
-            + "UcM33d6Tg9s4eNnsHzpmlC/CReW6MYJj0/06AsvgUgOxgWXf0YapOLRIr60reTUb\n"
-            + "ovVZtH76rsZXyQvR9qJv11F+BmIDDzg4EsipXDGVuEZ0SXJyq6OLAUPkV2ZdELaT\n"
-            + "P4RWp0Zsn22H8jm4MsZ7la2Ux3jD2AMdy2B9dpwhuxOegDSXUMRfXYwxQ1wioqpA\n"
-            + "pOZ1RjjFsID34XNtxGp3wMYcFleOl3CSpXyW/P1PYTVBQta/Y7xniEetzUk9NHVc\n"
-            + "2jMD8a8767+Tk0SChIPmWOhQYrHS1Ce309SjTRSRVexjKF0Mp5WXHxqz582IlPT9\n"
-            + "jdxvLjVIW4xbtZmnQ2JnPHInWbxoa3exaoPg5osvg8h7QlGxRY6H2/20JFRlc3R1\n"
-            + "c2VyIDEwIDx0ZXN0dXNlcjEwQGV4YW1wbGUuY29tPojOBBMBCAA4FiEEVzQsN5gq\n"
-            + "hDsZwGIraq8tJrSBAtsFAlvvfBoCGwEFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AA\n"
-            + "CgkQaq8tJrSBAtvfFAP/VqV77KQZp9rjSGStDpxxlatr4Y5nrRBZfV5vjpAjwusI\n"
-            + "HRjr0OWXLxX7NDLYd+oIjhLFn26Lux1UXOQT+rGRPwnxoJZWrpDQidP7fDgfqnNa\n"
-            + "5UQGvoBPSIVEK1l0DlYAOUuciwz3HdMkeMuvEVEdyg7nOiVd1bF9V9i/8v7ABV2d\n"
-            + "AgYEW+98VwEEALLL+YMMVseSdKuIBnKjCGiSswWhwI4it68h+qpxUKbH9Tg7VPmu\n"
-            + "DcRSbFxjneoxxIQRBz4FgGmimezxCVZ8AP1zoTxvqvWIpgG22UtKpgvyxw6RbRW7\n"
-            + "CbDCmWyAuvY/TnG5mpSKMLKRUAVXgGp5BhUXmVYYffWf6PNWPk8JvXorABEBAAH+\n"
-            + "BwMClgBcY/ItnafslgEWZOSqsxCSJatN72c9zzWZE+zmcx9NbDRuCVxXhTbHJZZs\n"
-            + "Hz44vsKqOKtyhrfr9Oke0mYyzH2CX6tv6ghJyC6znRCGoc/P84uJ1v3ibO/7/p85\n"
-            + "PDHzEEpHmdbef+UymnjZBYKGi45SINy3bLwOa/Vl80Q4wsppPe9oynerq6ig94HR\n"
-            + "e3mNDw/JggtgJA0X2VmmmXG8vHwIB5EziQrH7QGtLyjqdE+w7CLbbvAskL8Uw1qx\n"
-            + "Aowdpb7J8hrUdIDDCr/mlhT17+UM5yOXHKcixyrscqbjlG/nqwPvR10efo7D0rFR\n"
-            + "6tu5OU2y3N2PhGOysDLgupUXBLlpdByF6AYNV9zvU7ipO7QXzrUfYCb/WyAcjl+X\n"
-            + "Yl38sCVTVFGsB2ql9/fzFCxAB3FUNHDlI2sUbkdDPcjgf65SK0GGcckWfntfq9dj\n"
-            + "pQzEVen8X9dT3UhfuvHd98g3n6ju9gh8NucwHM5jITq9ItTY0whb+okBcQQYAQgA\n"
-            + "JhYhBFc0LDeYKoQ7GcBiK2qvLSa0gQLbBQJb73xXAhsCBQlYWHSAAL8JEGqvLSa0\n"
-            + "gQLbtCAEGQEIAB0WIQQKSpZgG5Yt/OiY5oZDBckuYm60hQUCW+98VwAKCRBDBcku\n"
-            + "Ym60hafuBACSkvwXAYfxvAf7IOK6+Sp3oWkrq6vsjH5K7oupTimR1cVgN1CEAWh8\n"
-            + "2UBCg3zR5Q5BAnvnjeugdQVrAY+sftkaoy8qO5YYHCPtHtQKmXGWM7Q33hU1E7If\n"
-            + "gU06qkFLhIOL3Vwr8jOuOzHv0M3PbLNr7lOCaIJ7uCjPBZuoqRwqjHt2BACuXwA8\n"
-            + "RHbRGAxC65YgoSjGNu/da3q2J26E57KfSFprQ4TzAg33U4Wsqdx2vbbJxy1bfTYx\n"
-            + "b0AYXe/+k23W7EIdBtMGOYwrX01oTfSIKbM+gDrHswSYXdOyziatLaUBSQfyG656\n"
-            + "lGGZO/aArLZb4dgGeBHBwhXTufFDIYl3X94zfQ==\n"
-            + "=RbPm\n"
-            + "-----END PGP PRIVATE KEY BLOCK-----");
+        """
+        -----BEGIN PGP PUBLIC KEY BLOCK-----
+
+        mI0EW+98GgEEALLn87xX++daic3AzKwM7nY50Mx2eTaEZPlnaDAVvFlhbZuPG+n5
+        g93vYX3wEfnFxI7IBEe7VMT1AyszLZgpFmbzW8eGQxCGpRd1hYrUUlC0IkGAwG9v
+        LQB85GDDZUUH4p+A4oHX0yUm8iCpbO9+D82xzNDe/D8Xbw1foWMWGonLABEBAAG0
+        JFRlc3R1c2VyIDEwIDx0ZXN0dXNlcjEwQGV4YW1wbGUuY29tPojOBBMBCAA4FiEE
+        VzQsN5gqhDsZwGIraq8tJrSBAtsFAlvvfBoCGwEFCwkIBwIGFQoJCAsCBBYCAwEC
+        HgECF4AACgkQaq8tJrSBAtvfFAP/VqV77KQZp9rjSGStDpxxlatr4Y5nrRBZfV5v
+        jpAjwusIHRjr0OWXLxX7NDLYd+oIjhLFn26Lux1UXOQT+rGRPwnxoJZWrpDQidP7
+        fDgfqnNa5UQGvoBPSIVEK1l0DlYAOUuciwz3HdMkeMuvEVEdyg7nOiVd1bF9V9i/
+        8v7ABV24jQRb73xXAQQAssv5gwxWx5J0q4gGcqMIaJKzBaHAjiK3ryH6qnFQpsf1
+        ODtU+a4NxFJsXGOd6jHEhBEHPgWAaaKZ7PEJVnwA/XOhPG+q9YimAbbZS0qmC/LH
+        DpFtFbsJsMKZbIC69j9OcbmalIowspFQBVeAankGFReZVhh99Z/o81Y+Twm9eisA
+        EQEAAYkBcQQYAQgAJhYhBFc0LDeYKoQ7GcBiK2qvLSa0gQLbBQJb73xXAhsCBQlY
+        WHSAAL8JEGqvLSa0gQLbtCAEGQEIAB0WIQQKSpZgG5Yt/OiY5oZDBckuYm60hQUC
+        W+98VwAKCRBDBckuYm60hafuBACSkvwXAYfxvAf7IOK6+Sp3oWkrq6vsjH5K7oup
+        TimR1cVgN1CEAWh82UBCg3zR5Q5BAnvnjeugdQVrAY+sftkaoy8qO5YYHCPtHtQK
+        mXGWM7Q33hU1E7IfgU06qkFLhIOL3Vwr8jOuOzHv0M3PbLNr7lOCaIJ7uCjPBZuo
+        qRwqjHt2BACuXwA8RHbRGAxC65YgoSjGNu/da3q2J26E57KfSFprQ4TzAg33U4Ws
+        qdx2vbbJxy1bfTYxb0AYXe/+k23W7EIdBtMGOYwrX01oTfSIKbM+gDrHswSYXdOy
+        ziatLaUBSQfyG656lGGZO/aArLZb4dgGeBHBwhXTufFDIYl3X94zfQ==
+        =BG9Z
+        -----END PGP PUBLIC KEY BLOCK-----\
+        """,
+        """
+        -----BEGIN PGP PRIVATE KEY BLOCK-----
+
+        lQIGBFvvfBoBBACy5/O8V/vnWonNwMysDO52OdDMdnk2hGT5Z2gwFbxZYW2bjxvp
+        +YPd72F98BH5xcSOyARHu1TE9QMrMy2YKRZm81vHhkMQhqUXdYWK1FJQtCJBgMBv
+        by0AfORgw2VFB+KfgOKB19MlJvIgqWzvfg/NsczQ3vw/F28NX6FjFhqJywARAQAB
+        /gcDAmvJS+mrsxlf7D58lnhHw8gBjP5JkY9anTgVhIdieJEIlitV4PyRQYPAGZZd
+        asUC7bC7WnLCygiU59kXS5z63Ue/RM0tVwWy0FsigpseC90Mtwb4wjL2jTeebszD
+        UcM33d6Tg9s4eNnsHzpmlC/CReW6MYJj0/06AsvgUgOxgWXf0YapOLRIr60reTUb
+        ovVZtH76rsZXyQvR9qJv11F+BmIDDzg4EsipXDGVuEZ0SXJyq6OLAUPkV2ZdELaT
+        P4RWp0Zsn22H8jm4MsZ7la2Ux3jD2AMdy2B9dpwhuxOegDSXUMRfXYwxQ1wioqpA
+        pOZ1RjjFsID34XNtxGp3wMYcFleOl3CSpXyW/P1PYTVBQta/Y7xniEetzUk9NHVc
+        2jMD8a8767+Tk0SChIPmWOhQYrHS1Ce309SjTRSRVexjKF0Mp5WXHxqz582IlPT9
+        jdxvLjVIW4xbtZmnQ2JnPHInWbxoa3exaoPg5osvg8h7QlGxRY6H2/20JFRlc3R1
+        c2VyIDEwIDx0ZXN0dXNlcjEwQGV4YW1wbGUuY29tPojOBBMBCAA4FiEEVzQsN5gq
+        hDsZwGIraq8tJrSBAtsFAlvvfBoCGwEFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AA
+        CgkQaq8tJrSBAtvfFAP/VqV77KQZp9rjSGStDpxxlatr4Y5nrRBZfV5vjpAjwusI
+        HRjr0OWXLxX7NDLYd+oIjhLFn26Lux1UXOQT+rGRPwnxoJZWrpDQidP7fDgfqnNa
+        5UQGvoBPSIVEK1l0DlYAOUuciwz3HdMkeMuvEVEdyg7nOiVd1bF9V9i/8v7ABV2d
+        AgYEW+98VwEEALLL+YMMVseSdKuIBnKjCGiSswWhwI4it68h+qpxUKbH9Tg7VPmu
+        DcRSbFxjneoxxIQRBz4FgGmimezxCVZ8AP1zoTxvqvWIpgG22UtKpgvyxw6RbRW7
+        CbDCmWyAuvY/TnG5mpSKMLKRUAVXgGp5BhUXmVYYffWf6PNWPk8JvXorABEBAAH+
+        BwMClgBcY/ItnafslgEWZOSqsxCSJatN72c9zzWZE+zmcx9NbDRuCVxXhTbHJZZs
+        Hz44vsKqOKtyhrfr9Oke0mYyzH2CX6tv6ghJyC6znRCGoc/P84uJ1v3ibO/7/p85
+        PDHzEEpHmdbef+UymnjZBYKGi45SINy3bLwOa/Vl80Q4wsppPe9oynerq6ig94HR
+        e3mNDw/JggtgJA0X2VmmmXG8vHwIB5EziQrH7QGtLyjqdE+w7CLbbvAskL8Uw1qx
+        Aowdpb7J8hrUdIDDCr/mlhT17+UM5yOXHKcixyrscqbjlG/nqwPvR10efo7D0rFR
+        6tu5OU2y3N2PhGOysDLgupUXBLlpdByF6AYNV9zvU7ipO7QXzrUfYCb/WyAcjl+X
+        Yl38sCVTVFGsB2ql9/fzFCxAB3FUNHDlI2sUbkdDPcjgf65SK0GGcckWfntfq9dj
+        pQzEVen8X9dT3UhfuvHd98g3n6ju9gh8NucwHM5jITq9ItTY0whb+okBcQQYAQgA
+        JhYhBFc0LDeYKoQ7GcBiK2qvLSa0gQLbBQJb73xXAhsCBQlYWHSAAL8JEGqvLSa0
+        gQLbtCAEGQEIAB0WIQQKSpZgG5Yt/OiY5oZDBckuYm60hQUCW+98VwAKCRBDBcku
+        Ym60hafuBACSkvwXAYfxvAf7IOK6+Sp3oWkrq6vsjH5K7oupTimR1cVgN1CEAWh8
+        2UBCg3zR5Q5BAnvnjeugdQVrAY+sftkaoy8qO5YYHCPtHtQKmXGWM7Q33hU1E7If
+        gU06qkFLhIOL3Vwr8jOuOzHv0M3PbLNr7lOCaIJ7uCjPBZuoqRwqjHt2BACuXwA8
+        RHbRGAxC65YgoSjGNu/da3q2J26E57KfSFprQ4TzAg33U4Wsqdx2vbbJxy1bfTYx
+        b0AYXe/+k23W7EIdBtMGOYwrX01oTfSIKbM+gDrHswSYXdOyziatLaUBSQfyG656
+        lGGZO/aArLZb4dgGeBHBwhXTufFDIYl3X94zfQ==
+        =RbPm
+        -----END PGP PRIVATE KEY BLOCK-----\
+        """);
   }
 }
diff --git a/java/com/google/gerrit/gpg/testing/TestTrustKeys.java b/java/com/google/gerrit/gpg/testing/TestTrustKeys.java
index 0f83f71..fb20aeb 100644
--- a/java/com/google/gerrit/gpg/testing/TestTrustKeys.java
+++ b/java/com/google/gerrit/gpg/testing/TestTrustKeys.java
@@ -43,105 +43,109 @@
    */
   public static TestKey keyA() throws Exception {
     return new TestKey(
-        "-----BEGIN PGP PUBLIC KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "mQENBEx6npoBCACp0vHePNPeLzm0HM35i70bRChyZXu/ARxOHZHNbh6hWJkq5saI\n"
-            + "zuzZoaqXAr3xZwHftTULlkgoJIt40x6VCT8EBnUHTkOqoHTsFnXg2kNuhFvmn0OX\n"
-            + "7RQFlR1SGoQG4fEy6t/GlOwEknpNSIMLkbDMP2FzEkLVWtlIe2hqqawVIgqzyO3k\n"
-            + "HaQxW8gWyyTx0qeSdSi4DyFZIzdyu/aZa7sj/MhO3DB3UwubW6yE+PMcAVrJD+0d\n"
-            + "EToMT7i8Erncc+xEzuXAoQUHaQfOXV4DG5qSgVpKaLxJ/ABWUri0eMPhj0cT4iDx\n"
-            + "eNTL7cZ4h72B1uJs8byDN74PHrypNiVE+IRHABEBAAG0HlRlc3R1c2VyIEEgPHRl\n"
-            + "c3RhQGV4YW1wbGUuY29tPokBOAQTAQIAIgUCTHqemgIbAwYLCQgHAwIGFQgCCQoL\n"
-            + "BBYCAwECHgECF4AACgkQ0lrQep/Q05ZxMAf+OoRzXWbGfv7kZb7xdrVyAUTAV4bU\n"
-            + "UvLoJZUIQ1ckPBcty2LUvY7l9efgp3c57nvTD6U98dVnsKfaW4PT0CRXlpl1IFyh\n"
-            + "kgbInFS5rO+cJMQn1KyC+FfiwyGNii630SwiHyWRG5+XQ6Iptx9JELwWUMCLJxFp\n"
-            + "B8DZQKlNnvdl+YUgEeQOkWTXfTSaBATdXHiZhskiumnTOGO24jSg8CrZc5O/n6fC\n"
-            + "CgEsAFWL7fnO0ii6EW1JH5btLHPxL9QI+5DJIypgOhGI1lqZW9KrpfmJ3w6N1Gek\n"
-            + "GBda98DmzxxxZ9iyq1cELAAiQMjkvws67cOs/hwXNn9YaK74dzhb49MLGIkBIAQQ\n"
-            + "AQIACgUCTHqf0QMFAXgACgkQV2Bph7AH1JCO/Qf+PBJqeWS7p32+K5r1cA7AeCB2\n"
-            + "pcHs78wLjnSxuimf0l+JItb9JQAKjzcdZTKVGkUivkq3zhsPCCtssgSav2wlG59F\n"
-            + "TaqtpGOxvGjc8TKWHW1TrPhV86wh0yUempKTMWfdZ0RAJVG3krAj60bzUsQNK41/\n"
-            + "0EZi4JI+sm/TRlwQcmEzdaGxhFSJqiJyaBWbPL8AQNA2iRyjMKNeGCrgapEl2IkW\n"
-            + "2ST+/yUPI/485LS0uU1+TLB+NhiJ6j5PoiVqYD+ul8WJ+cy1vvcp1GCQpbRv1yXY\n"
-            + "4GB1mw0JPIinVE1q+eKKQxN38zARPqyupiIuBQaqX9NCHCAdNtFc3kJQ7Nm83YkB\n"
-            + "IAQQAQIACgUCTHqkCwMFAXgACgkQZB8Rk9JP5GfGVQgArMBVQo3AD56p4g5A+DRA\n"
-            + "h0KdQMt4hs/dl+2GLAi+nK0wwuHrHvr9kcZNiQNMtu+YiwvxMpJ/JvXRwOp4wbEx\n"
-            + "6P6Uzp18R2sqbV4agnL5tXFZXfsa3OR2NLm56Ox1ReHnZtAcC6qa1nHqt9z2sTt1\n"
-            + "vh7IfK8GDU/3M3z4XBXPpmpZPAczqujuO/yshz84O6oc3noXfRUJRklbkhNC3WyS\n"
-            + "u5+3nupq4GwIYehQQpxBTD9xXj4hl3KfUnctg/MkgUGweEK3oZ22kObTLJttTP9t\n"
-            + "9q/hLkVyDtFhGorcsYbNZyupm3xhddzYovkReePwOO4WA7VeRqRdiYDU1UjIKvv4\n"
-            + "TrkBDQRMep6aAQgA3NQtBhS8yiEGN8rT4hGtuuprVd5jQVprLz4ImcI2+Gt71+CR\n"
-            + "gv/BZ0zzFp3VPjTGRusungJYkKKOGpEpERiqEG1X/ZyL7EzoyT+iKIMDsVJgmyDN\n"
-            + "cryHTejlKA8Z6GQ1hPlOIws22oLq5zQXxD9pzMDuabHl/s/bYlU5qXc7LhxdtrmT\n"
-            + "b2uBP9a+eneWKrz8OfgtS5m9DgqJ6Bjl0TvbeVJgKHX42pqzJlBTCn3hJjJosy8x\n"
-            + "4qTbqMraENnl9y+qynM7atoHX6TPWsD7vWtWvi+FA5OWGEe3rof8o/sJSj05DQUn\n"
-            + "i8mmSiCYW/tUklPPXOvPRP0GZ/GhBzIUtE3jBwARAQABiQEfBBgBAgAJBQJMep6a\n"
-            + "AhsMAAoJENJa0Hqf0NOW/gkH/jm9FL+S53NjrthdbNjffryhp7KhTmYAsRk3Hc3X\n"
-            + "4TBj3upecarJynpvsz5HlLi/OxDRR6L2yfjKk6/2iKAbV56mdnnu5xG3TG8++naL\n"
-            + "7n/s9TGBhgknb6+vGhSMZ/1dpQ6wkiyuEmgKJo8DzHAh3k3VATHiBeSD7fNSsgtK\n"
-            + "gzK0hi53IFRFDDPYiCca+SS6/pA2zF56JWGETiIa8rSHIQaK4hNJ38vgKOZM80vQ\n"
-            + "fp+CxvJkYY71Yc94oQByaQzrXod7xnukp5SXe/N3BYTFCWoaSTRUI/THRywWwKqa\n"
-            + "rUsttYrqs/EQSy0X3kZ7CAm04uzA8csNyxapEVRvJxbrt5I=\n"
-            + "=DAMW\n"
-            + "-----END PGP PUBLIC KEY BLOCK-----\n",
-        "-----BEGIN PGP PRIVATE KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "lQOYBEx6npoBCACp0vHePNPeLzm0HM35i70bRChyZXu/ARxOHZHNbh6hWJkq5saI\n"
-            + "zuzZoaqXAr3xZwHftTULlkgoJIt40x6VCT8EBnUHTkOqoHTsFnXg2kNuhFvmn0OX\n"
-            + "7RQFlR1SGoQG4fEy6t/GlOwEknpNSIMLkbDMP2FzEkLVWtlIe2hqqawVIgqzyO3k\n"
-            + "HaQxW8gWyyTx0qeSdSi4DyFZIzdyu/aZa7sj/MhO3DB3UwubW6yE+PMcAVrJD+0d\n"
-            + "EToMT7i8Erncc+xEzuXAoQUHaQfOXV4DG5qSgVpKaLxJ/ABWUri0eMPhj0cT4iDx\n"
-            + "eNTL7cZ4h72B1uJs8byDN74PHrypNiVE+IRHABEBAAEAB/9BbaG9Bz9zd0tqjrx2\n"
-            + "u/VQR3qz1FCQXtuqZu8RMC+B5zIf2si71clf8c7ZHnfSxWZt65Ez1SMYwDeyBdje\n"
-            + "/7B1Gw3Ekk00tFxHx0GEL2NSdZE4sbynkHIp0nD4/HlIc41rmh08E405F7wiAWFn\n"
-            + "uCpfDr47SNpR/A4BxHYOvi8r9pBxn/fXiHluqYROit0Z4tfKDCvQ47k+wqVD5nOt\n"
-            + "BEbHDfEwUMibgTuJ1qPyHf6HDlSdTQSfYV8QW1/UbHWus9QikfjGfLJpX0Rv3UG+\n"
-            + "WXHmowpRDVixj74UQCYXQ/AZi/OBlcS8PRY6EZV4RLyEWlZrdzKViNLOTUbJNHvA\n"
-            + "ZAQVBADQND7CIO6z4k8e9Z8Lf4iLWP9iIbH9R7ArTZr2mX1vkwp+sk0BNQurL/BQ\n"
-            + "jUHOJZnouwkc+C3pQi/JvGvAe1fLHPA0+NKe/tcuDXMk+L1HH6XmDgKtByac41AR\n"
-            + "txxqhaECNeK9OKXAXaEvenkGFMcqQV3QMiF2q5VlmFxSSXydEwQA0M8tCowz0iZF\n"
-            + "i3fGuuZDTN3Ut4u6Uf9FiLcR4ye2Aa5ppO8vlNjObNqpHz0UqdDjB+e3O/n7BUx3\n"
-            + "A5PRZNQvcMbhgr2U3zjWvFMHS3YuxbuIaZ1Vj69vpOAGkUc98v4i0/3Lk7Lijpto\n"
-            + "n40S0eCVo+eccHA4HRvS5XSdNGHVJn0EAMzfBt3DalOlHm+PrAiZdVdp5IfbJwJv\n"
-            + "xkyI++0p4VaYTZhOxjswTs6vgv30FBmHAlx1FzoUOKLaOhxPyLgamFd9YG+ab4DK\n"
-            + "chc4TxIj3kkx3/m6JufW8DWhKyAJNZ/MW+Iqop5pUIeTbOBlNyaflK+XxjkP71rP\n"
-            + "2gZx4pjYjK5EPDy0HlRlc3R1c2VyIEEgPHRlc3RhQGV4YW1wbGUuY29tPokBOAQT\n"
-            + "AQIAIgUCTHqemgIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQ0lrQep/Q\n"
-            + "05ZxMAf+OoRzXWbGfv7kZb7xdrVyAUTAV4bUUvLoJZUIQ1ckPBcty2LUvY7l9efg\n"
-            + "p3c57nvTD6U98dVnsKfaW4PT0CRXlpl1IFyhkgbInFS5rO+cJMQn1KyC+FfiwyGN\n"
-            + "ii630SwiHyWRG5+XQ6Iptx9JELwWUMCLJxFpB8DZQKlNnvdl+YUgEeQOkWTXfTSa\n"
-            + "BATdXHiZhskiumnTOGO24jSg8CrZc5O/n6fCCgEsAFWL7fnO0ii6EW1JH5btLHPx\n"
-            + "L9QI+5DJIypgOhGI1lqZW9KrpfmJ3w6N1GekGBda98DmzxxxZ9iyq1cELAAiQMjk\n"
-            + "vws67cOs/hwXNn9YaK74dzhb49MLGJ0DmARMep6aAQgA3NQtBhS8yiEGN8rT4hGt\n"
-            + "uuprVd5jQVprLz4ImcI2+Gt71+CRgv/BZ0zzFp3VPjTGRusungJYkKKOGpEpERiq\n"
-            + "EG1X/ZyL7EzoyT+iKIMDsVJgmyDNcryHTejlKA8Z6GQ1hPlOIws22oLq5zQXxD9p\n"
-            + "zMDuabHl/s/bYlU5qXc7LhxdtrmTb2uBP9a+eneWKrz8OfgtS5m9DgqJ6Bjl0Tvb\n"
-            + "eVJgKHX42pqzJlBTCn3hJjJosy8x4qTbqMraENnl9y+qynM7atoHX6TPWsD7vWtW\n"
-            + "vi+FA5OWGEe3rof8o/sJSj05DQUni8mmSiCYW/tUklPPXOvPRP0GZ/GhBzIUtE3j\n"
-            + "BwARAQABAAf+KQOPSS3Y0oHHsd0N9VLrPWgEf3JKZPzyI1gWKNiVdRYhbjrbS8VM\n"
-            + "mm8ERxMRY/hRSyKrCdXNtS87zVtgkThPfbWRPh0xL7YpFhenena63Ng78RPqlIDH\n"
-            + "cITs6r/DRBI4jnXvOTr/+R2Pm1llgKF2ePzsSt0rpmPcjyrdBsiKSUnLGxm4tGtW\n"
-            + "wVoEjy3+MRN2ULyTO8Pe4URKTtUkkb23iuQuJZy+k+SfH+H0/3oEb8ERRE3UXNG7\n"
-            + "BIbaj71nsx8+H8+x8ffRm1s5Unn86AJ418oEhxNzQk59NnrrlJ4HH9NNbjjzI3JE\n"
-            + "intSQKhFJsvMARdzX062yartQtnm1v6jwQQA65rpMMHCoh9pxvL6yagw3WjQLEPw\n"
-            + "vOGpD9ossBvcv/SfAe7SgJsx6J6X0IIW6EKIjyRhWTIfK/rVR0cmUFTGStib+y22\n"
-            + "BPcQmt/Oiw9rdUfOmDrnosPC0SB+19tKw1v1AfW5swpJnGBCkGz9UfX4Fr/eTS3e\n"
-            + "2KaMq+r1KALSUVkEAO/x0SWOiBRH3X1ETNE9nLTP6u2W3TAvrd+dXyP7JjXWZPB8\n"
-            + "NOwT7qidvUlhTbxdR7xWNI1W924Ywwgs43cAPGyq95pjdzhvi0Xxab7124UK+MS3\n"
-            + "V4WBvjOYYW8pkdMOydRLETXSkco2mDCRTiVKe3Zi7p+lKlVJj4xrFUPUnetfBADH\n"
-            + "EPwYeeZ8sQnW644J75eoph2e5KLRJaOy5GMPRLNmq+ODtJxdoIGpfQnEA35nSlze\n"
-            + "Ea+1UvLBlWyF+p08bNfnXHp3j5ugucAYbVEs4ptUwTB3vFt7eJ8rkx9GYcuBFiwm\n"
-            + "H47rg7QmS1mWDLyX6v2pI9brsb1SCgBL+oi9CyjypkjqiQEfBBgBAgAJBQJMep6a\n"
-            + "AhsMAAoJENJa0Hqf0NOW/gkH/jm9FL+S53NjrthdbNjffryhp7KhTmYAsRk3Hc3X\n"
-            + "4TBj3upecarJynpvsz5HlLi/OxDRR6L2yfjKk6/2iKAbV56mdnnu5xG3TG8++naL\n"
-            + "7n/s9TGBhgknb6+vGhSMZ/1dpQ6wkiyuEmgKJo8DzHAh3k3VATHiBeSD7fNSsgtK\n"
-            + "gzK0hi53IFRFDDPYiCca+SS6/pA2zF56JWGETiIa8rSHIQaK4hNJ38vgKOZM80vQ\n"
-            + "fp+CxvJkYY71Yc94oQByaQzrXod7xnukp5SXe/N3BYTFCWoaSTRUI/THRywWwKqa\n"
-            + "rUsttYrqs/EQSy0X3kZ7CAm04uzA8csNyxapEVRvJxbrt5I=\n"
-            + "=FLdD\n"
-            + "-----END PGP PRIVATE KEY BLOCK-----\n");
+        """
+        -----BEGIN PGP PUBLIC KEY BLOCK-----
+        Version: GnuPG v1
+
+        mQENBEx6npoBCACp0vHePNPeLzm0HM35i70bRChyZXu/ARxOHZHNbh6hWJkq5saI
+        zuzZoaqXAr3xZwHftTULlkgoJIt40x6VCT8EBnUHTkOqoHTsFnXg2kNuhFvmn0OX
+        7RQFlR1SGoQG4fEy6t/GlOwEknpNSIMLkbDMP2FzEkLVWtlIe2hqqawVIgqzyO3k
+        HaQxW8gWyyTx0qeSdSi4DyFZIzdyu/aZa7sj/MhO3DB3UwubW6yE+PMcAVrJD+0d
+        EToMT7i8Erncc+xEzuXAoQUHaQfOXV4DG5qSgVpKaLxJ/ABWUri0eMPhj0cT4iDx
+        eNTL7cZ4h72B1uJs8byDN74PHrypNiVE+IRHABEBAAG0HlRlc3R1c2VyIEEgPHRl
+        c3RhQGV4YW1wbGUuY29tPokBOAQTAQIAIgUCTHqemgIbAwYLCQgHAwIGFQgCCQoL
+        BBYCAwECHgECF4AACgkQ0lrQep/Q05ZxMAf+OoRzXWbGfv7kZb7xdrVyAUTAV4bU
+        UvLoJZUIQ1ckPBcty2LUvY7l9efgp3c57nvTD6U98dVnsKfaW4PT0CRXlpl1IFyh
+        kgbInFS5rO+cJMQn1KyC+FfiwyGNii630SwiHyWRG5+XQ6Iptx9JELwWUMCLJxFp
+        B8DZQKlNnvdl+YUgEeQOkWTXfTSaBATdXHiZhskiumnTOGO24jSg8CrZc5O/n6fC
+        CgEsAFWL7fnO0ii6EW1JH5btLHPxL9QI+5DJIypgOhGI1lqZW9KrpfmJ3w6N1Gek
+        GBda98DmzxxxZ9iyq1cELAAiQMjkvws67cOs/hwXNn9YaK74dzhb49MLGIkBIAQQ
+        AQIACgUCTHqf0QMFAXgACgkQV2Bph7AH1JCO/Qf+PBJqeWS7p32+K5r1cA7AeCB2
+        pcHs78wLjnSxuimf0l+JItb9JQAKjzcdZTKVGkUivkq3zhsPCCtssgSav2wlG59F
+        TaqtpGOxvGjc8TKWHW1TrPhV86wh0yUempKTMWfdZ0RAJVG3krAj60bzUsQNK41/
+        0EZi4JI+sm/TRlwQcmEzdaGxhFSJqiJyaBWbPL8AQNA2iRyjMKNeGCrgapEl2IkW
+        2ST+/yUPI/485LS0uU1+TLB+NhiJ6j5PoiVqYD+ul8WJ+cy1vvcp1GCQpbRv1yXY
+        4GB1mw0JPIinVE1q+eKKQxN38zARPqyupiIuBQaqX9NCHCAdNtFc3kJQ7Nm83YkB
+        IAQQAQIACgUCTHqkCwMFAXgACgkQZB8Rk9JP5GfGVQgArMBVQo3AD56p4g5A+DRA
+        h0KdQMt4hs/dl+2GLAi+nK0wwuHrHvr9kcZNiQNMtu+YiwvxMpJ/JvXRwOp4wbEx
+        6P6Uzp18R2sqbV4agnL5tXFZXfsa3OR2NLm56Ox1ReHnZtAcC6qa1nHqt9z2sTt1
+        vh7IfK8GDU/3M3z4XBXPpmpZPAczqujuO/yshz84O6oc3noXfRUJRklbkhNC3WyS
+        u5+3nupq4GwIYehQQpxBTD9xXj4hl3KfUnctg/MkgUGweEK3oZ22kObTLJttTP9t
+        9q/hLkVyDtFhGorcsYbNZyupm3xhddzYovkReePwOO4WA7VeRqRdiYDU1UjIKvv4
+        TrkBDQRMep6aAQgA3NQtBhS8yiEGN8rT4hGtuuprVd5jQVprLz4ImcI2+Gt71+CR
+        gv/BZ0zzFp3VPjTGRusungJYkKKOGpEpERiqEG1X/ZyL7EzoyT+iKIMDsVJgmyDN
+        cryHTejlKA8Z6GQ1hPlOIws22oLq5zQXxD9pzMDuabHl/s/bYlU5qXc7LhxdtrmT
+        b2uBP9a+eneWKrz8OfgtS5m9DgqJ6Bjl0TvbeVJgKHX42pqzJlBTCn3hJjJosy8x
+        4qTbqMraENnl9y+qynM7atoHX6TPWsD7vWtWvi+FA5OWGEe3rof8o/sJSj05DQUn
+        i8mmSiCYW/tUklPPXOvPRP0GZ/GhBzIUtE3jBwARAQABiQEfBBgBAgAJBQJMep6a
+        AhsMAAoJENJa0Hqf0NOW/gkH/jm9FL+S53NjrthdbNjffryhp7KhTmYAsRk3Hc3X
+        4TBj3upecarJynpvsz5HlLi/OxDRR6L2yfjKk6/2iKAbV56mdnnu5xG3TG8++naL
+        7n/s9TGBhgknb6+vGhSMZ/1dpQ6wkiyuEmgKJo8DzHAh3k3VATHiBeSD7fNSsgtK
+        gzK0hi53IFRFDDPYiCca+SS6/pA2zF56JWGETiIa8rSHIQaK4hNJ38vgKOZM80vQ
+        fp+CxvJkYY71Yc94oQByaQzrXod7xnukp5SXe/N3BYTFCWoaSTRUI/THRywWwKqa
+        rUsttYrqs/EQSy0X3kZ7CAm04uzA8csNyxapEVRvJxbrt5I=
+        =DAMW
+        -----END PGP PUBLIC KEY BLOCK-----
+        """,
+        """
+        -----BEGIN PGP PRIVATE KEY BLOCK-----
+        Version: GnuPG v1
+
+        lQOYBEx6npoBCACp0vHePNPeLzm0HM35i70bRChyZXu/ARxOHZHNbh6hWJkq5saI
+        zuzZoaqXAr3xZwHftTULlkgoJIt40x6VCT8EBnUHTkOqoHTsFnXg2kNuhFvmn0OX
+        7RQFlR1SGoQG4fEy6t/GlOwEknpNSIMLkbDMP2FzEkLVWtlIe2hqqawVIgqzyO3k
+        HaQxW8gWyyTx0qeSdSi4DyFZIzdyu/aZa7sj/MhO3DB3UwubW6yE+PMcAVrJD+0d
+        EToMT7i8Erncc+xEzuXAoQUHaQfOXV4DG5qSgVpKaLxJ/ABWUri0eMPhj0cT4iDx
+        eNTL7cZ4h72B1uJs8byDN74PHrypNiVE+IRHABEBAAEAB/9BbaG9Bz9zd0tqjrx2
+        u/VQR3qz1FCQXtuqZu8RMC+B5zIf2si71clf8c7ZHnfSxWZt65Ez1SMYwDeyBdje
+        /7B1Gw3Ekk00tFxHx0GEL2NSdZE4sbynkHIp0nD4/HlIc41rmh08E405F7wiAWFn
+        uCpfDr47SNpR/A4BxHYOvi8r9pBxn/fXiHluqYROit0Z4tfKDCvQ47k+wqVD5nOt
+        BEbHDfEwUMibgTuJ1qPyHf6HDlSdTQSfYV8QW1/UbHWus9QikfjGfLJpX0Rv3UG+
+        WXHmowpRDVixj74UQCYXQ/AZi/OBlcS8PRY6EZV4RLyEWlZrdzKViNLOTUbJNHvA
+        ZAQVBADQND7CIO6z4k8e9Z8Lf4iLWP9iIbH9R7ArTZr2mX1vkwp+sk0BNQurL/BQ
+        jUHOJZnouwkc+C3pQi/JvGvAe1fLHPA0+NKe/tcuDXMk+L1HH6XmDgKtByac41AR
+        txxqhaECNeK9OKXAXaEvenkGFMcqQV3QMiF2q5VlmFxSSXydEwQA0M8tCowz0iZF
+        i3fGuuZDTN3Ut4u6Uf9FiLcR4ye2Aa5ppO8vlNjObNqpHz0UqdDjB+e3O/n7BUx3
+        A5PRZNQvcMbhgr2U3zjWvFMHS3YuxbuIaZ1Vj69vpOAGkUc98v4i0/3Lk7Lijpto
+        n40S0eCVo+eccHA4HRvS5XSdNGHVJn0EAMzfBt3DalOlHm+PrAiZdVdp5IfbJwJv
+        xkyI++0p4VaYTZhOxjswTs6vgv30FBmHAlx1FzoUOKLaOhxPyLgamFd9YG+ab4DK
+        chc4TxIj3kkx3/m6JufW8DWhKyAJNZ/MW+Iqop5pUIeTbOBlNyaflK+XxjkP71rP
+        2gZx4pjYjK5EPDy0HlRlc3R1c2VyIEEgPHRlc3RhQGV4YW1wbGUuY29tPokBOAQT
+        AQIAIgUCTHqemgIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQ0lrQep/Q
+        05ZxMAf+OoRzXWbGfv7kZb7xdrVyAUTAV4bUUvLoJZUIQ1ckPBcty2LUvY7l9efg
+        p3c57nvTD6U98dVnsKfaW4PT0CRXlpl1IFyhkgbInFS5rO+cJMQn1KyC+FfiwyGN
+        ii630SwiHyWRG5+XQ6Iptx9JELwWUMCLJxFpB8DZQKlNnvdl+YUgEeQOkWTXfTSa
+        BATdXHiZhskiumnTOGO24jSg8CrZc5O/n6fCCgEsAFWL7fnO0ii6EW1JH5btLHPx
+        L9QI+5DJIypgOhGI1lqZW9KrpfmJ3w6N1GekGBda98DmzxxxZ9iyq1cELAAiQMjk
+        vws67cOs/hwXNn9YaK74dzhb49MLGJ0DmARMep6aAQgA3NQtBhS8yiEGN8rT4hGt
+        uuprVd5jQVprLz4ImcI2+Gt71+CRgv/BZ0zzFp3VPjTGRusungJYkKKOGpEpERiq
+        EG1X/ZyL7EzoyT+iKIMDsVJgmyDNcryHTejlKA8Z6GQ1hPlOIws22oLq5zQXxD9p
+        zMDuabHl/s/bYlU5qXc7LhxdtrmTb2uBP9a+eneWKrz8OfgtS5m9DgqJ6Bjl0Tvb
+        eVJgKHX42pqzJlBTCn3hJjJosy8x4qTbqMraENnl9y+qynM7atoHX6TPWsD7vWtW
+        vi+FA5OWGEe3rof8o/sJSj05DQUni8mmSiCYW/tUklPPXOvPRP0GZ/GhBzIUtE3j
+        BwARAQABAAf+KQOPSS3Y0oHHsd0N9VLrPWgEf3JKZPzyI1gWKNiVdRYhbjrbS8VM
+        mm8ERxMRY/hRSyKrCdXNtS87zVtgkThPfbWRPh0xL7YpFhenena63Ng78RPqlIDH
+        cITs6r/DRBI4jnXvOTr/+R2Pm1llgKF2ePzsSt0rpmPcjyrdBsiKSUnLGxm4tGtW
+        wVoEjy3+MRN2ULyTO8Pe4URKTtUkkb23iuQuJZy+k+SfH+H0/3oEb8ERRE3UXNG7
+        BIbaj71nsx8+H8+x8ffRm1s5Unn86AJ418oEhxNzQk59NnrrlJ4HH9NNbjjzI3JE
+        intSQKhFJsvMARdzX062yartQtnm1v6jwQQA65rpMMHCoh9pxvL6yagw3WjQLEPw
+        vOGpD9ossBvcv/SfAe7SgJsx6J6X0IIW6EKIjyRhWTIfK/rVR0cmUFTGStib+y22
+        BPcQmt/Oiw9rdUfOmDrnosPC0SB+19tKw1v1AfW5swpJnGBCkGz9UfX4Fr/eTS3e
+        2KaMq+r1KALSUVkEAO/x0SWOiBRH3X1ETNE9nLTP6u2W3TAvrd+dXyP7JjXWZPB8
+        NOwT7qidvUlhTbxdR7xWNI1W924Ywwgs43cAPGyq95pjdzhvi0Xxab7124UK+MS3
+        V4WBvjOYYW8pkdMOydRLETXSkco2mDCRTiVKe3Zi7p+lKlVJj4xrFUPUnetfBADH
+        EPwYeeZ8sQnW644J75eoph2e5KLRJaOy5GMPRLNmq+ODtJxdoIGpfQnEA35nSlze
+        Ea+1UvLBlWyF+p08bNfnXHp3j5ugucAYbVEs4ptUwTB3vFt7eJ8rkx9GYcuBFiwm
+        H47rg7QmS1mWDLyX6v2pI9brsb1SCgBL+oi9CyjypkjqiQEfBBgBAgAJBQJMep6a
+        AhsMAAoJENJa0Hqf0NOW/gkH/jm9FL+S53NjrthdbNjffryhp7KhTmYAsRk3Hc3X
+        4TBj3upecarJynpvsz5HlLi/OxDRR6L2yfjKk6/2iKAbV56mdnnu5xG3TG8++naL
+        7n/s9TGBhgknb6+vGhSMZ/1dpQ6wkiyuEmgKJo8DzHAh3k3VATHiBeSD7fNSsgtK
+        gzK0hi53IFRFDDPYiCca+SS6/pA2zF56JWGETiIa8rSHIQaK4hNJ38vgKOZM80vQ
+        fp+CxvJkYY71Yc94oQByaQzrXod7xnukp5SXe/N3BYTFCWoaSTRUI/THRywWwKqa
+        rUsttYrqs/EQSy0X3kZ7CAm04uzA8csNyxapEVRvJxbrt5I=
+        =FLdD
+        -----END PGP PRIVATE KEY BLOCK-----
+        """);
   }
 
   /**
@@ -150,93 +154,97 @@
    */
   public static TestKey keyB() throws Exception {
     return new TestKey(
-        "-----BEGIN PGP PUBLIC KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "mQENBEx6ntMBCADG7j/nuI+VvvNbPY9nnfLrAc3KTj0Z+DMxxUMYoZNLjTw1szQ0\n"
-            + "PuKKACiiSA9Oyj4R0aIhWdIR9iYxp6gQdje3yewzoqMwE+t5onYDpdX9QDFXyEzF\n"
-            + "UPWCjA7OSji1G6fyWakiYxKseqyRXOdHXI5TqMikBalmSpwwvmik0cfRGO+l6qvM\n"
-            + "mVJlcn6mkZB0d8WOPV8j8rFxmVSPn9SVP9L8HaFWv1uI9EY3zXbfNeDNgNeTWIMY\n"
-            + "75saINBA2LALBQ54u52GoSbaR8ukZYAjjkif3WIFI8B9xREwjUBLFy3E357aGyLZ\n"
-            + "jE8nsmPk4MDxDaeDNoSHJjcxtDWQJBub3u1zABEBAAG0HlRlc3R1c2VyIEIgPHRl\n"
-            + "c3RiQGV4YW1wbGUuY29tPokBPgQTAQIAKAUCTHqe0wIbAwUJAeEzgAYLCQgHAwIG\n"
-            + "FQgCCQoLBBYCAwECHgECF4AACgkQV2Bph7AH1JD0nQf/Vm+/Mvl99/y3Qw10S6et\n"
-            + "H6NYWDUeAKXe9mfXBJ39HdtlF50jZ5NzSwksAOSQtQZJ3tQQeElXB29cZDvAscva\n"
-            + "RiTtt+KUxDZSYbEHrC0EO7w0Wi5ltwaWdXnoitMOgPZ/grL7UpUbL8rB1evfLbhm\n"
-            + "AqC/6kgHuXeY/7EAzwU3o0wKbmfx1sh8AyQSi4unUwIDCV1RIAP0+ZfJSg0WwGoS\n"
-            + "JB5+lKajtIE6kMn9m8CWM66/zxSCY3XLcoXvjVxCYPwwgYSyje8dDxxOI+x7uj2I\n"
-            + "IjM5RHQ9hTsR7NQ9JUTFmpKZlcdah93NZLKJAFLUtOPjMa5d5t2O0ZOxZ5ftlhHp\n"
-            + "Q7kBDQRMep7TAQgAwOuLBXnACIsd879ld/vLcn8umpKV8MIUjrqOMjR0rNKpCUDw\n"
-            + "LxL4uVh3q/ksESHnQPPqxFYkgeA66SYrx4jwZjbZ5vv9BW99LHe8lSahqrJA9A9g\n"
-            + "5iw5hH+2ZWrGlu3P65UdQUJW+JaDx1IIBt3BbmdGDuKF/ESsy9qxEKq7tKqHI2JL\n"
-            + "Ed+6OIwWblU7ZogfiNpgZJ0lapxTe84mGsD0TowGTu5re/8wIJf1f2q4PuG+L9OZ\n"
-            + "0ZD5i9s1MAxdw4OD+705owPCQnqsr18nH9aUBHWJn9NCXb3jL7QGaId84Yq8SRlK\n"
-            + "wHSRtHLLJoowJ5fXw5UbZcUtRUergxFRwae87wARAQABiQElBBgBAgAPBQJMep7T\n"
-            + "AhsMBQkB4TOAAAoJEFdgaYewB9SQMbsH/iu1HY7OMJxd8EkfxairRNec/v9uEvYQ\n"
-            + "XqfEPw/Hihdef1TY8vB69ymAPd89e1PRDj1m+0/RivO045qFP7lbWMkjKeR9dXXe\n"
-            + "UzIEsTUJ1CNnA7C3fo11NBVg59E0d84bMKQx7n4AZkljgKFKghUb6OJZiWRdh+8W\n"
-            + "0I95JI2R7nMYw3L8/sSGxt+Vjhs9acB1DldbyYbJitYA4fhVZQH9zgeuhQqdCULQ\n"
-            + "ZexpkQqvG0o4iJKO4yeJNHdeM+NwH38wXfzydtEv6Dxz/YZSTwt08p97l6DQ//H7\n"
-            + "wek1LcqeX47YFa9Ftns8Y8fjh4S8Kyi1F6BhZKbsdDqg2hA+0AFv7LA=\n"
-            + "=tmW1\n"
-            + "-----END PGP PUBLIC KEY BLOCK-----\n",
-        "-----BEGIN PGP PRIVATE KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "lQOYBEx6ntMBCADG7j/nuI+VvvNbPY9nnfLrAc3KTj0Z+DMxxUMYoZNLjTw1szQ0\n"
-            + "PuKKACiiSA9Oyj4R0aIhWdIR9iYxp6gQdje3yewzoqMwE+t5onYDpdX9QDFXyEzF\n"
-            + "UPWCjA7OSji1G6fyWakiYxKseqyRXOdHXI5TqMikBalmSpwwvmik0cfRGO+l6qvM\n"
-            + "mVJlcn6mkZB0d8WOPV8j8rFxmVSPn9SVP9L8HaFWv1uI9EY3zXbfNeDNgNeTWIMY\n"
-            + "75saINBA2LALBQ54u52GoSbaR8ukZYAjjkif3WIFI8B9xREwjUBLFy3E357aGyLZ\n"
-            + "jE8nsmPk4MDxDaeDNoSHJjcxtDWQJBub3u1zABEBAAEAB/wPPV1Om92pc9F3jJsZ\n"
-            + "2F3YZxukLfjnA76tnMEWd/pYGrUhdV3AdY4r/aB0njSeApxdXRlLQ3L2cUxdGCJQ\n"
-            + "mzM1ies7IXCC/w5WaShwAG+zpmFL/5+cq3vDc9tb2Q/IasVOVFQYEE2el7SfW5Cp\n"
-            + "mjZFGR8V1wvdNvC0Q0IHrmfdECYSeftzZBEj7CcoGc2pF5zpCG0XQxq7K6cEeSf5\n"
-            + "TKf//UVHgyBCIso6mzgP5k6DGw2d64843CPhhlHEbirUu/wNnbm1SqJ5xFL2VatH\n"
-            + "w7ij4V/hbgnP0GQkbY5+p/PU74P7fx/Ee8D8mF2HmEKRy6ZQY/SAnrjsAURBYR5S\n"
-            + "GF5RBADfhOYEgseWr81lq6Y1oM4YQz+pXRIZk34BagOJsL767B7+uwhvmxBJKIOS\n"
-            + "nRIxfV8GlvT22hrbqsRRyusoIlo2ZUat94IMAL6Oqm6VFm71PT3z9+ukWK43FIXf\n"
-            + "Bsz4swSV001398e3jpSizI6fGW7LRxvnua+NPN+xJLmDVcsPvwQA49ajm48NorD9\n"
-            + "bIWG87+2ScNTVOnHKryR+/LrGWA0f3G6LUsHZPKHNBdFZ4yza2QtEKw95L3K9D4y\n"
-            + "jIeKGwSRYJPb5oh5tSge58pxwP88eI9J4dL+XF1nsG0vYF9B41+qG1TCsPyUJTp6\n"
-            + "ry7NAgWrbpsZpjB0yJ1kFva3iS/hD00EAMu66p1CtsosoDHhekvRZp8a3svd+8uf\n"
-            + "YEKkEKXZuNNmJJktJBSA2FK1RKl9bV8wuG0Pi1/k39egLO3QTjruWUbSggT+aibR\n"
-            + "RW3hU7G+Z5IBOU3p+kTFLat6+TBg0XhCjJ+Eq366nZy1QIfqTCixIaDwrutZd6DC\n"
-            + "BXOjdoG6ZvLcQia0HlRlc3R1c2VyIEIgPHRlc3RiQGV4YW1wbGUuY29tPokBPgQT\n"
-            + "AQIAKAUCTHqe0wIbAwUJAeEzgAYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQ\n"
-            + "V2Bph7AH1JD0nQf/Vm+/Mvl99/y3Qw10S6etH6NYWDUeAKXe9mfXBJ39HdtlF50j\n"
-            + "Z5NzSwksAOSQtQZJ3tQQeElXB29cZDvAscvaRiTtt+KUxDZSYbEHrC0EO7w0Wi5l\n"
-            + "twaWdXnoitMOgPZ/grL7UpUbL8rB1evfLbhmAqC/6kgHuXeY/7EAzwU3o0wKbmfx\n"
-            + "1sh8AyQSi4unUwIDCV1RIAP0+ZfJSg0WwGoSJB5+lKajtIE6kMn9m8CWM66/zxSC\n"
-            + "Y3XLcoXvjVxCYPwwgYSyje8dDxxOI+x7uj2IIjM5RHQ9hTsR7NQ9JUTFmpKZlcda\n"
-            + "h93NZLKJAFLUtOPjMa5d5t2O0ZOxZ5ftlhHpQ50DmARMep7TAQgAwOuLBXnACIsd\n"
-            + "879ld/vLcn8umpKV8MIUjrqOMjR0rNKpCUDwLxL4uVh3q/ksESHnQPPqxFYkgeA6\n"
-            + "6SYrx4jwZjbZ5vv9BW99LHe8lSahqrJA9A9g5iw5hH+2ZWrGlu3P65UdQUJW+JaD\n"
-            + "x1IIBt3BbmdGDuKF/ESsy9qxEKq7tKqHI2JLEd+6OIwWblU7ZogfiNpgZJ0lapxT\n"
-            + "e84mGsD0TowGTu5re/8wIJf1f2q4PuG+L9OZ0ZD5i9s1MAxdw4OD+705owPCQnqs\n"
-            + "r18nH9aUBHWJn9NCXb3jL7QGaId84Yq8SRlKwHSRtHLLJoowJ5fXw5UbZcUtRUer\n"
-            + "gxFRwae87wARAQABAAf8DAVBKsyswfuFGMB2vpSiVxaEnV3/2LoHFOOb45XwJSqV\n"
-            + "HL3+mThJ5iaUglMqw0CFC7+HA8fIS41grlFSDgNC02OcjS9rUxDg0En/pp17Gks0\n"
-            + "D+D7bSwZQ1+/yi7ug836lBe89GmBSMj8GgnK9T6RBGOL8nZ72b2ftK4CNWMmAfo4\n"
-            + "NZUy+rnnziV5WoYrkFZhl3dMMd3nITILBy9eYUoiKJl8O1b8amhrNkB/PEMAV7jc\n"
-            + "260XEQ9fgzMMe5/oT8pzIOGyrB+QO5rMu9pGVJ1qeMzTiZjjHXE2CEaEbvEk0F4l\n"
-            + "6w2gp5C6O5GoMpCOPwCy7dOYX5ETdO4Ppjnrob2XEQQAwus5q+EFoBVG8vfEf56x\n"
-            + "czkC15+0VcMe/IM8l/ur/oF1NUlAnPCq7WfgdELvGNszW7R+A625yXJJf7LJE/y/\n"
-            + "5GUGHAK60FUa0ElbVEn0A6kDcvll0dM6rKPQvFguaFpBKXre6k17cdOrf9hasfJk\n"
-            + "+lzaHlh9hJgoM30pAwG4+n8EAP1f+TEkEfVFo4Uy84eO6xVkYVndopDU1gCpfW1a\n"
-            + "84SA2PNjU3vkdIoFsEvOmf1xlfYeDYn37dikFPEZDsHBUzELDMewAXRgmVvnMJrj\n"
-            + "8Zq4FbEQSVjyz3qJOGk5V999qqoVMRXdnlQs5IXgZauPsnIqi5TRQZOMhbaiOVBO\n"
-            + "kqWRBAC9FhxypA3t9j1zGTFDppWmcBxpVzGGsgmzGO+WTVyk6szbZgTsf2+R+gTJ\n"
-            + "ZKVVzE6Mu+iZmPbrn/x7LWzKJuavRz0xSrvCYbIxYyheFz5LOPFHLF181h1g79gY\n"
-            + "E5Tz7uwu3jIldM7rY5RhxS6V5GGDVSfA+/Dsk6Iaujs6Hs7y30C0iQElBBgBAgAP\n"
-            + "BQJMep7TAhsMBQkB4TOAAAoJEFdgaYewB9SQMbsH/iu1HY7OMJxd8EkfxairRNec\n"
-            + "/v9uEvYQXqfEPw/Hihdef1TY8vB69ymAPd89e1PRDj1m+0/RivO045qFP7lbWMkj\n"
-            + "KeR9dXXeUzIEsTUJ1CNnA7C3fo11NBVg59E0d84bMKQx7n4AZkljgKFKghUb6OJZ\n"
-            + "iWRdh+8W0I95JI2R7nMYw3L8/sSGxt+Vjhs9acB1DldbyYbJitYA4fhVZQH9zgeu\n"
-            + "hQqdCULQZexpkQqvG0o4iJKO4yeJNHdeM+NwH38wXfzydtEv6Dxz/YZSTwt08p97\n"
-            + "l6DQ//H7wek1LcqeX47YFa9Ftns8Y8fjh4S8Kyi1F6BhZKbsdDqg2hA+0AFv7LA=\n"
-            + "=uFLT\n"
-            + "-----END PGP PRIVATE KEY BLOCK-----\n");
+        """
+        -----BEGIN PGP PUBLIC KEY BLOCK-----
+        Version: GnuPG v1
+
+        mQENBEx6ntMBCADG7j/nuI+VvvNbPY9nnfLrAc3KTj0Z+DMxxUMYoZNLjTw1szQ0
+        PuKKACiiSA9Oyj4R0aIhWdIR9iYxp6gQdje3yewzoqMwE+t5onYDpdX9QDFXyEzF
+        UPWCjA7OSji1G6fyWakiYxKseqyRXOdHXI5TqMikBalmSpwwvmik0cfRGO+l6qvM
+        mVJlcn6mkZB0d8WOPV8j8rFxmVSPn9SVP9L8HaFWv1uI9EY3zXbfNeDNgNeTWIMY
+        75saINBA2LALBQ54u52GoSbaR8ukZYAjjkif3WIFI8B9xREwjUBLFy3E357aGyLZ
+        jE8nsmPk4MDxDaeDNoSHJjcxtDWQJBub3u1zABEBAAG0HlRlc3R1c2VyIEIgPHRl
+        c3RiQGV4YW1wbGUuY29tPokBPgQTAQIAKAUCTHqe0wIbAwUJAeEzgAYLCQgHAwIG
+        FQgCCQoLBBYCAwECHgECF4AACgkQV2Bph7AH1JD0nQf/Vm+/Mvl99/y3Qw10S6et
+        H6NYWDUeAKXe9mfXBJ39HdtlF50jZ5NzSwksAOSQtQZJ3tQQeElXB29cZDvAscva
+        RiTtt+KUxDZSYbEHrC0EO7w0Wi5ltwaWdXnoitMOgPZ/grL7UpUbL8rB1evfLbhm
+        AqC/6kgHuXeY/7EAzwU3o0wKbmfx1sh8AyQSi4unUwIDCV1RIAP0+ZfJSg0WwGoS
+        JB5+lKajtIE6kMn9m8CWM66/zxSCY3XLcoXvjVxCYPwwgYSyje8dDxxOI+x7uj2I
+        IjM5RHQ9hTsR7NQ9JUTFmpKZlcdah93NZLKJAFLUtOPjMa5d5t2O0ZOxZ5ftlhHp
+        Q7kBDQRMep7TAQgAwOuLBXnACIsd879ld/vLcn8umpKV8MIUjrqOMjR0rNKpCUDw
+        LxL4uVh3q/ksESHnQPPqxFYkgeA66SYrx4jwZjbZ5vv9BW99LHe8lSahqrJA9A9g
+        5iw5hH+2ZWrGlu3P65UdQUJW+JaDx1IIBt3BbmdGDuKF/ESsy9qxEKq7tKqHI2JL
+        Ed+6OIwWblU7ZogfiNpgZJ0lapxTe84mGsD0TowGTu5re/8wIJf1f2q4PuG+L9OZ
+        0ZD5i9s1MAxdw4OD+705owPCQnqsr18nH9aUBHWJn9NCXb3jL7QGaId84Yq8SRlK
+        wHSRtHLLJoowJ5fXw5UbZcUtRUergxFRwae87wARAQABiQElBBgBAgAPBQJMep7T
+        AhsMBQkB4TOAAAoJEFdgaYewB9SQMbsH/iu1HY7OMJxd8EkfxairRNec/v9uEvYQ
+        XqfEPw/Hihdef1TY8vB69ymAPd89e1PRDj1m+0/RivO045qFP7lbWMkjKeR9dXXe
+        UzIEsTUJ1CNnA7C3fo11NBVg59E0d84bMKQx7n4AZkljgKFKghUb6OJZiWRdh+8W
+        0I95JI2R7nMYw3L8/sSGxt+Vjhs9acB1DldbyYbJitYA4fhVZQH9zgeuhQqdCULQ
+        ZexpkQqvG0o4iJKO4yeJNHdeM+NwH38wXfzydtEv6Dxz/YZSTwt08p97l6DQ//H7
+        wek1LcqeX47YFa9Ftns8Y8fjh4S8Kyi1F6BhZKbsdDqg2hA+0AFv7LA=
+        =tmW1
+        -----END PGP PUBLIC KEY BLOCK-----
+        """,
+        """
+        -----BEGIN PGP PRIVATE KEY BLOCK-----
+        Version: GnuPG v1
+
+        lQOYBEx6ntMBCADG7j/nuI+VvvNbPY9nnfLrAc3KTj0Z+DMxxUMYoZNLjTw1szQ0
+        PuKKACiiSA9Oyj4R0aIhWdIR9iYxp6gQdje3yewzoqMwE+t5onYDpdX9QDFXyEzF
+        UPWCjA7OSji1G6fyWakiYxKseqyRXOdHXI5TqMikBalmSpwwvmik0cfRGO+l6qvM
+        mVJlcn6mkZB0d8WOPV8j8rFxmVSPn9SVP9L8HaFWv1uI9EY3zXbfNeDNgNeTWIMY
+        75saINBA2LALBQ54u52GoSbaR8ukZYAjjkif3WIFI8B9xREwjUBLFy3E357aGyLZ
+        jE8nsmPk4MDxDaeDNoSHJjcxtDWQJBub3u1zABEBAAEAB/wPPV1Om92pc9F3jJsZ
+        2F3YZxukLfjnA76tnMEWd/pYGrUhdV3AdY4r/aB0njSeApxdXRlLQ3L2cUxdGCJQ
+        mzM1ies7IXCC/w5WaShwAG+zpmFL/5+cq3vDc9tb2Q/IasVOVFQYEE2el7SfW5Cp
+        mjZFGR8V1wvdNvC0Q0IHrmfdECYSeftzZBEj7CcoGc2pF5zpCG0XQxq7K6cEeSf5
+        TKf//UVHgyBCIso6mzgP5k6DGw2d64843CPhhlHEbirUu/wNnbm1SqJ5xFL2VatH
+        w7ij4V/hbgnP0GQkbY5+p/PU74P7fx/Ee8D8mF2HmEKRy6ZQY/SAnrjsAURBYR5S
+        GF5RBADfhOYEgseWr81lq6Y1oM4YQz+pXRIZk34BagOJsL767B7+uwhvmxBJKIOS
+        nRIxfV8GlvT22hrbqsRRyusoIlo2ZUat94IMAL6Oqm6VFm71PT3z9+ukWK43FIXf
+        Bsz4swSV001398e3jpSizI6fGW7LRxvnua+NPN+xJLmDVcsPvwQA49ajm48NorD9
+        bIWG87+2ScNTVOnHKryR+/LrGWA0f3G6LUsHZPKHNBdFZ4yza2QtEKw95L3K9D4y
+        jIeKGwSRYJPb5oh5tSge58pxwP88eI9J4dL+XF1nsG0vYF9B41+qG1TCsPyUJTp6
+        ry7NAgWrbpsZpjB0yJ1kFva3iS/hD00EAMu66p1CtsosoDHhekvRZp8a3svd+8uf
+        YEKkEKXZuNNmJJktJBSA2FK1RKl9bV8wuG0Pi1/k39egLO3QTjruWUbSggT+aibR
+        RW3hU7G+Z5IBOU3p+kTFLat6+TBg0XhCjJ+Eq366nZy1QIfqTCixIaDwrutZd6DC
+        BXOjdoG6ZvLcQia0HlRlc3R1c2VyIEIgPHRlc3RiQGV4YW1wbGUuY29tPokBPgQT
+        AQIAKAUCTHqe0wIbAwUJAeEzgAYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQ
+        V2Bph7AH1JD0nQf/Vm+/Mvl99/y3Qw10S6etH6NYWDUeAKXe9mfXBJ39HdtlF50j
+        Z5NzSwksAOSQtQZJ3tQQeElXB29cZDvAscvaRiTtt+KUxDZSYbEHrC0EO7w0Wi5l
+        twaWdXnoitMOgPZ/grL7UpUbL8rB1evfLbhmAqC/6kgHuXeY/7EAzwU3o0wKbmfx
+        1sh8AyQSi4unUwIDCV1RIAP0+ZfJSg0WwGoSJB5+lKajtIE6kMn9m8CWM66/zxSC
+        Y3XLcoXvjVxCYPwwgYSyje8dDxxOI+x7uj2IIjM5RHQ9hTsR7NQ9JUTFmpKZlcda
+        h93NZLKJAFLUtOPjMa5d5t2O0ZOxZ5ftlhHpQ50DmARMep7TAQgAwOuLBXnACIsd
+        879ld/vLcn8umpKV8MIUjrqOMjR0rNKpCUDwLxL4uVh3q/ksESHnQPPqxFYkgeA6
+        6SYrx4jwZjbZ5vv9BW99LHe8lSahqrJA9A9g5iw5hH+2ZWrGlu3P65UdQUJW+JaD
+        x1IIBt3BbmdGDuKF/ESsy9qxEKq7tKqHI2JLEd+6OIwWblU7ZogfiNpgZJ0lapxT
+        e84mGsD0TowGTu5re/8wIJf1f2q4PuG+L9OZ0ZD5i9s1MAxdw4OD+705owPCQnqs
+        r18nH9aUBHWJn9NCXb3jL7QGaId84Yq8SRlKwHSRtHLLJoowJ5fXw5UbZcUtRUer
+        gxFRwae87wARAQABAAf8DAVBKsyswfuFGMB2vpSiVxaEnV3/2LoHFOOb45XwJSqV
+        HL3+mThJ5iaUglMqw0CFC7+HA8fIS41grlFSDgNC02OcjS9rUxDg0En/pp17Gks0
+        D+D7bSwZQ1+/yi7ug836lBe89GmBSMj8GgnK9T6RBGOL8nZ72b2ftK4CNWMmAfo4
+        NZUy+rnnziV5WoYrkFZhl3dMMd3nITILBy9eYUoiKJl8O1b8amhrNkB/PEMAV7jc
+        260XEQ9fgzMMe5/oT8pzIOGyrB+QO5rMu9pGVJ1qeMzTiZjjHXE2CEaEbvEk0F4l
+        6w2gp5C6O5GoMpCOPwCy7dOYX5ETdO4Ppjnrob2XEQQAwus5q+EFoBVG8vfEf56x
+        czkC15+0VcMe/IM8l/ur/oF1NUlAnPCq7WfgdELvGNszW7R+A625yXJJf7LJE/y/
+        5GUGHAK60FUa0ElbVEn0A6kDcvll0dM6rKPQvFguaFpBKXre6k17cdOrf9hasfJk
+        +lzaHlh9hJgoM30pAwG4+n8EAP1f+TEkEfVFo4Uy84eO6xVkYVndopDU1gCpfW1a
+        84SA2PNjU3vkdIoFsEvOmf1xlfYeDYn37dikFPEZDsHBUzELDMewAXRgmVvnMJrj
+        8Zq4FbEQSVjyz3qJOGk5V999qqoVMRXdnlQs5IXgZauPsnIqi5TRQZOMhbaiOVBO
+        kqWRBAC9FhxypA3t9j1zGTFDppWmcBxpVzGGsgmzGO+WTVyk6szbZgTsf2+R+gTJ
+        ZKVVzE6Mu+iZmPbrn/x7LWzKJuavRz0xSrvCYbIxYyheFz5LOPFHLF181h1g79gY
+        E5Tz7uwu3jIldM7rY5RhxS6V5GGDVSfA+/Dsk6Iaujs6Hs7y30C0iQElBBgBAgAP
+        BQJMep7TAhsMBQkB4TOAAAoJEFdgaYewB9SQMbsH/iu1HY7OMJxd8EkfxairRNec
+        /v9uEvYQXqfEPw/Hihdef1TY8vB69ymAPd89e1PRDj1m+0/RivO045qFP7lbWMkj
+        KeR9dXXeUzIEsTUJ1CNnA7C3fo11NBVg59E0d84bMKQx7n4AZkljgKFKghUb6OJZ
+        iWRdh+8W0I95JI2R7nMYw3L8/sSGxt+Vjhs9acB1DldbyYbJitYA4fhVZQH9zgeu
+        hQqdCULQZexpkQqvG0o4iJKO4yeJNHdeM+NwH38wXfzydtEv6Dxz/YZSTwt08p97
+        l6DQ//H7wek1LcqeX47YFa9Ftns8Y8fjh4S8Kyi1F6BhZKbsdDqg2hA+0AFv7LA=
+        =uFLT
+        -----END PGP PRIVATE KEY BLOCK-----
+        """);
   }
 
   /**
@@ -245,105 +253,109 @@
    */
   public static TestKey keyC() throws Exception {
     return new TestKey(
-        "-----BEGIN PGP PUBLIC KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "mQENBEx6nuMBCADd077pyfsDGbGhHh+7xzipWihMJRrzQnpbSeVJIxA/Js+Z2MW8\n"
-            + "9J98AgnjONjGVlLqtp11O8Bp9xgdoGYWvFl2CrooQrCe+70JORHE30MJT+61mgLQ\n"
-            + "jm9l2WmIIcuzNwoTOKqWlXuaRIKddXMVbwr++Enl/9znx81FCf1KioDijeeHzVZb\n"
-            + "IjELLCtLlhwhGlYNy6LfNhSY+rNHOomIM9CUXkGZU7JvTe3M1plUzYYIFu3tttZI\n"
-            + "b6e1FSfR60yZ/f88fLacloc3fSrPWA261R/gHuFfLCdTt/I3EcYE+x33LZnSSOgz\n"
-            + "v/JtAuFlCaF/oNRTJHeRbALeri+FxBYule15ABEBAAG0HlRlc3R1c2VyIEMgPHRl\n"
-            + "c3RjQGV4YW1wbGUuY29tPokBOAQTAQIAIgUCTHqe4wIbAwYLCQgHAwIGFQgCCQoL\n"
-            + "BBYCAwECHgECF4AACgkQZB8Rk9JP5GcEIgf/cMvYBwH8ENrWec366Txaaeh/TO6n\n"
-            + "4v4P2LUR4/hcrNpHx3+9ikznkyF/b8OCsOE+KstvOO6i9vuRGVBPmfoALVv8iCGs\n"
-            + "5MXZJskjACXOqQav0I7ZY5rDJxuOKq6DrxtpHNxK8n0D1PEZllyk/OZVBAcjL2vu\n"
-            + "WC6ujP3jbMKaV0+heFqOVIghQjdA4McLH2u1XLOGEZdp7hLfmTnClmfzbnslFBSQ\n"
-            + "xU2g3jCq2k2zAPhn+jOGCL0987QGj1e6pHRXdUxcfnLRyNadRied0HO/clIb8vdt\n"
-            + "UaexujHjgg+1KDxj4PBAftN2lRtnnsSG9z4T31aTFz5YVG+pq8UXk9ohCokBIAQQ\n"
-            + "AQIACgUCTHqkKQMFAngACgkQqZHi1Q/dNnexiQf/ba9LcR76+tVvos1cxrGO3VkD\n"
-            + "3R1pvIWsb37/NTypWCvrFhsy4OUEy3bVCfJcqfwdY3Q2XixB9kuKo3qCSom1EjGg\n"
-            + "Qhr5ZsrB3qYqaa6S0AeVusmIwArEr9uuMUDjXhKlUALDX8HfXWGy2UmjNJkkT8Jm\n"
-            + "GtISS4KOfXUuZY04DttvbukEnyxAiLU9V0BnzrI9DARh0gEjqjUZAVyP5lOXJJxt\n"
-            + "sau95mOe8E61GELXPkxDLrnCboX7ys2OxcFO6S7q1xJPkki2SVq0y0k5oY/3jktw\n"
-            + "jO8uC3n7NiyW+BYJK6+zj3u3iA+o0YGm+i6F7aneJEaJrFqRj9L1vbojvuH0cYkB\n"
-            + "IAQQAQIACgUCTHqkOwMFAngACgkQOwm5f0tDh+7dSQf+PnEUftNSOuLVLoJ+2tyD\n"
-            + "DPJpcLIavNCyNR3hCGL86NXRUxOrmYgDVVv8pJuYB6aUTm69rFFZlzNwqQN5pBiX\n"
-            + "Zr3NM1jgJT6gKfXddcg1p/X2S9+xn4RN92R0fn0kEjM65fpE1Do+YWHOuHDZEOrx\n"
-            + "L8OaSo8lr19+r27fn09/HBhz2lOyTYzsdTjHeWdxPVQ3JNiVX11k7iKsttdYtM/V\n"
-            + "mAHzzd54Kvt5So/2qLIAcfSmUe9DQAdmcEcJQpQ2veND9uwccX7tH0cH4n9Cp16o\n"
-            + "quJ2pxWzOvKR3zxSw+cRxyIS4VjT6k+UsG3Lw55QZgdb5IEaJfezPj+tOhQlQz0f\n"
-            + "VrkBDQRMep7jAQgAw+67ahlOGnkF6mTtmg6MOGzAbRQ11MNrORnNtGOccNgtlgrO\n"
-            + "Y8TBqw1HkJ56v26E1FxfRh69CUGkYVXx0tMw0QbI+unX35ce5hJD4aWa8bOA1vfw\n"
-            + "474p/NpI+czWsFvcdOu5K6xIGXHShaQQyf2FQ9QeIFrU60qfaBL5jzuLyujCACqU\n"
-            + "46QGgBgeUjaT54LjrWSdn/Jtsbpv0MPv3Ea8fMdtSMkkBsDkF55jaJDFYq+xbs+e\n"
-            + "IKBjTwtSvrUisnLAC0Z9YY21GXGI3DGYqpVXz+Fe5xMTX1a6K3VKEmxmX2m/ebhm\n"
-            + "1p6EqjAJguOjJbJJQHKHMOol0zU6ANB6SgP26wARAQABiQEfBBgBAgAJBQJMep7j\n"
-            + "AhsMAAoJEGQfEZPST+Rn7AcH/32HACPLdxINsi8OSWa8OccMG5XEUvHTZjmdwVT2\n"
-            + "czMss8nwgifU9D4hEVRu1MWpiyxUgegW94wuSh4PWIVOVd18PmzAYc73aYgonakb\n"
-            + "M+MDIqGVvAH8QtHo79sqZ9vrkQaQXB3Y8cq+WxDQZyl8KLXP2icmq1Rl6Q6+i9oS\n"
-            + "pFe88Wr0cGaTblkfDbbWcih3C6tKAfcFwLLg8u4jYfXjZg/E9eAJf0dIFcQSQoHd\n"
-            + "O8hVXaZwx/rYXA8UFwAuROo2nu6SIof1lrH92p+now95d5zUZ5BYnKVd3uXsln0j\n"
-            + "z585UPQKS2J8PUy9IirmahgTyEYFwO64kZ2B4hYOE2g+rYw=\n"
-            + "=LtMR\n"
-            + "-----END PGP PUBLIC KEY BLOCK-----\n",
-        "-----BEGIN PGP PRIVATE KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "lQOYBEx6nuMBCADd077pyfsDGbGhHh+7xzipWihMJRrzQnpbSeVJIxA/Js+Z2MW8\n"
-            + "9J98AgnjONjGVlLqtp11O8Bp9xgdoGYWvFl2CrooQrCe+70JORHE30MJT+61mgLQ\n"
-            + "jm9l2WmIIcuzNwoTOKqWlXuaRIKddXMVbwr++Enl/9znx81FCf1KioDijeeHzVZb\n"
-            + "IjELLCtLlhwhGlYNy6LfNhSY+rNHOomIM9CUXkGZU7JvTe3M1plUzYYIFu3tttZI\n"
-            + "b6e1FSfR60yZ/f88fLacloc3fSrPWA261R/gHuFfLCdTt/I3EcYE+x33LZnSSOgz\n"
-            + "v/JtAuFlCaF/oNRTJHeRbALeri+FxBYule15ABEBAAEAB/sFPLoJDG1eV5QpqEZf\n"
-            + "m/QMOTOn8ZJ9xraQvXFvV7zgVXxJBvTLMbuACrnHnoiCrULS+w8Dt66Nfz7s4yQJ\n"
-            + "5SDtFX2AlMDVWL7wBEPgF1UpN6ox1CzSa6HOaygaUFGeKHO20WDjV4HmBLhQkKIa\n"
-            + "vKbghHA/4Nm1s1z3BHB8GtdGZ1VHc+s1DhPK5w+WHqYpLYjpNmI9yJg3gclEqEG9\n"
-            + "XzBqTZm9mPJRBdDMOD0xLa4nUD3Dkrjimqod3X7EuXE6sT2DuGVa1nuynk/8gIyO\n"
-            + "uS6crY7YJzEQUtQJ2n3y/h+QnZFo9UFuIVpgsxhBDsCnYNFWNR91Q0IM6PohHvqx\n"
-            + "BtFhBADsax1Bc0obP+bIkeAXltGlUYqm3bjOgVZ87XR0qe4TGwXGe8T1Yjfc8rj0\n"
-            + "cfBYCud201r/05CgchojMnTWlFLg308bSIZ9YvN3oOVay8nZ7h62dUIs45zebw3R\n"
-            + "SHwvjE5Sm/VWIdLrUUW1aGfk/VPudNMMMu2C64ev8DF/iwYjoQQA8DM+9oPvFJPA\n"
-            + "kLYg71tP2iIE5GbFqkiIEx59eQUxTsn6ubEfREjI99QliAdcKbyRHc3jc68NopLB\n"
-            + "41L7ny0j6VKuEszOYhhQ0qQK/jlI461aG14qHAylhuQTLrjpsUPE+WelBm9bxli0\n"
-            + "gA8F81WLOvJ2HzuMYVrj3tjGl3AHetkEAI77VKxGCGRzK63qBnmLwQEvqbphpgxH\n"
-            + "ANNAsg5HuWtDUgk85t2nrIgL1kfhu++CfP9duN/qU4dw/bgJaKOamWTfLBwST8qe\n"
-            + "3F8omovi1vLzHVpmvQp6Ly4wggJ4Gl/n0DNFopKw20V8ZTiRYtuLS43H7VsczE+8\n"
-            + "NKjy01EgHDMAP8O0HlRlc3R1c2VyIEMgPHRlc3RjQGV4YW1wbGUuY29tPokBOAQT\n"
-            + "AQIAIgUCTHqe4wIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQZB8Rk9JP\n"
-            + "5GcEIgf/cMvYBwH8ENrWec366Txaaeh/TO6n4v4P2LUR4/hcrNpHx3+9ikznkyF/\n"
-            + "b8OCsOE+KstvOO6i9vuRGVBPmfoALVv8iCGs5MXZJskjACXOqQav0I7ZY5rDJxuO\n"
-            + "Kq6DrxtpHNxK8n0D1PEZllyk/OZVBAcjL2vuWC6ujP3jbMKaV0+heFqOVIghQjdA\n"
-            + "4McLH2u1XLOGEZdp7hLfmTnClmfzbnslFBSQxU2g3jCq2k2zAPhn+jOGCL0987QG\n"
-            + "j1e6pHRXdUxcfnLRyNadRied0HO/clIb8vdtUaexujHjgg+1KDxj4PBAftN2lRtn\n"
-            + "nsSG9z4T31aTFz5YVG+pq8UXk9ohCp0DmARMep7jAQgAw+67ahlOGnkF6mTtmg6M\n"
-            + "OGzAbRQ11MNrORnNtGOccNgtlgrOY8TBqw1HkJ56v26E1FxfRh69CUGkYVXx0tMw\n"
-            + "0QbI+unX35ce5hJD4aWa8bOA1vfw474p/NpI+czWsFvcdOu5K6xIGXHShaQQyf2F\n"
-            + "Q9QeIFrU60qfaBL5jzuLyujCACqU46QGgBgeUjaT54LjrWSdn/Jtsbpv0MPv3Ea8\n"
-            + "fMdtSMkkBsDkF55jaJDFYq+xbs+eIKBjTwtSvrUisnLAC0Z9YY21GXGI3DGYqpVX\n"
-            + "z+Fe5xMTX1a6K3VKEmxmX2m/ebhm1p6EqjAJguOjJbJJQHKHMOol0zU6ANB6SgP2\n"
-            + "6wARAQABAAf9HIsMy8S/92SmE018vQgILrgjwursz1Vgq22HkBNALm2acSnwgzbz\n"
-            + "V8M+0mH5U9ClPSKae+aXzLS+s7IHi++u7uSO0YQmKgZ5PonD+ygFoyxumo0oOfqc\n"
-            + "DJ/oKFaforWJ2jv05S3bRbRVN5l9G0/5jWC7ZXnrXBOqQUkdCLFjXhMPq3zg2Yy3\n"
-            + "XSU83dVteOtrYRZqv33umZNCdk44z6kQOvh9tgSCL/aZ3d7AqjRK99I/IYY1IuVN\n"
-            + "qreFriVcJ0EzlnbPCnva+ReWAd2zt5VEClGu9J0CVnHmZNlwfmbFSiUN1hiMonkr\n"
-            + "sFImlw3adfJ7dsi/GzCC4147ep6jXw7QwQQAzwkeRWR9xc3ndrnXqUbQmgQkAD3D\n"
-            + "p2cwPygyLr0UDBDVX0z+8GKeBhNs3KIFXwUs6GxmDodHh0t4HUJeVLs7ur5ZATqo\n"
-            + "Bx50cSUOoaeSHRFVwicdJRtVgTTQ4UwwmKcLLJe2fWv6hnmyInK7Lp8ThLGQgqo8\n"
-            + "UWg3cdfzCvhKSvsEAPJFYhsFA/E92xUpzP8oYs3AA4mUXB+F0eObe9gqv8lAE6SX\n"
-            + "gB5kWhcd+MGddUGJuJV2LRrgOx3nXu3m3n35AH6iAY4Qi9URPzi/K659oefUU1c5\n"
-            + "BFArHX9bN1k1cOvH28tpQ38eAxaMygLqyR5Q5VbtZ5tYqLKCvHVs3I8lekDRA/4i\n"
-            + "e0vlu34qenppPANPm+Vq/7cSlG3XY4ioxwC/j6Y+92u90DXbbGatOg1SqGSwn1VP\n"
-            + "S034m7bDCNoWOXL0yAcbXrLZV74AyfvVOYOs/WtehehzWeTQRT5lkxX5+xGc1/h6\n"
-            + "9HQvsKKnUK8n1oc5aM5xzRVkU9+kcmqYqXqyOHnIbDbPiQEfBBgBAgAJBQJMep7j\n"
-            + "AhsMAAoJEGQfEZPST+Rn7AcH/32HACPLdxINsi8OSWa8OccMG5XEUvHTZjmdwVT2\n"
-            + "czMss8nwgifU9D4hEVRu1MWpiyxUgegW94wuSh4PWIVOVd18PmzAYc73aYgonakb\n"
-            + "M+MDIqGVvAH8QtHo79sqZ9vrkQaQXB3Y8cq+WxDQZyl8KLXP2icmq1Rl6Q6+i9oS\n"
-            + "pFe88Wr0cGaTblkfDbbWcih3C6tKAfcFwLLg8u4jYfXjZg/E9eAJf0dIFcQSQoHd\n"
-            + "O8hVXaZwx/rYXA8UFwAuROo2nu6SIof1lrH92p+now95d5zUZ5BYnKVd3uXsln0j\n"
-            + "z585UPQKS2J8PUy9IirmahgTyEYFwO64kZ2B4hYOE2g+rYw=\n"
-            + "=5pIh\n"
-            + "-----END PGP PRIVATE KEY BLOCK-----\n");
+        """
+        -----BEGIN PGP PUBLIC KEY BLOCK-----
+        Version: GnuPG v1
+
+        mQENBEx6nuMBCADd077pyfsDGbGhHh+7xzipWihMJRrzQnpbSeVJIxA/Js+Z2MW8
+        9J98AgnjONjGVlLqtp11O8Bp9xgdoGYWvFl2CrooQrCe+70JORHE30MJT+61mgLQ
+        jm9l2WmIIcuzNwoTOKqWlXuaRIKddXMVbwr++Enl/9znx81FCf1KioDijeeHzVZb
+        IjELLCtLlhwhGlYNy6LfNhSY+rNHOomIM9CUXkGZU7JvTe3M1plUzYYIFu3tttZI
+        b6e1FSfR60yZ/f88fLacloc3fSrPWA261R/gHuFfLCdTt/I3EcYE+x33LZnSSOgz
+        v/JtAuFlCaF/oNRTJHeRbALeri+FxBYule15ABEBAAG0HlRlc3R1c2VyIEMgPHRl
+        c3RjQGV4YW1wbGUuY29tPokBOAQTAQIAIgUCTHqe4wIbAwYLCQgHAwIGFQgCCQoL
+        BBYCAwECHgECF4AACgkQZB8Rk9JP5GcEIgf/cMvYBwH8ENrWec366Txaaeh/TO6n
+        4v4P2LUR4/hcrNpHx3+9ikznkyF/b8OCsOE+KstvOO6i9vuRGVBPmfoALVv8iCGs
+        5MXZJskjACXOqQav0I7ZY5rDJxuOKq6DrxtpHNxK8n0D1PEZllyk/OZVBAcjL2vu
+        WC6ujP3jbMKaV0+heFqOVIghQjdA4McLH2u1XLOGEZdp7hLfmTnClmfzbnslFBSQ
+        xU2g3jCq2k2zAPhn+jOGCL0987QGj1e6pHRXdUxcfnLRyNadRied0HO/clIb8vdt
+        UaexujHjgg+1KDxj4PBAftN2lRtnnsSG9z4T31aTFz5YVG+pq8UXk9ohCokBIAQQ
+        AQIACgUCTHqkKQMFAngACgkQqZHi1Q/dNnexiQf/ba9LcR76+tVvos1cxrGO3VkD
+        3R1pvIWsb37/NTypWCvrFhsy4OUEy3bVCfJcqfwdY3Q2XixB9kuKo3qCSom1EjGg
+        Qhr5ZsrB3qYqaa6S0AeVusmIwArEr9uuMUDjXhKlUALDX8HfXWGy2UmjNJkkT8Jm
+        GtISS4KOfXUuZY04DttvbukEnyxAiLU9V0BnzrI9DARh0gEjqjUZAVyP5lOXJJxt
+        sau95mOe8E61GELXPkxDLrnCboX7ys2OxcFO6S7q1xJPkki2SVq0y0k5oY/3jktw
+        jO8uC3n7NiyW+BYJK6+zj3u3iA+o0YGm+i6F7aneJEaJrFqRj9L1vbojvuH0cYkB
+        IAQQAQIACgUCTHqkOwMFAngACgkQOwm5f0tDh+7dSQf+PnEUftNSOuLVLoJ+2tyD
+        DPJpcLIavNCyNR3hCGL86NXRUxOrmYgDVVv8pJuYB6aUTm69rFFZlzNwqQN5pBiX
+        Zr3NM1jgJT6gKfXddcg1p/X2S9+xn4RN92R0fn0kEjM65fpE1Do+YWHOuHDZEOrx
+        L8OaSo8lr19+r27fn09/HBhz2lOyTYzsdTjHeWdxPVQ3JNiVX11k7iKsttdYtM/V
+        mAHzzd54Kvt5So/2qLIAcfSmUe9DQAdmcEcJQpQ2veND9uwccX7tH0cH4n9Cp16o
+        quJ2pxWzOvKR3zxSw+cRxyIS4VjT6k+UsG3Lw55QZgdb5IEaJfezPj+tOhQlQz0f
+        VrkBDQRMep7jAQgAw+67ahlOGnkF6mTtmg6MOGzAbRQ11MNrORnNtGOccNgtlgrO
+        Y8TBqw1HkJ56v26E1FxfRh69CUGkYVXx0tMw0QbI+unX35ce5hJD4aWa8bOA1vfw
+        474p/NpI+czWsFvcdOu5K6xIGXHShaQQyf2FQ9QeIFrU60qfaBL5jzuLyujCACqU
+        46QGgBgeUjaT54LjrWSdn/Jtsbpv0MPv3Ea8fMdtSMkkBsDkF55jaJDFYq+xbs+e
+        IKBjTwtSvrUisnLAC0Z9YY21GXGI3DGYqpVXz+Fe5xMTX1a6K3VKEmxmX2m/ebhm
+        1p6EqjAJguOjJbJJQHKHMOol0zU6ANB6SgP26wARAQABiQEfBBgBAgAJBQJMep7j
+        AhsMAAoJEGQfEZPST+Rn7AcH/32HACPLdxINsi8OSWa8OccMG5XEUvHTZjmdwVT2
+        czMss8nwgifU9D4hEVRu1MWpiyxUgegW94wuSh4PWIVOVd18PmzAYc73aYgonakb
+        M+MDIqGVvAH8QtHo79sqZ9vrkQaQXB3Y8cq+WxDQZyl8KLXP2icmq1Rl6Q6+i9oS
+        pFe88Wr0cGaTblkfDbbWcih3C6tKAfcFwLLg8u4jYfXjZg/E9eAJf0dIFcQSQoHd
+        O8hVXaZwx/rYXA8UFwAuROo2nu6SIof1lrH92p+now95d5zUZ5BYnKVd3uXsln0j
+        z585UPQKS2J8PUy9IirmahgTyEYFwO64kZ2B4hYOE2g+rYw=
+        =LtMR
+        -----END PGP PUBLIC KEY BLOCK-----
+        """,
+        """
+        -----BEGIN PGP PRIVATE KEY BLOCK-----
+        Version: GnuPG v1
+
+        lQOYBEx6nuMBCADd077pyfsDGbGhHh+7xzipWihMJRrzQnpbSeVJIxA/Js+Z2MW8
+        9J98AgnjONjGVlLqtp11O8Bp9xgdoGYWvFl2CrooQrCe+70JORHE30MJT+61mgLQ
+        jm9l2WmIIcuzNwoTOKqWlXuaRIKddXMVbwr++Enl/9znx81FCf1KioDijeeHzVZb
+        IjELLCtLlhwhGlYNy6LfNhSY+rNHOomIM9CUXkGZU7JvTe3M1plUzYYIFu3tttZI
+        b6e1FSfR60yZ/f88fLacloc3fSrPWA261R/gHuFfLCdTt/I3EcYE+x33LZnSSOgz
+        v/JtAuFlCaF/oNRTJHeRbALeri+FxBYule15ABEBAAEAB/sFPLoJDG1eV5QpqEZf
+        m/QMOTOn8ZJ9xraQvXFvV7zgVXxJBvTLMbuACrnHnoiCrULS+w8Dt66Nfz7s4yQJ
+        5SDtFX2AlMDVWL7wBEPgF1UpN6ox1CzSa6HOaygaUFGeKHO20WDjV4HmBLhQkKIa
+        vKbghHA/4Nm1s1z3BHB8GtdGZ1VHc+s1DhPK5w+WHqYpLYjpNmI9yJg3gclEqEG9
+        XzBqTZm9mPJRBdDMOD0xLa4nUD3Dkrjimqod3X7EuXE6sT2DuGVa1nuynk/8gIyO
+        uS6crY7YJzEQUtQJ2n3y/h+QnZFo9UFuIVpgsxhBDsCnYNFWNR91Q0IM6PohHvqx
+        BtFhBADsax1Bc0obP+bIkeAXltGlUYqm3bjOgVZ87XR0qe4TGwXGe8T1Yjfc8rj0
+        cfBYCud201r/05CgchojMnTWlFLg308bSIZ9YvN3oOVay8nZ7h62dUIs45zebw3R
+        SHwvjE5Sm/VWIdLrUUW1aGfk/VPudNMMMu2C64ev8DF/iwYjoQQA8DM+9oPvFJPA
+        kLYg71tP2iIE5GbFqkiIEx59eQUxTsn6ubEfREjI99QliAdcKbyRHc3jc68NopLB
+        41L7ny0j6VKuEszOYhhQ0qQK/jlI461aG14qHAylhuQTLrjpsUPE+WelBm9bxli0
+        gA8F81WLOvJ2HzuMYVrj3tjGl3AHetkEAI77VKxGCGRzK63qBnmLwQEvqbphpgxH
+        ANNAsg5HuWtDUgk85t2nrIgL1kfhu++CfP9duN/qU4dw/bgJaKOamWTfLBwST8qe
+        3F8omovi1vLzHVpmvQp6Ly4wggJ4Gl/n0DNFopKw20V8ZTiRYtuLS43H7VsczE+8
+        NKjy01EgHDMAP8O0HlRlc3R1c2VyIEMgPHRlc3RjQGV4YW1wbGUuY29tPokBOAQT
+        AQIAIgUCTHqe4wIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQZB8Rk9JP
+        5GcEIgf/cMvYBwH8ENrWec366Txaaeh/TO6n4v4P2LUR4/hcrNpHx3+9ikznkyF/
+        b8OCsOE+KstvOO6i9vuRGVBPmfoALVv8iCGs5MXZJskjACXOqQav0I7ZY5rDJxuO
+        Kq6DrxtpHNxK8n0D1PEZllyk/OZVBAcjL2vuWC6ujP3jbMKaV0+heFqOVIghQjdA
+        4McLH2u1XLOGEZdp7hLfmTnClmfzbnslFBSQxU2g3jCq2k2zAPhn+jOGCL0987QG
+        j1e6pHRXdUxcfnLRyNadRied0HO/clIb8vdtUaexujHjgg+1KDxj4PBAftN2lRtn
+        nsSG9z4T31aTFz5YVG+pq8UXk9ohCp0DmARMep7jAQgAw+67ahlOGnkF6mTtmg6M
+        OGzAbRQ11MNrORnNtGOccNgtlgrOY8TBqw1HkJ56v26E1FxfRh69CUGkYVXx0tMw
+        0QbI+unX35ce5hJD4aWa8bOA1vfw474p/NpI+czWsFvcdOu5K6xIGXHShaQQyf2F
+        Q9QeIFrU60qfaBL5jzuLyujCACqU46QGgBgeUjaT54LjrWSdn/Jtsbpv0MPv3Ea8
+        fMdtSMkkBsDkF55jaJDFYq+xbs+eIKBjTwtSvrUisnLAC0Z9YY21GXGI3DGYqpVX
+        z+Fe5xMTX1a6K3VKEmxmX2m/ebhm1p6EqjAJguOjJbJJQHKHMOol0zU6ANB6SgP2
+        6wARAQABAAf9HIsMy8S/92SmE018vQgILrgjwursz1Vgq22HkBNALm2acSnwgzbz
+        V8M+0mH5U9ClPSKae+aXzLS+s7IHi++u7uSO0YQmKgZ5PonD+ygFoyxumo0oOfqc
+        DJ/oKFaforWJ2jv05S3bRbRVN5l9G0/5jWC7ZXnrXBOqQUkdCLFjXhMPq3zg2Yy3
+        XSU83dVteOtrYRZqv33umZNCdk44z6kQOvh9tgSCL/aZ3d7AqjRK99I/IYY1IuVN
+        qreFriVcJ0EzlnbPCnva+ReWAd2zt5VEClGu9J0CVnHmZNlwfmbFSiUN1hiMonkr
+        sFImlw3adfJ7dsi/GzCC4147ep6jXw7QwQQAzwkeRWR9xc3ndrnXqUbQmgQkAD3D
+        p2cwPygyLr0UDBDVX0z+8GKeBhNs3KIFXwUs6GxmDodHh0t4HUJeVLs7ur5ZATqo
+        Bx50cSUOoaeSHRFVwicdJRtVgTTQ4UwwmKcLLJe2fWv6hnmyInK7Lp8ThLGQgqo8
+        UWg3cdfzCvhKSvsEAPJFYhsFA/E92xUpzP8oYs3AA4mUXB+F0eObe9gqv8lAE6SX
+        gB5kWhcd+MGddUGJuJV2LRrgOx3nXu3m3n35AH6iAY4Qi9URPzi/K659oefUU1c5
+        BFArHX9bN1k1cOvH28tpQ38eAxaMygLqyR5Q5VbtZ5tYqLKCvHVs3I8lekDRA/4i
+        e0vlu34qenppPANPm+Vq/7cSlG3XY4ioxwC/j6Y+92u90DXbbGatOg1SqGSwn1VP
+        S034m7bDCNoWOXL0yAcbXrLZV74AyfvVOYOs/WtehehzWeTQRT5lkxX5+xGc1/h6
+        9HQvsKKnUK8n1oc5aM5xzRVkU9+kcmqYqXqyOHnIbDbPiQEfBBgBAgAJBQJMep7j
+        AhsMAAoJEGQfEZPST+Rn7AcH/32HACPLdxINsi8OSWa8OccMG5XEUvHTZjmdwVT2
+        czMss8nwgifU9D4hEVRu1MWpiyxUgegW94wuSh4PWIVOVd18PmzAYc73aYgonakb
+        M+MDIqGVvAH8QtHo79sqZ9vrkQaQXB3Y8cq+WxDQZyl8KLXP2icmq1Rl6Q6+i9oS
+        pFe88Wr0cGaTblkfDbbWcih3C6tKAfcFwLLg8u4jYfXjZg/E9eAJf0dIFcQSQoHd
+        O8hVXaZwx/rYXA8UFwAuROo2nu6SIof1lrH92p+now95d5zUZ5BYnKVd3uXsln0j
+        z585UPQKS2J8PUy9IirmahgTyEYFwO64kZ2B4hYOE2g+rYw=
+        =5pIh
+        -----END PGP PRIVATE KEY BLOCK-----
+        """);
   }
 
   /**
@@ -352,93 +364,97 @@
    */
   public static TestKey keyD() throws Exception {
     return new TestKey(
-        "-----BEGIN PGP PUBLIC KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "mQENBEx6nwkBCADuztv2tGhjPljwW46qEhth7ZnkdhYXuctZ6lNQuy5LMaEECE3C\n"
-            + "jvVKY+nBrgsLY2Trts+q+mdooBWvxy/qe5PAQTcPR83KjVS4fYwNMBgeRxBEZAZg\n"
-            + "DFwRRCsRrHost+cMgtzLocQ+vL3+9yTRAIe/WmYwbEDXg/c9JSC7kQbZqaAaOshO\n"
-            + "cIOyeB8/QoYee0fEnBzHMmcd0SB1YpwIvRG6v61lXmgpQ9CbovvXO6ZZyEyCX784\n"
-            + "9xprzqP1y03DPrbhuhBAY8EMf3KGJA1dEcU4+lbGEgmlOe2YSbWoLs7mRLFcq5xx\n"
-            + "JroYMtvXF04k4ZHNZAnT3IZc+lJyCqOp4vXpABEBAAG0HlRlc3R1c2VyIEQgPHRl\n"
-            + "c3RkQGV4YW1wbGUuY29tPokBOAQTAQIAIgUCTHqfCQIbAwYLCQgHAwIGFQgCCQoL\n"
-            + "BBYCAwECHgECF4AACgkQqZHi1Q/dNne/0wgApuPzh4J8p2quCK1ScsJHlgGRojGq\n"
-            + "IDPhZFtPn0p2IAkqr5sAhvZAjd3u9A2DqQ7pwOX7gnGRE7dSrK69IAjfbRMc5k16\n"
-            + "aBK2ADq2YgPEmTToots1A0Tj+LaCFOXYUtEkgAC+RfFIkCdt8z86GIr0kg19Q/vY\n"
-            + "I/LtvThAk28D8yIfDnW49Mc4GGq+qvrOytBaGu3dzW0mjYWGEyl0fdSjNqtKyWN7\n"
-            + "Qw70Kqysaoy1KiPRAgwiPQfMCEx6pVaXuAfgRKaJ18kCNOldpajLgQv6yeY7mhgu\n"
-            + "Q3Qe7xQlAtVObxskcTH2CWggl2dPqSMNieLK0g/ER8PIReGDCBXNSJ4qYbkBDQRM\n"
-            + "ep8JAQgAw/o1nhJPLGlIfEMzOGU0Jjj+DwEyB3QIEEc+WKRvgtGsJ4cbZdaGWBJq\n"
-            + "jSo7e9XC9jA2ih0+Gld0vWV7S0LZ84xXxQeadC+AZBFR+b9ga4aUFIji8Tdi2dWX\n"
-            + "QmY76hHIaF8rs6aJB7lRig735VRLxVHOb194t9KLUzZiEKqd71BvLQyuLqAfTEsT\n"
-            + "GRHgmydaxZbGXz+Z57jbQgm11CQEHX1dtS8uqWb64xrV5GAeuEhRj4R6Yiy7OPNi\n"
-            + "xXHxryH2Jd34pA0cGHYVcTgVjXuZ9FFP2SnXuxABONGAIaJuqg7ozYBa2kOdr0DN\n"
-            + "5Pxy5ocR7R2ZoN0pYD5+Cc7oGHjuCQARAQABiQEfBBgBAgAJBQJMep8JAhsMAAoJ\n"
-            + "EKmR4tUP3TZ369QIAKPlfX2TUfhP3otYiaa24zBJ/cvGljGiSfX0KrausBHH161j\n"
-            + "lraJfLzpe7vSOZhwZwgIY/eKoErAkJwVnX1+dLuOcHaqRDi5gnLqa6Yg9a2LWb4z\n"
-            + "rvgsvbiNUs1o9htOcvcpv7e3UUUcRa8lO+aNkO+VoI6DI8RJ3wIfJayboePRXdfr\n"
-            + "8g9of0jSdIOzlaaBPxA2wYSWXm4kv7QXzZooxuGqhn0+JKuq2+oO9y5QUig+c3oG\n"
-            + "a5mpVblmv5ZL6Gc36kCbeEC8j6JkNT4wnceQwpNUNYtPU186cjy3rAD4C58w0Uvp\n"
-            + "HZZSTc0syLOShQr//We39LUNaX6WF3NmyF8K/OM=\n"
-            + "=YDhQ\n"
-            + "-----END PGP PUBLIC KEY BLOCK-----\n",
-        "-----BEGIN PGP PRIVATE KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "lQOYBEx6nwkBCADuztv2tGhjPljwW46qEhth7ZnkdhYXuctZ6lNQuy5LMaEECE3C\n"
-            + "jvVKY+nBrgsLY2Trts+q+mdooBWvxy/qe5PAQTcPR83KjVS4fYwNMBgeRxBEZAZg\n"
-            + "DFwRRCsRrHost+cMgtzLocQ+vL3+9yTRAIe/WmYwbEDXg/c9JSC7kQbZqaAaOshO\n"
-            + "cIOyeB8/QoYee0fEnBzHMmcd0SB1YpwIvRG6v61lXmgpQ9CbovvXO6ZZyEyCX784\n"
-            + "9xprzqP1y03DPrbhuhBAY8EMf3KGJA1dEcU4+lbGEgmlOe2YSbWoLs7mRLFcq5xx\n"
-            + "JroYMtvXF04k4ZHNZAnT3IZc+lJyCqOp4vXpABEBAAEAB/0Yf+FiLHz/HYDbW9FF\n"
-            + "kmj7wXgFz7WRho6dsWQNxr5HmZZWxxFPMgJpONnc9GGOsApFAnLIrDraqX3AFFPO\n"
-            + "nxH36djfuPKcYqZ77Olm2vXGeWzqT0a2KN5zKQawH/1CxDUwe+Zx/60V8KAfXbSJ\n"
-            + "up+ymnAcbKa0VYYSYFI82/KTdthJ1jFMNtXkaLskpM8TrDBCgd38m8Dpb5GCrDVY\n"
-            + "faZgkHokTTrvaTcx7ebGOxlOcbfzOPMJyFiz6lHf4JGr5ZVQXymaAG18kRDFxXHm\n"
-            + "AskOJIxnMdcy2IzNximht2CIgRuGznyPoeh/j8KFONKIKf3N6dVfV12uIvGOVV+D\n"
-            + "/ZQZBAD2dennp3Z4IsOWkgHTG3bloOVcIY5n+WvliQY/5G3psKdKeaGZxt6MhMSj\n"
-            + "sJEiUgveYTt5PxvQc5jmFEyjEQJmDAHo3RbycdFVvICrKIhKFyIlcVFCOSwDvLAW\n"
-            + "aZhu/m47jGnnYZ+bDzZl4X8L7Zu8e3TStEiVhjYTRqJfdEdMVQQA+A0ehIhIa1mJ\n"
-            + "ytGKWQVxn9BwKTP583vf2qPzul7yDEsYdGfoA0QGUicVwV4NNK3vK3FQM9MBSevp\n"
-            + "JFpxh2bRS/tgd5tFDyRqekTcagMqTxnJoIpCPUvj5D+WXsS1Kwrcm7OpWoNHOcjD\n"
-            + "Hbhk/966QALO+T6BTVLx32/72jtQ10UD/RsqQfRDzlQUOd6ZYOlH5qCb1+f8f3qJ\n"
-            + "yUmudrmjj8unBK3QbBVrxZ1h9AyaI5evFmsMlLKdTp0y49CmrSQmgEnUYzvBDjse\n"
-            + "/jYanpRKnt69HeZFilHLIF+HBbQfSM66UVXVoJSNTJIsncVa0IcGoZTpCUVOng3/\n"
-            + "MLfW4sh9NX1yRIi0HlRlc3R1c2VyIEQgPHRlc3RkQGV4YW1wbGUuY29tPokBOAQT\n"
-            + "AQIAIgUCTHqfCQIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQqZHi1Q/d\n"
-            + "Nne/0wgApuPzh4J8p2quCK1ScsJHlgGRojGqIDPhZFtPn0p2IAkqr5sAhvZAjd3u\n"
-            + "9A2DqQ7pwOX7gnGRE7dSrK69IAjfbRMc5k16aBK2ADq2YgPEmTToots1A0Tj+LaC\n"
-            + "FOXYUtEkgAC+RfFIkCdt8z86GIr0kg19Q/vYI/LtvThAk28D8yIfDnW49Mc4GGq+\n"
-            + "qvrOytBaGu3dzW0mjYWGEyl0fdSjNqtKyWN7Qw70Kqysaoy1KiPRAgwiPQfMCEx6\n"
-            + "pVaXuAfgRKaJ18kCNOldpajLgQv6yeY7mhguQ3Qe7xQlAtVObxskcTH2CWggl2dP\n"
-            + "qSMNieLK0g/ER8PIReGDCBXNSJ4qYZ0DmARMep8JAQgAw/o1nhJPLGlIfEMzOGU0\n"
-            + "Jjj+DwEyB3QIEEc+WKRvgtGsJ4cbZdaGWBJqjSo7e9XC9jA2ih0+Gld0vWV7S0LZ\n"
-            + "84xXxQeadC+AZBFR+b9ga4aUFIji8Tdi2dWXQmY76hHIaF8rs6aJB7lRig735VRL\n"
-            + "xVHOb194t9KLUzZiEKqd71BvLQyuLqAfTEsTGRHgmydaxZbGXz+Z57jbQgm11CQE\n"
-            + "HX1dtS8uqWb64xrV5GAeuEhRj4R6Yiy7OPNixXHxryH2Jd34pA0cGHYVcTgVjXuZ\n"
-            + "9FFP2SnXuxABONGAIaJuqg7ozYBa2kOdr0DN5Pxy5ocR7R2ZoN0pYD5+Cc7oGHju\n"
-            + "CQARAQABAAf/QiN/k9y+/pB7h4BQWXCCNIIYb6zqGuzUSdYZWuYHwiEL1f05SFmp\n"
-            + "VjDE5+ZAU+8U0Gv+BAeRbWdlfQOyI/ioQJL1DggeXqanUF4uCbjGDBPLhtCZsmmM\n"
-            + "QVLdrOl+v+SHe33e7E7AQSyQMaUSkUEtHycYIasZPQRfw9H/L3u9OEWXkMUbPso5\n"
-            + "L0A0StkcsM1isYfC8ApnF4zSTWHO9uqnc+qE4qChCqsGvaSIyLKEpVe4F0vEkbrq\n"
-            + "3usVp3cxJd9apN+JjMoC9dHJcQahgfJZ1jzgJ3rueRxrGZV+keo8VmyrDGFCerX9\n"
-            + "6Ke3RPMHN/evCHyPMtHC82QKYuy4ZTvldwQAyzbNKIIpNjyHRc/hXLMBUtnW0VYS\n"
-            + "dELA1VBMmT/d6Xx6pI9gg9HCjDx+DuQRych7ShxrYLL1pNQD8jwEJhZIeUpSgIFD\n"
-            + "BXdwkiGbmdrU5N0tBhxp8kRcqcGbL68zC9S0X2hNju6Dxu9hbG8ZAdYaCdAavVy0\n"
-            + "O6E66+T0cLRBinsEAPbiL/0rpV15DdITwD3hvzhYDyURE+yxQZe9ngS1uoui3mGn\n"
-            + "bLc/L/nbHf2Z91ViSsUaqJjpb2/eDsJtGJ9pFlFLTndujkA62CktJytD9DIYLlYD\n"
-            + "huXlsKvZkNZEZNDKLC5Tg8YR/28Opz0/ZFzfVuJAQqg7+iWkxklG3SvN71RLA/9x\n"
-            + "wun1AEw6tLJ2R2j8+yXIt8UaWExqAviT/JgZELVXdCTqcYuOmktsM2z+2D+OyUtP\n"
-            + "7+Yyz7MGQKMAU+V/1uOK4YqwUJrcGy501o9Of+xm+5DASsK1oM5e9sBdmNewdLHL\n"
-            + "ZJEllURrEC6zCE/4zzs7qUfakH4l4ZJgjRL6va+ED0HfiQEfBBgBAgAJBQJMep8J\n"
-            + "AhsMAAoJEKmR4tUP3TZ369QIAKPlfX2TUfhP3otYiaa24zBJ/cvGljGiSfX0Krau\n"
-            + "sBHH161jlraJfLzpe7vSOZhwZwgIY/eKoErAkJwVnX1+dLuOcHaqRDi5gnLqa6Yg\n"
-            + "9a2LWb4zrvgsvbiNUs1o9htOcvcpv7e3UUUcRa8lO+aNkO+VoI6DI8RJ3wIfJayb\n"
-            + "oePRXdfr8g9of0jSdIOzlaaBPxA2wYSWXm4kv7QXzZooxuGqhn0+JKuq2+oO9y5Q\n"
-            + "Uig+c3oGa5mpVblmv5ZL6Gc36kCbeEC8j6JkNT4wnceQwpNUNYtPU186cjy3rAD4\n"
-            + "C58w0UvpHZZSTc0syLOShQr//We39LUNaX6WF3NmyF8K/OM=\n"
-            + "=e1xT\n"
-            + "-----END PGP PRIVATE KEY BLOCK-----\n");
+        """
+        -----BEGIN PGP PUBLIC KEY BLOCK-----
+        Version: GnuPG v1
+
+        mQENBEx6nwkBCADuztv2tGhjPljwW46qEhth7ZnkdhYXuctZ6lNQuy5LMaEECE3C
+        jvVKY+nBrgsLY2Trts+q+mdooBWvxy/qe5PAQTcPR83KjVS4fYwNMBgeRxBEZAZg
+        DFwRRCsRrHost+cMgtzLocQ+vL3+9yTRAIe/WmYwbEDXg/c9JSC7kQbZqaAaOshO
+        cIOyeB8/QoYee0fEnBzHMmcd0SB1YpwIvRG6v61lXmgpQ9CbovvXO6ZZyEyCX784
+        9xprzqP1y03DPrbhuhBAY8EMf3KGJA1dEcU4+lbGEgmlOe2YSbWoLs7mRLFcq5xx
+        JroYMtvXF04k4ZHNZAnT3IZc+lJyCqOp4vXpABEBAAG0HlRlc3R1c2VyIEQgPHRl
+        c3RkQGV4YW1wbGUuY29tPokBOAQTAQIAIgUCTHqfCQIbAwYLCQgHAwIGFQgCCQoL
+        BBYCAwECHgECF4AACgkQqZHi1Q/dNne/0wgApuPzh4J8p2quCK1ScsJHlgGRojGq
+        IDPhZFtPn0p2IAkqr5sAhvZAjd3u9A2DqQ7pwOX7gnGRE7dSrK69IAjfbRMc5k16
+        aBK2ADq2YgPEmTToots1A0Tj+LaCFOXYUtEkgAC+RfFIkCdt8z86GIr0kg19Q/vY
+        I/LtvThAk28D8yIfDnW49Mc4GGq+qvrOytBaGu3dzW0mjYWGEyl0fdSjNqtKyWN7
+        Qw70Kqysaoy1KiPRAgwiPQfMCEx6pVaXuAfgRKaJ18kCNOldpajLgQv6yeY7mhgu
+        Q3Qe7xQlAtVObxskcTH2CWggl2dPqSMNieLK0g/ER8PIReGDCBXNSJ4qYbkBDQRM
+        ep8JAQgAw/o1nhJPLGlIfEMzOGU0Jjj+DwEyB3QIEEc+WKRvgtGsJ4cbZdaGWBJq
+        jSo7e9XC9jA2ih0+Gld0vWV7S0LZ84xXxQeadC+AZBFR+b9ga4aUFIji8Tdi2dWX
+        QmY76hHIaF8rs6aJB7lRig735VRLxVHOb194t9KLUzZiEKqd71BvLQyuLqAfTEsT
+        GRHgmydaxZbGXz+Z57jbQgm11CQEHX1dtS8uqWb64xrV5GAeuEhRj4R6Yiy7OPNi
+        xXHxryH2Jd34pA0cGHYVcTgVjXuZ9FFP2SnXuxABONGAIaJuqg7ozYBa2kOdr0DN
+        5Pxy5ocR7R2ZoN0pYD5+Cc7oGHjuCQARAQABiQEfBBgBAgAJBQJMep8JAhsMAAoJ
+        EKmR4tUP3TZ369QIAKPlfX2TUfhP3otYiaa24zBJ/cvGljGiSfX0KrausBHH161j
+        lraJfLzpe7vSOZhwZwgIY/eKoErAkJwVnX1+dLuOcHaqRDi5gnLqa6Yg9a2LWb4z
+        rvgsvbiNUs1o9htOcvcpv7e3UUUcRa8lO+aNkO+VoI6DI8RJ3wIfJayboePRXdfr
+        8g9of0jSdIOzlaaBPxA2wYSWXm4kv7QXzZooxuGqhn0+JKuq2+oO9y5QUig+c3oG
+        a5mpVblmv5ZL6Gc36kCbeEC8j6JkNT4wnceQwpNUNYtPU186cjy3rAD4C58w0Uvp
+        HZZSTc0syLOShQr//We39LUNaX6WF3NmyF8K/OM=
+        =YDhQ
+        -----END PGP PUBLIC KEY BLOCK-----
+        """,
+        """
+        -----BEGIN PGP PRIVATE KEY BLOCK-----
+        Version: GnuPG v1
+
+        lQOYBEx6nwkBCADuztv2tGhjPljwW46qEhth7ZnkdhYXuctZ6lNQuy5LMaEECE3C
+        jvVKY+nBrgsLY2Trts+q+mdooBWvxy/qe5PAQTcPR83KjVS4fYwNMBgeRxBEZAZg
+        DFwRRCsRrHost+cMgtzLocQ+vL3+9yTRAIe/WmYwbEDXg/c9JSC7kQbZqaAaOshO
+        cIOyeB8/QoYee0fEnBzHMmcd0SB1YpwIvRG6v61lXmgpQ9CbovvXO6ZZyEyCX784
+        9xprzqP1y03DPrbhuhBAY8EMf3KGJA1dEcU4+lbGEgmlOe2YSbWoLs7mRLFcq5xx
+        JroYMtvXF04k4ZHNZAnT3IZc+lJyCqOp4vXpABEBAAEAB/0Yf+FiLHz/HYDbW9FF
+        kmj7wXgFz7WRho6dsWQNxr5HmZZWxxFPMgJpONnc9GGOsApFAnLIrDraqX3AFFPO
+        nxH36djfuPKcYqZ77Olm2vXGeWzqT0a2KN5zKQawH/1CxDUwe+Zx/60V8KAfXbSJ
+        up+ymnAcbKa0VYYSYFI82/KTdthJ1jFMNtXkaLskpM8TrDBCgd38m8Dpb5GCrDVY
+        faZgkHokTTrvaTcx7ebGOxlOcbfzOPMJyFiz6lHf4JGr5ZVQXymaAG18kRDFxXHm
+        AskOJIxnMdcy2IzNximht2CIgRuGznyPoeh/j8KFONKIKf3N6dVfV12uIvGOVV+D
+        /ZQZBAD2dennp3Z4IsOWkgHTG3bloOVcIY5n+WvliQY/5G3psKdKeaGZxt6MhMSj
+        sJEiUgveYTt5PxvQc5jmFEyjEQJmDAHo3RbycdFVvICrKIhKFyIlcVFCOSwDvLAW
+        aZhu/m47jGnnYZ+bDzZl4X8L7Zu8e3TStEiVhjYTRqJfdEdMVQQA+A0ehIhIa1mJ
+        ytGKWQVxn9BwKTP583vf2qPzul7yDEsYdGfoA0QGUicVwV4NNK3vK3FQM9MBSevp
+        JFpxh2bRS/tgd5tFDyRqekTcagMqTxnJoIpCPUvj5D+WXsS1Kwrcm7OpWoNHOcjD
+        Hbhk/966QALO+T6BTVLx32/72jtQ10UD/RsqQfRDzlQUOd6ZYOlH5qCb1+f8f3qJ
+        yUmudrmjj8unBK3QbBVrxZ1h9AyaI5evFmsMlLKdTp0y49CmrSQmgEnUYzvBDjse
+        /jYanpRKnt69HeZFilHLIF+HBbQfSM66UVXVoJSNTJIsncVa0IcGoZTpCUVOng3/
+        MLfW4sh9NX1yRIi0HlRlc3R1c2VyIEQgPHRlc3RkQGV4YW1wbGUuY29tPokBOAQT
+        AQIAIgUCTHqfCQIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQqZHi1Q/d
+        Nne/0wgApuPzh4J8p2quCK1ScsJHlgGRojGqIDPhZFtPn0p2IAkqr5sAhvZAjd3u
+        9A2DqQ7pwOX7gnGRE7dSrK69IAjfbRMc5k16aBK2ADq2YgPEmTToots1A0Tj+LaC
+        FOXYUtEkgAC+RfFIkCdt8z86GIr0kg19Q/vYI/LtvThAk28D8yIfDnW49Mc4GGq+
+        qvrOytBaGu3dzW0mjYWGEyl0fdSjNqtKyWN7Qw70Kqysaoy1KiPRAgwiPQfMCEx6
+        pVaXuAfgRKaJ18kCNOldpajLgQv6yeY7mhguQ3Qe7xQlAtVObxskcTH2CWggl2dP
+        qSMNieLK0g/ER8PIReGDCBXNSJ4qYZ0DmARMep8JAQgAw/o1nhJPLGlIfEMzOGU0
+        Jjj+DwEyB3QIEEc+WKRvgtGsJ4cbZdaGWBJqjSo7e9XC9jA2ih0+Gld0vWV7S0LZ
+        84xXxQeadC+AZBFR+b9ga4aUFIji8Tdi2dWXQmY76hHIaF8rs6aJB7lRig735VRL
+        xVHOb194t9KLUzZiEKqd71BvLQyuLqAfTEsTGRHgmydaxZbGXz+Z57jbQgm11CQE
+        HX1dtS8uqWb64xrV5GAeuEhRj4R6Yiy7OPNixXHxryH2Jd34pA0cGHYVcTgVjXuZ
+        9FFP2SnXuxABONGAIaJuqg7ozYBa2kOdr0DN5Pxy5ocR7R2ZoN0pYD5+Cc7oGHju
+        CQARAQABAAf/QiN/k9y+/pB7h4BQWXCCNIIYb6zqGuzUSdYZWuYHwiEL1f05SFmp
+        VjDE5+ZAU+8U0Gv+BAeRbWdlfQOyI/ioQJL1DggeXqanUF4uCbjGDBPLhtCZsmmM
+        QVLdrOl+v+SHe33e7E7AQSyQMaUSkUEtHycYIasZPQRfw9H/L3u9OEWXkMUbPso5
+        L0A0StkcsM1isYfC8ApnF4zSTWHO9uqnc+qE4qChCqsGvaSIyLKEpVe4F0vEkbrq
+        3usVp3cxJd9apN+JjMoC9dHJcQahgfJZ1jzgJ3rueRxrGZV+keo8VmyrDGFCerX9
+        6Ke3RPMHN/evCHyPMtHC82QKYuy4ZTvldwQAyzbNKIIpNjyHRc/hXLMBUtnW0VYS
+        dELA1VBMmT/d6Xx6pI9gg9HCjDx+DuQRych7ShxrYLL1pNQD8jwEJhZIeUpSgIFD
+        BXdwkiGbmdrU5N0tBhxp8kRcqcGbL68zC9S0X2hNju6Dxu9hbG8ZAdYaCdAavVy0
+        O6E66+T0cLRBinsEAPbiL/0rpV15DdITwD3hvzhYDyURE+yxQZe9ngS1uoui3mGn
+        bLc/L/nbHf2Z91ViSsUaqJjpb2/eDsJtGJ9pFlFLTndujkA62CktJytD9DIYLlYD
+        huXlsKvZkNZEZNDKLC5Tg8YR/28Opz0/ZFzfVuJAQqg7+iWkxklG3SvN71RLA/9x
+        wun1AEw6tLJ2R2j8+yXIt8UaWExqAviT/JgZELVXdCTqcYuOmktsM2z+2D+OyUtP
+        7+Yyz7MGQKMAU+V/1uOK4YqwUJrcGy501o9Of+xm+5DASsK1oM5e9sBdmNewdLHL
+        ZJEllURrEC6zCE/4zzs7qUfakH4l4ZJgjRL6va+ED0HfiQEfBBgBAgAJBQJMep8J
+        AhsMAAoJEKmR4tUP3TZ369QIAKPlfX2TUfhP3otYiaa24zBJ/cvGljGiSfX0Krau
+        sBHH161jlraJfLzpe7vSOZhwZwgIY/eKoErAkJwVnX1+dLuOcHaqRDi5gnLqa6Yg
+        9a2LWb4zrvgsvbiNUs1o9htOcvcpv7e3UUUcRa8lO+aNkO+VoI6DI8RJ3wIfJayb
+        oePRXdfr8g9of0jSdIOzlaaBPxA2wYSWXm4kv7QXzZooxuGqhn0+JKuq2+oO9y5Q
+        Uig+c3oGa5mpVblmv5ZL6Gc36kCbeEC8j6JkNT4wnceQwpNUNYtPU186cjy3rAD4
+        C58w0UvpHZZSTc0syLOShQr//We39LUNaX6WF3NmyF8K/OM=
+        =e1xT
+        -----END PGP PRIVATE KEY BLOCK-----
+        """);
   }
 
   /**
@@ -447,93 +463,97 @@
    */
   public static TestKey keyE() throws Exception {
     return new TestKey(
-        "-----BEGIN PGP PUBLIC KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "mQENBEx6nxoBCADjYOWOFa7ZBJpRuNspRoXBTK0LiK5zqN894b87LgIYEgUM6q5J\n"
-            + "yLNo43x7V+ow1/7BEq0JUAMSQ3uRn2jqXiJskSXvwlFYcTVFb0gY09CSD0ptHvda\n"
-            + "zqYOuM/MU1l9jqmlM+pDw/z0pLTKYmAHi6pKJ64pqccMHPUZHpLywyzSNX+JM86I\n"
-            + "K5KAsyGArtgpT9vfci3idNeXjhMR8rfLPDFbdGvGFOZrYv0cfgTbBpVEWeHjs2FR\n"
-            + "4vHG133AdjdZcvA9Y9VW34ZLeiyBEeFix7+HPVS82rko2kQxZu1UZRu340maKDAo\n"
-            + "+UVirgo0FQ8nNUR+c9oNKgiZtO39IAPJv/WZABEBAAG0HlRlc3R1c2VyIEUgPHRl\n"
-            + "c3RlQGV4YW1wbGUuY29tPokBPgQTAQIAKAUCTHqfGgIbAwUJAeEzgAYLCQgHAwIG\n"
-            + "FQgCCQoLBBYCAwECHgECF4AACgkQOwm5f0tDh+6Fowf9FZgntlW4qc7BHe8zYJ0q\n"
-            + "zoLZrHwCFcaeO3kz53y5Lz3+plMuqVDjoQDOt8DxsPHrXWKiu0qBTjZ28ztN3ef6\n"
-            + "f0MpguTGclvFroevUct0xiyox5r1DfMT8JRvqsojE1XPscR2zJzIgEg3OCPuksT9\n"
-            + "EsHsF+/3RBbsXbQgDpW38g0GzIJI4AiQ/yvG2ON9awN2kzIWoBkthVCGy54lCTGj\n"
-            + "yPhatE7Zu2ABNcerIDstupWww2Psec6pGbPPci8ojc90fzalk3UMXcXHD7m8cTJS\n"
-            + "kgHScOzTElIQqOA1+w6uiHy2oAn+qW7534j6p9Tj+DrSIzUXBedGjXZevaKaurVy\n"
-            + "KLkBDQRMep8aAQgAn5r6toYnEzwDeig8r+t89vqOFtohYcmtyeLeTiTTdAz/xWBW\n"
-            + "HUlqV8sglQ9aINpGtBf37v13RhtU3WkUv8cZMQoRM8P2H3cKDNwkucFO6uKSEQO5\n"
-            + "FdzTm4C4WaoE7QiTRbiekwh7O54mz4Wup6LHuEFQEcSpdRUp8w/qaJIHG9EJad1q\n"
-            + "UEsKNnITW+mWHY3+ccK1hgqPwOPqO3/8QtaipekKOYAtOb+57c1jtDFBZnYIkant\n"
-            + "oKs+kRw0DykXFTyFOMYqaleBMcVG+u7ljwAq18L8Ev+qVIpBIZ5eQ5+6p1w9B69h\n"
-            + "RH0Ebn50ebpoqKOXhN4/bu/wq596y0o4xDB0GQARAQABiQElBBgBAgAPBQJMep8a\n"
-            + "AhsMBQkB4TOAAAoJEDsJuX9LQ4fu0/wH/35/22xina8ktbvGV/kB0pH2LBqeXN/b\n"
-            + "CLdA+CDzfwMDzqG0kU39EJ3Fbux7fj4uMaeiYfbO9U85+NOuDmeH41B2dM9S1AzE\n"
-            + "H+/OiCp/Zf1fdd1qXhsA4Xe5vc/VD9oso9OrZK5CM5u0TPmYFijfVDPNgag6mPnD\n"
-            + "zd8JCsuEj4VEy6NF1KcoCc8edQ8AZ4L6ZQ6qiV24gxLnh8xImVr5YjBKDUCdrl79\n"
-            + "0u4wekfgapSx9Sw9Ycz5dFOL07OOHPiKZwUG0f8td6oJX4Ddxset5JAm1pPcLQHR\n"
-            + "6PRx0hI/Tz7rsAI6O37/BEM15+MVGIgOSLL/SRIpOa0L8qmuUhhS6Bg=\n"
-            + "=uA5x\n"
-            + "-----END PGP PUBLIC KEY BLOCK-----\n",
-        "-----BEGIN PGP PRIVATE KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "lQOYBEx6nxoBCADjYOWOFa7ZBJpRuNspRoXBTK0LiK5zqN894b87LgIYEgUM6q5J\n"
-            + "yLNo43x7V+ow1/7BEq0JUAMSQ3uRn2jqXiJskSXvwlFYcTVFb0gY09CSD0ptHvda\n"
-            + "zqYOuM/MU1l9jqmlM+pDw/z0pLTKYmAHi6pKJ64pqccMHPUZHpLywyzSNX+JM86I\n"
-            + "K5KAsyGArtgpT9vfci3idNeXjhMR8rfLPDFbdGvGFOZrYv0cfgTbBpVEWeHjs2FR\n"
-            + "4vHG133AdjdZcvA9Y9VW34ZLeiyBEeFix7+HPVS82rko2kQxZu1UZRu340maKDAo\n"
-            + "+UVirgo0FQ8nNUR+c9oNKgiZtO39IAPJv/WZABEBAAEAB/4xKKzYqDVyM/2NN5Mi\n"
-            + "fF3EqegruzRESzlgrqLij5LiU1sGLOLbjunC/pPWMu6t+rTYV0pT3hmb5D0eAcH0\n"
-            + "EcANiuAR0wg1P9yNk36Z54mLWoTzzKMb3dunCSvb+BU8AREKZ4v5dLEGz2lK7DPo\n"
-            + "zbhWaffMiClBpC0VbjfFBo91LrVUVnhRglBYKdPLQm/Lhw5cNCYOw194ZturO+cC\n"
-            + "iQZhGSy52HMoMs4Wr470CeFZvvWaiDCirVLcj4UhMsVANFKsahMARm9c+QrGrkRP\n"
-            + "+654f8M9ptapcQYpGOMmaeZVnpocONXOTkiJd7Hhr4PRUY+QS8C8F0LbmL2ERQbL\n"
-            + "F65RBADkIelztY/8Xy2S0jsW7+xF2ziz9riOR87G6b0wrXDdFz4GHPzLvwsdXOeN\n"
-            + "cODic14d9bf5jtXr9hgbAzx55ANDjOl3jK5qil8Z9qwsrNK9Mz0wT1acQXBwf/5D\n"
-            + "hI/whBK1FsH7Y+wdX64XA3EXmclxB8GZf1JsGXF3jNH30vyS7QQA/ydoMMw8ja9L\n"
-            + "j6MxHtVHcE4A4j6tFljLDuf8icOwwNUfb7SsHTDjUI2+30ZJOv+qISrthsASCSj3\n"
-            + "AN87CGdVR62Xe923DNdW8/moKKDILNaESyOi27qhI5qWrVRgNB5QwbQcSoClUxbj\n"
-            + "V7YZSfrZkiI+GE1gh1QPMOVyCUmqu90D+wc0x0wUj8emX/4xbbujOa5RAvNcNvnD\n"
-            + "mOB2CfPWD10TEeOOlHBhuoy2/GdIl76W0szJaxnzcV82VArllSciCBzpSfkExDZ6\n"
-            + "08hA8GpOsuOmAAPwXWZsb8YZbJeM0ULMgUCGHgvUj1/pGsCVA6c7sPAdkCfAFlmO\n"
-            + "smC9bvpS2VHZPuG0HlRlc3R1c2VyIEUgPHRlc3RlQGV4YW1wbGUuY29tPokBPgQT\n"
-            + "AQIAKAUCTHqfGgIbAwUJAeEzgAYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQ\n"
-            + "Owm5f0tDh+6Fowf9FZgntlW4qc7BHe8zYJ0qzoLZrHwCFcaeO3kz53y5Lz3+plMu\n"
-            + "qVDjoQDOt8DxsPHrXWKiu0qBTjZ28ztN3ef6f0MpguTGclvFroevUct0xiyox5r1\n"
-            + "DfMT8JRvqsojE1XPscR2zJzIgEg3OCPuksT9EsHsF+/3RBbsXbQgDpW38g0GzIJI\n"
-            + "4AiQ/yvG2ON9awN2kzIWoBkthVCGy54lCTGjyPhatE7Zu2ABNcerIDstupWww2Ps\n"
-            + "ec6pGbPPci8ojc90fzalk3UMXcXHD7m8cTJSkgHScOzTElIQqOA1+w6uiHy2oAn+\n"
-            + "qW7534j6p9Tj+DrSIzUXBedGjXZevaKaurVyKJ0DmARMep8aAQgAn5r6toYnEzwD\n"
-            + "eig8r+t89vqOFtohYcmtyeLeTiTTdAz/xWBWHUlqV8sglQ9aINpGtBf37v13RhtU\n"
-            + "3WkUv8cZMQoRM8P2H3cKDNwkucFO6uKSEQO5FdzTm4C4WaoE7QiTRbiekwh7O54m\n"
-            + "z4Wup6LHuEFQEcSpdRUp8w/qaJIHG9EJad1qUEsKNnITW+mWHY3+ccK1hgqPwOPq\n"
-            + "O3/8QtaipekKOYAtOb+57c1jtDFBZnYIkantoKs+kRw0DykXFTyFOMYqaleBMcVG\n"
-            + "+u7ljwAq18L8Ev+qVIpBIZ5eQ5+6p1w9B69hRH0Ebn50ebpoqKOXhN4/bu/wq596\n"
-            + "y0o4xDB0GQARAQABAAf7Bk9bQCIXo2QJAyhaFd5qh10qhu7CyRnvG/8zKMW98mWd\n"
-            + "KxF+9hNz99qZBCuiNZBLoU0dST6OG6By/3nrDxXxAgZS3cgOj/nl1NJTRWDGHPUu\n"
-            + "LywFgj7Dwu8Y2rqlDTX8lJIS+t8n+BhtkmDHoesGmFtErh8nT/CxQuHLM60qSMgv\n"
-            + "6mSmtOkM+2KfiA5z2o1fDWXjDieW+hdgDPxkaB835wfuDn/Dsn1ch1XHON0xSyTo\n"
-            + "+c35nFXoK1pAXaoalAxZNxcXCAM3NhU37Ih4GejM0K7sSgK72HmgxtNYF77DrTIM\n"
-            + "m5+3960ri1JUuEaJ7ZcqbpKxy/GDldNCYBTx07QMzQQAyYQ+ujT9Pj8zfp1jMLRs\n"
-            + "Xn9GsvYawjo+AIZuHeUmmIXfEoyNmsEUoGHnz9ROLnJzanW5XEStiTys8tHJPIkz\n"
-            + "zL0Ce0oUF93ln0z/jQBIKaSzYB7PMmYCd7ueF94aKqAOrQ/QBb+6JsVjGAtLUoTv\n"
-            + "ey09hGYMogiBV1r0MB2Rsa8EAMrB5VKVQF6+q0XuP6ljFQRaumi4lH7PoQ65E7UD\n"
-            + "6YpyQpLBOE7dV+fHizdUuwsD/wyAOu0EskV1ZLXvXzyk10r3PRoFdpHOvijwZBGt\n"
-            + "jiOiVvK1vkQKDMBczOe74+DaknKn6HzgCsXmLgfk+P8BtLOJnCYsbS9IbnImy2vi\n"
-            + "aJC3A/9wOOK+po8C7JPHVIEfxbe7nwHOoi/h7T4uPrlq/gcQRquqGhQ16nDGYZvX\n"
-            + "ny9aPQ3NcvDR69RM2AaXav03bHVxfhVEyGjP5jLZz7956e4LlnKrsuEhDLfiv30i\n"
-            + "qCC7zNHNA99s5u25vt8AuPVVHfSQ++jifabfv5lU4FHqmK8/4EAoiQElBBgBAgAP\n"
-            + "BQJMep8aAhsMBQkB4TOAAAoJEDsJuX9LQ4fu0/wH/35/22xina8ktbvGV/kB0pH2\n"
-            + "LBqeXN/bCLdA+CDzfwMDzqG0kU39EJ3Fbux7fj4uMaeiYfbO9U85+NOuDmeH41B2\n"
-            + "dM9S1AzEH+/OiCp/Zf1fdd1qXhsA4Xe5vc/VD9oso9OrZK5CM5u0TPmYFijfVDPN\n"
-            + "gag6mPnDzd8JCsuEj4VEy6NF1KcoCc8edQ8AZ4L6ZQ6qiV24gxLnh8xImVr5YjBK\n"
-            + "DUCdrl790u4wekfgapSx9Sw9Ycz5dFOL07OOHPiKZwUG0f8td6oJX4Ddxset5JAm\n"
-            + "1pPcLQHR6PRx0hI/Tz7rsAI6O37/BEM15+MVGIgOSLL/SRIpOa0L8qmuUhhS6Bg=\n"
-            + "=HTKj\n"
-            + "-----END PGP PRIVATE KEY BLOCK-----\n");
+        """
+        -----BEGIN PGP PUBLIC KEY BLOCK-----
+        Version: GnuPG v1
+
+        mQENBEx6nxoBCADjYOWOFa7ZBJpRuNspRoXBTK0LiK5zqN894b87LgIYEgUM6q5J
+        yLNo43x7V+ow1/7BEq0JUAMSQ3uRn2jqXiJskSXvwlFYcTVFb0gY09CSD0ptHvda
+        zqYOuM/MU1l9jqmlM+pDw/z0pLTKYmAHi6pKJ64pqccMHPUZHpLywyzSNX+JM86I
+        K5KAsyGArtgpT9vfci3idNeXjhMR8rfLPDFbdGvGFOZrYv0cfgTbBpVEWeHjs2FR
+        4vHG133AdjdZcvA9Y9VW34ZLeiyBEeFix7+HPVS82rko2kQxZu1UZRu340maKDAo
+        +UVirgo0FQ8nNUR+c9oNKgiZtO39IAPJv/WZABEBAAG0HlRlc3R1c2VyIEUgPHRl
+        c3RlQGV4YW1wbGUuY29tPokBPgQTAQIAKAUCTHqfGgIbAwUJAeEzgAYLCQgHAwIG
+        FQgCCQoLBBYCAwECHgECF4AACgkQOwm5f0tDh+6Fowf9FZgntlW4qc7BHe8zYJ0q
+        zoLZrHwCFcaeO3kz53y5Lz3+plMuqVDjoQDOt8DxsPHrXWKiu0qBTjZ28ztN3ef6
+        f0MpguTGclvFroevUct0xiyox5r1DfMT8JRvqsojE1XPscR2zJzIgEg3OCPuksT9
+        EsHsF+/3RBbsXbQgDpW38g0GzIJI4AiQ/yvG2ON9awN2kzIWoBkthVCGy54lCTGj
+        yPhatE7Zu2ABNcerIDstupWww2Psec6pGbPPci8ojc90fzalk3UMXcXHD7m8cTJS
+        kgHScOzTElIQqOA1+w6uiHy2oAn+qW7534j6p9Tj+DrSIzUXBedGjXZevaKaurVy
+        KLkBDQRMep8aAQgAn5r6toYnEzwDeig8r+t89vqOFtohYcmtyeLeTiTTdAz/xWBW
+        HUlqV8sglQ9aINpGtBf37v13RhtU3WkUv8cZMQoRM8P2H3cKDNwkucFO6uKSEQO5
+        FdzTm4C4WaoE7QiTRbiekwh7O54mz4Wup6LHuEFQEcSpdRUp8w/qaJIHG9EJad1q
+        UEsKNnITW+mWHY3+ccK1hgqPwOPqO3/8QtaipekKOYAtOb+57c1jtDFBZnYIkant
+        oKs+kRw0DykXFTyFOMYqaleBMcVG+u7ljwAq18L8Ev+qVIpBIZ5eQ5+6p1w9B69h
+        RH0Ebn50ebpoqKOXhN4/bu/wq596y0o4xDB0GQARAQABiQElBBgBAgAPBQJMep8a
+        AhsMBQkB4TOAAAoJEDsJuX9LQ4fu0/wH/35/22xina8ktbvGV/kB0pH2LBqeXN/b
+        CLdA+CDzfwMDzqG0kU39EJ3Fbux7fj4uMaeiYfbO9U85+NOuDmeH41B2dM9S1AzE
+        H+/OiCp/Zf1fdd1qXhsA4Xe5vc/VD9oso9OrZK5CM5u0TPmYFijfVDPNgag6mPnD
+        zd8JCsuEj4VEy6NF1KcoCc8edQ8AZ4L6ZQ6qiV24gxLnh8xImVr5YjBKDUCdrl79
+        0u4wekfgapSx9Sw9Ycz5dFOL07OOHPiKZwUG0f8td6oJX4Ddxset5JAm1pPcLQHR
+        6PRx0hI/Tz7rsAI6O37/BEM15+MVGIgOSLL/SRIpOa0L8qmuUhhS6Bg=
+        =uA5x
+        -----END PGP PUBLIC KEY BLOCK-----
+        """,
+        """
+        -----BEGIN PGP PRIVATE KEY BLOCK-----
+        Version: GnuPG v1
+
+        lQOYBEx6nxoBCADjYOWOFa7ZBJpRuNspRoXBTK0LiK5zqN894b87LgIYEgUM6q5J
+        yLNo43x7V+ow1/7BEq0JUAMSQ3uRn2jqXiJskSXvwlFYcTVFb0gY09CSD0ptHvda
+        zqYOuM/MU1l9jqmlM+pDw/z0pLTKYmAHi6pKJ64pqccMHPUZHpLywyzSNX+JM86I
+        K5KAsyGArtgpT9vfci3idNeXjhMR8rfLPDFbdGvGFOZrYv0cfgTbBpVEWeHjs2FR
+        4vHG133AdjdZcvA9Y9VW34ZLeiyBEeFix7+HPVS82rko2kQxZu1UZRu340maKDAo
+        +UVirgo0FQ8nNUR+c9oNKgiZtO39IAPJv/WZABEBAAEAB/4xKKzYqDVyM/2NN5Mi
+        fF3EqegruzRESzlgrqLij5LiU1sGLOLbjunC/pPWMu6t+rTYV0pT3hmb5D0eAcH0
+        EcANiuAR0wg1P9yNk36Z54mLWoTzzKMb3dunCSvb+BU8AREKZ4v5dLEGz2lK7DPo
+        zbhWaffMiClBpC0VbjfFBo91LrVUVnhRglBYKdPLQm/Lhw5cNCYOw194ZturO+cC
+        iQZhGSy52HMoMs4Wr470CeFZvvWaiDCirVLcj4UhMsVANFKsahMARm9c+QrGrkRP
+        +654f8M9ptapcQYpGOMmaeZVnpocONXOTkiJd7Hhr4PRUY+QS8C8F0LbmL2ERQbL
+        F65RBADkIelztY/8Xy2S0jsW7+xF2ziz9riOR87G6b0wrXDdFz4GHPzLvwsdXOeN
+        cODic14d9bf5jtXr9hgbAzx55ANDjOl3jK5qil8Z9qwsrNK9Mz0wT1acQXBwf/5D
+        hI/whBK1FsH7Y+wdX64XA3EXmclxB8GZf1JsGXF3jNH30vyS7QQA/ydoMMw8ja9L
+        j6MxHtVHcE4A4j6tFljLDuf8icOwwNUfb7SsHTDjUI2+30ZJOv+qISrthsASCSj3
+        AN87CGdVR62Xe923DNdW8/moKKDILNaESyOi27qhI5qWrVRgNB5QwbQcSoClUxbj
+        V7YZSfrZkiI+GE1gh1QPMOVyCUmqu90D+wc0x0wUj8emX/4xbbujOa5RAvNcNvnD
+        mOB2CfPWD10TEeOOlHBhuoy2/GdIl76W0szJaxnzcV82VArllSciCBzpSfkExDZ6
+        08hA8GpOsuOmAAPwXWZsb8YZbJeM0ULMgUCGHgvUj1/pGsCVA6c7sPAdkCfAFlmO
+        smC9bvpS2VHZPuG0HlRlc3R1c2VyIEUgPHRlc3RlQGV4YW1wbGUuY29tPokBPgQT
+        AQIAKAUCTHqfGgIbAwUJAeEzgAYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQ
+        Owm5f0tDh+6Fowf9FZgntlW4qc7BHe8zYJ0qzoLZrHwCFcaeO3kz53y5Lz3+plMu
+        qVDjoQDOt8DxsPHrXWKiu0qBTjZ28ztN3ef6f0MpguTGclvFroevUct0xiyox5r1
+        DfMT8JRvqsojE1XPscR2zJzIgEg3OCPuksT9EsHsF+/3RBbsXbQgDpW38g0GzIJI
+        4AiQ/yvG2ON9awN2kzIWoBkthVCGy54lCTGjyPhatE7Zu2ABNcerIDstupWww2Ps
+        ec6pGbPPci8ojc90fzalk3UMXcXHD7m8cTJSkgHScOzTElIQqOA1+w6uiHy2oAn+
+        qW7534j6p9Tj+DrSIzUXBedGjXZevaKaurVyKJ0DmARMep8aAQgAn5r6toYnEzwD
+        eig8r+t89vqOFtohYcmtyeLeTiTTdAz/xWBWHUlqV8sglQ9aINpGtBf37v13RhtU
+        3WkUv8cZMQoRM8P2H3cKDNwkucFO6uKSEQO5FdzTm4C4WaoE7QiTRbiekwh7O54m
+        z4Wup6LHuEFQEcSpdRUp8w/qaJIHG9EJad1qUEsKNnITW+mWHY3+ccK1hgqPwOPq
+        O3/8QtaipekKOYAtOb+57c1jtDFBZnYIkantoKs+kRw0DykXFTyFOMYqaleBMcVG
+        +u7ljwAq18L8Ev+qVIpBIZ5eQ5+6p1w9B69hRH0Ebn50ebpoqKOXhN4/bu/wq596
+        y0o4xDB0GQARAQABAAf7Bk9bQCIXo2QJAyhaFd5qh10qhu7CyRnvG/8zKMW98mWd
+        KxF+9hNz99qZBCuiNZBLoU0dST6OG6By/3nrDxXxAgZS3cgOj/nl1NJTRWDGHPUu
+        LywFgj7Dwu8Y2rqlDTX8lJIS+t8n+BhtkmDHoesGmFtErh8nT/CxQuHLM60qSMgv
+        6mSmtOkM+2KfiA5z2o1fDWXjDieW+hdgDPxkaB835wfuDn/Dsn1ch1XHON0xSyTo
+        +c35nFXoK1pAXaoalAxZNxcXCAM3NhU37Ih4GejM0K7sSgK72HmgxtNYF77DrTIM
+        m5+3960ri1JUuEaJ7ZcqbpKxy/GDldNCYBTx07QMzQQAyYQ+ujT9Pj8zfp1jMLRs
+        Xn9GsvYawjo+AIZuHeUmmIXfEoyNmsEUoGHnz9ROLnJzanW5XEStiTys8tHJPIkz
+        zL0Ce0oUF93ln0z/jQBIKaSzYB7PMmYCd7ueF94aKqAOrQ/QBb+6JsVjGAtLUoTv
+        ey09hGYMogiBV1r0MB2Rsa8EAMrB5VKVQF6+q0XuP6ljFQRaumi4lH7PoQ65E7UD
+        6YpyQpLBOE7dV+fHizdUuwsD/wyAOu0EskV1ZLXvXzyk10r3PRoFdpHOvijwZBGt
+        jiOiVvK1vkQKDMBczOe74+DaknKn6HzgCsXmLgfk+P8BtLOJnCYsbS9IbnImy2vi
+        aJC3A/9wOOK+po8C7JPHVIEfxbe7nwHOoi/h7T4uPrlq/gcQRquqGhQ16nDGYZvX
+        ny9aPQ3NcvDR69RM2AaXav03bHVxfhVEyGjP5jLZz7956e4LlnKrsuEhDLfiv30i
+        qCC7zNHNA99s5u25vt8AuPVVHfSQ++jifabfv5lU4FHqmK8/4EAoiQElBBgBAgAP
+        BQJMep8aAhsMBQkB4TOAAAoJEDsJuX9LQ4fu0/wH/35/22xina8ktbvGV/kB0pH2
+        LBqeXN/bCLdA+CDzfwMDzqG0kU39EJ3Fbux7fj4uMaeiYfbO9U85+NOuDmeH41B2
+        dM9S1AzEH+/OiCp/Zf1fdd1qXhsA4Xe5vc/VD9oso9OrZK5CM5u0TPmYFijfVDPN
+        gag6mPnDzd8JCsuEj4VEy6NF1KcoCc8edQ8AZ4L6ZQ6qiV24gxLnh8xImVr5YjBK
+        DUCdrl790u4wekfgapSx9Sw9Ycz5dFOL07OOHPiKZwUG0f8td6oJX4Ddxset5JAm
+        1pPcLQHR6PRx0hI/Tz7rsAI6O37/BEM15+MVGIgOSLL/SRIpOa0L8qmuUhhS6Bg=
+        =HTKj
+        -----END PGP PRIVATE KEY BLOCK-----
+        """);
   }
 
   /**
@@ -542,99 +562,103 @@
    */
   public static TestKey keyF() throws Exception {
     return new TestKey(
-        "-----BEGIN PGP PUBLIC KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "mQENBEx+aQkBCADycHmQ8wC4GzaDIvw4uv6/HiTWOUmuLcT06PpsvNBdR2sQ6Vyy\n"
-            + "w1SAnaPmskdgxE7TXpDrwIWPmIkg8KzSfPAap6qZy5zyE1ABQa9yD9v6wsew+lM5\n"
-            + "3UdBO6HQodpWSJMbeR48mUQ96z72B7Lb2GvhFLxvcn5od9jQhbQXfb2k67l33hgR\n"
-            + "D427lxXa+qnmL9pMRGhRw6QATFX+icHxsPfpKnzuk0aY3feJm4+jr4RgHP4djH3i\n"
-            + "NZbv3ibZ24Dj3CK07PwbhqUhZwMqueWbo3ChYjLkRGT/UosNTN0EbHjqBMl4N9OT\n"
-            + "Pl2CM6kuzuaLz3ZeAf48B29GX4rAXfuJTKBbABEBAAG0HlRlc3R1c2VyIEYgPHRl\n"
-            + "c3RmQGV4YW1wbGUuY29tPokBOAQTAQIAIgUCTH5pCQIbAwYLCQgHAwIGFQgCCQoL\n"
-            + "BBYCAwECHgECF4AACgkQSp+scDH6SMRfqggAh//U/l4JuwFgWx14mo0SB9YWU81L\n"
-            + "EgUYUd2MUzvX4p/HIFQa0c7stj68Za40+O0tG/J0RCMNb7piM9JFii+MQZzOVuza\n"
-            + "4bbO59D9qboc7Anvx9hGlfIdinT+n5rwX9kZvD2D7GMskm8ZgovkvNwNKcW+5W/4\n"
-            + "ciWqCJKE/Fp9XsooJgN94pJfgDQ2WBL5KDx1aGt4wZXhH2Atl6a6oVZJIH4SaizD\n"
-            + "jau7F4vc7hBfbcDhxFcrVX1QMpzpl352cIx6KVw4FRWvQ8VKkga4JiQwosfvCT2Z\n"
-            + "pdMwy3cARynv8BWLc4Uexf88QIeClP9ZhoVeMqvHMfUb3d6Q5362VdZqI4kBIAQQ\n"
-            + "AQIACgUCTH5xcgMFCngACgkQiptSk+LTK6UqsAgAlsEmzC3Xxv4o5ui95AFbWZGi\n"
-            + "es5rI9WoW2P+6OqVUy1E8+5HdlJ8wUbU1H7JAdFTjY9rH3vKXCXsTetF4z0cupER\n"
-            + "Rkx06M9/jl5OSw8i9bPNNJFobHwiiNO00ctC1tT5oUVXVsfPQHlEbMofv8jehfgC\n"
-            + "gMqH/ve/aafKFfYCZkNHugRgLzxeDpXp3IdyXoSAFGiULnGvMDN7n61QOvEYOw2Z\n"
-            + "i63ql+bL2oj4G+/bNOkdYkuIBN4F/P45P7xy80MSOvkMH7IG/aFTKMNQGWSykKwI\n"
-            + "FRkC+y+F5Oqf/WD30GvbSA7q013sb6nHYvsaHS/48cgIJ5TSVd0LTlrF9uv43bkB\n"
-            + "DQRMfmkJAQgAzc1uAF4x16Cx4GtHI0Hvm+v7bUEUtBw2XzyOKu883XC5JmGcY18y\n"
-            + "YItRpchAtmacDpu0/2925/mWF7aS9RMgSYI/1D9LaTeimISM3iGFY35kt78NGZwJ\n"
-            + "DeCPJPI1sbOU0njfrCPTbOQuRDJ6evaBNX9HYArSEp0ygruJdOUYgnepCt4A7W95\n"
-            + "EKp9KPo7XV1K8y86vrKbgpJ+NnEi7dzMqVxnhO4wAWqb6HYcKLrEc2gVnLtzHkBl\n"
-            + "Y/6dOP15jgQKql1/yQIXae/WGT24n/VeaKqrbSmDNkhW5eW5o1Bkgy/M98oNHXd0\n"
-            + "nVrT8Lyf6un5TwMy+vk0l5AjMMtIZKS0GQARAQABiQEfBBgBAgAJBQJMfmkJAhsM\n"
-            + "AAoJEEqfrHAx+kjEvDAH/iO6BHQfFa+kqjfYD3NE+FNosXv3jiXOU7SCD2MG3AwD\n"
-            + "YqM+v1n4UvvMLLdEbtboht1Btys1vuyNM3RAmR45oh9Dfuc4SKtVzSCkKs85jNvH\n"
-            + "7Ik8gxZ9ARzJbawNzTLFyLwDdcdX42Umuvh49Pn7Nc7FDYcZLffEcTh9sZ7KyxLY\n"
-            + "qcjtnblx5oOQnYnpBbM61GvgNXC8Z+g9fg0oHRouKXKE/HDKbsN0siEf9XJFJTKd\n"
-            + "Eg1NgoyKWdaV4+pU/fTzZUvvDqOSRx8he5w64dvW9o7WdARq/3vPvHgy0O8fMTSI\n"
-            + "tmcHxCU8l0jptJz181N36Uhmjyc9oC4dn9ceSn6VDbg=\n"
-            + "=WDx2\n"
-            + "-----END PGP PUBLIC KEY BLOCK-----\n",
-        "-----BEGIN PGP PRIVATE KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "lQOYBEx+aQkBCADycHmQ8wC4GzaDIvw4uv6/HiTWOUmuLcT06PpsvNBdR2sQ6Vyy\n"
-            + "w1SAnaPmskdgxE7TXpDrwIWPmIkg8KzSfPAap6qZy5zyE1ABQa9yD9v6wsew+lM5\n"
-            + "3UdBO6HQodpWSJMbeR48mUQ96z72B7Lb2GvhFLxvcn5od9jQhbQXfb2k67l33hgR\n"
-            + "D427lxXa+qnmL9pMRGhRw6QATFX+icHxsPfpKnzuk0aY3feJm4+jr4RgHP4djH3i\n"
-            + "NZbv3ibZ24Dj3CK07PwbhqUhZwMqueWbo3ChYjLkRGT/UosNTN0EbHjqBMl4N9OT\n"
-            + "Pl2CM6kuzuaLz3ZeAf48B29GX4rAXfuJTKBbABEBAAEAB/4vTP+C5s5snS6ZDlHc\n"
-            + "datvOV/hhgLYn2huiigV4A7dLCp4/bbOz+pkP51zTLQ9bn+coLYwsPq+Bfo3OY3W\n"
-            + "cXbdFHpmEEJaPqdc32ZuICcAuVEBuA1V3FTjJtHO5U02iWleMlbSZurYE9ZQZTch\n"
-            + "yotdulB7hACivENKh9OXw7ok+1GZVvBGA8tpIwzLZo0Pkb2lDQHaL0GXAjlMNzwg\n"
-            + "cCPFtzjNu6K4g58nuYrjGiE+yWPMJgfo4fTGXcapqXgvh1tKIVxwr2YQSyEOqfMH\n"
-            + "8EwgBj5NPwv0UXAivQUkTaguUJXrlJLtS3mp45nCEAlGT4PNoMyPdvPEf62gND7C\n"
-            + "y9K1BAD493ADPAx9pWCSQI9wp4ARUelTzwHgZ6fRVIzmwO6MuZN1PrtiOLCwY5Jw\n"
-            + "r+97VvMmem7Ya3khP4vz0IiN7p1oCR5nJazk2eRaQNuim0aB0lqrTsli8OXtBlgQ\n"
-            + "5WtLcRi5798Jw8coczc5OftZKhu1SbQZ1VdDdmTbMTAsSRtMjQQA+UnU6FYJZBjE\n"
-            + "NHNheV6+k45HXHubcCm4Ka3kJK88zbZzyt+nrBLEtElosxDCqT8WbiAH7qmpnd/r\n"
-            + "ly7ryIX08etuWVYnx0Xa02cKQ6TzNcbxijeGQYGHIE0RK29nRo8zRWVmbCydqJz1\n"
-            + "5cHgcvoTu7DWWjM5QEZlLPQytJeAyocEAM6AiWDXYVZVnCB9w0wwK/9cX0v3tfYv\n"
-            + "QrJZCT3/YKxJWnMZ+LgHYO0w1B0YwGEeVTnmXODDy5mRh9lxV1aZnwKCwMR1tXTx\n"
-            + "G1potBR0GJxI2xpMb/MJPxeJCAZPu8NncRpl/8v0stiGnkpYCNR/k3JV5jEXq0u6\n"
-            + "4pDSzRGehOHnOqu0HlRlc3R1c2VyIEYgPHRlc3RmQGV4YW1wbGUuY29tPokBOAQT\n"
-            + "AQIAIgUCTH5pCQIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQSp+scDH6\n"
-            + "SMRfqggAh//U/l4JuwFgWx14mo0SB9YWU81LEgUYUd2MUzvX4p/HIFQa0c7stj68\n"
-            + "Za40+O0tG/J0RCMNb7piM9JFii+MQZzOVuza4bbO59D9qboc7Anvx9hGlfIdinT+\n"
-            + "n5rwX9kZvD2D7GMskm8ZgovkvNwNKcW+5W/4ciWqCJKE/Fp9XsooJgN94pJfgDQ2\n"
-            + "WBL5KDx1aGt4wZXhH2Atl6a6oVZJIH4SaizDjau7F4vc7hBfbcDhxFcrVX1QMpzp\n"
-            + "l352cIx6KVw4FRWvQ8VKkga4JiQwosfvCT2ZpdMwy3cARynv8BWLc4Uexf88QIeC\n"
-            + "lP9ZhoVeMqvHMfUb3d6Q5362VdZqI50DmARMfmkJAQgAzc1uAF4x16Cx4GtHI0Hv\n"
-            + "m+v7bUEUtBw2XzyOKu883XC5JmGcY18yYItRpchAtmacDpu0/2925/mWF7aS9RMg\n"
-            + "SYI/1D9LaTeimISM3iGFY35kt78NGZwJDeCPJPI1sbOU0njfrCPTbOQuRDJ6evaB\n"
-            + "NX9HYArSEp0ygruJdOUYgnepCt4A7W95EKp9KPo7XV1K8y86vrKbgpJ+NnEi7dzM\n"
-            + "qVxnhO4wAWqb6HYcKLrEc2gVnLtzHkBlY/6dOP15jgQKql1/yQIXae/WGT24n/Ve\n"
-            + "aKqrbSmDNkhW5eW5o1Bkgy/M98oNHXd0nVrT8Lyf6un5TwMy+vk0l5AjMMtIZKS0\n"
-            + "GQARAQABAAf/T22JFmhESUnSTOBqeK+Sd/WIOJ7lDCxVScVXwzdJINfIBYmnr2yG\n"
-            + "x18NuHOEkkEg2rx6ixksZZRcurMynZZvoB8+Xj69bpLT1JRXv8VlM0SNP6NjPW6M\n"
-            + "ygfQhzxZv8ck2WRgQxIin8SjHJv0zG9F5+1DEUyrzhZQb8dMYkqm/nbZ1FDnMu4F\n"
-            + "1qUZxKx0hU70tAXfywtpH9NQs8jwenUjiXA00k6A48BF7gartYtcGnEG9mk+Z+lh\n"
-            + "/uD+z5j3/ym9XqOJPpFIWhMYTLueSD5yrCT34VdIc1xBOjjtxBsCCbgSFZaewCpB\n"
-            + "5usRr2I4+CK3vbAMny5Hk+/RYZdFQkCA5wQA2JusdhwqPjfzxtcxz13Vu1ZzKR41\n"
-            + "kkno/boGh5afBlf7kL/5FXDhGVVvHMvXtQntU1kHgOcE8b2Jfy38gNGkd3TAh4Oj\n"
-            + "fLavcYyn+9tEkjRVdOeU0P9fszDA1cW5Gjuv6GkbCUSQrv68TKp/mWiTlYm+FT3a\n"
-            + "RSIz2gEyOZNkTzsEAPM6sU/VOwpJ2ppOa5+290sptjSbRNYjKlQ66nHZnbafzLz5\n"
-            + "tKpRc0BzG/N2lXwlVl5+3oXSSSbWhJscA8EFwSnAx8Id10zW5NAEfxNuqxxEXlJg\n"
-            + "kOhqwJ1JMz32xlZFRZYxSdXSycYrX/AhV7I7RQxgC48X9udMb8LIXYq0lzy7A/9p\n"
-            + "Skd2Me9JotuTN3OaR42hXozLx+yERBBEWuI3WXovWRD8b8gCfWL3P40d2UVnjFmP\n"
-            + "TZ8p9aHAd2srWgaPSZaSsHtIyI6dQGScMEOKEaCJxYvF/wuvx/MABDatcaJhMaAc\n"
-            + "W/0w+gb8Lr2hbuRhBSP754V3Amma6LxsmLRAwB6ioT7NiQEfBBgBAgAJBQJMfmkJ\n"
-            + "AhsMAAoJEEqfrHAx+kjEvDAH/iO6BHQfFa+kqjfYD3NE+FNosXv3jiXOU7SCD2MG\n"
-            + "3AwDYqM+v1n4UvvMLLdEbtboht1Btys1vuyNM3RAmR45oh9Dfuc4SKtVzSCkKs85\n"
-            + "jNvH7Ik8gxZ9ARzJbawNzTLFyLwDdcdX42Umuvh49Pn7Nc7FDYcZLffEcTh9sZ7K\n"
-            + "yxLYqcjtnblx5oOQnYnpBbM61GvgNXC8Z+g9fg0oHRouKXKE/HDKbsN0siEf9XJF\n"
-            + "JTKdEg1NgoyKWdaV4+pU/fTzZUvvDqOSRx8he5w64dvW9o7WdARq/3vPvHgy0O8f\n"
-            + "MTSItmcHxCU8l0jptJz181N36Uhmjyc9oC4dn9ceSn6VDbg=\n"
-            + "=ZLpl\n"
-            + "-----END PGP PRIVATE KEY BLOCK-----\n");
+        """
+        -----BEGIN PGP PUBLIC KEY BLOCK-----
+        Version: GnuPG v1
+
+        mQENBEx+aQkBCADycHmQ8wC4GzaDIvw4uv6/HiTWOUmuLcT06PpsvNBdR2sQ6Vyy
+        w1SAnaPmskdgxE7TXpDrwIWPmIkg8KzSfPAap6qZy5zyE1ABQa9yD9v6wsew+lM5
+        3UdBO6HQodpWSJMbeR48mUQ96z72B7Lb2GvhFLxvcn5od9jQhbQXfb2k67l33hgR
+        D427lxXa+qnmL9pMRGhRw6QATFX+icHxsPfpKnzuk0aY3feJm4+jr4RgHP4djH3i
+        NZbv3ibZ24Dj3CK07PwbhqUhZwMqueWbo3ChYjLkRGT/UosNTN0EbHjqBMl4N9OT
+        Pl2CM6kuzuaLz3ZeAf48B29GX4rAXfuJTKBbABEBAAG0HlRlc3R1c2VyIEYgPHRl
+        c3RmQGV4YW1wbGUuY29tPokBOAQTAQIAIgUCTH5pCQIbAwYLCQgHAwIGFQgCCQoL
+        BBYCAwECHgECF4AACgkQSp+scDH6SMRfqggAh//U/l4JuwFgWx14mo0SB9YWU81L
+        EgUYUd2MUzvX4p/HIFQa0c7stj68Za40+O0tG/J0RCMNb7piM9JFii+MQZzOVuza
+        4bbO59D9qboc7Anvx9hGlfIdinT+n5rwX9kZvD2D7GMskm8ZgovkvNwNKcW+5W/4
+        ciWqCJKE/Fp9XsooJgN94pJfgDQ2WBL5KDx1aGt4wZXhH2Atl6a6oVZJIH4SaizD
+        jau7F4vc7hBfbcDhxFcrVX1QMpzpl352cIx6KVw4FRWvQ8VKkga4JiQwosfvCT2Z
+        pdMwy3cARynv8BWLc4Uexf88QIeClP9ZhoVeMqvHMfUb3d6Q5362VdZqI4kBIAQQ
+        AQIACgUCTH5xcgMFCngACgkQiptSk+LTK6UqsAgAlsEmzC3Xxv4o5ui95AFbWZGi
+        es5rI9WoW2P+6OqVUy1E8+5HdlJ8wUbU1H7JAdFTjY9rH3vKXCXsTetF4z0cupER
+        Rkx06M9/jl5OSw8i9bPNNJFobHwiiNO00ctC1tT5oUVXVsfPQHlEbMofv8jehfgC
+        gMqH/ve/aafKFfYCZkNHugRgLzxeDpXp3IdyXoSAFGiULnGvMDN7n61QOvEYOw2Z
+        i63ql+bL2oj4G+/bNOkdYkuIBN4F/P45P7xy80MSOvkMH7IG/aFTKMNQGWSykKwI
+        FRkC+y+F5Oqf/WD30GvbSA7q013sb6nHYvsaHS/48cgIJ5TSVd0LTlrF9uv43bkB
+        DQRMfmkJAQgAzc1uAF4x16Cx4GtHI0Hvm+v7bUEUtBw2XzyOKu883XC5JmGcY18y
+        YItRpchAtmacDpu0/2925/mWF7aS9RMgSYI/1D9LaTeimISM3iGFY35kt78NGZwJ
+        DeCPJPI1sbOU0njfrCPTbOQuRDJ6evaBNX9HYArSEp0ygruJdOUYgnepCt4A7W95
+        EKp9KPo7XV1K8y86vrKbgpJ+NnEi7dzMqVxnhO4wAWqb6HYcKLrEc2gVnLtzHkBl
+        Y/6dOP15jgQKql1/yQIXae/WGT24n/VeaKqrbSmDNkhW5eW5o1Bkgy/M98oNHXd0
+        nVrT8Lyf6un5TwMy+vk0l5AjMMtIZKS0GQARAQABiQEfBBgBAgAJBQJMfmkJAhsM
+        AAoJEEqfrHAx+kjEvDAH/iO6BHQfFa+kqjfYD3NE+FNosXv3jiXOU7SCD2MG3AwD
+        YqM+v1n4UvvMLLdEbtboht1Btys1vuyNM3RAmR45oh9Dfuc4SKtVzSCkKs85jNvH
+        7Ik8gxZ9ARzJbawNzTLFyLwDdcdX42Umuvh49Pn7Nc7FDYcZLffEcTh9sZ7KyxLY
+        qcjtnblx5oOQnYnpBbM61GvgNXC8Z+g9fg0oHRouKXKE/HDKbsN0siEf9XJFJTKd
+        Eg1NgoyKWdaV4+pU/fTzZUvvDqOSRx8he5w64dvW9o7WdARq/3vPvHgy0O8fMTSI
+        tmcHxCU8l0jptJz181N36Uhmjyc9oC4dn9ceSn6VDbg=
+        =WDx2
+        -----END PGP PUBLIC KEY BLOCK-----
+        """,
+        """
+        -----BEGIN PGP PRIVATE KEY BLOCK-----
+        Version: GnuPG v1
+
+        lQOYBEx+aQkBCADycHmQ8wC4GzaDIvw4uv6/HiTWOUmuLcT06PpsvNBdR2sQ6Vyy
+        w1SAnaPmskdgxE7TXpDrwIWPmIkg8KzSfPAap6qZy5zyE1ABQa9yD9v6wsew+lM5
+        3UdBO6HQodpWSJMbeR48mUQ96z72B7Lb2GvhFLxvcn5od9jQhbQXfb2k67l33hgR
+        D427lxXa+qnmL9pMRGhRw6QATFX+icHxsPfpKnzuk0aY3feJm4+jr4RgHP4djH3i
+        NZbv3ibZ24Dj3CK07PwbhqUhZwMqueWbo3ChYjLkRGT/UosNTN0EbHjqBMl4N9OT
+        Pl2CM6kuzuaLz3ZeAf48B29GX4rAXfuJTKBbABEBAAEAB/4vTP+C5s5snS6ZDlHc
+        datvOV/hhgLYn2huiigV4A7dLCp4/bbOz+pkP51zTLQ9bn+coLYwsPq+Bfo3OY3W
+        cXbdFHpmEEJaPqdc32ZuICcAuVEBuA1V3FTjJtHO5U02iWleMlbSZurYE9ZQZTch
+        yotdulB7hACivENKh9OXw7ok+1GZVvBGA8tpIwzLZo0Pkb2lDQHaL0GXAjlMNzwg
+        cCPFtzjNu6K4g58nuYrjGiE+yWPMJgfo4fTGXcapqXgvh1tKIVxwr2YQSyEOqfMH
+        8EwgBj5NPwv0UXAivQUkTaguUJXrlJLtS3mp45nCEAlGT4PNoMyPdvPEf62gND7C
+        y9K1BAD493ADPAx9pWCSQI9wp4ARUelTzwHgZ6fRVIzmwO6MuZN1PrtiOLCwY5Jw
+        r+97VvMmem7Ya3khP4vz0IiN7p1oCR5nJazk2eRaQNuim0aB0lqrTsli8OXtBlgQ
+        5WtLcRi5798Jw8coczc5OftZKhu1SbQZ1VdDdmTbMTAsSRtMjQQA+UnU6FYJZBjE
+        NHNheV6+k45HXHubcCm4Ka3kJK88zbZzyt+nrBLEtElosxDCqT8WbiAH7qmpnd/r
+        ly7ryIX08etuWVYnx0Xa02cKQ6TzNcbxijeGQYGHIE0RK29nRo8zRWVmbCydqJz1
+        5cHgcvoTu7DWWjM5QEZlLPQytJeAyocEAM6AiWDXYVZVnCB9w0wwK/9cX0v3tfYv
+        QrJZCT3/YKxJWnMZ+LgHYO0w1B0YwGEeVTnmXODDy5mRh9lxV1aZnwKCwMR1tXTx
+        G1potBR0GJxI2xpMb/MJPxeJCAZPu8NncRpl/8v0stiGnkpYCNR/k3JV5jEXq0u6
+        4pDSzRGehOHnOqu0HlRlc3R1c2VyIEYgPHRlc3RmQGV4YW1wbGUuY29tPokBOAQT
+        AQIAIgUCTH5pCQIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQSp+scDH6
+        SMRfqggAh//U/l4JuwFgWx14mo0SB9YWU81LEgUYUd2MUzvX4p/HIFQa0c7stj68
+        Za40+O0tG/J0RCMNb7piM9JFii+MQZzOVuza4bbO59D9qboc7Anvx9hGlfIdinT+
+        n5rwX9kZvD2D7GMskm8ZgovkvNwNKcW+5W/4ciWqCJKE/Fp9XsooJgN94pJfgDQ2
+        WBL5KDx1aGt4wZXhH2Atl6a6oVZJIH4SaizDjau7F4vc7hBfbcDhxFcrVX1QMpzp
+        l352cIx6KVw4FRWvQ8VKkga4JiQwosfvCT2ZpdMwy3cARynv8BWLc4Uexf88QIeC
+        lP9ZhoVeMqvHMfUb3d6Q5362VdZqI50DmARMfmkJAQgAzc1uAF4x16Cx4GtHI0Hv
+        m+v7bUEUtBw2XzyOKu883XC5JmGcY18yYItRpchAtmacDpu0/2925/mWF7aS9RMg
+        SYI/1D9LaTeimISM3iGFY35kt78NGZwJDeCPJPI1sbOU0njfrCPTbOQuRDJ6evaB
+        NX9HYArSEp0ygruJdOUYgnepCt4A7W95EKp9KPo7XV1K8y86vrKbgpJ+NnEi7dzM
+        qVxnhO4wAWqb6HYcKLrEc2gVnLtzHkBlY/6dOP15jgQKql1/yQIXae/WGT24n/Ve
+        aKqrbSmDNkhW5eW5o1Bkgy/M98oNHXd0nVrT8Lyf6un5TwMy+vk0l5AjMMtIZKS0
+        GQARAQABAAf/T22JFmhESUnSTOBqeK+Sd/WIOJ7lDCxVScVXwzdJINfIBYmnr2yG
+        x18NuHOEkkEg2rx6ixksZZRcurMynZZvoB8+Xj69bpLT1JRXv8VlM0SNP6NjPW6M
+        ygfQhzxZv8ck2WRgQxIin8SjHJv0zG9F5+1DEUyrzhZQb8dMYkqm/nbZ1FDnMu4F
+        1qUZxKx0hU70tAXfywtpH9NQs8jwenUjiXA00k6A48BF7gartYtcGnEG9mk+Z+lh
+        /uD+z5j3/ym9XqOJPpFIWhMYTLueSD5yrCT34VdIc1xBOjjtxBsCCbgSFZaewCpB
+        5usRr2I4+CK3vbAMny5Hk+/RYZdFQkCA5wQA2JusdhwqPjfzxtcxz13Vu1ZzKR41
+        kkno/boGh5afBlf7kL/5FXDhGVVvHMvXtQntU1kHgOcE8b2Jfy38gNGkd3TAh4Oj
+        fLavcYyn+9tEkjRVdOeU0P9fszDA1cW5Gjuv6GkbCUSQrv68TKp/mWiTlYm+FT3a
+        RSIz2gEyOZNkTzsEAPM6sU/VOwpJ2ppOa5+290sptjSbRNYjKlQ66nHZnbafzLz5
+        tKpRc0BzG/N2lXwlVl5+3oXSSSbWhJscA8EFwSnAx8Id10zW5NAEfxNuqxxEXlJg
+        kOhqwJ1JMz32xlZFRZYxSdXSycYrX/AhV7I7RQxgC48X9udMb8LIXYq0lzy7A/9p
+        Skd2Me9JotuTN3OaR42hXozLx+yERBBEWuI3WXovWRD8b8gCfWL3P40d2UVnjFmP
+        TZ8p9aHAd2srWgaPSZaSsHtIyI6dQGScMEOKEaCJxYvF/wuvx/MABDatcaJhMaAc
+        W/0w+gb8Lr2hbuRhBSP754V3Amma6LxsmLRAwB6ioT7NiQEfBBgBAgAJBQJMfmkJ
+        AhsMAAoJEEqfrHAx+kjEvDAH/iO6BHQfFa+kqjfYD3NE+FNosXv3jiXOU7SCD2MG
+        3AwDYqM+v1n4UvvMLLdEbtboht1Btys1vuyNM3RAmR45oh9Dfuc4SKtVzSCkKs85
+        jNvH7Ik8gxZ9ARzJbawNzTLFyLwDdcdX42Umuvh49Pn7Nc7FDYcZLffEcTh9sZ7K
+        yxLYqcjtnblx5oOQnYnpBbM61GvgNXC8Z+g9fg0oHRouKXKE/HDKbsN0siEf9XJF
+        JTKdEg1NgoyKWdaV4+pU/fTzZUvvDqOSRx8he5w64dvW9o7WdARq/3vPvHgy0O8f
+        MTSItmcHxCU8l0jptJz181N36Uhmjyc9oC4dn9ceSn6VDbg=
+        =ZLpl
+        -----END PGP PRIVATE KEY BLOCK-----
+        """);
   }
 
   /**
@@ -643,99 +667,103 @@
    */
   public static TestKey keyG() throws Exception {
     return new TestKey(
-        "-----BEGIN PGP PUBLIC KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "mQENBEx+aRYBCAC77YjBScTjRFHtZvk0yyAy8KAXopbCdMBQs7S7iidFMMxhs0Uu\n"
-            + "D7GeleyVusLFJfEM0Ul0b0pLgfJx9j3cot4BTl71OqnawHp4ktuqFyTjhhYy8kBe\n"
-            + "4mliNP36WW7fYXh+f5SZqDQ6rgyoJCOmiUlosb6CM2yUPH3oDtOKg/9Z0iMUcXfQ\n"
-            + "y+bxRKSQmDtiSIS7hwUZmQoo30iAZNygMBLnYyVau3YFan+xyBMCFLa2/pfE0qaU\n"
-            + "QMy67XP8uP7DXlepfc4Lk/qa/2WnAqmuTT2ty9MG+X8M8LuiPuMWfOEx8ICUWB9s\n"
-            + "kCCMWCagS7EUIPhp6AOqjMqEWGOyLmclkGCJABEBAAG0HlRlc3R1c2VyIEcgPHRl\n"
-            + "c3RnQGV4YW1wbGUuY29tPokBOAQTAQIAIgUCTH5pFgIbAwYLCQgHAwIGFQgCCQoL\n"
-            + "BBYCAwECHgECF4AACgkQiptSk+LTK6VSwQf/WnIYkLZoARZIUfH61EDlkUPv8+6G\n"
-            + "1YY3YgFFMjeOKybu47eU3QtATEaKHphvKqFtxdNyEtmti1Zx7Cq2LzReY1KoQQ5E\n"
-            + "OlKeyxVmXAuAqoRWesxuG318rVTrozCqSdKPCHLcC26M5sO+Gd2sKbA4DjoSyfrE\n"
-            + "zEOVS1NA9dtZ7WBMXr8gjH//ob7dvuptSAlADaLYYaJugcmbzkRGRbfiCQHqv30I\n"
-            + "+81d7RAeSx8XS38YEWm2IvBLpiS/d7A/2AQ25SHxf+QMMWt83+uOuEVa9rEOraid\n"
-            + "ZC6T8vnSRu1TKkX/60LnJvAw9tigmedi21O6Gpz3H3uGyjuk9o18+m8dJokBIAQQ\n"
-            + "AQIACgUCTH5xfAMFCngACgkQSp+scDH6SMT42gf9H7K0jp6PF1vD5t90bcjtnP/t\n"
-            + "CkOXgfL3lJK/l0KMkoDzyO5z898PP8IAnAj1veJ2fNPsRP903/3K8kd9/31kBriC\n"
-            + "poTVPWBmeLut16TgSDxAQPDLsBPcKe2VadhszOQwhfmdsUlCXwXcwbiAjweXwKh+\n"
-            + "00UoW1GLnPw0T387ttCjHsLe972SVUPFxb6NUkA7val62qxDKg+6MRcf6tDs8sN8\n"
-            + "orhYgh9VJcI3Iw8qK1wHI0CenNie0U5xEkZ5U6W4lfhnL5sggjoAeVeAVLiQ4eiP\n"
-            + "sFrq4TOYq9qfuThYiRaSuTLXzuWG5NVs7NyXxOGFSkwzXrQsBo+LuPwjSCERLbkB\n"
-            + "DQRMfmkWAQgA1O0I9vfZNSRuYTx++SkJccXXqL4neVWEnQ4Ws9tzfSG0Rch3Gb/d\n"
-            + "+ckDtJhlQOdaayTVX7h5k8tTGx0myg6OjG2UM6i+aTgFAzwGnBh/N3p5tTaJhRCF\n"
-            + "x1IapX0N7ijq6rQPPCISc3CUZhCVBTnp5dk3c0/hNxsyYXlI1AwuoMabygzTFN/c\n"
-            + "b1bXp0UTTVrdN+Sj5hHVDvpxyaljLa77I0V+lI3bCil9VhQ9h/TP4C2iK3ZdXOMb\n"
-            + "uW7ANhd+I9LWulmExZIiD9RIsHvB3bDu32g1847uT+DUynKETbZWlZS0Q93Aly1N\n"
-            + "lBIkvOCVCBt+VatzZ8oBV8vbk5R41W1HywARAQABiQEfBBgBAgAJBQJMfmkWAhsM\n"
-            + "AAoJEIqbUpPi0yul/doH+wR+o6UCdD6OZxGMx7d0a7yDJqQFkFf2DRsJvY2suug0\n"
-            + "CMJZRWiA+hIin5P6Brn/eb5nTdWgzlrHxkvb68YkevHALdOvmrYNQFXbb9uWGgEf\n"
-            + "3qERdI8ayJsSTqYsTqyuh9YVz21kADxTHN3JkJ4evjHpyz0Xbtq+oDADg+uswj1b\n"
-            + "ihHthFif54vNMEIW9rX9T7ufhXKamr4LuGwKTPTxV8gEPW4h4ZoQwFKV2qOjR+su\n"
-            + "tHnuXVL24kTnv8CHXUVzJXVTNz7i7fAJTgWc9drH6Ktp3XHfLDBwzT5/5ZhyxGJk\n"
-            + "Qq2Jm/Q8mNkXi34H2DeQ3VPtjtMLr9JR9pf6ivmvUag=\n"
-            + "=34GE\n"
-            + "-----END PGP PUBLIC KEY BLOCK-----\n",
-        "-----BEGIN PGP PRIVATE KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "lQOXBEx+aRYBCAC77YjBScTjRFHtZvk0yyAy8KAXopbCdMBQs7S7iidFMMxhs0Uu\n"
-            + "D7GeleyVusLFJfEM0Ul0b0pLgfJx9j3cot4BTl71OqnawHp4ktuqFyTjhhYy8kBe\n"
-            + "4mliNP36WW7fYXh+f5SZqDQ6rgyoJCOmiUlosb6CM2yUPH3oDtOKg/9Z0iMUcXfQ\n"
-            + "y+bxRKSQmDtiSIS7hwUZmQoo30iAZNygMBLnYyVau3YFan+xyBMCFLa2/pfE0qaU\n"
-            + "QMy67XP8uP7DXlepfc4Lk/qa/2WnAqmuTT2ty9MG+X8M8LuiPuMWfOEx8ICUWB9s\n"
-            + "kCCMWCagS7EUIPhp6AOqjMqEWGOyLmclkGCJABEBAAEAB/QJiwZmylg1MkL2y0Pc\n"
-            + "anQ4If//M0J0nXkmn/mNjHZyDQhT7caVkDZ01ygsck9xs3uKKxaP0xbyvqaRIvAB\n"
-            + "REQBzPkFevUlJqERfmOpP4OgCi8WZzbdmqG/WvGKxP/cWBbGVbQ2GVSNpkj+QNeO\n"
-            + "nWoc5unFstbQsEG0hww2/Hz7EppYoBvDrDLY1EPKzr0r6sk1O5gk3VWOqMEJVCh+\n"
-            + "K7EV4pPGmzMrfZQ0jSwRpr0HhzzhDYR7+QUbxr4OS5PoSJDFh0+A5kqFagyupe7A\n"
-            + "96L3Lh7wJBQJsOe5xjOu3lkFp+3vU+Mq7VzO9Fnp9BCwjb4mEjI39bJdGeeOVCWR\n"
-            + "sYEEAMjmftMhIHrjGRlbZVrLcZY8Du4CFQqImb2Tluo/6siIEurVp4F2swZFm7fw\n"
-            + "B2v09GGJ6zKpauJuxlbwo3CFnxbk24W39F/SixZLggLPtNOXdSrLIQrQ1AXu5ucQ\n"
-            + "oCnXS5FaVkD3Rtd53hSMIf2xJiSRKGp/1X9hga/phScud7URBADveDh1oEmwl3gc\n"
-            + "gorhABLYV7cPrARteQRV13tYWcuAZ6WjqNlbbW2mzBE7KTh4bgTzIX0uQ6SZ7bPl\n"
-            + "RmuKQHrdOO9vFGiSf3zDnIg8fhqSyy2SNrC/e7teuaguGCrg5GrP5izBAsiwvXbt\n"
-            + "ST3OG7c8Ky717JGTiUeTJoe4IaET+QP/SB4uQzVTrbXjBNtq1KqL/CT7l2ABnXsn\n"
-            + "psaVwHOMmY/wP+PiazMEDvLInDAu7R8oLNGqYR+7UYmYeAGmWgrc0L3yFVC01tTG\n"
-            + "bk7Yt/V5KRKVO2I9x+2CP0v0EqW4BNOJzbx5TJ5lBFLMTvbviOdsoDXw0S98HIHB\n"
-            + "T1bFFmhVeulCDLQeVGVzdHVzZXIgRyA8dGVzdGdAZXhhbXBsZS5jb20+iQE4BBMB\n"
-            + "AgAiBQJMfmkWAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRCKm1KT4tMr\n"
-            + "pVLBB/9achiQtmgBFkhR8frUQOWRQ+/z7obVhjdiAUUyN44rJu7jt5TdC0BMRooe\n"
-            + "mG8qoW3F03IS2a2LVnHsKrYvNF5jUqhBDkQ6Up7LFWZcC4CqhFZ6zG4bfXytVOuj\n"
-            + "MKpJ0o8IctwLbozmw74Z3awpsDgOOhLJ+sTMQ5VLU0D121ntYExevyCMf/+hvt2+\n"
-            + "6m1ICUANothhom6ByZvOREZFt+IJAeq/fQj7zV3tEB5LHxdLfxgRabYi8EumJL93\n"
-            + "sD/YBDblIfF/5Awxa3zf6464RVr2sQ6tqJ1kLpPy+dJG7VMqRf/rQucm8DD22KCZ\n"
-            + "52LbU7oanPcfe4bKO6T2jXz6bx0mnQOYBEx+aRYBCADU7Qj299k1JG5hPH75KQlx\n"
-            + "xdeovid5VYSdDhaz23N9IbRFyHcZv935yQO0mGVA51prJNVfuHmTy1MbHSbKDo6M\n"
-            + "bZQzqL5pOAUDPAacGH83enm1NomFEIXHUhqlfQ3uKOrqtA88IhJzcJRmEJUFOenl\n"
-            + "2TdzT+E3GzJheUjUDC6gxpvKDNMU39xvVtenRRNNWt035KPmEdUO+nHJqWMtrvsj\n"
-            + "RX6UjdsKKX1WFD2H9M/gLaIrdl1c4xu5bsA2F34j0ta6WYTFkiIP1Eiwe8HdsO7f\n"
-            + "aDXzju5P4NTKcoRNtlaVlLRD3cCXLU2UEiS84JUIG35Vq3NnygFXy9uTlHjVbUfL\n"
-            + "ABEBAAEAB/48KLaaNJ+xhJgNMA797crF0uyiOAumG/PqfeMLMQs5xQ6OktuXsl6Q\n"
-            + "pus9mLsu8c7Zq9//efsbt1xFMmDVwPQkmAdB60DVMKc16T1C2CcFcTy25vBG4Mqz\n"
-            + "bK6rqCAJ9JSe+H2/cy78X8gF6FR6VAkSUGN62IxcyfnbkW1yv/hiowZ5pQpGVjBH\n"
-            + "sjfu+6HGZhdJIyzrjnVjTJhXNCodtKq1lQGuL2t3ZB6osOXEsFtsI6lQF2s6QZZd\n"
-            + "MUOpSO+X1Rb5TCpWpR/Yj43sH6Tq7LZWEml9fV4wKe2PQWmFW+L8eZCwbYEz6GgZ\n"
-            + "w2pMoMxxOZJsOMOq4LFs4r9qaNQI+sU1BADZhx42JjqBIUsq0OhQcCizjCbPURNw\n"
-            + "7HRfPV8SQkldzmccVzGwFIKQqAVglNdT9AQefUQzx84CRqmWaROXaypkulOB79gM\n"
-            + "R/C/aXOdWz9/dGJ9fT/gcgq1vg9zt7dPE5QIYlhmNdfQPt6R50bUTXe22N2UYL98\n"
-            + "n1pQrhAdlsbT3QQA+pWPXQE4k3Hm7pwCycM2d4TmOIfB6YiaxjMNsZiepV4bqWPX\n"
-            + "iaHh0gw1f8Av6zmMncQELKRspA8Zrj3ZzB/OvNwfpgpqmjS0LyH4u8fGttm7y3In\n"
-            + "/NxZO33omf5vdB2yptzE6DegtsvS94ux6zp01SuzgCXjQbiSjb/VDL0/A8cD/1sQ\n"
-            + "PQGP1yrhn8aX/HAxgJv8cdI6ZnrSUW+G8RnhX281dl5a9so8APchhqeXspYFX6DJ\n"
-            + "Br6MqNkX69a7jthdLZCxaa3hGInr+A/nPVkNEHhjQ8a/kI+28ChRWndofme10hje\n"
-            + "QISFfGuMf6ULK9uo4d1MzGlstfcNRecizfniKby3SBmJAR8EGAECAAkFAkx+aRYC\n"
-            + "GwwACgkQiptSk+LTK6X92gf7BH6jpQJ0Po5nEYzHt3RrvIMmpAWQV/YNGwm9jay6\n"
-            + "6DQIwllFaID6EiKfk/oGuf95vmdN1aDOWsfGS9vrxiR68cAt06+atg1AVdtv25Ya\n"
-            + "AR/eoRF0jxrImxJOpixOrK6H1hXPbWQAPFMc3cmQnh6+MenLPRdu2r6gMAOD66zC\n"
-            + "PVuKEe2EWJ/ni80wQhb2tf1Pu5+Fcpqavgu4bApM9PFXyAQ9biHhmhDAUpXao6NH\n"
-            + "6y60ee5dUvbiROe/wIddRXMldVM3PuLt8AlOBZz12sfoq2ndcd8sMHDNPn/lmHLE\n"
-            + "YmRCrYmb9DyY2ReLfgfYN5DdU+2O0wuv0lH2l/qK+a9RqA==\n"
-            + "=T1WV\n"
-            + "-----END PGP PRIVATE KEY BLOCK-----\n");
+        """
+        -----BEGIN PGP PUBLIC KEY BLOCK-----
+        Version: GnuPG v1
+
+        mQENBEx+aRYBCAC77YjBScTjRFHtZvk0yyAy8KAXopbCdMBQs7S7iidFMMxhs0Uu
+        D7GeleyVusLFJfEM0Ul0b0pLgfJx9j3cot4BTl71OqnawHp4ktuqFyTjhhYy8kBe
+        4mliNP36WW7fYXh+f5SZqDQ6rgyoJCOmiUlosb6CM2yUPH3oDtOKg/9Z0iMUcXfQ
+        y+bxRKSQmDtiSIS7hwUZmQoo30iAZNygMBLnYyVau3YFan+xyBMCFLa2/pfE0qaU
+        QMy67XP8uP7DXlepfc4Lk/qa/2WnAqmuTT2ty9MG+X8M8LuiPuMWfOEx8ICUWB9s
+        kCCMWCagS7EUIPhp6AOqjMqEWGOyLmclkGCJABEBAAG0HlRlc3R1c2VyIEcgPHRl
+        c3RnQGV4YW1wbGUuY29tPokBOAQTAQIAIgUCTH5pFgIbAwYLCQgHAwIGFQgCCQoL
+        BBYCAwECHgECF4AACgkQiptSk+LTK6VSwQf/WnIYkLZoARZIUfH61EDlkUPv8+6G
+        1YY3YgFFMjeOKybu47eU3QtATEaKHphvKqFtxdNyEtmti1Zx7Cq2LzReY1KoQQ5E
+        OlKeyxVmXAuAqoRWesxuG318rVTrozCqSdKPCHLcC26M5sO+Gd2sKbA4DjoSyfrE
+        zEOVS1NA9dtZ7WBMXr8gjH//ob7dvuptSAlADaLYYaJugcmbzkRGRbfiCQHqv30I
+        +81d7RAeSx8XS38YEWm2IvBLpiS/d7A/2AQ25SHxf+QMMWt83+uOuEVa9rEOraid
+        ZC6T8vnSRu1TKkX/60LnJvAw9tigmedi21O6Gpz3H3uGyjuk9o18+m8dJokBIAQQ
+        AQIACgUCTH5xfAMFCngACgkQSp+scDH6SMT42gf9H7K0jp6PF1vD5t90bcjtnP/t
+        CkOXgfL3lJK/l0KMkoDzyO5z898PP8IAnAj1veJ2fNPsRP903/3K8kd9/31kBriC
+        poTVPWBmeLut16TgSDxAQPDLsBPcKe2VadhszOQwhfmdsUlCXwXcwbiAjweXwKh+
+        00UoW1GLnPw0T387ttCjHsLe972SVUPFxb6NUkA7val62qxDKg+6MRcf6tDs8sN8
+        orhYgh9VJcI3Iw8qK1wHI0CenNie0U5xEkZ5U6W4lfhnL5sggjoAeVeAVLiQ4eiP
+        sFrq4TOYq9qfuThYiRaSuTLXzuWG5NVs7NyXxOGFSkwzXrQsBo+LuPwjSCERLbkB
+        DQRMfmkWAQgA1O0I9vfZNSRuYTx++SkJccXXqL4neVWEnQ4Ws9tzfSG0Rch3Gb/d
+        +ckDtJhlQOdaayTVX7h5k8tTGx0myg6OjG2UM6i+aTgFAzwGnBh/N3p5tTaJhRCF
+        x1IapX0N7ijq6rQPPCISc3CUZhCVBTnp5dk3c0/hNxsyYXlI1AwuoMabygzTFN/c
+        b1bXp0UTTVrdN+Sj5hHVDvpxyaljLa77I0V+lI3bCil9VhQ9h/TP4C2iK3ZdXOMb
+        uW7ANhd+I9LWulmExZIiD9RIsHvB3bDu32g1847uT+DUynKETbZWlZS0Q93Aly1N
+        lBIkvOCVCBt+VatzZ8oBV8vbk5R41W1HywARAQABiQEfBBgBAgAJBQJMfmkWAhsM
+        AAoJEIqbUpPi0yul/doH+wR+o6UCdD6OZxGMx7d0a7yDJqQFkFf2DRsJvY2suug0
+        CMJZRWiA+hIin5P6Brn/eb5nTdWgzlrHxkvb68YkevHALdOvmrYNQFXbb9uWGgEf
+        3qERdI8ayJsSTqYsTqyuh9YVz21kADxTHN3JkJ4evjHpyz0Xbtq+oDADg+uswj1b
+        ihHthFif54vNMEIW9rX9T7ufhXKamr4LuGwKTPTxV8gEPW4h4ZoQwFKV2qOjR+su
+        tHnuXVL24kTnv8CHXUVzJXVTNz7i7fAJTgWc9drH6Ktp3XHfLDBwzT5/5ZhyxGJk
+        Qq2Jm/Q8mNkXi34H2DeQ3VPtjtMLr9JR9pf6ivmvUag=
+        =34GE
+        -----END PGP PUBLIC KEY BLOCK-----
+        """,
+        """
+        -----BEGIN PGP PRIVATE KEY BLOCK-----
+        Version: GnuPG v1
+
+        lQOXBEx+aRYBCAC77YjBScTjRFHtZvk0yyAy8KAXopbCdMBQs7S7iidFMMxhs0Uu
+        D7GeleyVusLFJfEM0Ul0b0pLgfJx9j3cot4BTl71OqnawHp4ktuqFyTjhhYy8kBe
+        4mliNP36WW7fYXh+f5SZqDQ6rgyoJCOmiUlosb6CM2yUPH3oDtOKg/9Z0iMUcXfQ
+        y+bxRKSQmDtiSIS7hwUZmQoo30iAZNygMBLnYyVau3YFan+xyBMCFLa2/pfE0qaU
+        QMy67XP8uP7DXlepfc4Lk/qa/2WnAqmuTT2ty9MG+X8M8LuiPuMWfOEx8ICUWB9s
+        kCCMWCagS7EUIPhp6AOqjMqEWGOyLmclkGCJABEBAAEAB/QJiwZmylg1MkL2y0Pc
+        anQ4If//M0J0nXkmn/mNjHZyDQhT7caVkDZ01ygsck9xs3uKKxaP0xbyvqaRIvAB
+        REQBzPkFevUlJqERfmOpP4OgCi8WZzbdmqG/WvGKxP/cWBbGVbQ2GVSNpkj+QNeO
+        nWoc5unFstbQsEG0hww2/Hz7EppYoBvDrDLY1EPKzr0r6sk1O5gk3VWOqMEJVCh+
+        K7EV4pPGmzMrfZQ0jSwRpr0HhzzhDYR7+QUbxr4OS5PoSJDFh0+A5kqFagyupe7A
+        96L3Lh7wJBQJsOe5xjOu3lkFp+3vU+Mq7VzO9Fnp9BCwjb4mEjI39bJdGeeOVCWR
+        sYEEAMjmftMhIHrjGRlbZVrLcZY8Du4CFQqImb2Tluo/6siIEurVp4F2swZFm7fw
+        B2v09GGJ6zKpauJuxlbwo3CFnxbk24W39F/SixZLggLPtNOXdSrLIQrQ1AXu5ucQ
+        oCnXS5FaVkD3Rtd53hSMIf2xJiSRKGp/1X9hga/phScud7URBADveDh1oEmwl3gc
+        gorhABLYV7cPrARteQRV13tYWcuAZ6WjqNlbbW2mzBE7KTh4bgTzIX0uQ6SZ7bPl
+        RmuKQHrdOO9vFGiSf3zDnIg8fhqSyy2SNrC/e7teuaguGCrg5GrP5izBAsiwvXbt
+        ST3OG7c8Ky717JGTiUeTJoe4IaET+QP/SB4uQzVTrbXjBNtq1KqL/CT7l2ABnXsn
+        psaVwHOMmY/wP+PiazMEDvLInDAu7R8oLNGqYR+7UYmYeAGmWgrc0L3yFVC01tTG
+        bk7Yt/V5KRKVO2I9x+2CP0v0EqW4BNOJzbx5TJ5lBFLMTvbviOdsoDXw0S98HIHB
+        T1bFFmhVeulCDLQeVGVzdHVzZXIgRyA8dGVzdGdAZXhhbXBsZS5jb20+iQE4BBMB
+        AgAiBQJMfmkWAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRCKm1KT4tMr
+        pVLBB/9achiQtmgBFkhR8frUQOWRQ+/z7obVhjdiAUUyN44rJu7jt5TdC0BMRooe
+        mG8qoW3F03IS2a2LVnHsKrYvNF5jUqhBDkQ6Up7LFWZcC4CqhFZ6zG4bfXytVOuj
+        MKpJ0o8IctwLbozmw74Z3awpsDgOOhLJ+sTMQ5VLU0D121ntYExevyCMf/+hvt2+
+        6m1ICUANothhom6ByZvOREZFt+IJAeq/fQj7zV3tEB5LHxdLfxgRabYi8EumJL93
+        sD/YBDblIfF/5Awxa3zf6464RVr2sQ6tqJ1kLpPy+dJG7VMqRf/rQucm8DD22KCZ
+        52LbU7oanPcfe4bKO6T2jXz6bx0mnQOYBEx+aRYBCADU7Qj299k1JG5hPH75KQlx
+        xdeovid5VYSdDhaz23N9IbRFyHcZv935yQO0mGVA51prJNVfuHmTy1MbHSbKDo6M
+        bZQzqL5pOAUDPAacGH83enm1NomFEIXHUhqlfQ3uKOrqtA88IhJzcJRmEJUFOenl
+        2TdzT+E3GzJheUjUDC6gxpvKDNMU39xvVtenRRNNWt035KPmEdUO+nHJqWMtrvsj
+        RX6UjdsKKX1WFD2H9M/gLaIrdl1c4xu5bsA2F34j0ta6WYTFkiIP1Eiwe8HdsO7f
+        aDXzju5P4NTKcoRNtlaVlLRD3cCXLU2UEiS84JUIG35Vq3NnygFXy9uTlHjVbUfL
+        ABEBAAEAB/48KLaaNJ+xhJgNMA797crF0uyiOAumG/PqfeMLMQs5xQ6OktuXsl6Q
+        pus9mLsu8c7Zq9//efsbt1xFMmDVwPQkmAdB60DVMKc16T1C2CcFcTy25vBG4Mqz
+        bK6rqCAJ9JSe+H2/cy78X8gF6FR6VAkSUGN62IxcyfnbkW1yv/hiowZ5pQpGVjBH
+        sjfu+6HGZhdJIyzrjnVjTJhXNCodtKq1lQGuL2t3ZB6osOXEsFtsI6lQF2s6QZZd
+        MUOpSO+X1Rb5TCpWpR/Yj43sH6Tq7LZWEml9fV4wKe2PQWmFW+L8eZCwbYEz6GgZ
+        w2pMoMxxOZJsOMOq4LFs4r9qaNQI+sU1BADZhx42JjqBIUsq0OhQcCizjCbPURNw
+        7HRfPV8SQkldzmccVzGwFIKQqAVglNdT9AQefUQzx84CRqmWaROXaypkulOB79gM
+        R/C/aXOdWz9/dGJ9fT/gcgq1vg9zt7dPE5QIYlhmNdfQPt6R50bUTXe22N2UYL98
+        n1pQrhAdlsbT3QQA+pWPXQE4k3Hm7pwCycM2d4TmOIfB6YiaxjMNsZiepV4bqWPX
+        iaHh0gw1f8Av6zmMncQELKRspA8Zrj3ZzB/OvNwfpgpqmjS0LyH4u8fGttm7y3In
+        /NxZO33omf5vdB2yptzE6DegtsvS94ux6zp01SuzgCXjQbiSjb/VDL0/A8cD/1sQ
+        PQGP1yrhn8aX/HAxgJv8cdI6ZnrSUW+G8RnhX281dl5a9so8APchhqeXspYFX6DJ
+        Br6MqNkX69a7jthdLZCxaa3hGInr+A/nPVkNEHhjQ8a/kI+28ChRWndofme10hje
+        QISFfGuMf6ULK9uo4d1MzGlstfcNRecizfniKby3SBmJAR8EGAECAAkFAkx+aRYC
+        GwwACgkQiptSk+LTK6X92gf7BH6jpQJ0Po5nEYzHt3RrvIMmpAWQV/YNGwm9jay6
+        6DQIwllFaID6EiKfk/oGuf95vmdN1aDOWsfGS9vrxiR68cAt06+atg1AVdtv25Ya
+        AR/eoRF0jxrImxJOpixOrK6H1hXPbWQAPFMc3cmQnh6+MenLPRdu2r6gMAOD66zC
+        PVuKEe2EWJ/ni80wQhb2tf1Pu5+Fcpqavgu4bApM9PFXyAQ9biHhmhDAUpXao6NH
+        6y60ee5dUvbiROe/wIddRXMldVM3PuLt8AlOBZz12sfoq2ndcd8sMHDNPn/lmHLE
+        YmRCrYmb9DyY2ReLfgfYN5DdU+2O0wuv0lH2l/qK+a9RqA==
+        =T1WV
+        -----END PGP PRIVATE KEY BLOCK-----
+        """);
   }
 
   /**
@@ -744,99 +772,103 @@
    */
   public static TestKey keyH() throws Exception {
     return new TestKey(
-        "-----BEGIN PGP PUBLIC KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "mQENBEx+aSUBCADzpZ1h9awUQR1ChzrMhtoE1ltyTlJpS1G5HFEov9QNxVDTjpB8\n"
-            + "PMdb20NNdk/7g6E+ETpCBJGPoC4/TPFDiqe+UI7cRrRZJVbInkCbflYycLTUt9qW\n"
-            + "5c7IuyZA1+cSYaKp3jYccFZfIWvfTWDLWyUozTs9t1TsI28s3r5fBPvrZ+F1nYv/\n"
-            + "xpSkx3Zsxnn7QJTnd63rZdp0RdfJmF2rXERwR6XVtuLj5CqrFoLxy6OrSOl4am4J\n"
-            + "C2HRWhskB21LpdRtloY8bz0DOn6W6JUFRmSxQ1kbPClOXaiNhzMI0fD/KFnHImgR\n"
-            + "IKbbQyHHsKHBjNyn+zTIm5zUL6JMZMf9PoSZABEBAAG0HlRlc3R1c2VyIEggPHRl\n"
-            + "c3RoQGV4YW1wbGUuY29tPokBOAQTAQIAIgUCTH5pJQIbAwYLCQgHAwIGFQgCCQoL\n"
-            + "BBYCAwECHgECF4AACgkQZcQzxAgOVyORcAf/QaHVlyhlBnU4edujW2uG/PFrZvwK\n"
-            + "fqOKW0QqQ7kVN8okKhnFv4y11IwLIzL9mOLYe2+Zyv3I3bz4X8Xw+MsBF6sMWLLf\n"
-            + "9ieu4Wz/5ScVu0PxY36kgV0AQRiLXk802Vk4t9jElCp9qx/dDln7f3879LLb3wNt\n"
-            + "fajne8EH0hjR4E3joPoG+IXSvSzWcPoZTmAZOKHPcRS8iqy0Ao8/UuQWYCedI/4R\n"
-            + "S1IJaByk8mmkMkqqV0kuPyDkvGpqhfh9zFYh97LuKcJktRTEBp3YMvuGcBDBwofG\n"
-            + "vYIVEMr7Ci5rowRQO/sxJfI1zNSWterWC46v6tOb9IvenOgP0/dQxlU82YkBIAQQ\n"
-            + "AQIACgUCTH5xmAMFAXgACgkQ0CLaOl6a7dCYuQf/V2i3Ih5Dqze0Rz5zoTD56/J7\n"
-            + "0SA4/SFm5eDUirY5B9BohkyxoMVG04uyjUmVs62ree7N0IASmeiF/wkBUZ/r/rr/\n"
-            + "0ntGj43y+1JpuSEohZOfgZJryDKRqyVWhRbeBj0g/SzxIQ1lEt2iHFvdSlfFVd+a\n"
-            + "SH1uDDjT/ZATKfAXcgeajUirWorJRaldue7O4oFe67fMLy36ewvpaMVZ+SpxH4CC\n"
-            + "Owq4Ls3dIAg2C5GQK8G0G7FwT1M26EPg66C79EGYkaxprgrilWE6l7QHc484TY1L\n"
-            + "ys04qKoPRnBinmrRxgRyyimvDN/+nd1jdM6nMe1gVLL3s5Vgo0fJMwNhDZMtdrkB\n"
-            + "DQRMfmklAQgAyajPVMt+OXO1ow7xzb0aZYNa5Xdv+w50JzVeWI0boPOuOmq6RCc1\n"
-            + "3NhOmBzx3CKH6zbSRoLBCZWM3cs1EQbl+8noaxq6YQVWiaROX8U7CThYA50jONP/\n"
-            + "qEk655QFsP8Bq96Z5AT/MflxEMayOtQywUFREF4/olhXvJOdurZfQPGnIis35NUc\n"
-            + "IaubI+gGVsluqWBohLOgqzyF7GMlv+Y2JZE5JKGSTO7ZosyI+OCNdZ6X2CJdDPZ1\n"
-            + "325QHYkmqiMJtb73AYTXurL7NNTxdxQVOnfvwXXW4mgHwPEHr8PU30+2xgo1ktrr\n"
-            + "rpFsd0o2UFhybTe7w1z2sAO1gP5s1bbGlwARAQABiQEfBBgBAgAJBQJMfmklAhsM\n"
-            + "AAoJEGXEM8QIDlcjqkQIAI78nwAgO5EgrUDoFikH6d36Kie9SHleaYcSX2c95Vqc\n"
-            + "umuiSAhaulGX0gM/jwvZkoawSyWIq+O2sPSc9F7VzdYdEnWVj2J5BpVx83TRPrTu\n"
-            + "72tsJ97op6JZz+Q8HwTLYJBmyW3/TEKh+iRL9CBtfTVywodZa58j41vCkx37NFPw\n"
-            + "plglT/Se1/US1rWYTH3Kfqo5zNARLUYzAdcxEpjwXWOvqnybn86KfMwqiOunz8eq\n"
-            + "MnTQYECfUrhX2WrbEAjCSc6/LfrTv/S+cO0rvulO/R97gG99pZdWSUjZypU5KLbp\n"
-            + "MBh0qq2wQxO2iagNXE6ms3kV/XihvCpXo9RArmldmW0=\n"
-            + "=lddL\n"
-            + "-----END PGP PUBLIC KEY BLOCK-----\n",
-        "-----BEGIN PGP PRIVATE KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "lQOYBEx+aSUBCADzpZ1h9awUQR1ChzrMhtoE1ltyTlJpS1G5HFEov9QNxVDTjpB8\n"
-            + "PMdb20NNdk/7g6E+ETpCBJGPoC4/TPFDiqe+UI7cRrRZJVbInkCbflYycLTUt9qW\n"
-            + "5c7IuyZA1+cSYaKp3jYccFZfIWvfTWDLWyUozTs9t1TsI28s3r5fBPvrZ+F1nYv/\n"
-            + "xpSkx3Zsxnn7QJTnd63rZdp0RdfJmF2rXERwR6XVtuLj5CqrFoLxy6OrSOl4am4J\n"
-            + "C2HRWhskB21LpdRtloY8bz0DOn6W6JUFRmSxQ1kbPClOXaiNhzMI0fD/KFnHImgR\n"
-            + "IKbbQyHHsKHBjNyn+zTIm5zUL6JMZMf9PoSZABEBAAEAB/wPPOigp4d9VcwxbLkz\n"
-            + "8OwiONDLz5OuY6hHCjsWMBcgTFqffI9TQc7bExW8ur1KVuNm+RdaaSQ8ZhF2YobF\n"
-            + "SV7v02R36NEfMStiDSmvv+E+stdQZXY9kT5TRgcgr5ATUXllo9DhCvKP7Qxs0Q9Q\n"
-            + "cJEcoedGVxiv0xCBLyYbVbm2sW+GJYjq0R5loaOy/Swbt5vOKQsajU8iyA4czSE8\n"
-            + "Ryr63OtwZ1TZsxekj//HKcngnptYY/FT5TPe4uzw8g1tJTIg/OZXrm8CahWzpfE3\n"
-            + "q8lGafhd0GjLftA9ffIHF0cAUs7HklMrgIKGdVPXfQmPzqDpmH5FO2y6QmqTG0v6\n"
-            + "JYW9BAD4Iobwh80MT3JZhJ0jGYMdi07cRyFN+hRwVKgNcBTdx3QGpGJatcyumD0C\n"
-            + "Yn/aXAn+XUkewSgYhdj9sSRodnWGoavdWELxUQkktsdiFg2/rnqmpqRXTGfR/tDh\n"
-            + "ohD2JaPrsavmUF6ShT3stGp8nUN+n6Bhd+QosaCZm5TC1CtA7QQA+16rrNNdP8XN\n"
-            + "MvpQRqJM5ljH0haqR/yD8vdCCZjk23hBk3YsXwSrhSbPzMeZC2FcDqkQTraTxrSG\n"
-            + "U0+xK3NjKKtbzCjQFH4cy4zdNMUX04OWopLGOEnnvTYukGtXT4lZQ9qm8ZBPh5a4\n"
-            + "cXfWy3ovjvRbxUuFOWm0gOfIoRcuWN0D/isTjqPmjihCuWkKTfa3xoq+dD7ynYhg\n"
-            + "Yu3UKfCqbNVor59ZrB4AkQiaVIDLKim3E1XDMS+IukmTuNVXpJeqK32tAYbEduHM\n"
-            + "7kwEq7SgVh34QvryKjCC/EUkDcjSQ+xlUaKl8QKYOdwtH97zZYK6QixB4uNQ6CuM\n"
-            + "75dqTZ6iQw7jQA+0HlRlc3R1c2VyIEggPHRlc3RoQGV4YW1wbGUuY29tPokBOAQT\n"
-            + "AQIAIgUCTH5pJQIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQZcQzxAgO\n"
-            + "VyORcAf/QaHVlyhlBnU4edujW2uG/PFrZvwKfqOKW0QqQ7kVN8okKhnFv4y11IwL\n"
-            + "IzL9mOLYe2+Zyv3I3bz4X8Xw+MsBF6sMWLLf9ieu4Wz/5ScVu0PxY36kgV0AQRiL\n"
-            + "Xk802Vk4t9jElCp9qx/dDln7f3879LLb3wNtfajne8EH0hjR4E3joPoG+IXSvSzW\n"
-            + "cPoZTmAZOKHPcRS8iqy0Ao8/UuQWYCedI/4RS1IJaByk8mmkMkqqV0kuPyDkvGpq\n"
-            + "hfh9zFYh97LuKcJktRTEBp3YMvuGcBDBwofGvYIVEMr7Ci5rowRQO/sxJfI1zNSW\n"
-            + "terWC46v6tOb9IvenOgP0/dQxlU82Z0DmARMfmklAQgAyajPVMt+OXO1ow7xzb0a\n"
-            + "ZYNa5Xdv+w50JzVeWI0boPOuOmq6RCc13NhOmBzx3CKH6zbSRoLBCZWM3cs1EQbl\n"
-            + "+8noaxq6YQVWiaROX8U7CThYA50jONP/qEk655QFsP8Bq96Z5AT/MflxEMayOtQy\n"
-            + "wUFREF4/olhXvJOdurZfQPGnIis35NUcIaubI+gGVsluqWBohLOgqzyF7GMlv+Y2\n"
-            + "JZE5JKGSTO7ZosyI+OCNdZ6X2CJdDPZ1325QHYkmqiMJtb73AYTXurL7NNTxdxQV\n"
-            + "OnfvwXXW4mgHwPEHr8PU30+2xgo1ktrrrpFsd0o2UFhybTe7w1z2sAO1gP5s1bbG\n"
-            + "lwARAQABAAf8C3vFcrqz0Wm5ajOrqV+fZTB5uJ94jP9htengGYLPk/bMcR8qxD7H\n"
-            + "XnAi6Z6cV0DQJKDWkJVZkMYnY2ny96lA53mz9oVrH6NCLkxg+istFXVT7cDBBLdt\n"
-            + "05N3+z/+ovmiirr+YHG4Zowh2Ca4d4kl6sNhbmEvlnsZY++0B7Hi8ru2KgFBag2g\n"
-            + "wDmeVt2+ANJNfJ4uIHUEG+sDSDL4+rxQlBTMhxfVY5+zjbvzPlTf2jyAgDa5zGN2\n"
-            + "vRjB33Z0lbdZTeW7HsJcDsXaS77lKnQeWMmHSvpOXvFSIjnrWpxcMpg8hGY5e5UC\n"
-            + "zLCk+nucY/Od1NbtFYu/e7fl9/n3YnT7AQQA0v/t43Ut3go9vRlb47NN/KpJYL1N\n"
-            + "hh9F/SRzFwWxS+79CiZkf/bgmdJe4XkkS7QJMv+nXhtcko/gfzoaCrvIWIAyvhYa\n"
-            + "7tEbqH+iZ0eaLrQf7bu89Jmp2UNRT1EHLzm38eJ8gg7eNu+SjIhs3wART1KB7GvT\n"
-            + "YmpN5caJA2t2OaEEAPSq7CbvlPDc0qomQSs+NrDnhAv89mQEeksZRmhVa0o4Z7EO\n"
-            + "84DzM+Vxho5fn9h0LtxthhuKWKT8uYN/Qu4Y42cKQuRgMx09+GGwc4GWSC6gJPeP\n"
-            + "oKVJCdZx0l9u8fWQb37gnyH34WDxPvdQx3e4iw/dvruNzu17zmPndkdcyEU3BACD\n"
-            + "yXo21SEflFcfrO16VsITXWc9yweKTSD8Mq7wg2GG6eJPopgtwCLZSlYjnehxD2w2\n"
-            + "38lyr6jGPyITvalVwH6R//676Q2osbQ948Dv2ZcxaTlyla4RyY6E33hsnV9m8ZmM\n"
-            + "PUoNJvFSkKCuPy1N5zaYgUAPKwbEkc3qG+bZm+x2WU2biQEfBBgBAgAJBQJMfmkl\n"
-            + "AhsMAAoJEGXEM8QIDlcjqkQIAI78nwAgO5EgrUDoFikH6d36Kie9SHleaYcSX2c9\n"
-            + "5VqcumuiSAhaulGX0gM/jwvZkoawSyWIq+O2sPSc9F7VzdYdEnWVj2J5BpVx83TR\n"
-            + "PrTu72tsJ97op6JZz+Q8HwTLYJBmyW3/TEKh+iRL9CBtfTVywodZa58j41vCkx37\n"
-            + "NFPwplglT/Se1/US1rWYTH3Kfqo5zNARLUYzAdcxEpjwXWOvqnybn86KfMwqiOun\n"
-            + "z8eqMnTQYECfUrhX2WrbEAjCSc6/LfrTv/S+cO0rvulO/R97gG99pZdWSUjZypU5\n"
-            + "KLbpMBh0qq2wQxO2iagNXE6ms3kV/XihvCpXo9RArmldmW0=\n"
-            + "=voB9\n"
-            + "-----END PGP PRIVATE KEY BLOCK-----\n");
+        """
+        -----BEGIN PGP PUBLIC KEY BLOCK-----
+        Version: GnuPG v1
+
+        mQENBEx+aSUBCADzpZ1h9awUQR1ChzrMhtoE1ltyTlJpS1G5HFEov9QNxVDTjpB8
+        PMdb20NNdk/7g6E+ETpCBJGPoC4/TPFDiqe+UI7cRrRZJVbInkCbflYycLTUt9qW
+        5c7IuyZA1+cSYaKp3jYccFZfIWvfTWDLWyUozTs9t1TsI28s3r5fBPvrZ+F1nYv/
+        xpSkx3Zsxnn7QJTnd63rZdp0RdfJmF2rXERwR6XVtuLj5CqrFoLxy6OrSOl4am4J
+        C2HRWhskB21LpdRtloY8bz0DOn6W6JUFRmSxQ1kbPClOXaiNhzMI0fD/KFnHImgR
+        IKbbQyHHsKHBjNyn+zTIm5zUL6JMZMf9PoSZABEBAAG0HlRlc3R1c2VyIEggPHRl
+        c3RoQGV4YW1wbGUuY29tPokBOAQTAQIAIgUCTH5pJQIbAwYLCQgHAwIGFQgCCQoL
+        BBYCAwECHgECF4AACgkQZcQzxAgOVyORcAf/QaHVlyhlBnU4edujW2uG/PFrZvwK
+        fqOKW0QqQ7kVN8okKhnFv4y11IwLIzL9mOLYe2+Zyv3I3bz4X8Xw+MsBF6sMWLLf
+        9ieu4Wz/5ScVu0PxY36kgV0AQRiLXk802Vk4t9jElCp9qx/dDln7f3879LLb3wNt
+        fajne8EH0hjR4E3joPoG+IXSvSzWcPoZTmAZOKHPcRS8iqy0Ao8/UuQWYCedI/4R
+        S1IJaByk8mmkMkqqV0kuPyDkvGpqhfh9zFYh97LuKcJktRTEBp3YMvuGcBDBwofG
+        vYIVEMr7Ci5rowRQO/sxJfI1zNSWterWC46v6tOb9IvenOgP0/dQxlU82YkBIAQQ
+        AQIACgUCTH5xmAMFAXgACgkQ0CLaOl6a7dCYuQf/V2i3Ih5Dqze0Rz5zoTD56/J7
+        0SA4/SFm5eDUirY5B9BohkyxoMVG04uyjUmVs62ree7N0IASmeiF/wkBUZ/r/rr/
+        0ntGj43y+1JpuSEohZOfgZJryDKRqyVWhRbeBj0g/SzxIQ1lEt2iHFvdSlfFVd+a
+        SH1uDDjT/ZATKfAXcgeajUirWorJRaldue7O4oFe67fMLy36ewvpaMVZ+SpxH4CC
+        Owq4Ls3dIAg2C5GQK8G0G7FwT1M26EPg66C79EGYkaxprgrilWE6l7QHc484TY1L
+        ys04qKoPRnBinmrRxgRyyimvDN/+nd1jdM6nMe1gVLL3s5Vgo0fJMwNhDZMtdrkB
+        DQRMfmklAQgAyajPVMt+OXO1ow7xzb0aZYNa5Xdv+w50JzVeWI0boPOuOmq6RCc1
+        3NhOmBzx3CKH6zbSRoLBCZWM3cs1EQbl+8noaxq6YQVWiaROX8U7CThYA50jONP/
+        qEk655QFsP8Bq96Z5AT/MflxEMayOtQywUFREF4/olhXvJOdurZfQPGnIis35NUc
+        IaubI+gGVsluqWBohLOgqzyF7GMlv+Y2JZE5JKGSTO7ZosyI+OCNdZ6X2CJdDPZ1
+        325QHYkmqiMJtb73AYTXurL7NNTxdxQVOnfvwXXW4mgHwPEHr8PU30+2xgo1ktrr
+        rpFsd0o2UFhybTe7w1z2sAO1gP5s1bbGlwARAQABiQEfBBgBAgAJBQJMfmklAhsM
+        AAoJEGXEM8QIDlcjqkQIAI78nwAgO5EgrUDoFikH6d36Kie9SHleaYcSX2c95Vqc
+        umuiSAhaulGX0gM/jwvZkoawSyWIq+O2sPSc9F7VzdYdEnWVj2J5BpVx83TRPrTu
+        72tsJ97op6JZz+Q8HwTLYJBmyW3/TEKh+iRL9CBtfTVywodZa58j41vCkx37NFPw
+        plglT/Se1/US1rWYTH3Kfqo5zNARLUYzAdcxEpjwXWOvqnybn86KfMwqiOunz8eq
+        MnTQYECfUrhX2WrbEAjCSc6/LfrTv/S+cO0rvulO/R97gG99pZdWSUjZypU5KLbp
+        MBh0qq2wQxO2iagNXE6ms3kV/XihvCpXo9RArmldmW0=
+        =lddL
+        -----END PGP PUBLIC KEY BLOCK-----
+        """,
+        """
+        -----BEGIN PGP PRIVATE KEY BLOCK-----
+        Version: GnuPG v1
+
+        lQOYBEx+aSUBCADzpZ1h9awUQR1ChzrMhtoE1ltyTlJpS1G5HFEov9QNxVDTjpB8
+        PMdb20NNdk/7g6E+ETpCBJGPoC4/TPFDiqe+UI7cRrRZJVbInkCbflYycLTUt9qW
+        5c7IuyZA1+cSYaKp3jYccFZfIWvfTWDLWyUozTs9t1TsI28s3r5fBPvrZ+F1nYv/
+        xpSkx3Zsxnn7QJTnd63rZdp0RdfJmF2rXERwR6XVtuLj5CqrFoLxy6OrSOl4am4J
+        C2HRWhskB21LpdRtloY8bz0DOn6W6JUFRmSxQ1kbPClOXaiNhzMI0fD/KFnHImgR
+        IKbbQyHHsKHBjNyn+zTIm5zUL6JMZMf9PoSZABEBAAEAB/wPPOigp4d9VcwxbLkz
+        8OwiONDLz5OuY6hHCjsWMBcgTFqffI9TQc7bExW8ur1KVuNm+RdaaSQ8ZhF2YobF
+        SV7v02R36NEfMStiDSmvv+E+stdQZXY9kT5TRgcgr5ATUXllo9DhCvKP7Qxs0Q9Q
+        cJEcoedGVxiv0xCBLyYbVbm2sW+GJYjq0R5loaOy/Swbt5vOKQsajU8iyA4czSE8
+        Ryr63OtwZ1TZsxekj//HKcngnptYY/FT5TPe4uzw8g1tJTIg/OZXrm8CahWzpfE3
+        q8lGafhd0GjLftA9ffIHF0cAUs7HklMrgIKGdVPXfQmPzqDpmH5FO2y6QmqTG0v6
+        JYW9BAD4Iobwh80MT3JZhJ0jGYMdi07cRyFN+hRwVKgNcBTdx3QGpGJatcyumD0C
+        Yn/aXAn+XUkewSgYhdj9sSRodnWGoavdWELxUQkktsdiFg2/rnqmpqRXTGfR/tDh
+        ohD2JaPrsavmUF6ShT3stGp8nUN+n6Bhd+QosaCZm5TC1CtA7QQA+16rrNNdP8XN
+        MvpQRqJM5ljH0haqR/yD8vdCCZjk23hBk3YsXwSrhSbPzMeZC2FcDqkQTraTxrSG
+        U0+xK3NjKKtbzCjQFH4cy4zdNMUX04OWopLGOEnnvTYukGtXT4lZQ9qm8ZBPh5a4
+        cXfWy3ovjvRbxUuFOWm0gOfIoRcuWN0D/isTjqPmjihCuWkKTfa3xoq+dD7ynYhg
+        Yu3UKfCqbNVor59ZrB4AkQiaVIDLKim3E1XDMS+IukmTuNVXpJeqK32tAYbEduHM
+        7kwEq7SgVh34QvryKjCC/EUkDcjSQ+xlUaKl8QKYOdwtH97zZYK6QixB4uNQ6CuM
+        75dqTZ6iQw7jQA+0HlRlc3R1c2VyIEggPHRlc3RoQGV4YW1wbGUuY29tPokBOAQT
+        AQIAIgUCTH5pJQIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQZcQzxAgO
+        VyORcAf/QaHVlyhlBnU4edujW2uG/PFrZvwKfqOKW0QqQ7kVN8okKhnFv4y11IwL
+        IzL9mOLYe2+Zyv3I3bz4X8Xw+MsBF6sMWLLf9ieu4Wz/5ScVu0PxY36kgV0AQRiL
+        Xk802Vk4t9jElCp9qx/dDln7f3879LLb3wNtfajne8EH0hjR4E3joPoG+IXSvSzW
+        cPoZTmAZOKHPcRS8iqy0Ao8/UuQWYCedI/4RS1IJaByk8mmkMkqqV0kuPyDkvGpq
+        hfh9zFYh97LuKcJktRTEBp3YMvuGcBDBwofGvYIVEMr7Ci5rowRQO/sxJfI1zNSW
+        terWC46v6tOb9IvenOgP0/dQxlU82Z0DmARMfmklAQgAyajPVMt+OXO1ow7xzb0a
+        ZYNa5Xdv+w50JzVeWI0boPOuOmq6RCc13NhOmBzx3CKH6zbSRoLBCZWM3cs1EQbl
+        +8noaxq6YQVWiaROX8U7CThYA50jONP/qEk655QFsP8Bq96Z5AT/MflxEMayOtQy
+        wUFREF4/olhXvJOdurZfQPGnIis35NUcIaubI+gGVsluqWBohLOgqzyF7GMlv+Y2
+        JZE5JKGSTO7ZosyI+OCNdZ6X2CJdDPZ1325QHYkmqiMJtb73AYTXurL7NNTxdxQV
+        OnfvwXXW4mgHwPEHr8PU30+2xgo1ktrrrpFsd0o2UFhybTe7w1z2sAO1gP5s1bbG
+        lwARAQABAAf8C3vFcrqz0Wm5ajOrqV+fZTB5uJ94jP9htengGYLPk/bMcR8qxD7H
+        XnAi6Z6cV0DQJKDWkJVZkMYnY2ny96lA53mz9oVrH6NCLkxg+istFXVT7cDBBLdt
+        05N3+z/+ovmiirr+YHG4Zowh2Ca4d4kl6sNhbmEvlnsZY++0B7Hi8ru2KgFBag2g
+        wDmeVt2+ANJNfJ4uIHUEG+sDSDL4+rxQlBTMhxfVY5+zjbvzPlTf2jyAgDa5zGN2
+        vRjB33Z0lbdZTeW7HsJcDsXaS77lKnQeWMmHSvpOXvFSIjnrWpxcMpg8hGY5e5UC
+        zLCk+nucY/Od1NbtFYu/e7fl9/n3YnT7AQQA0v/t43Ut3go9vRlb47NN/KpJYL1N
+        hh9F/SRzFwWxS+79CiZkf/bgmdJe4XkkS7QJMv+nXhtcko/gfzoaCrvIWIAyvhYa
+        7tEbqH+iZ0eaLrQf7bu89Jmp2UNRT1EHLzm38eJ8gg7eNu+SjIhs3wART1KB7GvT
+        YmpN5caJA2t2OaEEAPSq7CbvlPDc0qomQSs+NrDnhAv89mQEeksZRmhVa0o4Z7EO
+        84DzM+Vxho5fn9h0LtxthhuKWKT8uYN/Qu4Y42cKQuRgMx09+GGwc4GWSC6gJPeP
+        oKVJCdZx0l9u8fWQb37gnyH34WDxPvdQx3e4iw/dvruNzu17zmPndkdcyEU3BACD
+        yXo21SEflFcfrO16VsITXWc9yweKTSD8Mq7wg2GG6eJPopgtwCLZSlYjnehxD2w2
+        38lyr6jGPyITvalVwH6R//676Q2osbQ948Dv2ZcxaTlyla4RyY6E33hsnV9m8ZmM
+        PUoNJvFSkKCuPy1N5zaYgUAPKwbEkc3qG+bZm+x2WU2biQEfBBgBAgAJBQJMfmkl
+        AhsMAAoJEGXEM8QIDlcjqkQIAI78nwAgO5EgrUDoFikH6d36Kie9SHleaYcSX2c9
+        5VqcumuiSAhaulGX0gM/jwvZkoawSyWIq+O2sPSc9F7VzdYdEnWVj2J5BpVx83TR
+        PrTu72tsJ97op6JZz+Q8HwTLYJBmyW3/TEKh+iRL9CBtfTVywodZa58j41vCkx37
+        NFPwplglT/Se1/US1rWYTH3Kfqo5zNARLUYzAdcxEpjwXWOvqnybn86KfMwqiOun
+        z8eqMnTQYECfUrhX2WrbEAjCSc6/LfrTv/S+cO0rvulO/R97gG99pZdWSUjZypU5
+        KLbpMBh0qq2wQxO2iagNXE6ms3kV/XihvCpXo9RArmldmW0=
+        =voB9
+        -----END PGP PRIVATE KEY BLOCK-----
+        """);
   }
 
   /**
@@ -845,99 +877,103 @@
    */
   public static TestKey keyI() throws Exception {
     return new TestKey(
-        "-----BEGIN PGP PUBLIC KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "mQENBEx+aTEBCAC6dFperkew4ZowIfEyAjScjPBggcbw5XUXxLCF0nBRjWH+HvuI\n"
-            + "CGwznRyeuTiy5yyB9/CcvTLTkEs8qIyJUJoikm7QpaVVL6imVq1HD1xcOJpV1FV1\n"
-            + "eFu562xCRDUqD6KQf54N04V9TMDyubhPkQYbx1H2gq+uBEo9d1w6AsSMgaUn3xH/\n"
-            + "xYe+INxcP6jFT2OKc36x+8ipP6pc8Hba1X90JwadOcJlwEyJfJKs7hYHTaYn+I6+\n"
-            + "4w0Y//WebhT4ocsYIiOYrENQUcic+vL3fkwwJCloyDBCGxr7w7Gn4Pe3peTCl4Sp\n"
-            + "vIIoYnHPW4h3Nyh8qAlBNDw7dCPS9LP7wRdNABEBAAG0HlRlc3R1c2VyIEkgPHRl\n"
-            + "c3RpQGV4YW1wbGUuY29tPokBOAQTAQIAIgUCTH5pMQIbAwYLCQgHAwIGFQgCCQoL\n"
-            + "BBYCAwECHgECF4AACgkQ0CLaOl6a7dAjNQf/fLmGeKgaesawP53UeioQ8hgDEFKP\n"
-            + "BddNQP248NpReZ1rg3h8Q21PQJVKrtDYn94WJi5NTqUtk9rtx9SiqKaEc3wzIpLc\n"
-            + "nIYrgGLWot5nq+5V1nY9t9QAiJJDrmm2/3tX+jTWW6CpuLih7IsD+gJmpZkY6PfM\n"
-            + "T+teKEeh5E1XBbu10fwDwMJta+043/TiljInjER1f/b41EnSjI6YXFnxnyiLeDgD\n"
-            + "A1QIIzB/W2ccGqphzJriDETDJhKFZIeqvjylZofgCLyMRSyZtsu+b4pfBK3hMpu5\n"
-            + "aaYylaM1BWOpAiqUmGUKqxN/o9EGx4wvsMxK6xgiZe5UdQPaoDcFCsEMg4kBIAQQ\n"
-            + "AQIACgUCTH5xrAMFAXgACgkQoTk8RsLmoZiu2Af8D4PnyWkosYYkcmU4T7CvIHGW\n"
-            + "Qnx4KsnYWaAqYrYrorL6R+f8SZ5caGwj05UOvHnqx/Ij0a1Zv4MpEuzB0se1XkyQ\n"
-            + "eCLdAIKVodfiepsCHyqW6/mc9LV2qKS1HF5x5LwDkI1atOuPt/O14fch4E0beTbl\n"
-            + "FXzGo7YdpH8RunV8l+i3FxxTcUtUkij3Ro4EMwVF/6YG8gBOd08GxWspEQWBH3GK\n"
-            + "k7Repj4IPwXCoEfU1H+XJNPaM5cnt+L87QfbhNOWmHmWhhrOmZg160joODON8w8x\n"
-            + "j3gma9Cp6luPDEQC3XnsEup3BdCdIciG5JS6JA/2GDeulg+eS4x9Xkmmp6nzObkB\n"
-            + "DQRMfmkxAQgAxeT+bUBbADga+lYtkmtYVbuG7uWjwdg9TR6qWKD7n37mcu6OgNNl\n"
-            + "rPaHoClvOL20fcArZ8wT/FbjvDI6ZHn22YA19OvAR+Eqmf3D7qTmebchnCu955Pk\n"
-            + "X7AOOpKfX48qoYq8BoskZDnbFidm5YKfIin3CNDdlQbd3na+ihGCuv0KoGzefuAH\n"
-            + "cITeYEUESh7HLzQ9/pMES9eCgdTEkwYD5NJjfkLnj2kZtDsSiNnENZ0TIlyKOBMn\n"
-            + "ixgsARDjLrkqyTg79thWALiqVBXUKn2NBtMkK5xTDc/7q3nIw4InYMIrLtntSu1w\n"
-            + "pn1gXbdg1HFl5BgqEB9Fp0k02YvrSiiVswARAQABiQEfBBgBAgAJBQJMfmkxAhsM\n"
-            + "AAoJENAi2jpemu3QFPoH/1ynX1j1QWL8TfJFPoB3vXivwGURs3J7LsywHTRjpQVQ\n"
-            + "vxQvKTzB1+woUxtEbdjKgMbvY/ShHSlEZKVV9l3ZihrNewHA1GMHrDtBGXcNRP9B\n"
-            + "RfJHTrDzjUxrEEwu4QIq71o4tS89NvQmlYYi7O4ThtVB4hYSwl436+vAT9ybIQkU\n"
-            + "OjCkYrKye6JHs1K4BnVuWcOVujQwW4H8QFbddcWF49uN6DSqrwDFsjFog6wL7u6V\n"
-            + "UL5upRBP/RZWA4HKJVF2tS0Ptr6xLTmf4Tp5n10CGFYkPcRp9biVyeVRJBW4uZf0\n"
-            + "EDsn9J5rNG0pWtgnhAEi6smoT4fADTOzpOovUiTSQhQ=\n"
-            + "=SiG3\n"
-            + "-----END PGP PUBLIC KEY BLOCK-----\n",
-        "-----BEGIN PGP PRIVATE KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "lQOYBEx+aTEBCAC6dFperkew4ZowIfEyAjScjPBggcbw5XUXxLCF0nBRjWH+HvuI\n"
-            + "CGwznRyeuTiy5yyB9/CcvTLTkEs8qIyJUJoikm7QpaVVL6imVq1HD1xcOJpV1FV1\n"
-            + "eFu562xCRDUqD6KQf54N04V9TMDyubhPkQYbx1H2gq+uBEo9d1w6AsSMgaUn3xH/\n"
-            + "xYe+INxcP6jFT2OKc36x+8ipP6pc8Hba1X90JwadOcJlwEyJfJKs7hYHTaYn+I6+\n"
-            + "4w0Y//WebhT4ocsYIiOYrENQUcic+vL3fkwwJCloyDBCGxr7w7Gn4Pe3peTCl4Sp\n"
-            + "vIIoYnHPW4h3Nyh8qAlBNDw7dCPS9LP7wRdNABEBAAEAB/oCD6EKLvjXgItlqdm/\n"
-            + "X+OWMYHDCtuRCMW7+2gEw/TxfLeGJaOHWxAouwUIArEEb/hjdaRfIg4wdJUxmyPX\n"
-            + "WyNqUdupkjdXNa7RNaesIi0ilrdZOn7NlHWJCCXwKt2R0jd2p8PDED6CWaE1+76I\n"
-            + "/IuwOHDTD8MABke3KvHDXMxjzdeuRbm670Aqz6zTVY+BZG1GH63Ef5JEyezMgAU5\n"
-            + "42+v+OgD0W0/jCxF7jt2ddP9QiOzu0q65mI4qlOuSebxjH8P7ye0LU9EuWVgAcwc\n"
-            + "YJh2lk3eH8bCWTwlIHj4+8MYgY5i510I5xfY3sWuylw/qtFP9vYjisrysadcUExc\n"
-            + "QUxFBADXQSCmvtgRoSLiGfQv2y2qInx67eJw8pUXFEIJKdOFOhX4vogT9qPWQAms\n"
-            + "/vSshcsAPgpZJZ8MNeGpMGLAGm8y4D2zWWd9YLNmVXsPu7EyrDpXlKHCFnsQfOGN\n"
-            + "c5j8u4CHBn1cS/Yk53S+6Yge2jvnOjVNFmxB0ocs0Y5zbdTJYwQA3b+hQebH7NNr\n"
-            + "FlPwthRZS0TiX5+qkE9tE/0mpRrUN3iS9bnF0IXRmHFp7Hz+EsVbA2Re2A5HIHnQ\n"
-            + "/BSpAsSHRhjU3MH4gzwfg9W43eZGVfofSY6IlUCIcd1bGjSAjJgmfhjU7ofS59i/\n"
-            + "DjzP1jBfXdjOEUQULTkXjHPqO7j4048D/jqMwZNY3AawTMjqKr9nGK49aWv/OVdy\n"
-            + "6xGn4dRJNk3gnnIvjAEFy5+HHbUCJ2lA3X2AssQ9tvbuyDnoSL5/G+zEYtyRuAC5\n"
-            + "9TLQQRmy4qjsYC5TwfoUwFbgqRsmGUcjj2wtE+gb1S8P/zudYrEqOD3K60Y5qXcn\n"
-            + "S3PHgJ++5TzFQba0HlRlc3R1c2VyIEkgPHRlc3RpQGV4YW1wbGUuY29tPokBOAQT\n"
-            + "AQIAIgUCTH5pMQIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQ0CLaOl6a\n"
-            + "7dAjNQf/fLmGeKgaesawP53UeioQ8hgDEFKPBddNQP248NpReZ1rg3h8Q21PQJVK\n"
-            + "rtDYn94WJi5NTqUtk9rtx9SiqKaEc3wzIpLcnIYrgGLWot5nq+5V1nY9t9QAiJJD\n"
-            + "rmm2/3tX+jTWW6CpuLih7IsD+gJmpZkY6PfMT+teKEeh5E1XBbu10fwDwMJta+04\n"
-            + "3/TiljInjER1f/b41EnSjI6YXFnxnyiLeDgDA1QIIzB/W2ccGqphzJriDETDJhKF\n"
-            + "ZIeqvjylZofgCLyMRSyZtsu+b4pfBK3hMpu5aaYylaM1BWOpAiqUmGUKqxN/o9EG\n"
-            + "x4wvsMxK6xgiZe5UdQPaoDcFCsEMg50DmARMfmkxAQgAxeT+bUBbADga+lYtkmtY\n"
-            + "VbuG7uWjwdg9TR6qWKD7n37mcu6OgNNlrPaHoClvOL20fcArZ8wT/FbjvDI6ZHn2\n"
-            + "2YA19OvAR+Eqmf3D7qTmebchnCu955PkX7AOOpKfX48qoYq8BoskZDnbFidm5YKf\n"
-            + "Iin3CNDdlQbd3na+ihGCuv0KoGzefuAHcITeYEUESh7HLzQ9/pMES9eCgdTEkwYD\n"
-            + "5NJjfkLnj2kZtDsSiNnENZ0TIlyKOBMnixgsARDjLrkqyTg79thWALiqVBXUKn2N\n"
-            + "BtMkK5xTDc/7q3nIw4InYMIrLtntSu1wpn1gXbdg1HFl5BgqEB9Fp0k02YvrSiiV\n"
-            + "swARAQABAAf/VXp4O5CUvh9956vZu2kKmt2Jhx9CALT6pZkdU3MVvOr/d517iEHH\n"
-            + "pVJHevLqy8OFdtvO4+LOryyI6f14I3ZbHc+3frdmMqYb1LA8NZScyO5FYkOyn5jO\n"
-            + "CFbvjnVOyeP5MhXO6bSoX3JuI7+ZPoGRYxxlTDWLwJdatoDsBI9TvJhVekyAchTH\n"
-            + "Tyt3NQIvLXqHvKU/8WAgclBKeL/y/idep1BrJ4cIJ+EFp0agEG0WpRRUAYjwfE3P\n"
-            + "aSEV0NOoB8rapPW3XuEjO+ZTht+NYvqgPIdTjwXZGFPYnwvEuz772Th4pO3o/PdF\n"
-            + "2cljvRn3qo+lSVnJ0Ki2pb+LukJSIdfHgQQA1DBdm29a/3dBla2y6wxlSXW/3WBp\n"
-            + "51Vpd8SBuwdVrNNQMwPmf1L93YskJnUKSTo7MwgrYZFWf7QzgfD/cHXr8QK2C1TP\n"
-            + "czUC0/uFCm8pPQoOt/osp3PjDAzGgUAMFXCgLtb04P2JqbFvtse5oTFWrKqmscTG\n"
-            + "KnEBkzfgy37U0iMEAO7BEgXCYvqyztHmQATqJfbpxgQGqk738UW6qWwG8mK6aT5V\n"
-            + "OidZvrWqJ3WeIKmEhoJlY2Ky1ZTuJfeQuVucqzNWlZy2yzDijs+t3v4pFGajv4nV\n"
-            + "ivGvlb/O/QoHBuF/9K36lIIqcZstfa2UIYRqkkdEz2JHWJsr81VvCw2Gb38xA/sG\n"
-            + "hqErrIgSBPRCJObM/gb9rJ6dbA5SNY5trc778EjS1myhyPhGOaOmYbdQMONUqLo2\n"
-            + "q1UZo1G7oaI1Um9v5MXN1yZNX/kvx1TMldZEEixrhCIob81eXSpEUfs+Mz2RqvqT\n"
-            + "YsYquYQNPrPXWZQwTJV6fpsBQUMeE/pmlisaSAijHkXPiQEfBBgBAgAJBQJMfmkx\n"
-            + "AhsMAAoJENAi2jpemu3QFPoH/1ynX1j1QWL8TfJFPoB3vXivwGURs3J7LsywHTRj\n"
-            + "pQVQvxQvKTzB1+woUxtEbdjKgMbvY/ShHSlEZKVV9l3ZihrNewHA1GMHrDtBGXcN\n"
-            + "RP9BRfJHTrDzjUxrEEwu4QIq71o4tS89NvQmlYYi7O4ThtVB4hYSwl436+vAT9yb\n"
-            + "IQkUOjCkYrKye6JHs1K4BnVuWcOVujQwW4H8QFbddcWF49uN6DSqrwDFsjFog6wL\n"
-            + "7u6VUL5upRBP/RZWA4HKJVF2tS0Ptr6xLTmf4Tp5n10CGFYkPcRp9biVyeVRJBW4\n"
-            + "uZf0EDsn9J5rNG0pWtgnhAEi6smoT4fADTOzpOovUiTSQhQ=\n"
-            + "=RcWw\n"
-            + "-----END PGP PRIVATE KEY BLOCK-----\n");
+        """
+        -----BEGIN PGP PUBLIC KEY BLOCK-----
+        Version: GnuPG v1
+
+        mQENBEx+aTEBCAC6dFperkew4ZowIfEyAjScjPBggcbw5XUXxLCF0nBRjWH+HvuI
+        CGwznRyeuTiy5yyB9/CcvTLTkEs8qIyJUJoikm7QpaVVL6imVq1HD1xcOJpV1FV1
+        eFu562xCRDUqD6KQf54N04V9TMDyubhPkQYbx1H2gq+uBEo9d1w6AsSMgaUn3xH/
+        xYe+INxcP6jFT2OKc36x+8ipP6pc8Hba1X90JwadOcJlwEyJfJKs7hYHTaYn+I6+
+        4w0Y//WebhT4ocsYIiOYrENQUcic+vL3fkwwJCloyDBCGxr7w7Gn4Pe3peTCl4Sp
+        vIIoYnHPW4h3Nyh8qAlBNDw7dCPS9LP7wRdNABEBAAG0HlRlc3R1c2VyIEkgPHRl
+        c3RpQGV4YW1wbGUuY29tPokBOAQTAQIAIgUCTH5pMQIbAwYLCQgHAwIGFQgCCQoL
+        BBYCAwECHgECF4AACgkQ0CLaOl6a7dAjNQf/fLmGeKgaesawP53UeioQ8hgDEFKP
+        BddNQP248NpReZ1rg3h8Q21PQJVKrtDYn94WJi5NTqUtk9rtx9SiqKaEc3wzIpLc
+        nIYrgGLWot5nq+5V1nY9t9QAiJJDrmm2/3tX+jTWW6CpuLih7IsD+gJmpZkY6PfM
+        T+teKEeh5E1XBbu10fwDwMJta+043/TiljInjER1f/b41EnSjI6YXFnxnyiLeDgD
+        A1QIIzB/W2ccGqphzJriDETDJhKFZIeqvjylZofgCLyMRSyZtsu+b4pfBK3hMpu5
+        aaYylaM1BWOpAiqUmGUKqxN/o9EGx4wvsMxK6xgiZe5UdQPaoDcFCsEMg4kBIAQQ
+        AQIACgUCTH5xrAMFAXgACgkQoTk8RsLmoZiu2Af8D4PnyWkosYYkcmU4T7CvIHGW
+        Qnx4KsnYWaAqYrYrorL6R+f8SZ5caGwj05UOvHnqx/Ij0a1Zv4MpEuzB0se1XkyQ
+        eCLdAIKVodfiepsCHyqW6/mc9LV2qKS1HF5x5LwDkI1atOuPt/O14fch4E0beTbl
+        FXzGo7YdpH8RunV8l+i3FxxTcUtUkij3Ro4EMwVF/6YG8gBOd08GxWspEQWBH3GK
+        k7Repj4IPwXCoEfU1H+XJNPaM5cnt+L87QfbhNOWmHmWhhrOmZg160joODON8w8x
+        j3gma9Cp6luPDEQC3XnsEup3BdCdIciG5JS6JA/2GDeulg+eS4x9Xkmmp6nzObkB
+        DQRMfmkxAQgAxeT+bUBbADga+lYtkmtYVbuG7uWjwdg9TR6qWKD7n37mcu6OgNNl
+        rPaHoClvOL20fcArZ8wT/FbjvDI6ZHn22YA19OvAR+Eqmf3D7qTmebchnCu955Pk
+        X7AOOpKfX48qoYq8BoskZDnbFidm5YKfIin3CNDdlQbd3na+ihGCuv0KoGzefuAH
+        cITeYEUESh7HLzQ9/pMES9eCgdTEkwYD5NJjfkLnj2kZtDsSiNnENZ0TIlyKOBMn
+        ixgsARDjLrkqyTg79thWALiqVBXUKn2NBtMkK5xTDc/7q3nIw4InYMIrLtntSu1w
+        pn1gXbdg1HFl5BgqEB9Fp0k02YvrSiiVswARAQABiQEfBBgBAgAJBQJMfmkxAhsM
+        AAoJENAi2jpemu3QFPoH/1ynX1j1QWL8TfJFPoB3vXivwGURs3J7LsywHTRjpQVQ
+        vxQvKTzB1+woUxtEbdjKgMbvY/ShHSlEZKVV9l3ZihrNewHA1GMHrDtBGXcNRP9B
+        RfJHTrDzjUxrEEwu4QIq71o4tS89NvQmlYYi7O4ThtVB4hYSwl436+vAT9ybIQkU
+        OjCkYrKye6JHs1K4BnVuWcOVujQwW4H8QFbddcWF49uN6DSqrwDFsjFog6wL7u6V
+        UL5upRBP/RZWA4HKJVF2tS0Ptr6xLTmf4Tp5n10CGFYkPcRp9biVyeVRJBW4uZf0
+        EDsn9J5rNG0pWtgnhAEi6smoT4fADTOzpOovUiTSQhQ=
+        =SiG3
+        -----END PGP PUBLIC KEY BLOCK-----
+        """,
+        """
+        -----BEGIN PGP PRIVATE KEY BLOCK-----
+        Version: GnuPG v1
+
+        lQOYBEx+aTEBCAC6dFperkew4ZowIfEyAjScjPBggcbw5XUXxLCF0nBRjWH+HvuI
+        CGwznRyeuTiy5yyB9/CcvTLTkEs8qIyJUJoikm7QpaVVL6imVq1HD1xcOJpV1FV1
+        eFu562xCRDUqD6KQf54N04V9TMDyubhPkQYbx1H2gq+uBEo9d1w6AsSMgaUn3xH/
+        xYe+INxcP6jFT2OKc36x+8ipP6pc8Hba1X90JwadOcJlwEyJfJKs7hYHTaYn+I6+
+        4w0Y//WebhT4ocsYIiOYrENQUcic+vL3fkwwJCloyDBCGxr7w7Gn4Pe3peTCl4Sp
+        vIIoYnHPW4h3Nyh8qAlBNDw7dCPS9LP7wRdNABEBAAEAB/oCD6EKLvjXgItlqdm/
+        X+OWMYHDCtuRCMW7+2gEw/TxfLeGJaOHWxAouwUIArEEb/hjdaRfIg4wdJUxmyPX
+        WyNqUdupkjdXNa7RNaesIi0ilrdZOn7NlHWJCCXwKt2R0jd2p8PDED6CWaE1+76I
+        /IuwOHDTD8MABke3KvHDXMxjzdeuRbm670Aqz6zTVY+BZG1GH63Ef5JEyezMgAU5
+        42+v+OgD0W0/jCxF7jt2ddP9QiOzu0q65mI4qlOuSebxjH8P7ye0LU9EuWVgAcwc
+        YJh2lk3eH8bCWTwlIHj4+8MYgY5i510I5xfY3sWuylw/qtFP9vYjisrysadcUExc
+        QUxFBADXQSCmvtgRoSLiGfQv2y2qInx67eJw8pUXFEIJKdOFOhX4vogT9qPWQAms
+        /vSshcsAPgpZJZ8MNeGpMGLAGm8y4D2zWWd9YLNmVXsPu7EyrDpXlKHCFnsQfOGN
+        c5j8u4CHBn1cS/Yk53S+6Yge2jvnOjVNFmxB0ocs0Y5zbdTJYwQA3b+hQebH7NNr
+        FlPwthRZS0TiX5+qkE9tE/0mpRrUN3iS9bnF0IXRmHFp7Hz+EsVbA2Re2A5HIHnQ
+        /BSpAsSHRhjU3MH4gzwfg9W43eZGVfofSY6IlUCIcd1bGjSAjJgmfhjU7ofS59i/
+        DjzP1jBfXdjOEUQULTkXjHPqO7j4048D/jqMwZNY3AawTMjqKr9nGK49aWv/OVdy
+        6xGn4dRJNk3gnnIvjAEFy5+HHbUCJ2lA3X2AssQ9tvbuyDnoSL5/G+zEYtyRuAC5
+        9TLQQRmy4qjsYC5TwfoUwFbgqRsmGUcjj2wtE+gb1S8P/zudYrEqOD3K60Y5qXcn
+        S3PHgJ++5TzFQba0HlRlc3R1c2VyIEkgPHRlc3RpQGV4YW1wbGUuY29tPokBOAQT
+        AQIAIgUCTH5pMQIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQ0CLaOl6a
+        7dAjNQf/fLmGeKgaesawP53UeioQ8hgDEFKPBddNQP248NpReZ1rg3h8Q21PQJVK
+        rtDYn94WJi5NTqUtk9rtx9SiqKaEc3wzIpLcnIYrgGLWot5nq+5V1nY9t9QAiJJD
+        rmm2/3tX+jTWW6CpuLih7IsD+gJmpZkY6PfMT+teKEeh5E1XBbu10fwDwMJta+04
+        3/TiljInjER1f/b41EnSjI6YXFnxnyiLeDgDA1QIIzB/W2ccGqphzJriDETDJhKF
+        ZIeqvjylZofgCLyMRSyZtsu+b4pfBK3hMpu5aaYylaM1BWOpAiqUmGUKqxN/o9EG
+        x4wvsMxK6xgiZe5UdQPaoDcFCsEMg50DmARMfmkxAQgAxeT+bUBbADga+lYtkmtY
+        VbuG7uWjwdg9TR6qWKD7n37mcu6OgNNlrPaHoClvOL20fcArZ8wT/FbjvDI6ZHn2
+        2YA19OvAR+Eqmf3D7qTmebchnCu955PkX7AOOpKfX48qoYq8BoskZDnbFidm5YKf
+        Iin3CNDdlQbd3na+ihGCuv0KoGzefuAHcITeYEUESh7HLzQ9/pMES9eCgdTEkwYD
+        5NJjfkLnj2kZtDsSiNnENZ0TIlyKOBMnixgsARDjLrkqyTg79thWALiqVBXUKn2N
+        BtMkK5xTDc/7q3nIw4InYMIrLtntSu1wpn1gXbdg1HFl5BgqEB9Fp0k02YvrSiiV
+        swARAQABAAf/VXp4O5CUvh9956vZu2kKmt2Jhx9CALT6pZkdU3MVvOr/d517iEHH
+        pVJHevLqy8OFdtvO4+LOryyI6f14I3ZbHc+3frdmMqYb1LA8NZScyO5FYkOyn5jO
+        CFbvjnVOyeP5MhXO6bSoX3JuI7+ZPoGRYxxlTDWLwJdatoDsBI9TvJhVekyAchTH
+        Tyt3NQIvLXqHvKU/8WAgclBKeL/y/idep1BrJ4cIJ+EFp0agEG0WpRRUAYjwfE3P
+        aSEV0NOoB8rapPW3XuEjO+ZTht+NYvqgPIdTjwXZGFPYnwvEuz772Th4pO3o/PdF
+        2cljvRn3qo+lSVnJ0Ki2pb+LukJSIdfHgQQA1DBdm29a/3dBla2y6wxlSXW/3WBp
+        51Vpd8SBuwdVrNNQMwPmf1L93YskJnUKSTo7MwgrYZFWf7QzgfD/cHXr8QK2C1TP
+        czUC0/uFCm8pPQoOt/osp3PjDAzGgUAMFXCgLtb04P2JqbFvtse5oTFWrKqmscTG
+        KnEBkzfgy37U0iMEAO7BEgXCYvqyztHmQATqJfbpxgQGqk738UW6qWwG8mK6aT5V
+        OidZvrWqJ3WeIKmEhoJlY2Ky1ZTuJfeQuVucqzNWlZy2yzDijs+t3v4pFGajv4nV
+        ivGvlb/O/QoHBuF/9K36lIIqcZstfa2UIYRqkkdEz2JHWJsr81VvCw2Gb38xA/sG
+        hqErrIgSBPRCJObM/gb9rJ6dbA5SNY5trc778EjS1myhyPhGOaOmYbdQMONUqLo2
+        q1UZo1G7oaI1Um9v5MXN1yZNX/kvx1TMldZEEixrhCIob81eXSpEUfs+Mz2RqvqT
+        YsYquYQNPrPXWZQwTJV6fpsBQUMeE/pmlisaSAijHkXPiQEfBBgBAgAJBQJMfmkx
+        AhsMAAoJENAi2jpemu3QFPoH/1ynX1j1QWL8TfJFPoB3vXivwGURs3J7LsywHTRj
+        pQVQvxQvKTzB1+woUxtEbdjKgMbvY/ShHSlEZKVV9l3ZihrNewHA1GMHrDtBGXcN
+        RP9BRfJHTrDzjUxrEEwu4QIq71o4tS89NvQmlYYi7O4ThtVB4hYSwl436+vAT9yb
+        IQkUOjCkYrKye6JHs1K4BnVuWcOVujQwW4H8QFbddcWF49uN6DSqrwDFsjFog6wL
+        7u6VUL5upRBP/RZWA4HKJVF2tS0Ptr6xLTmf4Tp5n10CGFYkPcRp9biVyeVRJBW4
+        uZf0EDsn9J5rNG0pWtgnhAEi6smoT4fADTOzpOovUiTSQhQ=
+        =RcWw
+        -----END PGP PRIVATE KEY BLOCK-----
+        """);
   }
 
   /**
@@ -946,93 +982,97 @@
    */
   public static TestKey keyJ() throws Exception {
     return new TestKey(
-        "-----BEGIN PGP PUBLIC KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "mQENBEx+aUgBCADczNio9UWnUggUZkdqJye57497oD9vNo9rmtR+i1TkMpVeWaMH\n"
-            + "UWrm1twzIPV9D4lAWLJoG2cYF6nXG1JxsKc9mOIZ6O1WfsopMUU0p+EfU8H/cvdM\n"
-            + "/iccYS6OnNL4/xR1R7hlA4+b/jaOZfzdS3i5jwOf+TtCk7c5qOuFhraiVQ9H1G86\n"
-            + "+LsiWVeXEFc/FXxnESRmbaZFNJrAdJl23eKXRC6az0S5FwMVBvUhRpLwIGDbVT/0\n"
-            + "/QwaNUOq3bYwudPREFLg/1HtBuxNhRdV6mCrit+tsPan9o0/WtsHuq8n4/pqOKBc\n"
-            + "RRmOIQR9SEohE2TuVT3XVFpMXa4a4CBuNXjTABEBAAG0HlRlc3R1c2VyIEogPHRl\n"
-            + "c3RqQGV4YW1wbGUuY29tPokBOAQTAQIAIgUCTH5pSAIbAwYLCQgHAwIGFQgCCQoL\n"
-            + "BBYCAwECHgECF4AACgkQoTk8RsLmoZi0BggAlnbCwmwaLwcpU9YcOE9/8KF56dIs\n"
-            + "XhdxzqdP91UmhVT0df1OBhgTqFkKprBLCT+B9yBClsnyXMatkvuhQG6C7lw9toMO\n"
-            + "TITRPZoFJe3Ezi+HRRPqAPubIcSgeILuilvFhkoUOgoC1ubmVPgcGBLb8tdvI3bA\n"
-            + "svq+n2jaYUlgL5N6ZNRNakc07e8vH5SeKiD8ZntJlTU49fkxzlawtDaI3+GhyUiB\n"
-            + "0Ah8pl143DFNAq8CfvQCPKwX4WFPkEflh0LlgaEPJUZ/H6KxKXXF8SC9cD2VIii8\n"
-            + "Yrue8y9T+j5y699A0GCptb1IKrgxbfhgD//3g3l1eXsEwn2cwFNCt7pZFLkBDQRM\n"
-            + "fmlIAQgA3E2pM6oDJGgfxbqSfykuRtTbiAi7JEd1DNvEe6gJ7qkBLM4ipILBD0qR\n"
-            + "qCwL37E4/3nMsZjA7GIFLQj2DrFW3aEEKwR/zdh7R67lo9CunCY+FPWTuOkCG8Sh\n"
-            + "3RLpbAV6I61NG/wDznW30vmKNJDgPpkzYj8u0T4MtpywEgxTxCqWZKCufWDRfNAy\n"
-            + "IBLt+piG+bcYKfw9pS8PvXPQMNIi4U2pu3hb/BHC3Y1A8FVpEe4CFV7rWb/K2Ydx\n"
-            + "eBxwwxm9sBxF+vhlI+ZEeb9JxGH6jYlc6twD4e6p3KqusAKLKiLsS5uLQnpMGGZ8\n"
-            + "vcpTSfyHjG2QHc3qG9S/yDCZjhhe2QARAQABiQEfBBgBAgAJBQJMfmlIAhsMAAoJ\n"
-            + "EKE5PEbC5qGYClMIANTdZ+/g/FPl1Lm0tO1CSnHVHekeGNA9n3L6SGiSZQJjEDo0\n"
-            + "gsye5xgxh5JGKf7CqbEFfeLC9Jx5W5EN4dVFudncIlC/SutfRzdt5W8CLXMl0c41\n"
-            + "5FmtpWNStk3MglkcjE5PrRRrSiRc45S0e2kIPb8eiVKg98/rCToC9+Qn3pMi/fcM\n"
-            + "LVpYE+dhvB5EhOSwBWWgvWXzeLhv5CnBKxH0ItHhNwvt8qPOHgQAJKPc6dV888xn\n"
-            + "Sew62LFefHPnGTHLP8RRgVIvZBG5IoovxSz89QGHQZiC4xv00I7zNwmtr6eEcl+y\n"
-            + "BkUK9QWITEBHUDqR+cbVa2dRr3fUHwRP7G2G+ow=\n"
-            + "=ucAX\n"
-            + "-----END PGP PUBLIC KEY BLOCK-----\n",
-        "-----BEGIN PGP PRIVATE KEY BLOCK-----\n"
-            + "Version: GnuPG v1\n"
-            + "\n"
-            + "lQOYBEx+aUgBCADczNio9UWnUggUZkdqJye57497oD9vNo9rmtR+i1TkMpVeWaMH\n"
-            + "UWrm1twzIPV9D4lAWLJoG2cYF6nXG1JxsKc9mOIZ6O1WfsopMUU0p+EfU8H/cvdM\n"
-            + "/iccYS6OnNL4/xR1R7hlA4+b/jaOZfzdS3i5jwOf+TtCk7c5qOuFhraiVQ9H1G86\n"
-            + "+LsiWVeXEFc/FXxnESRmbaZFNJrAdJl23eKXRC6az0S5FwMVBvUhRpLwIGDbVT/0\n"
-            + "/QwaNUOq3bYwudPREFLg/1HtBuxNhRdV6mCrit+tsPan9o0/WtsHuq8n4/pqOKBc\n"
-            + "RRmOIQR9SEohE2TuVT3XVFpMXa4a4CBuNXjTABEBAAEAB/9sW1MQR53xKP6yFCeD\n"
-            + "3sdOJlSB1PiMeXgU1JznpTT58CEBdnfdRYVy14qkxM30m8U9gMm88YW8exBscgoZ\n"
-            + "pRnNztNW58phokNPx9AwsRp3p0ETPbZDYI6NDNwuPKQEchn2HEZPvFmjsjPP2hkn\n"
-            + "+Lu8RIUA4uzEFX3bnBxJIP1L2AztqyTgHDfXS4/nqerO/cheXhN7j1TUyRO4hinp\n"
-            + "C3WXaxm2kpQXFP2ktq2eu7YPFoW6I6HzHVDN2Z7fD/NzfmR2h4gcIaSDEjIs893N\n"
-            + "b3hsYiOTYwVFX9TBWLr9rSWyrjR4sWelFuMZpjQ53qq+rBm/+8knoNtoWgZFhbR0\n"
-            + "WJyRBADlBuX8kveqLl31QShgw+6TwTHXI40GiCA6DHwZiTstOO6d2KDNq2nHdtuo\n"
-            + "HBvSKYP4a2na39JKb7YfuSMg16QvxQNd7BQWz+NzbGLQEGuX455OD3TE74ZfVElo\n"
-            + "2H/i51hSjOdWihJVNBGlcDYPgb7oLLTbPdKXxptRM1+wrk2//QQA9s3pw2O3lSbV\n"
-            + "U8JyL/FhdyhDvRDuiNBPnB4O/Ynnzz8YSFwSdSE/u8FpguFWdh+UdSrdwE+Ux8kj\n"
-            + "W/miXaqTxUeKnpzOkiO5O2fLvAeriO3rU9KfBER03+NJo4weSorLXzeU4SWkw63N\n"
-            + "OiY3fc67Nj+l8qi1tmoEJyHUomuy7Q8EAOfBvMzGsQQJ12k+4gOSXN9DTWUa85P6\n"
-            + "IphFHC2cpTDy30IRR55sI6Mf3GpC+KzxEyw7WXjlTensEJAHMpyVVRhv6uF0eMaY\n"
-            + "+QGS+vyCgtUfGIwM5Teu6NjeqyShJDTC8qnM+75JgCNu6gZ2F2iTeY+tM3zE1auq\n"
-            + "po1pUACVm7qwR6u0HlRlc3R1c2VyIEogPHRlc3RqQGV4YW1wbGUuY29tPokBOAQT\n"
-            + "AQIAIgUCTH5pSAIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQoTk8RsLm\n"
-            + "oZi0BggAlnbCwmwaLwcpU9YcOE9/8KF56dIsXhdxzqdP91UmhVT0df1OBhgTqFkK\n"
-            + "prBLCT+B9yBClsnyXMatkvuhQG6C7lw9toMOTITRPZoFJe3Ezi+HRRPqAPubIcSg\n"
-            + "eILuilvFhkoUOgoC1ubmVPgcGBLb8tdvI3bAsvq+n2jaYUlgL5N6ZNRNakc07e8v\n"
-            + "H5SeKiD8ZntJlTU49fkxzlawtDaI3+GhyUiB0Ah8pl143DFNAq8CfvQCPKwX4WFP\n"
-            + "kEflh0LlgaEPJUZ/H6KxKXXF8SC9cD2VIii8Yrue8y9T+j5y699A0GCptb1IKrgx\n"
-            + "bfhgD//3g3l1eXsEwn2cwFNCt7pZFJ0DmARMfmlIAQgA3E2pM6oDJGgfxbqSfyku\n"
-            + "RtTbiAi7JEd1DNvEe6gJ7qkBLM4ipILBD0qRqCwL37E4/3nMsZjA7GIFLQj2DrFW\n"
-            + "3aEEKwR/zdh7R67lo9CunCY+FPWTuOkCG8Sh3RLpbAV6I61NG/wDznW30vmKNJDg\n"
-            + "PpkzYj8u0T4MtpywEgxTxCqWZKCufWDRfNAyIBLt+piG+bcYKfw9pS8PvXPQMNIi\n"
-            + "4U2pu3hb/BHC3Y1A8FVpEe4CFV7rWb/K2YdxeBxwwxm9sBxF+vhlI+ZEeb9JxGH6\n"
-            + "jYlc6twD4e6p3KqusAKLKiLsS5uLQnpMGGZ8vcpTSfyHjG2QHc3qG9S/yDCZjhhe\n"
-            + "2QARAQABAAf7BUTPxk/u/vi935DpBXoXRKHZnLM3bFuIexCGQ74rQqR2qazUMH8o\n"
-            + "SFEsaBJpm2WyR47J5WqSHNi5SxPT2AUdNFeh/39hxY61Q6SuBFED+WMRbHrKbURR\n"
-            + "WjPiFuwus02eAkAYFWfBFY0n9/BcAhicQa90MTRj+RZb/EHa+GDdbgDatpwEK22z\n"
-            + "pPb3t/D2TC7ModizelngBN7bdp4Vqna/vMLhsiE+FqL+Ob0KiLkDxtcjZljc9xLK\n"
-            + "B7ZuGH/AZfhF08OAxUcsJdu5cF3viBT+HeSI4OUvdfxPFX98U/SFfuW4mPdHPEI9\n"
-            + "438pdjDUIpJFtcnROtZdS2o6C9ohHa5BUwQA52P8AKKRfg7LpaFMvtKkNORnscac\n"
-            + "1qvXLqAXaMeSsvyU5o1GNvSgbhFzDcXbAFJcXdOo2XgT7JzW/6v1uW9AuQPAkYhr\n"
-            + "ep0uE3mewlzWHZR41MQRaMGN4l80RN6ju4c/Ei+OMHYp2DUfZFDBXbxwWpN8tNoR\n"
-            + "S1X+rOL5RsQgkrcEAPO7zthR+GQnIgJC3c9Las9JkPywCxddjoWZoyt6yITVjIso\n"
-            + "IGD0SJppAkOS3Vdb+raydLuN7HmbpPFnvzyc+RdSt+YCGUObrHb/z9MfahzDNG3S\n"
-            + "VwUQEIl+L6glhwscQOCz80MCcYMFMk4TiankvChRFF5Wil//8QnaonH4bcrvA/46\n"
-            + "VB+ZaEdR+Z8IkYIf7oHLJNEwaH+kRTBQ2x5F9Gnwr9SL6AXAkNkvYD4in/+Bw35r\n"
-            + "o9zGirQQvNrvH3JlZ5PWp1/9rRl2Tefaaf8P2ij/Ky2poBLAhPwK56JXHLt5v+BZ\n"
-            + "mQwhY+teJnbfCwiiS0OeWtpVY/tDVU7wYOd2RIhVfkUziQEfBBgBAgAJBQJMfmlI\n"
-            + "AhsMAAoJEKE5PEbC5qGYClMIANTdZ+/g/FPl1Lm0tO1CSnHVHekeGNA9n3L6SGiS\n"
-            + "ZQJjEDo0gsye5xgxh5JGKf7CqbEFfeLC9Jx5W5EN4dVFudncIlC/SutfRzdt5W8C\n"
-            + "LXMl0c415FmtpWNStk3MglkcjE5PrRRrSiRc45S0e2kIPb8eiVKg98/rCToC9+Qn\n"
-            + "3pMi/fcMLVpYE+dhvB5EhOSwBWWgvWXzeLhv5CnBKxH0ItHhNwvt8qPOHgQAJKPc\n"
-            + "6dV888xnSew62LFefHPnGTHLP8RRgVIvZBG5IoovxSz89QGHQZiC4xv00I7zNwmt\n"
-            + "r6eEcl+yBkUK9QWITEBHUDqR+cbVa2dRr3fUHwRP7G2G+ow=\n"
-            + "=NiQI\n"
-            + "-----END PGP PRIVATE KEY BLOCK-----\n");
+        """
+        -----BEGIN PGP PUBLIC KEY BLOCK-----
+        Version: GnuPG v1
+
+        mQENBEx+aUgBCADczNio9UWnUggUZkdqJye57497oD9vNo9rmtR+i1TkMpVeWaMH
+        UWrm1twzIPV9D4lAWLJoG2cYF6nXG1JxsKc9mOIZ6O1WfsopMUU0p+EfU8H/cvdM
+        /iccYS6OnNL4/xR1R7hlA4+b/jaOZfzdS3i5jwOf+TtCk7c5qOuFhraiVQ9H1G86
+        +LsiWVeXEFc/FXxnESRmbaZFNJrAdJl23eKXRC6az0S5FwMVBvUhRpLwIGDbVT/0
+        /QwaNUOq3bYwudPREFLg/1HtBuxNhRdV6mCrit+tsPan9o0/WtsHuq8n4/pqOKBc
+        RRmOIQR9SEohE2TuVT3XVFpMXa4a4CBuNXjTABEBAAG0HlRlc3R1c2VyIEogPHRl
+        c3RqQGV4YW1wbGUuY29tPokBOAQTAQIAIgUCTH5pSAIbAwYLCQgHAwIGFQgCCQoL
+        BBYCAwECHgECF4AACgkQoTk8RsLmoZi0BggAlnbCwmwaLwcpU9YcOE9/8KF56dIs
+        XhdxzqdP91UmhVT0df1OBhgTqFkKprBLCT+B9yBClsnyXMatkvuhQG6C7lw9toMO
+        TITRPZoFJe3Ezi+HRRPqAPubIcSgeILuilvFhkoUOgoC1ubmVPgcGBLb8tdvI3bA
+        svq+n2jaYUlgL5N6ZNRNakc07e8vH5SeKiD8ZntJlTU49fkxzlawtDaI3+GhyUiB
+        0Ah8pl143DFNAq8CfvQCPKwX4WFPkEflh0LlgaEPJUZ/H6KxKXXF8SC9cD2VIii8
+        Yrue8y9T+j5y699A0GCptb1IKrgxbfhgD//3g3l1eXsEwn2cwFNCt7pZFLkBDQRM
+        fmlIAQgA3E2pM6oDJGgfxbqSfykuRtTbiAi7JEd1DNvEe6gJ7qkBLM4ipILBD0qR
+        qCwL37E4/3nMsZjA7GIFLQj2DrFW3aEEKwR/zdh7R67lo9CunCY+FPWTuOkCG8Sh
+        3RLpbAV6I61NG/wDznW30vmKNJDgPpkzYj8u0T4MtpywEgxTxCqWZKCufWDRfNAy
+        IBLt+piG+bcYKfw9pS8PvXPQMNIi4U2pu3hb/BHC3Y1A8FVpEe4CFV7rWb/K2Ydx
+        eBxwwxm9sBxF+vhlI+ZEeb9JxGH6jYlc6twD4e6p3KqusAKLKiLsS5uLQnpMGGZ8
+        vcpTSfyHjG2QHc3qG9S/yDCZjhhe2QARAQABiQEfBBgBAgAJBQJMfmlIAhsMAAoJ
+        EKE5PEbC5qGYClMIANTdZ+/g/FPl1Lm0tO1CSnHVHekeGNA9n3L6SGiSZQJjEDo0
+        gsye5xgxh5JGKf7CqbEFfeLC9Jx5W5EN4dVFudncIlC/SutfRzdt5W8CLXMl0c41
+        5FmtpWNStk3MglkcjE5PrRRrSiRc45S0e2kIPb8eiVKg98/rCToC9+Qn3pMi/fcM
+        LVpYE+dhvB5EhOSwBWWgvWXzeLhv5CnBKxH0ItHhNwvt8qPOHgQAJKPc6dV888xn
+        Sew62LFefHPnGTHLP8RRgVIvZBG5IoovxSz89QGHQZiC4xv00I7zNwmtr6eEcl+y
+        BkUK9QWITEBHUDqR+cbVa2dRr3fUHwRP7G2G+ow=
+        =ucAX
+        -----END PGP PUBLIC KEY BLOCK-----
+        """,
+        """
+        -----BEGIN PGP PRIVATE KEY BLOCK-----
+        Version: GnuPG v1
+
+        lQOYBEx+aUgBCADczNio9UWnUggUZkdqJye57497oD9vNo9rmtR+i1TkMpVeWaMH
+        UWrm1twzIPV9D4lAWLJoG2cYF6nXG1JxsKc9mOIZ6O1WfsopMUU0p+EfU8H/cvdM
+        /iccYS6OnNL4/xR1R7hlA4+b/jaOZfzdS3i5jwOf+TtCk7c5qOuFhraiVQ9H1G86
+        +LsiWVeXEFc/FXxnESRmbaZFNJrAdJl23eKXRC6az0S5FwMVBvUhRpLwIGDbVT/0
+        /QwaNUOq3bYwudPREFLg/1HtBuxNhRdV6mCrit+tsPan9o0/WtsHuq8n4/pqOKBc
+        RRmOIQR9SEohE2TuVT3XVFpMXa4a4CBuNXjTABEBAAEAB/9sW1MQR53xKP6yFCeD
+        3sdOJlSB1PiMeXgU1JznpTT58CEBdnfdRYVy14qkxM30m8U9gMm88YW8exBscgoZ
+        pRnNztNW58phokNPx9AwsRp3p0ETPbZDYI6NDNwuPKQEchn2HEZPvFmjsjPP2hkn
+        +Lu8RIUA4uzEFX3bnBxJIP1L2AztqyTgHDfXS4/nqerO/cheXhN7j1TUyRO4hinp
+        C3WXaxm2kpQXFP2ktq2eu7YPFoW6I6HzHVDN2Z7fD/NzfmR2h4gcIaSDEjIs893N
+        b3hsYiOTYwVFX9TBWLr9rSWyrjR4sWelFuMZpjQ53qq+rBm/+8knoNtoWgZFhbR0
+        WJyRBADlBuX8kveqLl31QShgw+6TwTHXI40GiCA6DHwZiTstOO6d2KDNq2nHdtuo
+        HBvSKYP4a2na39JKb7YfuSMg16QvxQNd7BQWz+NzbGLQEGuX455OD3TE74ZfVElo
+        2H/i51hSjOdWihJVNBGlcDYPgb7oLLTbPdKXxptRM1+wrk2//QQA9s3pw2O3lSbV
+        U8JyL/FhdyhDvRDuiNBPnB4O/Ynnzz8YSFwSdSE/u8FpguFWdh+UdSrdwE+Ux8kj
+        W/miXaqTxUeKnpzOkiO5O2fLvAeriO3rU9KfBER03+NJo4weSorLXzeU4SWkw63N
+        OiY3fc67Nj+l8qi1tmoEJyHUomuy7Q8EAOfBvMzGsQQJ12k+4gOSXN9DTWUa85P6
+        IphFHC2cpTDy30IRR55sI6Mf3GpC+KzxEyw7WXjlTensEJAHMpyVVRhv6uF0eMaY
+        +QGS+vyCgtUfGIwM5Teu6NjeqyShJDTC8qnM+75JgCNu6gZ2F2iTeY+tM3zE1auq
+        po1pUACVm7qwR6u0HlRlc3R1c2VyIEogPHRlc3RqQGV4YW1wbGUuY29tPokBOAQT
+        AQIAIgUCTH5pSAIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQoTk8RsLm
+        oZi0BggAlnbCwmwaLwcpU9YcOE9/8KF56dIsXhdxzqdP91UmhVT0df1OBhgTqFkK
+        prBLCT+B9yBClsnyXMatkvuhQG6C7lw9toMOTITRPZoFJe3Ezi+HRRPqAPubIcSg
+        eILuilvFhkoUOgoC1ubmVPgcGBLb8tdvI3bAsvq+n2jaYUlgL5N6ZNRNakc07e8v
+        H5SeKiD8ZntJlTU49fkxzlawtDaI3+GhyUiB0Ah8pl143DFNAq8CfvQCPKwX4WFP
+        kEflh0LlgaEPJUZ/H6KxKXXF8SC9cD2VIii8Yrue8y9T+j5y699A0GCptb1IKrgx
+        bfhgD//3g3l1eXsEwn2cwFNCt7pZFJ0DmARMfmlIAQgA3E2pM6oDJGgfxbqSfyku
+        RtTbiAi7JEd1DNvEe6gJ7qkBLM4ipILBD0qRqCwL37E4/3nMsZjA7GIFLQj2DrFW
+        3aEEKwR/zdh7R67lo9CunCY+FPWTuOkCG8Sh3RLpbAV6I61NG/wDznW30vmKNJDg
+        PpkzYj8u0T4MtpywEgxTxCqWZKCufWDRfNAyIBLt+piG+bcYKfw9pS8PvXPQMNIi
+        4U2pu3hb/BHC3Y1A8FVpEe4CFV7rWb/K2YdxeBxwwxm9sBxF+vhlI+ZEeb9JxGH6
+        jYlc6twD4e6p3KqusAKLKiLsS5uLQnpMGGZ8vcpTSfyHjG2QHc3qG9S/yDCZjhhe
+        2QARAQABAAf7BUTPxk/u/vi935DpBXoXRKHZnLM3bFuIexCGQ74rQqR2qazUMH8o
+        SFEsaBJpm2WyR47J5WqSHNi5SxPT2AUdNFeh/39hxY61Q6SuBFED+WMRbHrKbURR
+        WjPiFuwus02eAkAYFWfBFY0n9/BcAhicQa90MTRj+RZb/EHa+GDdbgDatpwEK22z
+        pPb3t/D2TC7ModizelngBN7bdp4Vqna/vMLhsiE+FqL+Ob0KiLkDxtcjZljc9xLK
+        B7ZuGH/AZfhF08OAxUcsJdu5cF3viBT+HeSI4OUvdfxPFX98U/SFfuW4mPdHPEI9
+        438pdjDUIpJFtcnROtZdS2o6C9ohHa5BUwQA52P8AKKRfg7LpaFMvtKkNORnscac
+        1qvXLqAXaMeSsvyU5o1GNvSgbhFzDcXbAFJcXdOo2XgT7JzW/6v1uW9AuQPAkYhr
+        ep0uE3mewlzWHZR41MQRaMGN4l80RN6ju4c/Ei+OMHYp2DUfZFDBXbxwWpN8tNoR
+        S1X+rOL5RsQgkrcEAPO7zthR+GQnIgJC3c9Las9JkPywCxddjoWZoyt6yITVjIso
+        IGD0SJppAkOS3Vdb+raydLuN7HmbpPFnvzyc+RdSt+YCGUObrHb/z9MfahzDNG3S
+        VwUQEIl+L6glhwscQOCz80MCcYMFMk4TiankvChRFF5Wil//8QnaonH4bcrvA/46
+        VB+ZaEdR+Z8IkYIf7oHLJNEwaH+kRTBQ2x5F9Gnwr9SL6AXAkNkvYD4in/+Bw35r
+        o9zGirQQvNrvH3JlZ5PWp1/9rRl2Tefaaf8P2ij/Ky2poBLAhPwK56JXHLt5v+BZ
+        mQwhY+teJnbfCwiiS0OeWtpVY/tDVU7wYOd2RIhVfkUziQEfBBgBAgAJBQJMfmlI
+        AhsMAAoJEKE5PEbC5qGYClMIANTdZ+/g/FPl1Lm0tO1CSnHVHekeGNA9n3L6SGiS
+        ZQJjEDo0gsye5xgxh5JGKf7CqbEFfeLC9Jx5W5EN4dVFudncIlC/SutfRzdt5W8C
+        LXMl0c415FmtpWNStk3MglkcjE5PrRRrSiRc45S0e2kIPb8eiVKg98/rCToC9+Qn
+        3pMi/fcMLVpYE+dhvB5EhOSwBWWgvWXzeLhv5CnBKxH0ItHhNwvt8qPOHgQAJKPc
+        6dV888xnSew62LFefHPnGTHLP8RRgVIvZBG5IoovxSz89QGHQZiC4xv00I7zNwmt
+        r6eEcl+yBkUK9QWITEBHUDqR+cbVa2dRr3fUHwRP7G2G+ow=
+        =NiQI
+        -----END PGP PRIVATE KEY BLOCK-----
+        """);
   }
 
   private TestTrustKeys() {}
diff --git a/java/com/google/gerrit/httpd/GetUserFilter.java b/java/com/google/gerrit/httpd/GetUserFilter.java
index 68db98a..637d930 100644
--- a/java/com/google/gerrit/httpd/GetUserFilter.java
+++ b/java/com/google/gerrit/httpd/GetUserFilter.java
@@ -85,8 +85,8 @@
       if (reqEnabled) {
         req.setAttribute(USER_ATTR_KEY, loggableName);
       }
-      if (resEnabled && resp instanceof HttpServletResponse) {
-        ((HttpServletResponse) resp).addHeader(USER_ATTR_KEY, loggableName);
+      if (resEnabled && resp instanceof HttpServletResponse httpServletResponse) {
+        httpServletResponse.addHeader(USER_ATTR_KEY, loggableName);
       }
     }
     chain.doFilter(req, resp);
diff --git a/java/com/google/gerrit/httpd/HtmlDomUtil.java b/java/com/google/gerrit/httpd/HtmlDomUtil.java
index 16e0938..68f7f02 100644
--- a/java/com/google/gerrit/httpd/HtmlDomUtil.java
+++ b/java/com/google/gerrit/httpd/HtmlDomUtil.java
@@ -101,8 +101,7 @@
     NodeList list = parent.getChildNodes();
     for (int i = 0; i < list.getLength(); i++) {
       Node n = list.item(i);
-      if (n instanceof Element) {
-        Element e = (Element) n;
+      if (n instanceof Element e) {
         if (name.equals(e.getAttribute("id"))) {
           return e;
         }
diff --git a/java/com/google/gerrit/httpd/RequestContextFilter.java b/java/com/google/gerrit/httpd/RequestContextFilter.java
index 9428c5e..6ece1a5 100644
--- a/java/com/google/gerrit/httpd/RequestContextFilter.java
+++ b/java/com/google/gerrit/httpd/RequestContextFilter.java
@@ -63,8 +63,7 @@
     try {
       chain.doFilter(request, response);
     } finally {
-      @SuppressWarnings("unused")
-      var unused = local.setContext(old);
+      var _ = local.setContext(old);
     }
   }
 }
diff --git a/java/com/google/gerrit/httpd/WebSessionManager.java b/java/com/google/gerrit/httpd/WebSessionManager.java
index 40e1d05..e7b3ff0 100644
--- a/java/com/google/gerrit/httpd/WebSessionManager.java
+++ b/java/com/google/gerrit/httpd/WebSessionManager.java
@@ -182,7 +182,7 @@
 
     @Override
     public boolean equals(Object obj) {
-      return obj instanceof Key && token.equals(((Key) obj).token);
+      return obj instanceof Key k && token.equals(k.token);
     }
   }
 
diff --git a/java/com/google/gerrit/httpd/XsrfCookieFilter.java b/java/com/google/gerrit/httpd/XsrfCookieFilter.java
index 9bad714..7ba752c 100644
--- a/java/com/google/gerrit/httpd/XsrfCookieFilter.java
+++ b/java/com/google/gerrit/httpd/XsrfCookieFilter.java
@@ -49,7 +49,7 @@
   @Override
   public void doFilter(ServletRequest req, ServletResponse rsp, FilterChain chain)
       throws IOException, ServletException {
-    try (TraceTimer ignored = TraceContext.newTimer("XsrfCookieFilter#preprocess")) {
+    try (TraceTimer _ = TraceContext.newTimer("XsrfCookieFilter#preprocess")) {
       HttpServletRequest httpRequest = (HttpServletRequest) req;
       if (!GitSmartHttpTools.isGitClient(httpRequest)) {
         WebSession s = user.get().isIdentifiedUser() ? session.get() : null;
diff --git a/java/com/google/gerrit/httpd/auth/container/HttpLoginServlet.java b/java/com/google/gerrit/httpd/auth/container/HttpLoginServlet.java
index 53f33b5..d799324 100644
--- a/java/com/google/gerrit/httpd/auth/container/HttpLoginServlet.java
+++ b/java/com/google/gerrit/httpd/auth/container/HttpLoginServlet.java
@@ -176,8 +176,8 @@
     final NodeList list = parent.getChildNodes();
     for (int i = 0; i < list.getLength(); i++) {
       final Node n = list.item(i);
-      if (n instanceof Element) {
-        final Element e = (Element) n;
+      if (n instanceof Element element) {
+        final Element e = element;
         if (name.equals(e.getAttribute("class"))) {
           e.setTextContent(value);
         }
diff --git a/java/com/google/gerrit/httpd/auth/oauth/OAuthWebFilter.java b/java/com/google/gerrit/httpd/auth/oauth/OAuthWebFilter.java
index 453dc0b..3391eb9 100644
--- a/java/com/google/gerrit/httpd/auth/oauth/OAuthWebFilter.java
+++ b/java/com/google/gerrit/httpd/auth/oauth/OAuthWebFilter.java
@@ -103,8 +103,7 @@
       }
       oauthSession.setServiceProvider(service);
 
-      @SuppressWarnings("unused")
-      var unused = oauthSession.login(httpRequest, httpResponse, service);
+      var _ = oauthSession.login(httpRequest, httpResponse, service);
     } else {
       chain.doFilter(httpRequest, response);
     }
diff --git a/java/com/google/gerrit/httpd/auth/openid/LoginForm.java b/java/com/google/gerrit/httpd/auth/openid/LoginForm.java
index 4ed9078..e41d460 100644
--- a/java/com/google/gerrit/httpd/auth/openid/LoginForm.java
+++ b/java/com/google/gerrit/httpd/auth/openid/LoginForm.java
@@ -175,8 +175,7 @@
         oauthSession.setServiceProvider(oauthProvider);
         oauthSession.setLinkMode(link);
 
-        @SuppressWarnings("unused")
-        var unused = oauthSession.login(req, res, oauthProvider);
+        var _ = oauthSession.login(req, res, oauthProvider);
       }
     }
   }
diff --git a/java/com/google/gerrit/httpd/auth/openid/OAuthWebFilterOverOpenID.java b/java/com/google/gerrit/httpd/auth/openid/OAuthWebFilterOverOpenID.java
index 043b7a1..d702ffb 100644
--- a/java/com/google/gerrit/httpd/auth/openid/OAuthWebFilterOverOpenID.java
+++ b/java/com/google/gerrit/httpd/auth/openid/OAuthWebFilterOverOpenID.java
@@ -73,8 +73,7 @@
       }
       oauthSession.setServiceProvider(service);
 
-      @SuppressWarnings("unused")
-      var unused = oauthSession.login(httpRequest, httpResponse, service);
+      var _ = oauthSession.login(httpRequest, httpResponse, service);
     } else {
       chain.doFilter(httpRequest, response);
     }
diff --git a/java/com/google/gerrit/httpd/auth/openid/OpenIdServiceImpl.java b/java/com/google/gerrit/httpd/auth/openid/OpenIdServiceImpl.java
index 87c0b03..c24cf01 100644
--- a/java/com/google/gerrit/httpd/auth/openid/OpenIdServiceImpl.java
+++ b/java/com/google/gerrit/httpd/auth/openid/OpenIdServiceImpl.java
@@ -304,15 +304,15 @@
 
     if (authRsp.hasExtension(SRegMessage.OPENID_NS_SREG)) {
       final MessageExtension ext = authRsp.getExtension(SRegMessage.OPENID_NS_SREG);
-      if (ext instanceof SRegResponse) {
-        sregRsp = (SRegResponse) ext;
+      if (ext instanceof SRegResponse sRegResponse) {
+        sregRsp = sRegResponse;
       }
     }
 
     if (authRsp.hasExtension(AxMessage.OPENID_NS_AX)) {
       final MessageExtension ext = authRsp.getExtension(AxMessage.OPENID_NS_AX);
-      if (ext instanceof FetchResponse) {
-        fetchRsp = (FetchResponse) ext;
+      if (ext instanceof FetchResponse fetchResponse) {
+        fetchRsp = fetchResponse;
       }
     }
 
diff --git a/java/com/google/gerrit/httpd/gitweb/GitwebServlet.java b/java/com/google/gerrit/httpd/gitweb/GitwebServlet.java
index 5063a81..1211539 100644
--- a/java/com/google/gerrit/httpd/gitweb/GitwebServlet.java
+++ b/java/com/google/gerrit/httpd/gitweb/GitwebServlet.java
@@ -666,8 +666,8 @@
    * @throws ProvisionException if the repo is not DelegateRepository or FileRepository.
    */
   private static Path getRepositoryRoot(Repository repo, Project.NameKey nameKey) {
-    if (repo instanceof DelegateRepository) {
-      return getRepositoryRoot(((DelegateRepository) repo).delegate(), nameKey);
+    if (repo instanceof DelegateRepository delegateRepository) {
+      return getRepositoryRoot(delegateRepository.delegate(), nameKey);
     }
 
     if (repo instanceof FileRepository) {
diff --git a/java/com/google/gerrit/httpd/init/SiteInitializer.java b/java/com/google/gerrit/httpd/init/SiteInitializer.java
index f9f93e1..46140ef 100644
--- a/java/com/google/gerrit/httpd/init/SiteInitializer.java
+++ b/java/com/google/gerrit/httpd/init/SiteInitializer.java
@@ -47,8 +47,7 @@
         Path site = Path.of(sitePath);
         logger.atInfo().log("Initializing site at %s", site.toRealPath().normalize());
 
-        @SuppressWarnings("unused")
-        var unused = new BaseInit(site, false, pluginsDistribution, pluginsToInstall).run();
+        var _ = new BaseInit(site, false, pluginsDistribution, pluginsToInstall).run();
 
         return;
       }
@@ -65,8 +64,7 @@
       if (site != null) {
         logger.atInfo().log("Initializing site at %s", site.toRealPath().normalize());
 
-        @SuppressWarnings("unused")
-        var unused = new BaseInit(site, false, pluginsDistribution, pluginsToInstall).run();
+        var _ = new BaseInit(site, false, pluginsDistribution, pluginsToInstall).run();
       }
     } catch (Exception e) {
       logger.atSevere().withCause(e).log("Site init failed");
diff --git a/java/com/google/gerrit/httpd/raw/DirectoryDocServlet.java b/java/com/google/gerrit/httpd/raw/DirectoryDocServlet.java
index 3f59084..693faf6 100644
--- a/java/com/google/gerrit/httpd/raw/DirectoryDocServlet.java
+++ b/java/com/google/gerrit/httpd/raw/DirectoryDocServlet.java
@@ -15,7 +15,6 @@
 package com.google.gerrit.httpd.raw;
 
 import com.google.common.cache.Cache;
-import com.google.gerrit.server.experiments.ExperimentFeatures;
 import java.nio.file.Path;
 
 class DirectoryDocServlet extends DocServlet {
@@ -23,9 +22,8 @@
 
   private final Path doc;
 
-  DirectoryDocServlet(
-      Cache<Path, Resource> cache, Path unpackedWar, ExperimentFeatures experimentFeatures) {
-    super(cache, true, experimentFeatures);
+  DirectoryDocServlet(Cache<Path, Resource> cache, Path unpackedWar) {
+    super(cache, true);
     this.doc = unpackedWar.resolve("Documentation");
   }
 
diff --git a/java/com/google/gerrit/httpd/raw/DocServlet.java b/java/com/google/gerrit/httpd/raw/DocServlet.java
index d5027ba..f44abe0 100644
--- a/java/com/google/gerrit/httpd/raw/DocServlet.java
+++ b/java/com/google/gerrit/httpd/raw/DocServlet.java
@@ -14,11 +14,8 @@
 
 package com.google.gerrit.httpd.raw;
 
-import static com.google.gerrit.server.experiments.ExperimentFeaturesConstants.GERRIT_BACKEND_FEATURE_ATTACH_NONCE_TO_DOCUMENTATION;
-
 import com.google.common.cache.Cache;
 import com.google.gerrit.httpd.HtmlDomUtil;
-import com.google.gerrit.server.experiments.ExperimentFeatures;
 import java.nio.charset.StandardCharsets;
 import java.nio.file.Path;
 import java.util.Optional;
@@ -28,19 +25,15 @@
 abstract class DocServlet extends ResourceServlet {
   private static final long serialVersionUID = 1L;
 
-  private final ExperimentFeatures experimentFeatures;
-
-  DocServlet(Cache<Path, Resource> cache, boolean refresh, ExperimentFeatures experimentFeatures) {
+  DocServlet(Cache<Path, Resource> cache, boolean refresh) {
     super(cache, refresh);
-    this.experimentFeatures = experimentFeatures;
   }
 
   @Override
   protected boolean shouldProcessResourceBeforeServe(
       HttpServletRequest req, HttpServletResponse rsp, Path p) {
     String nonce = (String) req.getAttribute("nonce");
-    if (!experimentFeatures.isFeatureEnabled(GERRIT_BACKEND_FEATURE_ATTACH_NONCE_TO_DOCUMENTATION)
-        || nonce == null) {
+    if (nonce == null) {
       return false;
     }
     return ResourceServlet.contentType(p.toString()).equals("text/html");
diff --git a/java/com/google/gerrit/httpd/raw/IndexHtmlUtil.java b/java/com/google/gerrit/httpd/raw/IndexHtmlUtil.java
index f7eb673..89100d6 100644
--- a/java/com/google/gerrit/httpd/raw/IndexHtmlUtil.java
+++ b/java/com/google/gerrit/httpd/raw/IndexHtmlUtil.java
@@ -30,6 +30,7 @@
 import com.google.gerrit.extensions.api.config.Server;
 import com.google.gerrit.extensions.client.ListChangesOption;
 import com.google.gerrit.extensions.client.ListOption;
+import com.google.gerrit.extensions.common.ServerInfo;
 import com.google.gerrit.extensions.restapi.AuthException;
 import com.google.gerrit.extensions.restapi.RestApiException;
 import com.google.gerrit.httpd.raw.IndexPreloadingUtil.RequestedPage;
@@ -89,7 +90,7 @@
    * Returns the basePatchNum that was specified in the URL when present. If no basePatchNum is
    * specified then it points to PARENT which is represented by 0
    */
-  public static Integer computeBasePatchNum(@Nullable String requestedPath) {
+  public static int computeBasePatchNum(@Nullable String requestedPath) {
     if (requestedPath == null) {
       return 0;
     }
@@ -97,6 +98,11 @@
     String basePatchNum = null;
     if (matcher.matches()) {
       basePatchNum = matcher.group("basePatchNum");
+    } else {
+      Matcher diffMatcher = IndexPreloadingUtil.DIFF_URL_PATTERN.matcher(requestedPath);
+      if (diffMatcher.matches()) {
+        basePatchNum = diffMatcher.group("basePatchNum");
+      }
     }
     if (basePatchNum == null) {
       return 0; // No match is found
@@ -115,9 +121,9 @@
     ImmutableMap.Builder<String, Object> data = ImmutableMap.builder();
     Map<String, SanitizedContent> initialData = new HashMap<>();
     Server serverApi = gerritApi.config().server();
+    ServerInfo serverInfo = serverApi.getInfo();
     initialData.put(
-        addCanonicalUrl("/config/server/info", canonicalURL),
-        serializeObject(GSON, serverApi.getInfo()));
+        addCanonicalUrl("/config/server/info", canonicalURL), serializeObject(GSON, serverInfo));
     initialData.put(
         addCanonicalUrl("/config/server/version", canonicalURL),
         serializeObject(GSON, serverApi.getVersion()));
@@ -127,14 +133,18 @@
 
     String requestedPath = IndexPreloadingUtil.getPath(requestedURL);
     IndexPreloadingUtil.RequestedPage page = IndexPreloadingUtil.parseRequestedPage(requestedPath);
-    Integer basePatchNum = computeBasePatchNum(requestedPath);
+    int basePatchNum = computeBasePatchNum(requestedPath);
     switch (page) {
       case CHANGE, DIFF -> {
         LinkedHashSet<ListChangesOption> changeDetailOptions =
             new LinkedHashSet<>(
-                basePatchNum.equals(0)
-                    ? IndexPreloadingUtil.CHANGE_DETAIL_OPTIONS_WITHOUT_PARENTS
-                    : IndexPreloadingUtil.CHANGE_DETAIL_OPTIONS_WITH_PARENTS);
+                basePatchNum > 0
+                    ? IndexPreloadingUtil.CHANGE_DETAIL_OPTIONS_WITH_PARENTS
+                    : IndexPreloadingUtil.CHANGE_DETAIL_OPTIONS_WITHOUT_PARENTS);
+        if (serverInfo.receive != null
+            && Boolean.TRUE.equals(serverInfo.receive.enableSignedPush)) {
+          changeDetailOptions.add(ListChangesOption.PUSH_CERTIFICATES);
+        }
         data.put(
             "submitRequirementsHex",
             ListOption.toHex(
diff --git a/java/com/google/gerrit/httpd/raw/IndexPreloadingUtil.java b/java/com/google/gerrit/httpd/raw/IndexPreloadingUtil.java
index 12085e2..3a8ce86 100644
--- a/java/com/google/gerrit/httpd/raw/IndexPreloadingUtil.java
+++ b/java/com/google/gerrit/httpd/raw/IndexPreloadingUtil.java
@@ -46,7 +46,7 @@
 
   public static final String CHANGE_CANONICAL_PATH = "/c/(?<project>.+)/\\+/(?<changeNum>\\d+)";
   public static final String BASE_PATCH_NUM_PATH_PART =
-      "(/(?<basePatchNum>-?\\d+|edit)(\\.\\.(\\d+|edit))?)";
+      "(/(?:(?<basePatchNum>-?\\d+|edit)\\.\\.)?(?<patchNum>\\d+|edit))";
   public static final Pattern CHANGE_URL_PATTERN =
       Pattern.compile(CHANGE_CANONICAL_PATH + BASE_PATCH_NUM_PATH_PART + "?" + "/?$");
   public static final Pattern DIFF_URL_PATTERN =
diff --git a/java/com/google/gerrit/httpd/raw/StaticModule.java b/java/com/google/gerrit/httpd/raw/StaticModule.java
index 038d9f2..65c2d2b 100644
--- a/java/com/google/gerrit/httpd/raw/StaticModule.java
+++ b/java/com/google/gerrit/httpd/raw/StaticModule.java
@@ -101,6 +101,7 @@
   private static final String FAVICON_SERVLET = "FaviconServlet";
   private static final String SERVICE_WORKER_SERVLET = "ServiceWorkerServlet";
   private static final String GERRIT_ICON_SERVLET = "GerritIconServlet";
+  private static final String DIFFY_ICON_SERVLET = "DiffyIconServlet";
   private static final String MANIFEST_SERVLET = "ManifestServlet";
   private static final String POLYGERRIT_INDEX_SERVLET = "PolyGerritUiIndexServlet";
   private static final String ROBOTS_TXT_SERVLET = "RobotsTxtServlet";
@@ -144,13 +145,12 @@
   @Provides
   @Singleton
   @Named(DOC_SERVLET)
-  HttpServlet getDocServlet(
-      @Named(CACHE) Cache<Path, Resource> cache, ExperimentFeatures experimentFeatures) {
+  HttpServlet getDocServlet(@Named(CACHE) Cache<Path, Resource> cache) {
     Paths p = getPaths();
     if (p.warFs != null) {
-      return new WarDocServlet(cache, p.warFs, experimentFeatures);
+      return new WarDocServlet(cache, p.warFs);
     } else if (p.unpackedWar != null && !p.isDev()) {
-      return new DirectoryDocServlet(cache, p.unpackedWar, experimentFeatures);
+      return new DirectoryDocServlet(cache, p.unpackedWar);
     } else {
       return new HttpServlet() {
         private static final long serialVersionUID = 1L;
@@ -170,6 +170,7 @@
       serve("/robots.txt").with(named(ROBOTS_TXT_SERVLET));
       serve("/favicon.ico").with(named(FAVICON_SERVLET));
       serve("/gerrit_icon.png").with(named(GERRIT_ICON_SERVLET));
+      serve("/diffy.png").with(named(DIFFY_ICON_SERVLET));
       serve("/service-worker.js").with(named(SERVICE_WORKER_SERVLET));
       serve("/manifest.webmanifest").with(named(MANIFEST_SERVLET));
     }
@@ -219,6 +220,17 @@
 
     @Provides
     @Singleton
+    @Named(DIFFY_ICON_SERVLET)
+    HttpServlet getDiffyIconServlet(@Named(CACHE) Cache<Path, Resource> cache) {
+      Paths p = getPaths();
+      if (p.warFs != null) {
+        return new SingleFileServlet(cache, p.warFs.getPath("/diffy.png"), false);
+      }
+      return new SingleFileServlet(cache, webappSourcePath("diffy.png"), true);
+    }
+
+    @Provides
+    @Singleton
     @Named(SERVICE_WORKER_SERVLET)
     HttpServlet getServiceWorkerServlet(@Named(CACHE) Cache<Path, Resource> cache) {
       Paths p = getPaths();
diff --git a/java/com/google/gerrit/httpd/raw/WarDocServlet.java b/java/com/google/gerrit/httpd/raw/WarDocServlet.java
index 718d46d..756ec77 100644
--- a/java/com/google/gerrit/httpd/raw/WarDocServlet.java
+++ b/java/com/google/gerrit/httpd/raw/WarDocServlet.java
@@ -15,7 +15,6 @@
 package com.google.gerrit.httpd.raw;
 
 import com.google.common.cache.Cache;
-import com.google.gerrit.server.experiments.ExperimentFeatures;
 import com.google.gerrit.server.util.time.TimeUtil;
 import java.nio.file.FileSystem;
 import java.nio.file.Path;
@@ -28,9 +27,8 @@
 
   private final FileSystem warFs;
 
-  WarDocServlet(
-      Cache<Path, Resource> cache, FileSystem warFs, ExperimentFeatures experimentFeatures) {
-    super(cache, false, experimentFeatures);
+  WarDocServlet(Cache<Path, Resource> cache, FileSystem warFs) {
+    super(cache, false);
     this.warFs = warFs;
   }
 
diff --git a/java/com/google/gerrit/httpd/restapi/RestApiQuotaEnforcer.java b/java/com/google/gerrit/httpd/restapi/RestApiQuotaEnforcer.java
index a3aba6d..443f067 100644
--- a/java/com/google/gerrit/httpd/restapi/RestApiQuotaEnforcer.java
+++ b/java/com/google/gerrit/httpd/restapi/RestApiQuotaEnforcer.java
@@ -62,15 +62,12 @@
     String pathForQuotaReporting = RequestUtil.getRestPathWithoutIds(req);
     // Enrich the quota request we are operating on an interesting collection
     QuotaBackend.WithResource report = quotaBackend.currentUser();
-    if (rsrc instanceof ChangeResource) {
-      ChangeResource changeResource = (ChangeResource) rsrc;
+    if (rsrc instanceof ChangeResource changeResource) {
       report =
           quotaBackend.currentUser().change(changeResource.getId(), changeResource.getProject());
-    } else if (rsrc instanceof AccountResource) {
-      AccountResource accountResource = (AccountResource) rsrc;
+    } else if (rsrc instanceof AccountResource accountResource) {
       report = quotaBackend.currentUser().account(accountResource.getUser().getAccountId());
-    } else if (rsrc instanceof ProjectResource) {
-      ProjectResource projectResource = (ProjectResource) rsrc;
+    } else if (rsrc instanceof ProjectResource projectResource) {
       report = quotaBackend.currentUser().project(projectResource.getNameKey());
     }
 
diff --git a/java/com/google/gerrit/httpd/restapi/RestApiServlet.java b/java/com/google/gerrit/httpd/restapi/RestApiServlet.java
index c336921..fba5ce7 100644
--- a/java/com/google/gerrit/httpd/restapi/RestApiServlet.java
+++ b/java/com/google/gerrit/httpd/restapi/RestApiServlet.java
@@ -346,7 +346,7 @@
 
     String requestUri = requestUri(req);
 
-    try (PerThreadCache ignored = PerThreadCache.create()) {
+    try (PerThreadCache _ = PerThreadCache.create()) {
       List<IdString> path = splitPath(req);
       TraceContext traceContext = globals.requestTraceContext.get();
       RequestInfo requestInfo = createRequestInfo(traceContext, req, requestUri, path);
@@ -390,8 +390,8 @@
 
         if (path.isEmpty()) {
           globals.quotaChecker.enforce(req);
-          if (rc instanceof NeedsParams) {
-            ((NeedsParams) rc).setParams(qp.params());
+          if (rc instanceof NeedsParams needsParams) {
+            needsParams.setParams(qp.params());
           }
 
           if (isRead(req)) {
@@ -539,6 +539,7 @@
                 invokeRestReadViewWithRetry(
                     req, traceContext, viewData, (RestReadView<RestResource>) viewData.view, rsrc);
           } else if (viewData.view instanceof RestModifyView<?, ?>) {
+            @SuppressWarnings("unchecked")
             RestModifyView<RestResource, Object> m =
                 (RestModifyView<RestResource, Object>) viewData.view;
 
@@ -554,6 +555,7 @@
               }
             }
           } else if (viewData.view instanceof RestCollectionCreateView<?, ?, ?>) {
+            @SuppressWarnings("unchecked")
             RestCollectionCreateView<RestResource, RestResource, Object> m =
                 (RestCollectionCreateView<RestResource, RestResource, Object>) viewData.view;
 
@@ -568,6 +570,7 @@
               }
             }
           } else if (viewData.view instanceof RestCollectionDeleteMissingView<?, ?, ?>) {
+            @SuppressWarnings("unchecked")
             RestCollectionDeleteMissingView<RestResource, RestResource, Object> m =
                 (RestCollectionDeleteMissingView<RestResource, RestResource, Object>) viewData.view;
 
@@ -582,6 +585,7 @@
               }
             }
           } else if (viewData.view instanceof RestCollectionModifyView<?, ?, ?>) {
+            @SuppressWarnings("unchecked")
             RestCollectionModifyView<RestResource, RestResource, Object> m =
                 (RestCollectionModifyView<RestResource, RestResource, Object>) viewData.view;
 
@@ -603,16 +607,16 @@
             setXGerritUpdatedRefResponseHeaders(req, res);
           }
 
-          if (response instanceof Response.Redirect) {
+          if (response instanceof Response.Redirect redirect) {
             CacheHeaders.setNotCacheable(res);
-            String location = ((Response.Redirect) response).location();
+            String location = redirect.location();
             res.sendRedirect(location);
             logger.atFinest().log("REST call redirected to: %s", location);
             return;
-          } else if (response instanceof Response.Accepted) {
+          } else if (response instanceof Response.Accepted accepted) {
             CacheHeaders.setNotCacheable(res);
             res.setStatus(response.statusCode());
-            res.setHeader(HttpHeaders.LOCATION, ((Response.Accepted) response).location());
+            res.setHeader(HttpHeaders.LOCATION, accepted.location());
             logger.atFinest().log("REST call succeeded: %d", response.statusCode());
             return;
           }
@@ -626,8 +630,8 @@
 
         if (!identity().equivalent(response, Response.none())) {
           Object value = Response.unwrap(response);
-          if (value instanceof BinaryResult) {
-            responseBytes = replyBinaryResult(req, res, (BinaryResult) value);
+          if (value instanceof BinaryResult binaryResult) {
+            responseBytes = replyBinaryResult(req, res, binaryResult);
           } else {
             responseBytes = replyJson(req, res, false, qp.config(), value);
           }
@@ -996,8 +1000,8 @@
       return false;
     }
 
-    if (rsrc instanceof RestResource.HasLastModified) {
-      Timestamp m = ((RestResource.HasLastModified) rsrc).getLastModified();
+    if (rsrc instanceof RestResource.HasLastModified hasLastModified) {
+      Timestamp m = hasLastModified.getLastModified();
       long d = req.getDateHeader(HttpHeaders.IF_MODIFIED_SINCE);
 
       // HTTP times are in seconds, database may have millisecond precision.
@@ -1051,10 +1055,8 @@
   }
 
   private void addResourceStateHeaders(HttpServletResponse res, RestResource rsrc) {
-    if (rsrc instanceof RestResource.HasLastModified) {
-      res.setDateHeader(
-          HttpHeaders.LAST_MODIFIED,
-          ((RestResource.HasLastModified) rsrc).getLastModified().getTime());
+    if (rsrc instanceof RestResource.HasLastModified hasLastModified) {
+      res.setDateHeader(HttpHeaders.LAST_MODIFIED, hasLastModified.getLastModified().getTime());
     }
   }
 
@@ -1174,10 +1176,9 @@
     return (len <= 0 && type == null) || (len == 0 && isType(FORM_TYPE, type));
   }
 
-  @SuppressWarnings("rawtypes")
   private static boolean acceptsRawInput(Type type) {
-    if (type instanceof Class) {
-      for (Field f : ((Class) type).getDeclaredFields()) {
+    if (type instanceof Class<?> cls) {
+      for (Field f : cls.getDeclaredFields()) {
         if (f.getType() == RawInput.class) {
           return true;
         }
@@ -1237,18 +1238,17 @@
           InstantiationException,
           IllegalAccessException,
           InvocationTargetException {
-    if (type instanceof Class) {
-      Class<?> clazz = (Class<?>) type;
+    if (type instanceof Class<?> clazz) {
       Constructor<?> c = clazz.getDeclaredConstructor();
       c.setAccessible(true);
       return c.newInstance();
     }
-    if (type instanceof ParameterizedType) {
-      Type rawType = ((ParameterizedType) type).getRawType();
-      if (rawType instanceof Class && List.class.isAssignableFrom((Class<?>) rawType)) {
+    if (type instanceof ParameterizedType parameterizedType) {
+      Type rawType = parameterizedType.getRawType();
+      if (rawType instanceof Class<?> clazz && List.class.isAssignableFrom(clazz)) {
         return new ArrayList<>();
       }
-      if (rawType instanceof Class && Map.class.isAssignableFrom((Class<?>) rawType)) {
+      if (rawType instanceof Class<?> clazz && Map.class.isAssignableFrom(clazz)) {
         return new HashMap<>();
       }
     }
@@ -1278,8 +1278,8 @@
     buf.write(JSON_MAGIC);
     Writer w = new BufferedWriter(new OutputStreamWriter(buf, UTF_8));
     Gson gson = newGson(config);
-    if (result instanceof JsonElement) {
-      gson.toJson((JsonElement) result, w);
+    if (result instanceof JsonElement jsonElement) {
+      gson.toJson(jsonElement, w);
     } else {
       gson.toJson(result, w);
     }
diff --git a/java/com/google/gerrit/index/query/AndCardinalPredicate.java b/java/com/google/gerrit/index/query/AndCardinalPredicate.java
index cf0e8c3..aea714f 100644
--- a/java/com/google/gerrit/index/query/AndCardinalPredicate.java
+++ b/java/com/google/gerrit/index/query/AndCardinalPredicate.java
@@ -29,8 +29,8 @@
     }
     int minCardinality = Integer.MAX_VALUE;
     for (Predicate<T> child : getChildren()) {
-      if (child instanceof HasCardinality) {
-        minCardinality = Math.min(((HasCardinality) child).getCardinality(), minCardinality);
+      if (child instanceof HasCardinality hasCardinality) {
+        minCardinality = Math.min(hasCardinality.getCardinality(), minCardinality);
       }
     }
     cardinality = minCardinality;
diff --git a/java/com/google/gerrit/index/query/AndPredicate.java b/java/com/google/gerrit/index/query/AndPredicate.java
index 70ab09c..2d995e5 100644
--- a/java/com/google/gerrit/index/query/AndPredicate.java
+++ b/java/com/google/gerrit/index/query/AndPredicate.java
@@ -130,9 +130,7 @@
       cmp = a.estimateCost() - b.estimateCost();
     }
 
-    if (cmp == 0 && a instanceof DataSource) {
-      DataSource<?> as = (DataSource<?>) a;
-      DataSource<?> bs = (DataSource<?>) b;
+    if (cmp == 0 && a instanceof DataSource<?> as && b instanceof DataSource<?> bs) {
       cmp = as.getCardinality() - bs.getCardinality();
     }
     return cmp;
diff --git a/java/com/google/gerrit/index/query/AndSource.java b/java/com/google/gerrit/index/query/AndSource.java
index 89cfcab..dc8f2e6e 100644
--- a/java/com/google/gerrit/index/query/AndSource.java
+++ b/java/com/google/gerrit/index/query/AndSource.java
@@ -41,8 +41,7 @@
     Predicate<T> selectedSource = null;
     int minCardinality = Integer.MAX_VALUE;
     for (Predicate<T> p : getChildren()) {
-      if (p instanceof DataSource) {
-        DataSource<?> source = (DataSource<?>) p;
+      if (p instanceof DataSource<?> source) {
         int cardinality = source.getCardinality();
 
         if (selectedSource == null
diff --git a/java/com/google/gerrit/index/query/FilteredSource.java b/java/com/google/gerrit/index/query/FilteredSource.java
index 95e6435..1dc8a1c 100644
--- a/java/com/google/gerrit/index/query/FilteredSource.java
+++ b/java/com/google/gerrit/index/query/FilteredSource.java
@@ -62,14 +62,14 @@
             pageResultSize++;
           }
 
-          if (last != null && source instanceof Paginated) {
+          if (last != null && source instanceof Paginated p) {
             // Restart source and continue if we have not filled the
             // full limit the caller wants.
-            Paginated<T> p = (Paginated<T>) source;
             QueryOptions opts = p.getOptions();
             final int limit = opts.limit();
             int nextStart = pageResultSize;
             while (pageResultSize == limit && r.size() < limit) {
+              @SuppressWarnings("unchecked")
               ResultSet<T> next = p.restart(nextStart);
               pageResultSize = 0;
               for (T data : buffer(next)) {
diff --git a/java/com/google/gerrit/index/query/NotPredicate.java b/java/com/google/gerrit/index/query/NotPredicate.java
index fa8e01b..574069e 100644
--- a/java/com/google/gerrit/index/query/NotPredicate.java
+++ b/java/com/google/gerrit/index/query/NotPredicate.java
@@ -87,8 +87,7 @@
     if (other == null) {
       return false;
     }
-    return other instanceof NotPredicate
-        && getChildren().equals(((Predicate<?>) other).getChildren());
+    return other instanceof NotPredicate p && getChildren().equals(p.getChildren());
   }
 
   @Override
diff --git a/java/com/google/gerrit/index/query/OrCardinalPredicate.java b/java/com/google/gerrit/index/query/OrCardinalPredicate.java
index 9d7913a..b658493 100644
--- a/java/com/google/gerrit/index/query/OrCardinalPredicate.java
+++ b/java/com/google/gerrit/index/query/OrCardinalPredicate.java
@@ -29,8 +29,8 @@
     }
     int aggregateCardinality = 0;
     for (Predicate<T> p : getChildren()) {
-      if (p instanceof HasCardinality) {
-        aggregateCardinality += ((HasCardinality) p).getCardinality();
+      if (p instanceof HasCardinality hasCardinality) {
+        aggregateCardinality += hasCardinality.getCardinality();
       }
     }
     cardinality = aggregateCardinality;
diff --git a/java/com/google/gerrit/index/query/QueryBuilder.java b/java/com/google/gerrit/index/query/QueryBuilder.java
index 377ace4..3077907 100644
--- a/java/com/google/gerrit/index/query/QueryBuilder.java
+++ b/java/com/google/gerrit/index/query/QueryBuilder.java
@@ -175,8 +175,8 @@
   @SuppressWarnings("unchecked")
   public static <T, P extends OperatorPredicate<T>> P find(
       Predicate<T> p, Class<P> clazz, String name) {
-    if (p instanceof OperatorPredicate
-        && ((OperatorPredicate<?>) p).getOperator().equals(name)
+    if (p instanceof OperatorPredicate<?> operatorPredicate
+        && operatorPredicate.getOperator().equals(name)
         && clazz.isAssignableFrom(p.getClass())) {
       return (P) p;
     }
diff --git a/java/com/google/gerrit/index/query/QueryProcessor.java b/java/com/google/gerrit/index/query/QueryProcessor.java
index c36b204..f4cd6a0 100644
--- a/java/com/google/gerrit/index/query/QueryProcessor.java
+++ b/java/com/google/gerrit/index/query/QueryProcessor.java
@@ -292,7 +292,7 @@
         logger.atFine().log("Query options: %s", opts);
         // Apply index-specific rewrite first
         Predicate<T> pred;
-        try (TraceTimer ignored = TraceContext.newTimer("rewriteQuery")) {
+        try (TraceTimer _ = TraceContext.newTimer("rewriteQuery")) {
           pred = rewriter.rewrite(q, opts);
         }
         if (enforceVisibility) {
@@ -318,14 +318,14 @@
       // Run each query asynchronously, if supported.
       List<ResultSet<T>> matches = new ArrayList<>(cnt);
       for (DataSource<T> s : sources) {
-        try (TraceTimer ignored = TraceContext.newTimer("readDataSource")) {
+        try (TraceTimer _ = TraceContext.newTimer("readDataSource")) {
           matches.add(s.read());
         }
       }
 
       out = new ArrayList<>(cnt);
       for (int i = 0; i < cnt; i++) {
-        try (TraceTimer ignored = TraceContext.newTimer("createQueryResult")) {
+        try (TraceTimer _ = TraceContext.newTimer("createQueryResult")) {
           String queryString = queryStrings != null ? queryStrings.get(i) : null;
           ImmutableList<T> matchesList = matches.get(i).toList();
           int limit = limits.get(i);
diff --git a/java/com/google/gerrit/index/testing/AbstractFakeIndex.java b/java/com/google/gerrit/index/testing/AbstractFakeIndex.java
index 32399d3..46b63d2 100644
--- a/java/com/google/gerrit/index/testing/AbstractFakeIndex.java
+++ b/java/com/google/gerrit/index/testing/AbstractFakeIndex.java
@@ -44,7 +44,7 @@
 import com.google.gerrit.server.account.AccountState;
 import com.google.gerrit.server.change.MergeabilityComputationBehavior;
 import com.google.gerrit.server.config.GerritServerConfig;
-import com.google.gerrit.server.index.IndexDir;
+import com.google.gerrit.server.config.SitePaths;
 import com.google.gerrit.server.index.IndexUtils;
 import com.google.gerrit.server.index.account.AccountIndex;
 import com.google.gerrit.server.index.change.ChangeField;
@@ -54,7 +54,6 @@
 import com.google.gerrit.server.query.change.ChangePredicates;
 import com.google.inject.Inject;
 import com.google.inject.assistedinject.Assisted;
-import java.nio.file.Path;
 import java.time.Instant;
 import java.util.ArrayList;
 import java.util.Comparator;
@@ -76,10 +75,10 @@
   private final Schema<V> schema;
 
   /**
-   * The index directory (config files) is used to signal that an index is ready. This
-   * implementation is consistent with other index backends.
+   * SitePaths (config files) are used to signal that an index is ready. This implementation is
+   * consistent with other index backends.
    */
-  private final Path indexDir;
+  private final SitePaths sitePaths;
 
   private final String indexName;
   private final Map<K, D> indexedDocuments;
@@ -87,9 +86,9 @@
   private int flushAndCommitCount;
   private List<Integer> resultsSizes;
 
-  AbstractFakeIndex(Schema<V> schema, Path indexDir, String indexName) {
+  AbstractFakeIndex(Schema<V> schema, SitePaths sitePaths, String indexName) {
     this.schema = schema;
-    this.indexDir = indexDir;
+    this.sitePaths = sitePaths;
     this.indexName = indexName;
     this.indexedDocuments = new HashMap<>();
     this.queryCount = 0;
@@ -239,7 +238,7 @@
 
   @Override
   public void markReady(boolean ready) {
-    IndexUtils.setReady(indexDir, indexName, schema.getVersion(), ready);
+    IndexUtils.setReady(sitePaths, indexName, schema.getVersion(), ready);
   }
 
   /** Method to get a key from a document. */
@@ -271,12 +270,12 @@
     @Inject
     @VisibleForTesting
     protected FakeChangeIndex(
-        @IndexDir Path indexDir,
+        SitePaths sitePaths,
         ChangeData.Factory changeDataFactory,
         @Assisted Schema<ChangeData> schema,
         @GerritServerConfig Config cfg,
         IndexConfig indexConfig) {
-      super(schema, indexDir, "changes");
+      super(schema, sitePaths, "changes");
       this.changeDataFactory = changeDataFactory;
       this.skipMergable = !MergeabilityComputationBehavior.fromConfig(cfg).includeInIndex();
       this.indexConfig = indexConfig;
@@ -327,8 +326,7 @@
       for (SchemaField<ChangeData, ?> field : getSchema().getSchemaFields().values()) {
         boolean isProtoField = SchemaFieldDefs.isProtoField(field);
 
-        @SuppressWarnings("unused")
-        var unused =
+        var _ =
             field.setIfPossible(cd, new FakeStoredValue(doc.get(field.getName()), isProtoField));
       }
       return cd;
@@ -357,8 +355,8 @@
   public static class FakeAccountIndex
       extends AbstractFakeIndex<Account.Id, AccountState, AccountState> implements AccountIndex {
     @Inject
-    FakeAccountIndex(@IndexDir Path indexDir, @Assisted Schema<AccountState> schema) {
-      super(schema, indexDir, "accounts");
+    FakeAccountIndex(SitePaths sitePaths, @Assisted Schema<AccountState> schema) {
+      super(schema, sitePaths, "accounts");
     }
 
     @Override
@@ -395,8 +393,8 @@
       extends AbstractFakeIndex<AccountGroup.UUID, InternalGroup, InternalGroup>
       implements GroupIndex {
     @Inject
-    FakeGroupIndex(@IndexDir Path indexDir, @Assisted Schema<InternalGroup> schema) {
-      super(schema, indexDir, "groups");
+    FakeGroupIndex(SitePaths sitePaths, @Assisted Schema<InternalGroup> schema) {
+      super(schema, sitePaths, "groups");
     }
 
     @Override
@@ -432,8 +430,8 @@
   public static class FakeProjectIndex
       extends AbstractFakeIndex<Project.NameKey, ProjectData, ProjectData> implements ProjectIndex {
     @Inject
-    FakeProjectIndex(@IndexDir Path indexDir, @Assisted Schema<ProjectData> schema) {
-      super(schema, indexDir, "projects");
+    FakeProjectIndex(SitePaths sitePaths, @Assisted Schema<ProjectData> schema) {
+      super(schema, sitePaths, "projects");
     }
 
     @Override
diff --git a/java/com/google/gerrit/index/testing/FakeIndexVersionManager.java b/java/com/google/gerrit/index/testing/FakeIndexVersionManager.java
index 1e8effd..6adb007 100644
--- a/java/com/google/gerrit/index/testing/FakeIndexVersionManager.java
+++ b/java/com/google/gerrit/index/testing/FakeIndexVersionManager.java
@@ -21,13 +21,11 @@
 import com.google.gerrit.server.config.GerritServerConfig;
 import com.google.gerrit.server.config.SitePaths;
 import com.google.gerrit.server.index.GerritIndexStatus;
-import com.google.gerrit.server.index.IndexDir;
 import com.google.gerrit.server.index.OnlineUpgradeListener;
 import com.google.gerrit.server.index.VersionManager;
 import com.google.gerrit.server.plugincontext.PluginSetContext;
 import com.google.inject.Inject;
 import com.google.inject.Singleton;
-import java.nio.file.Path;
 import java.util.Collection;
 import java.util.TreeMap;
 import org.eclipse.jgit.lib.Config;
@@ -40,12 +38,10 @@
   FakeIndexVersionManager(
       @GerritServerConfig Config cfg,
       SitePaths sitePaths,
-      @IndexDir Path indexDir,
       PluginSetContext<OnlineUpgradeListener> listeners,
       Collection<IndexDefinition<?, ?, ?>> defs) {
     super(
         sitePaths,
-        indexDir,
         listeners,
         defs,
         VersionManager.shouldPerformOnlineUpgrade(cfg),
diff --git a/java/com/google/gerrit/json/OptionalTypeAdapter.java b/java/com/google/gerrit/json/OptionalTypeAdapter.java
index 9bfa72d..36cc5643 100644
--- a/java/com/google/gerrit/json/OptionalTypeAdapter.java
+++ b/java/com/google/gerrit/json/OptionalTypeAdapter.java
@@ -56,8 +56,8 @@
     // <?> type
     ParameterizedType parameterizedType =
         (ParameterizedType) new TypeLiteral<Optional<?>>() {}.getType();
-    if (typeOfT instanceof ParameterizedType) {
-      parameterizedType = (ParameterizedType) typeOfT;
+    if (typeOfT instanceof ParameterizedType pt) {
+      parameterizedType = pt;
       if (parameterizedType.getActualTypeArguments().length != 1) {
         throw new JsonParseException("Expected one parameter type in Optional.");
       }
diff --git a/java/com/google/gerrit/launcher/GerritLauncher.java b/java/com/google/gerrit/launcher/GerritLauncher.java
index 79205ed..f8845d3 100644
--- a/java/com/google/gerrit/launcher/GerritLauncher.java
+++ b/java/com/google/gerrit/launcher/GerritLauncher.java
@@ -251,16 +251,16 @@
             main.invoke(clazz.getConstructor(new Class<?>[] {}).newInstance(), new Object[] {argv});
       }
     } catch (InvocationTargetException ite) {
-      if (ite.getCause() instanceof Exception) {
-        throw (Exception) ite.getCause();
-      } else if (ite.getCause() instanceof Error) {
-        throw (Error) ite.getCause();
+      if (ite.getCause() instanceof Exception e) {
+        throw e;
+      } else if (ite.getCause() instanceof Error e) {
+        throw e;
       } else {
         throw ite;
       }
     }
-    if (res instanceof Number) {
-      return ((Number) res).intValue();
+    if (res instanceof Number number) {
+      return number.intValue();
     }
     return 0;
   }
diff --git a/java/com/google/gerrit/lucene/AbstractLuceneIndex.java b/java/com/google/gerrit/lucene/AbstractLuceneIndex.java
index 56e0793..9489181 100644
--- a/java/com/google/gerrit/lucene/AbstractLuceneIndex.java
+++ b/java/com/google/gerrit/lucene/AbstractLuceneIndex.java
@@ -48,6 +48,7 @@
 import com.google.gerrit.index.query.ListResultSet;
 import com.google.gerrit.index.query.ResultSet;
 import com.google.gerrit.proto.Protos;
+import com.google.gerrit.server.config.SitePaths;
 import com.google.gerrit.server.index.IndexUtils;
 import com.google.gerrit.server.index.options.AutoFlush;
 import com.google.gerrit.server.logging.LoggingContextAwareExecutorService;
@@ -104,7 +105,7 @@
   }
 
   private final Schema<V> schema;
-  private final Path indexDir;
+  private final SitePaths sitePaths;
   private final Directory dir;
   private final String name;
   private final ImmutableSet<String> skipFields;
@@ -120,7 +121,7 @@
   @SuppressWarnings("ThreadPriorityCheck")
   AbstractLuceneIndex(
       Schema<V> schema,
-      Path indexDir,
+      SitePaths sitePaths,
       Directory dir,
       String name,
       ImmutableSet<String> skipFields,
@@ -131,7 +132,7 @@
       Function<V, K> valueToKeyFunction)
       throws IOException {
     this.schema = schema;
-    this.indexDir = indexDir;
+    this.sitePaths = sitePaths;
     this.dir = dir;
     this.name = name;
     this.skipFields = skipFields;
@@ -246,7 +247,7 @@
 
   @Override
   public void markReady(boolean ready) {
-    IndexUtils.setReady(indexDir, name, schema.getVersion(), ready);
+    IndexUtils.setReady(sitePaths, name, schema.getVersion(), ready);
   }
 
   @Override
@@ -554,12 +555,9 @@
     IndexCommit commit = snapshooter.snapshot();
     try {
       Path sourceDir = canonical(((FSDirectory) commit.getDirectory()).getDirectory());
-      Path canonicalIndexDir = canonical(indexDir);
+      Path indexDir = canonical(sitePaths.index_dir);
       Path targetDir =
-          canonicalIndexDir
-              .resolve("snapshots")
-              .resolve(id)
-              .resolve(canonicalIndexDir.relativize(sourceDir));
+          indexDir.resolve("snapshots").resolve(id).resolve(indexDir.relativize(sourceDir));
       if (targetDir.toFile().exists()) {
         throw new FileAlreadyExistsException(targetDir.toString());
       }
diff --git a/java/com/google/gerrit/lucene/ChangeSubIndex.java b/java/com/google/gerrit/lucene/ChangeSubIndex.java
index fa6373e..22ca037 100644
--- a/java/com/google/gerrit/lucene/ChangeSubIndex.java
+++ b/java/com/google/gerrit/lucene/ChangeSubIndex.java
@@ -32,6 +32,7 @@
 import com.google.gerrit.index.query.FieldBundle;
 import com.google.gerrit.index.query.Predicate;
 import com.google.gerrit.index.query.QueryParseException;
+import com.google.gerrit.server.config.SitePaths;
 import com.google.gerrit.server.index.change.ChangeField;
 import com.google.gerrit.server.index.change.ChangeIndex;
 import com.google.gerrit.server.index.options.AutoFlush;
@@ -43,14 +44,13 @@
 import org.apache.lucene.document.NumericDocValuesField;
 import org.apache.lucene.search.SearcherFactory;
 import org.apache.lucene.store.Directory;
-import org.eclipse.jgit.lib.Config;
+import org.apache.lucene.store.FSDirectory;
 
 public class ChangeSubIndex extends AbstractLuceneIndex<Change.Id, ChangeData>
     implements ChangeIndex {
   ChangeSubIndex(
       Schema<ChangeData> schema,
-      Path indexDir,
-      Config cfg,
+      SitePaths sitePaths,
       Path path,
       ImmutableSet<String> skipFields,
       GerritIndexWriterConfig writerConfig,
@@ -59,8 +59,8 @@
       throws IOException {
     this(
         schema,
-        indexDir,
-        LuceneDirectory.open(cfg, path),
+        sitePaths,
+        FSDirectory.open(path),
         path.getFileName().toString(),
         skipFields,
         writerConfig,
@@ -70,7 +70,7 @@
 
   ChangeSubIndex(
       Schema<ChangeData> schema,
-      Path indexDir,
+      SitePaths sitePaths,
       Directory dir,
       String subIndex,
       ImmutableSet<String> skipFields,
@@ -80,7 +80,7 @@
       throws IOException {
     super(
         schema,
-        indexDir,
+        sitePaths,
         dir,
         NAME,
         skipFields,
diff --git a/java/com/google/gerrit/lucene/LuceneAccountIndex.java b/java/com/google/gerrit/lucene/LuceneAccountIndex.java
index 4d15916..43f3f35 100644
--- a/java/com/google/gerrit/lucene/LuceneAccountIndex.java
+++ b/java/com/google/gerrit/lucene/LuceneAccountIndex.java
@@ -35,7 +35,6 @@
 import com.google.gerrit.server.account.AccountState;
 import com.google.gerrit.server.config.GerritServerConfig;
 import com.google.gerrit.server.config.SitePaths;
-import com.google.gerrit.server.index.IndexDir;
 import com.google.gerrit.server.index.IndexUtils;
 import com.google.gerrit.server.index.account.AccountIndex;
 import com.google.gerrit.server.index.options.AutoFlush;
@@ -54,6 +53,7 @@
 import org.apache.lucene.search.SortField;
 import org.apache.lucene.store.ByteBuffersDirectory;
 import org.apache.lucene.store.Directory;
+import org.apache.lucene.store.FSDirectory;
 import org.apache.lucene.util.BytesRef;
 import org.eclipse.jgit.lib.Config;
 
@@ -83,28 +83,27 @@
   private final QueryBuilder<AccountState> queryBuilder;
   private final Provider<AccountCache> accountCache;
 
-  private static Directory dir(Schema<AccountState> schema, Config cfg, Path indexDir)
+  private static Directory dir(Schema<AccountState> schema, Config cfg, SitePaths sitePaths)
       throws IOException {
     if (LuceneIndexModule.isInMemoryTest(cfg)) {
       return new ByteBuffersDirectory();
     }
-    Path dir = LuceneVersionManager.getDir(indexDir, ACCOUNTS, schema);
-    return LuceneDirectory.open(cfg, dir);
+    Path indexDir = LuceneVersionManager.getDir(sitePaths, ACCOUNTS, schema);
+    return FSDirectory.open(indexDir);
   }
 
   @Inject
   LuceneAccountIndex(
       @GerritServerConfig Config cfg,
       SitePaths sitePaths,
-      @IndexDir Path indexDir,
       Provider<AccountCache> accountCache,
       @Assisted Schema<AccountState> schema,
       AutoFlush autoFlush)
       throws IOException {
     super(
         schema,
-        indexDir,
-        dir(schema, cfg, indexDir),
+        sitePaths,
+        dir(schema, cfg, sitePaths),
         ACCOUNTS,
         ImmutableSet.of(),
         null,
diff --git a/java/com/google/gerrit/lucene/LuceneChangeIndex.java b/java/com/google/gerrit/lucene/LuceneChangeIndex.java
index fd59370..e42dfaa 100644
--- a/java/com/google/gerrit/lucene/LuceneChangeIndex.java
+++ b/java/com/google/gerrit/lucene/LuceneChangeIndex.java
@@ -53,7 +53,6 @@
 import com.google.gerrit.server.change.MergeabilityComputationBehavior;
 import com.google.gerrit.server.config.GerritServerConfig;
 import com.google.gerrit.server.config.SitePaths;
-import com.google.gerrit.server.index.IndexDir;
 import com.google.gerrit.server.index.IndexExecutor;
 import com.google.gerrit.server.index.IndexUtils;
 import com.google.gerrit.server.index.change.ChangeField;
@@ -135,7 +134,6 @@
   LuceneChangeIndex(
       @GerritServerConfig Config cfg,
       SitePaths sitePaths,
-      @IndexDir Path indexDir,
       @IndexExecutor(INTERACTIVE) ListeningExecutorService executor,
       ChangeData.Factory changeDataFactory,
       @Assisted Schema<ChangeData> schema,
@@ -161,7 +159,7 @@
       openIndex =
           new ChangeSubIndex(
               schema,
-              indexDir,
+              sitePaths,
               new ByteBuffersDirectory(),
               "ramOpen",
               skipFields,
@@ -171,7 +169,7 @@
       closedIndex =
           new ChangeSubIndex(
               schema,
-              indexDir,
+              sitePaths,
               new ByteBuffersDirectory(),
               "ramClosed",
               skipFields,
@@ -179,12 +177,11 @@
               searcherFactory,
               autoFlush);
     } else {
-      Path dir = LuceneVersionManager.getDir(indexDir, CHANGES, schema);
+      Path dir = LuceneVersionManager.getDir(sitePaths, CHANGES, schema);
       openIndex =
           new ChangeSubIndex(
               schema,
-              indexDir,
-              cfg,
+              sitePaths,
               dir.resolve(CHANGES_OPEN),
               skipFields,
               openConfig,
@@ -193,8 +190,7 @@
       closedIndex =
           new ChangeSubIndex(
               schema,
-              indexDir,
-              cfg,
+              sitePaths,
               dir.resolve(CHANGES_CLOSED),
               skipFields,
               closedConfig,
@@ -353,8 +349,8 @@
 
     @Override
     public int getCardinality() {
-      if (predicate instanceof HasCardinality) {
-        return ((HasCardinality) predicate).getCardinality();
+      if (predicate instanceof HasCardinality hasCardinality) {
+        return hasCardinality.getCardinality();
       }
       return 10;
     }
@@ -516,10 +512,9 @@
     @Nullable
     private ScoreDoc getSearchAfter(ChangeSubIndex subIndex) {
       if (isSearchAfterPagination
-          && opts.searchAfter() != null
-          && opts.searchAfter() instanceof Map
-          && ((Map<?, ?>) opts.searchAfter()).get(subIndex) instanceof ScoreDoc) {
-        return (ScoreDoc) ((Map<?, ?>) opts.searchAfter()).get(subIndex);
+          && opts.searchAfter() instanceof Map<?, ?> searchAfter
+          && searchAfter.get(subIndex) instanceof ScoreDoc scoreDoc) {
+        return scoreDoc;
       }
       return null;
     }
@@ -624,8 +619,7 @@
 
     for (SchemaField<ChangeData, ?> field : getSchema().getSchemaFields().values()) {
       if (fields.contains(field.getName())) {
-        @SuppressWarnings("unused")
-        var unused = field.setIfPossible(cd, new LuceneStoredValue(doc.get(field.getName())));
+        var _ = field.setIfPossible(cd, new LuceneStoredValue(doc.get(field.getName())));
       }
     }
     return cd;
diff --git a/java/com/google/gerrit/lucene/LuceneDirectory.java b/java/com/google/gerrit/lucene/LuceneDirectory.java
deleted file mode 100644
index 1117401..0000000
--- a/java/com/google/gerrit/lucene/LuceneDirectory.java
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (C) 2026 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.google.gerrit.lucene;
-
-import java.io.IOException;
-import java.nio.file.Path;
-import org.apache.lucene.store.Directory;
-import org.apache.lucene.store.FSDirectory;
-import org.apache.lucene.store.LockFactory;
-import org.apache.lucene.store.NativeFSLockFactory;
-import org.apache.lucene.store.SimpleFSLockFactory;
-import org.eclipse.jgit.lib.Config;
-
-/**
- * Opens the on-disk {@link Directory} of a Lucene index, using the lock implementation configured
- * for this site.
- */
-final class LuceneDirectory {
-  /** Value of the {@code index.lockFactory} setting. */
-  enum LockFactoryType {
-    /** Use {@link NativeFSLockFactory}. */
-    NATIVE,
-
-    /** Use {@link SimpleFSLockFactory}. */
-    SIMPLE
-  }
-
-  static Directory open(Config cfg, Path path) throws IOException {
-    return FSDirectory.open(path, lockFactory(cfg));
-  }
-
-  private static LockFactory lockFactory(Config cfg) {
-    return switch (cfg.getEnum(
-        LockFactoryType.values(), "index", null, "lockFactory", LockFactoryType.NATIVE)) {
-      case NATIVE -> NativeFSLockFactory.INSTANCE;
-      case SIMPLE -> SimpleFSLockFactory.INSTANCE;
-    };
-  }
-
-  private LuceneDirectory() {}
-}
diff --git a/java/com/google/gerrit/lucene/LuceneGroupIndex.java b/java/com/google/gerrit/lucene/LuceneGroupIndex.java
index 83c9926..856903c 100644
--- a/java/com/google/gerrit/lucene/LuceneGroupIndex.java
+++ b/java/com/google/gerrit/lucene/LuceneGroupIndex.java
@@ -33,7 +33,6 @@
 import com.google.gerrit.server.account.GroupCache;
 import com.google.gerrit.server.config.GerritServerConfig;
 import com.google.gerrit.server.config.SitePaths;
-import com.google.gerrit.server.index.IndexDir;
 import com.google.gerrit.server.index.IndexUtils;
 import com.google.gerrit.server.index.group.GroupIndex;
 import com.google.gerrit.server.index.options.AutoFlush;
@@ -51,6 +50,7 @@
 import org.apache.lucene.search.SortField;
 import org.apache.lucene.store.ByteBuffersDirectory;
 import org.apache.lucene.store.Directory;
+import org.apache.lucene.store.FSDirectory;
 import org.apache.lucene.util.BytesRef;
 import org.eclipse.jgit.lib.Config;
 
@@ -73,27 +73,27 @@
   private final QueryBuilder<InternalGroup> queryBuilder;
   private final Provider<GroupCache> groupCache;
 
-  private static Directory dir(Schema<?> schema, Config cfg, Path indexDir) throws IOException {
+  private static Directory dir(Schema<?> schema, Config cfg, SitePaths sitePaths)
+      throws IOException {
     if (LuceneIndexModule.isInMemoryTest(cfg)) {
       return new ByteBuffersDirectory();
     }
-    Path dir = LuceneVersionManager.getDir(indexDir, GROUPS, schema);
-    return LuceneDirectory.open(cfg, dir);
+    Path indexDir = LuceneVersionManager.getDir(sitePaths, GROUPS, schema);
+    return FSDirectory.open(indexDir);
   }
 
   @Inject
   LuceneGroupIndex(
       @GerritServerConfig Config cfg,
       SitePaths sitePaths,
-      @IndexDir Path indexDir,
       Provider<GroupCache> groupCache,
       @Assisted Schema<InternalGroup> schema,
       AutoFlush autoFlush)
       throws IOException {
     super(
         schema,
-        indexDir,
-        dir(schema, cfg, indexDir),
+        sitePaths,
+        dir(schema, cfg, sitePaths),
         GROUPS,
         ImmutableSet.of(),
         null,
diff --git a/java/com/google/gerrit/lucene/LuceneProjectIndex.java b/java/com/google/gerrit/lucene/LuceneProjectIndex.java
index f1cbeed..cfddf81 100644
--- a/java/com/google/gerrit/lucene/LuceneProjectIndex.java
+++ b/java/com/google/gerrit/lucene/LuceneProjectIndex.java
@@ -33,7 +33,6 @@
 import com.google.gerrit.index.query.QueryParseException;
 import com.google.gerrit.server.config.GerritServerConfig;
 import com.google.gerrit.server.config.SitePaths;
-import com.google.gerrit.server.index.IndexDir;
 import com.google.gerrit.server.index.IndexUtils;
 import com.google.gerrit.server.index.options.AutoFlush;
 import com.google.gerrit.server.project.ProjectCache;
@@ -52,6 +51,7 @@
 import org.apache.lucene.search.SortField;
 import org.apache.lucene.store.ByteBuffersDirectory;
 import org.apache.lucene.store.Directory;
+import org.apache.lucene.store.FSDirectory;
 import org.apache.lucene.util.BytesRef;
 import org.eclipse.jgit.lib.Config;
 
@@ -73,28 +73,27 @@
   private final QueryBuilder<ProjectData> queryBuilder;
   private final Provider<ProjectCache> projectCache;
 
-  private static Directory dir(Schema<ProjectData> schema, Config cfg, Path indexDir)
+  private static Directory dir(Schema<ProjectData> schema, Config cfg, SitePaths sitePaths)
       throws IOException {
     if (LuceneIndexModule.isInMemoryTest(cfg)) {
       return new ByteBuffersDirectory();
     }
-    Path dir = LuceneVersionManager.getDir(indexDir, PROJECTS, schema);
-    return LuceneDirectory.open(cfg, dir);
+    Path indexDir = LuceneVersionManager.getDir(sitePaths, PROJECTS, schema);
+    return FSDirectory.open(indexDir);
   }
 
   @Inject
   LuceneProjectIndex(
       @GerritServerConfig Config cfg,
       SitePaths sitePaths,
-      @IndexDir Path indexDir,
       Provider<ProjectCache> projectCache,
       @Assisted Schema<ProjectData> schema,
       AutoFlush autoFlush)
       throws IOException {
     super(
         schema,
-        indexDir,
-        dir(schema, cfg, indexDir),
+        sitePaths,
+        dir(schema, cfg, sitePaths),
         PROJECTS,
         ImmutableSet.of(),
         null,
diff --git a/java/com/google/gerrit/lucene/LuceneVersionManager.java b/java/com/google/gerrit/lucene/LuceneVersionManager.java
index 7461ebe..f900d75 100644
--- a/java/com/google/gerrit/lucene/LuceneVersionManager.java
+++ b/java/com/google/gerrit/lucene/LuceneVersionManager.java
@@ -22,7 +22,6 @@
 import com.google.gerrit.server.config.GerritServerConfig;
 import com.google.gerrit.server.config.SitePaths;
 import com.google.gerrit.server.index.GerritIndexStatus;
-import com.google.gerrit.server.index.IndexDir;
 import com.google.gerrit.server.index.OnlineUpgradeListener;
 import com.google.gerrit.server.index.VersionManager;
 import com.google.gerrit.server.plugincontext.PluginSetContext;
@@ -40,20 +39,18 @@
 public class LuceneVersionManager extends VersionManager {
   private static final FluentLogger logger = FluentLogger.forEnclosingClass();
 
-  static Path getDir(Path indexDir, String name, Schema<?> schema) {
-    return indexDir.resolve(String.format("%s_%04d", name, schema.getVersion()));
+  static Path getDir(SitePaths sitePaths, String name, Schema<?> schema) {
+    return sitePaths.index_dir.resolve(String.format("%s_%04d", name, schema.getVersion()));
   }
 
   @Inject
   LuceneVersionManager(
       @GerritServerConfig Config cfg,
       SitePaths sitePaths,
-      @IndexDir Path indexDir,
       PluginSetContext<OnlineUpgradeListener> listeners,
       Collection<IndexDefinition<?, ?, ?>> defs) {
     super(
         sitePaths,
-        indexDir,
         listeners,
         defs,
         VersionManager.shouldPerformOnlineUpgrade(cfg),
@@ -66,7 +63,7 @@
     TreeMap<Integer, VersionManager.Version<V>> versions = new TreeMap<>();
     for (Schema<V> schema : def.getSchemas().values()) {
       // This part is Lucene-specific.
-      Path p = getDir(indexDir, def.getName(), schema);
+      Path p = getDir(sitePaths, def.getName(), schema);
       boolean isDir = Files.isDirectory(p);
       if (Files.exists(p) && !isDir) {
         logger.atWarning().log("Not a directory: %s", p.toAbsolutePath());
@@ -76,7 +73,7 @@
     }
 
     String prefix = def.getName() + "_";
-    try (DirectoryStream<Path> paths = Files.newDirectoryStream(indexDir)) {
+    try (DirectoryStream<Path> paths = Files.newDirectoryStream(sitePaths.index_dir)) {
       for (Path p : paths) {
         String n = p.getFileName().toString();
         if (!n.startsWith(prefix)) {
@@ -93,7 +90,7 @@
         }
       }
     } catch (IOException e) {
-      logger.atSevere().withCause(e).log("Error scanning index directory: %s", indexDir);
+      logger.atSevere().withCause(e).log("Error scanning index directory: %s", sitePaths.index_dir);
     }
     return versions;
   }
diff --git a/java/com/google/gerrit/lucene/QueryBuilder.java b/java/com/google/gerrit/lucene/QueryBuilder.java
index 467a329..3eb18bb 100644
--- a/java/com/google/gerrit/lucene/QueryBuilder.java
+++ b/java/com/google/gerrit/lucene/QueryBuilder.java
@@ -35,6 +35,7 @@
 import com.google.gerrit.index.query.RegexPredicate;
 import com.google.gerrit.index.query.TimestampRangePredicate;
 import java.util.List;
+import java.util.Objects;
 import org.apache.lucene.analysis.Analyzer;
 import org.apache.lucene.document.IntPoint;
 import org.apache.lucene.document.LongPoint;
@@ -76,24 +77,19 @@
   }
 
   public Query toQuery(Predicate<V> p) throws QueryParseException {
-    if (p instanceof AndPredicate) {
-      return and(p);
-    } else if (p instanceof OrPredicate) {
-      return or(p);
-    } else if (p instanceof NotPredicate) {
-      return not(p);
-    } else if (p instanceof Predicate.Any) {
-      return new MatchAllDocsQuery();
-    } else if (p instanceof IndexPredicate) {
-      return fieldQuery((IndexPredicate<V>) p);
-    } else if (p instanceof PostFilterPredicate) {
-      return new MatchAllDocsQuery();
-    } else {
-      throw new QueryParseException("cannot create query for index: " + p);
-    }
+    Objects.requireNonNull(p, "p must not be null");
+    return switch (p) {
+      case AndPredicate<V> a -> and(a);
+      case OrPredicate<V> o -> or(o);
+      case NotPredicate<V> n -> not(n);
+      case Predicate.Any<V> _ -> new MatchAllDocsQuery();
+      case IndexPredicate<V> ip -> fieldQuery(ip);
+      case PostFilterPredicate<V> _ -> new MatchAllDocsQuery();
+      default -> throw new QueryParseException("cannot create query for index: " + p);
+    };
   }
 
-  private Query or(Predicate<V> p) throws QueryParseException {
+  private Query or(OrPredicate<V> p) throws QueryParseException {
     try {
       BooleanQuery.Builder q = new BooleanQuery.Builder();
       for (int i = 0; i < p.getChildCount(); i++) {
@@ -105,16 +101,16 @@
     }
   }
 
-  private Query and(Predicate<V> p) throws QueryParseException {
+  private Query and(AndPredicate<V> p) throws QueryParseException {
     try {
       BooleanQuery.Builder b = new BooleanQuery.Builder();
       List<Query> not = Lists.newArrayListWithCapacity(p.getChildCount());
       for (int i = 0; i < p.getChildCount(); i++) {
         Predicate<V> c = p.getChild(i);
-        if (c instanceof NotPredicate) {
-          Predicate<V> n = c.getChild(0);
-          if (n instanceof TimestampRangePredicate) {
-            b.add(notTimestamp((TimestampRangePredicate<V>) n), MUST);
+        if (c instanceof NotPredicate<V> notP) {
+          Predicate<V> n = notP.getChild(0);
+          if (n instanceof TimestampRangePredicate<V> tr) {
+            b.add(notTimestamp(tr), MUST);
           } else {
             not.add(toQuery(n));
           }
@@ -131,10 +127,10 @@
     }
   }
 
-  private Query not(Predicate<V> p) throws QueryParseException {
+  private Query not(NotPredicate<V> p) throws QueryParseException {
     Predicate<V> n = p.getChild(0);
-    if (n instanceof TimestampRangePredicate) {
-      return notTimestamp((TimestampRangePredicate<V>) n);
+    if (n instanceof TimestampRangePredicate<V> tr) {
+      return notTimestamp(tr);
     }
 
     // Lucene does not support negation, start with all and subtract.
@@ -181,8 +177,7 @@
   }
 
   private Query intRangeQuery(IndexPredicate<V> p) throws QueryParseException {
-    if (p instanceof IntegerRangePredicate) {
-      IntegerRangePredicate<V> r = (IntegerRangePredicate<V>) p;
+    if (p instanceof IntegerRangePredicate<V> r) {
       String name = r.getField().getName();
       int minimum = r.getMinimumValue();
       int maximum = r.getMaximumValue();
@@ -196,8 +191,7 @@
   }
 
   private Query timestampQuery(IndexPredicate<V> p) throws QueryParseException {
-    if (p instanceof TimestampRangePredicate) {
-      TimestampRangePredicate<V> r = (TimestampRangePredicate<V>) p;
+    if (p instanceof TimestampRangePredicate<V> r) {
       return LongPoint.newRangeQuery(
           r.getField().getName(),
           r.getMinTimestamp().toEpochMilli(),
@@ -215,13 +209,13 @@
   }
 
   private Query exactQuery(IndexPredicate<V> p) {
-    if (p instanceof RegexPredicate<?>) {
-      return regexQuery(p);
+    if (p instanceof RegexPredicate<V> r) {
+      return regexQuery(r);
     }
     return new TermQuery(new Term(p.getField().getName(), p.getValue()));
   }
 
-  private Query regexQuery(IndexPredicate<V> p) {
+  private Query regexQuery(RegexPredicate<V> p) {
     String re = p.getValue();
     if (re.startsWith("^")) {
       re = re.substring(1);
diff --git a/java/com/google/gerrit/lucene/WrappableSearcherManager.java b/java/com/google/gerrit/lucene/WrappableSearcherManager.java
index 56cb220..beb264b 100644
--- a/java/com/google/gerrit/lucene/WrappableSearcherManager.java
+++ b/java/com/google/gerrit/lucene/WrappableSearcherManager.java
@@ -191,10 +191,10 @@
       while (true) {
         if (unwrapped == reader) {
           break;
-        } else if (unwrapped instanceof FilterDirectoryReader) {
-          unwrapped = ((FilterDirectoryReader) unwrapped).getDelegate();
-        } else if (unwrapped instanceof FilterLeafReader) {
-          unwrapped = ((FilterLeafReader) unwrapped).getDelegate();
+        } else if (unwrapped instanceof FilterDirectoryReader filterDirectoryReader) {
+          unwrapped = filterDirectoryReader.getDelegate();
+        } else if (unwrapped instanceof FilterLeafReader filterLeafReader) {
+          unwrapped = filterLeafReader.getDelegate();
         } else {
           break;
         }
diff --git a/java/com/google/gerrit/metrics/dropwizard/DropWizardReservoirProvider.java b/java/com/google/gerrit/metrics/dropwizard/DropWizardReservoirProvider.java
index 3089068..05d73d2 100644
--- a/java/com/google/gerrit/metrics/dropwizard/DropWizardReservoirProvider.java
+++ b/java/com/google/gerrit/metrics/dropwizard/DropWizardReservoirProvider.java
@@ -30,23 +30,17 @@
 
   static Reservoir get(MetricsReservoirConfig config) {
     ReservoirType reservoirType = config.reservoirType();
-    switch (reservoirType) {
-      case ExponentiallyDecaying:
-        return new ExponentiallyDecayingReservoir(config.reservoirSize(), config.reservoirAlpha());
-      case SlidingTimeWindowArray:
-        return new SlidingTimeWindowArrayReservoir(
-            config.reservoirWindow().toMillis(), TimeUnit.MILLISECONDS);
-      case SlidingTimeWindow:
-        return new SlidingTimeWindowReservoir(
-            config.reservoirWindow().toMillis(), TimeUnit.MILLISECONDS);
-      case SlidingWindow:
-        return new SlidingWindowReservoir(config.reservoirSize());
-      case Uniform:
-        return new UniformReservoir(config.reservoirSize());
-
-      default:
-        throw new IllegalArgumentException(
-            "Unsupported metrics reservoir type " + reservoirType.name());
-    }
+    return switch (reservoirType) {
+      case ExponentiallyDecaying ->
+          new ExponentiallyDecayingReservoir(config.reservoirSize(), config.reservoirAlpha());
+      case SlidingTimeWindowArray ->
+          new SlidingTimeWindowArrayReservoir(
+              config.reservoirWindow().toMillis(), TimeUnit.MILLISECONDS);
+      case SlidingTimeWindow ->
+          new SlidingTimeWindowReservoir(
+              config.reservoirWindow().toMillis(), TimeUnit.MILLISECONDS);
+      case SlidingWindow -> new SlidingWindowReservoir(config.reservoirSize());
+      case Uniform -> new UniformReservoir(config.reservoirSize());
+    };
   }
 }
diff --git a/java/com/google/gerrit/metrics/dropwizard/MetricInfo.java b/java/com/google/gerrit/metrics/dropwizard/MetricInfo.java
index 7abccf4..daa1ae8 100644
--- a/java/com/google/gerrit/metrics/dropwizard/MetricInfo.java
+++ b/java/com/google/gerrit/metrics/dropwizard/MetricInfo.java
@@ -77,8 +77,7 @@
   }
 
   private void init(Metric metric, ImmutableMap<String, String> atts) {
-    if (metric instanceof BucketedMetric) {
-      BucketedMetric m = (BucketedMetric) metric;
+    if (metric instanceof BucketedMetric m) {
       if (m.getTotal() != null) {
         init(m.getTotal(), atts);
       }
@@ -90,23 +89,19 @@
       }
       buckets = makeBuckets(fieldList, m.getCells(), atts);
 
-    } else if (metric instanceof Counter) {
-      Counter c = (Counter) metric;
+    } else if (metric instanceof Counter c) {
       count = c.getCount();
 
-    } else if (metric instanceof Gauge) {
-      Gauge<?> g = (Gauge<?>) metric;
+    } else if (metric instanceof Gauge<?> g) {
       value = g.getValue();
 
-    } else if (metric instanceof Meter) {
-      Meter m = (Meter) metric;
+    } else if (metric instanceof Meter m) {
       count = m.getCount();
       rate_1m = m.getOneMinuteRate();
       rate_5m = m.getFiveMinuteRate();
       rate_15m = m.getFifteenMinuteRate();
 
-    } else if (metric instanceof Timer) {
-      Timer m = (Timer) metric;
+    } else if (metric instanceof Timer m) {
       Snapshot s = m.getSnapshot();
       count = m.getCount();
       rate_1m = m.getOneMinuteRate();
@@ -125,8 +120,7 @@
       max = s.getMax() / div;
       std_dev = s.getStdDev() / div;
 
-    } else if (metric instanceof Histogram) {
-      Histogram m = (Histogram) metric;
+    } else if (metric instanceof Histogram m) {
       Snapshot s = m.getSnapshot();
       count = m.getCount();
 
diff --git a/java/com/google/gerrit/metrics/proc/OperatingSystemMXBeanFactory.java b/java/com/google/gerrit/metrics/proc/OperatingSystemMXBeanFactory.java
index 84f2320..c62fb38 100644
--- a/java/com/google/gerrit/metrics/proc/OperatingSystemMXBeanFactory.java
+++ b/java/com/google/gerrit/metrics/proc/OperatingSystemMXBeanFactory.java
@@ -29,8 +29,8 @@
   @Nullable
   static OperatingSystemMXBeanInterface create() {
     OperatingSystemMXBean sys = ManagementFactory.getOperatingSystemMXBean();
-    if (sys instanceof UnixOperatingSystemMXBean) {
-      return new OperatingSystemMXBeanUnixNative((UnixOperatingSystemMXBean) sys);
+    if (sys instanceof UnixOperatingSystemMXBean unixOperatingSystemMXBean) {
+      return new OperatingSystemMXBeanUnixNative(unixOperatingSystemMXBean);
     }
 
     for (String name :
diff --git a/java/com/google/gerrit/pgm/Daemon.java b/java/com/google/gerrit/pgm/Daemon.java
index 291b0d6..0605253 100644
--- a/java/com/google/gerrit/pgm/Daemon.java
+++ b/java/com/google/gerrit/pgm/Daemon.java
@@ -285,8 +285,7 @@
     }
     if (doInit) {
       try {
-        @SuppressWarnings("unused")
-        var unused = new Init(getSitePath()).run();
+        var _ = new Init(getSitePath()).run();
       } catch (Exception e) {
         throw die("Init failed", e);
       }
diff --git a/java/com/google/gerrit/pgm/Init.java b/java/com/google/gerrit/pgm/Init.java
index 9c3e8b5..27ce888 100644
--- a/java/com/google/gerrit/pgm/Init.java
+++ b/java/com/google/gerrit/pgm/Init.java
@@ -34,7 +34,6 @@
 import com.google.gerrit.server.config.GerritServerConfigModule;
 import com.google.gerrit.server.config.SitePath;
 import com.google.gerrit.server.index.GerritIndexStatus;
-import com.google.gerrit.server.index.IndexModule;
 import com.google.gerrit.server.index.account.AccountSchemaDefinitions;
 import com.google.gerrit.server.index.change.ChangeSchemaDefinitions;
 import com.google.gerrit.server.index.group.GroupSchemaDefinitions;
@@ -116,7 +115,7 @@
 
   @Override
   protected boolean beforeInit(SiteInit init) throws Exception {
-    indexStatus = new GerritIndexStatus(IndexModule.indexDirectory(init.site));
+    indexStatus = new GerritIndexStatus(init.site);
     ErrorLogFile.errorOnlyConsole();
 
     if (!skipPlugins) {
@@ -306,8 +305,7 @@
     getConsoleUI().message(" reindex " + reindexArgs.stream().collect(joining(" ")));
     Reindex reindexPgm = new Reindex();
 
-    @SuppressWarnings("unused")
-    var unused = reindexPgm.main(reindexArgs.stream().toArray(String[]::new));
+    var _ = reindexPgm.main(reindexArgs.stream().toArray(String[]::new));
   }
 
   private static boolean nullOrEmpty(List<?> list) {
diff --git a/java/com/google/gerrit/pgm/JythonShell.java b/java/com/google/gerrit/pgm/JythonShell.java
index dcd89dc..df7c2d7 100644
--- a/java/com/google/gerrit/pgm/JythonShell.java
+++ b/java/com/google/gerrit/pgm/JythonShell.java
@@ -52,9 +52,7 @@
     // Jython needs to inspect actual .jar files (not just classloader)
     StringBuilder classPath = new StringBuilder();
     final ClassLoader cl = getClass().getClassLoader();
-    if (cl instanceof java.net.URLClassLoader) {
-      @SuppressWarnings("resource")
-      URLClassLoader ucl = (URLClassLoader) cl;
+    if (cl instanceof URLClassLoader ucl) {
       for (URL u : ucl.getURLs()) {
         if ("file".equals(u.getProtocol())) {
           if (classPath.length() > 0) {
@@ -70,8 +68,7 @@
     pyObject = findClass("org.python.core.PyObject");
     pySystemState = findClass("org.python.core.PySystemState");
 
-    @SuppressWarnings("unused")
-    var unused =
+    var _ =
         runMethod(
             pySystemState,
             pySystemState,
@@ -127,8 +124,7 @@
   }
 
   protected void printInjectedVariable(String id) {
-    @SuppressWarnings("unused")
-    var unused =
+    var _ =
         runInterpreter(
             "exec",
             new Class<?>[] {String.class},
@@ -141,8 +137,7 @@
     }
     reload();
 
-    @SuppressWarnings("unused")
-    var unused =
+    var _ =
         runInterpreter(
             "interact",
             new Class<?>[] {String.class, pyObject},
@@ -155,8 +150,7 @@
   }
 
   public void set(String key, Object content) {
-    @SuppressWarnings("unused")
-    var unused =
+    var _ =
         runInterpreter(
             "set", new Class<?>[] {String.class, Object.class}, new Object[] {key, content});
 
@@ -192,8 +186,7 @@
     try {
       File script = new File(parent, p);
       if (script.canExecute()) {
-        @SuppressWarnings("unused")
-        var unused =
+        var _ =
             runMethod0(
                 console,
                 shell,
@@ -213,8 +206,7 @@
 
   protected void execStream(InputStream in, String p) {
     try {
-      @SuppressWarnings("unused")
-      var unused =
+      var _ =
           runMethod0(
               console,
               shell,
diff --git a/java/com/google/gerrit/pgm/Reindex.java b/java/com/google/gerrit/pgm/Reindex.java
index 243626a..f58c3b6 100644
--- a/java/com/google/gerrit/pgm/Reindex.java
+++ b/java/com/google/gerrit/pgm/Reindex.java
@@ -270,8 +270,10 @@
   private void overrideConfig() {
     // Disable auto-commit for speed; committing will happen at the end of the process.
     if (IndexModule.getIndexType(dbInjector).isLucene()) {
-      globalConfig.setLong("index", "changes_open", "commitWithin", -1);
-      globalConfig.setLong("index", "changes_closed", "commitWithin", -1);
+      for (String index :
+          ImmutableSet.of("changes_open", "changes_closed", "accounts", "groups", "projects")) {
+        globalConfig.setLong("index", index, "commitWithin", -1);
+      }
     }
 
     // Disable change cache.
diff --git a/java/com/google/gerrit/pgm/http/jetty/JettyServer.java b/java/com/google/gerrit/pgm/http/jetty/JettyServer.java
index 6c4299d..faf9f16 100644
--- a/java/com/google/gerrit/pgm/http/jetty/JettyServer.java
+++ b/java/com/google/gerrit/pgm/http/jetty/JettyServer.java
@@ -70,6 +70,8 @@
 import org.eclipse.jetty.server.Handler;
 import org.eclipse.jetty.server.HttpConfiguration;
 import org.eclipse.jetty.server.HttpConnectionFactory;
+import org.eclipse.jetty.server.ProxyConnectionFactory;
+import org.eclipse.jetty.server.ProxyCustomizer;
 import org.eclipse.jetty.server.Request;
 import org.eclipse.jetty.server.SecureRequestCustomizer;
 import org.eclipse.jetty.server.Server;
@@ -104,17 +106,24 @@
            * }
            * </code>
            *
-           * What we want to achieve here is to remember what it was the original proxy address before
-           * calling super.customize() and give the possibility to fetch it later down the chain.
+           * What we want to achieve here is to remember the original proxy address before calling
+           * super.customize() and give the possibility to fetch it later down the chain. When
+           * PROXY protocol is enabled, ProxyCustomizer has already exposed the underlying socket
+           * peer address through its request attribute.
            */
-          request.setAttribute(
-              RemoteUserUtil.PROXY_REMOTE_ADDRESS_ATTR,
-              ((InetSocketAddress) request.getConnectionMetaData().getRemoteSocketAddress())
-                  .getAddress()
-                  .getHostAddress());
+          String proxyRemoteAddress =
+              (String) request.getAttribute(ProxyCustomizer.REMOTE_ADDRESS_ATTRIBUTE_NAME);
+          if (proxyRemoteAddress == null) {
+            proxyRemoteAddress =
+                ((InetSocketAddress) request.getConnectionMetaData().getRemoteSocketAddress())
+                    .getAddress()
+                    .getHostAddress();
+          }
+          request.setAttribute(RemoteUserUtil.PROXY_REMOTE_ADDRESS_ATTR, proxyRemoteAddress);
           return super.customize(request, responseHeaders);
         }
       };
+  private static final ProxyCustomizer PROXY_CUSTOMIZER = new ProxyCustomizer();
 
   static class Lifecycle implements LifecycleListener {
     private final JettyServer server;
@@ -134,9 +143,8 @@
         server.httpd.start();
         if (rewrite) {
           Connector con = server.httpd.getConnectors()[0];
-          if (con instanceof ServerConnector) {
+          if (con instanceof ServerConnector serverCon) {
             @SuppressWarnings("resource")
-            ServerConnector serverCon = (ServerConnector) con;
             String host = serverCon.getHost();
             int port = serverCon.getLocalPort();
             String url = String.format("http://%s:%d", host, port);
@@ -336,11 +344,13 @@
     final int acceptors = cfg.getInt("httpd", "acceptorThreads", 0);
     final int selectors = cfg.getInt("httpd", "selectorThreads", 2);
     final AuthType authType = cfg.getEnum("auth", null, "type", AuthType.OPENID);
+    final boolean enableProxyProtocol = cfg.getBoolean("httpd", null, "enableProxyProtocol", false);
 
-    reverseProxy = isReverseProxied(listenUrls);
+    boolean allReverseProxy = true;
     final Connector[] connectors = new Connector[listenUrls.length];
     for (int idx = 0; idx < listenUrls.length; idx++) {
       final URI u = listenUrls[idx];
+      final String scheme = u.getScheme();
       final int defaultPort;
       final ServerConnector c;
       HttpConfiguration config = defaultConfig(requestHeaderSize);
@@ -372,10 +382,10 @@
                   UriCompliance.Violation.AMBIGUOUS_PATH_ENCODING,
                   UriCompliance.Violation.SUSPICIOUS_PATH_CHARACTERS)));
 
-      if (AuthType.CLIENT_SSL_CERT_LDAP.equals(authType) && !"https".equals(u.getScheme())) {
+      if (AuthType.CLIENT_SSL_CERT_LDAP.equals(authType) && !"https".equals(scheme)) {
         throw new IllegalArgumentException(
             "Protocol '"
-                + u.getScheme()
+                + scheme
                 + "' "
                 + " not supported in httpd.listenurl '"
                 + u
@@ -384,11 +394,13 @@
                 + "'; only 'https' is supported");
       }
 
-      if ("http".equals(u.getScheme())) {
+      if ("http".equals(scheme)) {
+        allReverseProxy = false;
         defaultPort = 80;
-        c = newServerConnector(server, acceptors, selectors, config);
+        c = newServerConnector(server, acceptors, selectors, config, false);
 
-      } else if ("https".equals(u.getScheme())) {
+      } else if ("https".equals(scheme)) {
+        allReverseProxy = false;
         SslContextFactory.Server ssl = new SslContextFactory.Server();
         final Path keystore = getFile(cfg, "sslkeystore", "etc/keystore");
         String password = cfg.getString("httpd", null, "sslkeypassword");
@@ -424,41 +436,43 @@
                 new SslConnectionFactory(ssl, "http/1.1"),
                 new HttpConnectionFactory(config));
 
-      } else if ("proxy-http".equals(u.getScheme())) {
+      } else if ("proxy-http".equals(scheme) || "proxy-https".equals(scheme)) {
         defaultPort = 8080;
+        // Add the proxy customizer first so the forwarding customizer can record the underlying
+        // peer address used for authentication before applying X-Forwarded-For to the request.
+        if (enableProxyProtocol) {
+          config.addCustomizer(PROXY_CUSTOMIZER);
+        }
         config.addCustomizer(FORWARDED_REQUEST_CUSTOMIZER);
-        c = newServerConnector(server, acceptors, selectors, config);
+        if ("proxy-https".equals(scheme)) {
+          // For a proxy that terminates TLS, mark every request as HTTPS
+          // unconditionally. ForwardedRequestCustomizer alone only sets
+          // isSecure() when the proxy sends X-Forwarded-Proto=https or
+          // X-Proxied-Https=on; this wrapper covers proxies that don't.
+          // Jetty 12's HttpConfiguration.Customizer returns a (possibly
+          // wrapped) Request, so wrap the URI's scheme and override isSecure().
+          config.addCustomizer(
+              (request, responseHeaders) ->
+                  new Request.Wrapper(request) {
+                    @Override
+                    public HttpURI getHttpURI() {
+                      return HttpURI.build(super.getHttpURI())
+                          .scheme(HttpScheme.HTTPS.asString())
+                          .asImmutable();
+                    }
 
-      } else if ("proxy-https".equals(u.getScheme())) {
-        defaultPort = 8080;
-        config.addCustomizer(FORWARDED_REQUEST_CUSTOMIZER);
-        // For a proxy that terminates TLS, mark every request as HTTPS
-        // unconditionally. ForwardedRequestCustomizer alone only sets
-        // isSecure() when the proxy sends X-Forwarded-Proto=https or
-        // X-Proxied-Https=on; this wrapper covers proxies that don't.
-        // Jetty 12's HttpConfiguration.Customizer returns a (possibly
-        // wrapped) Request, so wrap the URI's scheme and override isSecure().
-        config.addCustomizer(
-            (request, responseHeaders) ->
-                new Request.Wrapper(request) {
-                  @Override
-                  public HttpURI getHttpURI() {
-                    return HttpURI.build(super.getHttpURI())
-                        .scheme(HttpScheme.HTTPS.asString())
-                        .asImmutable();
-                  }
-
-                  @Override
-                  public boolean isSecure() {
-                    return true;
-                  }
-                });
-        c = newServerConnector(server, acceptors, selectors, config);
+                    @Override
+                    public boolean isSecure() {
+                      return true;
+                    }
+                  });
+        }
+        c = newServerConnector(server, acceptors, selectors, config, enableProxyProtocol);
 
       } else {
         throw new IllegalArgumentException(
             "Protocol '"
-                + u.getScheme()
+                + scheme
                 + "' "
                 + " not supported in httpd.listenurl '"
                 + u
@@ -491,13 +505,30 @@
       c.setIdleTimeout(cfg.getTimeUnit("httpd", null, "idleTimeout", 30000L, MILLISECONDS));
       connectors[idx] = c;
     }
+    reverseProxy = allReverseProxy;
     return connectors;
   }
 
-  private static ServerConnector newServerConnector(
-      Server server, int acceptors, int selectors, HttpConfiguration config) {
-    return new ServerConnector(
-        server, null, null, null, acceptors, selectors, new HttpConnectionFactory(config));
+  @VisibleForTesting
+  static ServerConnector newServerConnector(
+      Server server,
+      int acceptors,
+      int selectors,
+      HttpConfiguration config,
+      boolean enableProxyProtocol) {
+    HttpConnectionFactory http = new HttpConnectionFactory(config);
+    if (enableProxyProtocol) {
+      return new ServerConnector(
+          server,
+          null,
+          null,
+          null,
+          acceptors,
+          selectors,
+          new ProxyConnectionFactory(http.getProtocol()),
+          http);
+    }
+    return new ServerConnector(server, null, null, null, acceptors, selectors, http);
   }
 
   private HttpConfiguration defaultConfig(int requestHeaderSize) {
@@ -521,15 +552,6 @@
     return config;
   }
 
-  static boolean isReverseProxied(URI[] listenUrls) {
-    for (URI u : listenUrls) {
-      if ("http".equals(u.getScheme()) || "https".equals(u.getScheme())) {
-        return false;
-      }
-    }
-    return true;
-  }
-
   static URI[] listenURLs(Config cfg) {
     String[] urls = cfg.getStringList("httpd", null, "listenurl");
     if (urls.length == 0) {
diff --git a/java/com/google/gerrit/pgm/init/BaseInit.java b/java/com/google/gerrit/pgm/init/BaseInit.java
index 3e51b98..3a7100d 100644
--- a/java/com/google/gerrit/pgm/init/BaseInit.java
+++ b/java/com/google/gerrit/pgm/init/BaseInit.java
@@ -274,8 +274,8 @@
       final Message first = ce.getErrorMessages().iterator().next();
       Throwable why = first.getCause();
 
-      if (why instanceof Die) {
-        throw (Die) why;
+      if (why instanceof Die die) {
+        throw die;
       }
 
       final StringBuilder buf = new StringBuilder(ce.getMessage());
diff --git a/java/com/google/gerrit/pgm/init/InitAdminUser.java b/java/com/google/gerrit/pgm/init/InitAdminUser.java
index a657ad1..3f25c63 100644
--- a/java/com/google/gerrit/pgm/init/InitAdminUser.java
+++ b/java/com/google/gerrit/pgm/init/InitAdminUser.java
@@ -206,6 +206,6 @@
       throw new IOException(String.format("Cannot add public SSH key: %s is not a file", keyFile));
     }
     String content = new String(Files.readAllBytes(p), UTF_8);
-    return AccountSshKey.create(id, 1, content);
+    return new AccountSshKey(id, 1, content);
   }
 }
diff --git a/java/com/google/gerrit/pgm/init/InitIndex.java b/java/com/google/gerrit/pgm/init/InitIndex.java
index 53a4aca..f6e5ede 100644
--- a/java/com/google/gerrit/pgm/init/InitIndex.java
+++ b/java/com/google/gerrit/pgm/init/InitIndex.java
@@ -14,7 +14,6 @@
 
 package com.google.gerrit.pgm.init;
 
-import com.google.common.base.Strings;
 import com.google.common.collect.Iterables;
 import com.google.gerrit.common.FileUtil;
 import com.google.gerrit.index.IndexType;
@@ -36,7 +35,6 @@
 /** Initialize the {@code index} configuration section. */
 @Singleton
 class InitIndex implements InitStep {
-  private static final String DIRECTORY = "directory";
   private final ConsoleUI ui;
   private final Section index;
   private final SitePaths site;
@@ -59,15 +57,10 @@
         new IndexType(
             index.select("Type", "type", IndexType.getDefault(), IndexType.getKnownTypes()));
 
-    if (Strings.isNullOrEmpty(index.get(DIRECTORY))) {
-      index.set(DIRECTORY, IndexModule.INDEX);
-    }
-    Path loc = IndexModule.indexDirectory(initFlags.cfg, site);
-    FileUtil.mkdirsOrDie(loc, "Cannot create index.directory");
-
     if ((site.isNew || isEmptySite()) && type.isLucene()) {
+      FileUtil.mkdirsOrDie(site.index_dir, "Cannot create index directory");
       for (SchemaDefinitions<?> def : IndexModule.ALL_SCHEMA_DEFS) {
-        IndexUtils.setReady(loc, def.getName(), def.getLatest().getVersion(), true);
+        IndexUtils.setReady(site, def.getName(), def.getLatest().getVersion(), true);
       }
     } else {
       String message =
diff --git a/java/com/google/gerrit/pgm/init/InitSshd.java b/java/com/google/gerrit/pgm/init/InitSshd.java
index c0adbe7..dfb34b6 100644
--- a/java/com/google/gerrit/pgm/init/InitSshd.java
+++ b/java/com/google/gerrit/pgm/init/InitSshd.java
@@ -18,6 +18,7 @@
 import static java.nio.file.Files.exists;
 
 import com.google.gerrit.pgm.init.api.ConsoleUI;
+import com.google.gerrit.pgm.init.api.InitFlags;
 import com.google.gerrit.pgm.init.api.InitStep;
 import com.google.gerrit.pgm.init.api.Section;
 import com.google.gerrit.server.config.SitePaths;
@@ -32,13 +33,20 @@
 /** Initialize the {@code sshd} configuration section. */
 @Singleton
 public class InitSshd implements InitStep {
+  private final InitFlags flags;
   private final ConsoleUI ui;
   private final SitePaths site;
   private final Section sshd;
   private final StaleLibraryRemover remover;
 
   @Inject
-  InitSshd(ConsoleUI ui, SitePaths site, Section.Factory sections, StaleLibraryRemover remover) {
+  InitSshd(
+      InitFlags flags,
+      ConsoleUI ui,
+      SitePaths site,
+      Section.Factory sections,
+      StaleLibraryRemover remover) {
+    this.flags = flags;
     this.ui = ui;
     this.site = site;
     this.sshd = sections.get("sshd", null);
@@ -69,7 +77,9 @@
     port = ui.readInt(port, "Listen on port");
     sshd.set("listenAddress", SocketUtil.format(hostname, port));
 
-    generateSshHostKeys();
+    if (flags.cfg.getBoolean("sshd", "generateHostKeys", true)) {
+      generateSshHostKeys();
+    }
     remover.remove("bc(pg|pkix|prov)-.*[.]jar");
   }
 
diff --git a/java/com/google/gerrit/pgm/init/api/GitRepositoryManagerOnInit.java b/java/com/google/gerrit/pgm/init/api/GitRepositoryManagerOnInit.java
index dd29783..30ae18c 100644
--- a/java/com/google/gerrit/pgm/init/api/GitRepositoryManagerOnInit.java
+++ b/java/com/google/gerrit/pgm/init/api/GitRepositoryManagerOnInit.java
@@ -44,8 +44,7 @@
   @Override
   public Status getRepositoryStatus(NameKey name) {
     try {
-      @SuppressWarnings("unused")
-      var unused = openRepository(name);
+      var _ = openRepository(name);
     } catch (RepositoryNotFoundException e) {
       return Status.NON_EXISTENT;
     } catch (IOException e) {
diff --git a/java/com/google/gerrit/pgm/rules/PrologCompiler.java b/java/com/google/gerrit/pgm/rules/PrologCompiler.java
index e68e203..4ec912c 100644
--- a/java/com/google/gerrit/pgm/rules/PrologCompiler.java
+++ b/java/com/google/gerrit/pgm/rules/PrologCompiler.java
@@ -196,8 +196,8 @@
     if (classLoader.getParent() != null) {
       appendClasspath(cp, classLoader.getParent());
     }
-    if (classLoader instanceof URLClassLoader) {
-      for (URL url : ((URLClassLoader) classLoader).getURLs()) {
+    if (classLoader instanceof URLClassLoader urlClassLoader) {
+      for (URL url : urlClassLoader.getURLs()) {
         if ("file".equals(url.getProtocol())) {
           if (0 < cp.length()) {
             cp.append(File.pathSeparatorChar);
diff --git a/java/com/google/gerrit/server/BUILD b/java/com/google/gerrit/server/BUILD
index 460d842..edb14d8 100644
--- a/java/com/google/gerrit/server/BUILD
+++ b/java/com/google/gerrit/server/BUILD
@@ -35,9 +35,6 @@
         exclude = CONSTANTS_SRC + GERRIT_GLOBAL_MODULE_SRC + TESTING_SRC +
                   PROLOG_SRC,
     ),
-    # Pin AutoFactory to the javax inject API. See the "Bump auto-factory
-    # version to 1.1.0" change for why; the follow-up removes this pin.
-    javacopts = ["-Acom.google.auto.factory.InjectApi=javax"],
     resource_strip_prefix = "resources",
     resources = ["//resources/com/google/gerrit/server"],
     visibility = ["//visibility:public"],
@@ -115,6 +112,7 @@
         "//lib/lucene:lucene-queryparser",
         "//lib/mime4j:core",
         "//lib/mime4j:dom",
+        "//lib/mina:sshd",
         "//lib/ow2:ow2-asm",
         "//lib/ow2:ow2-asm-tree",
         "//lib/ow2:ow2-asm-util",
diff --git a/java/com/google/gerrit/server/ChangeUtil.java b/java/com/google/gerrit/server/ChangeUtil.java
index 5b78658..083f223c 100644
--- a/java/com/google/gerrit/server/ChangeUtil.java
+++ b/java/com/google/gerrit/server/ChangeUtil.java
@@ -146,8 +146,7 @@
             Constants.encode("tree " + ObjectId.zeroId().name() + "\n\n" + newCommitMessage));
 
     // Check that the commit message without footers is not empty
-    @SuppressWarnings("unused")
-    var unused = CommitMessageUtil.checkAndSanitizeCommitMessage(revCommit.getShortMessage());
+    var _ = CommitMessageUtil.checkAndSanitizeCommitMessage(revCommit.getShortMessage());
 
     List<String> changeIdFooters = getChangeIdsFromFooter(revCommit);
     if (requireChangeId && changeIdFooters.isEmpty()) {
diff --git a/java/com/google/gerrit/server/DefaultRefLogIdentityProvider.java b/java/com/google/gerrit/server/DefaultRefLogIdentityProvider.java
index 10b4ec5..29cd53b 100644
--- a/java/com/google/gerrit/server/DefaultRefLogIdentityProvider.java
+++ b/java/com/google/gerrit/server/DefaultRefLogIdentityProvider.java
@@ -84,8 +84,7 @@
   private String guessHost(IdentifiedUser user) {
     String host = null;
     SocketAddress remotePeer = user.getRemotePeer();
-    if (remotePeer instanceof InetSocketAddress) {
-      InetSocketAddress sa = (InetSocketAddress) remotePeer;
+    if (remotePeer instanceof InetSocketAddress sa) {
       InetAddress in = sa.getAddress();
       host = in != null ? in.getHostAddress() : sa.getHostName();
     }
diff --git a/java/com/google/gerrit/server/DynamicOptions.java b/java/com/google/gerrit/server/DynamicOptions.java
index 03d7465..3bce2b1 100644
--- a/java/com/google/gerrit/server/DynamicOptions.java
+++ b/java/com/google/gerrit/server/DynamicOptions.java
@@ -251,8 +251,8 @@
     }
 
     String className = null;
-    if (dynamicBean instanceof ClassNameProvider) {
-      className = ((ClassNameProvider) dynamicBean).getClassName();
+    if (dynamicBean instanceof ClassNameProvider classNameProvider) {
+      className = classNameProvider.getClassName();
     } else if (!identity().equivalent(loader, beanCl)) { // in a different plugin?
       className = dynamicBean.getClass().getCanonicalName();
     }
@@ -261,10 +261,9 @@
       try {
         List<Module> modules = new ArrayList<>();
         Injector modulesInjector = injector;
-        if (dynamicBean instanceof ModulesClassNamesProvider) {
+        if (dynamicBean instanceof ModulesClassNamesProvider modulesClassNamesProvider) {
           modulesInjector = injector.createChildInjector();
-          for (String moduleName :
-              ((ModulesClassNamesProvider) dynamicBean).getModulesClassNames()) {
+          for (String moduleName : modulesClassNamesProvider.getModulesClassNames()) {
             Class<Module> mClass = (Class<Module>) loader.loadClass(moduleName);
             modules.add(modulesInjector.getInstance(mClass));
           }
@@ -307,8 +306,7 @@
   }
 
   public void setDynamicBeans() {
-    if (bean instanceof BeanReceiver) {
-      BeanReceiver receiver = (BeanReceiver) bean;
+    if (bean instanceof BeanReceiver receiver) {
       for (Map.Entry<String, DynamicBean> e : beansByPlugin.entrySet()) {
         receiver.setDynamicBean(e.getKey(), e.getValue());
       }
@@ -326,8 +324,7 @@
   public void onBeanParseStart() {
     for (Map.Entry<String, DynamicBean> e : beansByPlugin.entrySet()) {
       DynamicBean instance = e.getValue();
-      if (instance instanceof BeanParseListener) {
-        BeanParseListener listener = (BeanParseListener) instance;
+      if (instance instanceof BeanParseListener listener) {
         listener.onBeanParseStart(e.getKey(), bean);
       }
     }
@@ -336,8 +333,7 @@
   public void onBeanParseEnd() {
     for (Map.Entry<String, DynamicBean> e : beansByPlugin.entrySet()) {
       DynamicBean instance = e.getValue();
-      if (instance instanceof BeanParseListener) {
-        BeanParseListener listener = (BeanParseListener) instance;
+      if (instance instanceof BeanParseListener listener) {
         listener.onBeanParseEnd(e.getKey(), bean);
       }
     }
diff --git a/java/com/google/gerrit/server/ReviewerByEmailSet.java b/java/com/google/gerrit/server/ReviewerByEmailSet.java
index c6ba7b5..d022a85 100644
--- a/java/com/google/gerrit/server/ReviewerByEmailSet.java
+++ b/java/com/google/gerrit/server/ReviewerByEmailSet.java
@@ -63,7 +63,7 @@
 
   @Override
   public boolean equals(Object o) {
-    return (o instanceof ReviewerByEmailSet) && table.equals(((ReviewerByEmailSet) o).table);
+    return (o instanceof ReviewerByEmailSet r) && table.equals(r.table);
   }
 
   @Override
diff --git a/java/com/google/gerrit/server/ReviewerSet.java b/java/com/google/gerrit/server/ReviewerSet.java
index 0ff68e0..ef08b58 100644
--- a/java/com/google/gerrit/server/ReviewerSet.java
+++ b/java/com/google/gerrit/server/ReviewerSet.java
@@ -91,7 +91,7 @@
 
   @Override
   public boolean equals(Object o) {
-    return (o instanceof ReviewerSet) && table.equals(((ReviewerSet) o).table);
+    return (o instanceof ReviewerSet r) && table.equals(r.table);
   }
 
   @Override
diff --git a/java/com/google/gerrit/server/account/AccountCacheImpl.java b/java/com/google/gerrit/server/account/AccountCacheImpl.java
index 43e9d5a..9a92ace 100644
--- a/java/com/google/gerrit/server/account/AccountCacheImpl.java
+++ b/java/com/google/gerrit/server/account/AccountCacheImpl.java
@@ -151,7 +151,7 @@
     if (accountIds.isEmpty()) {
       return ImmutableMap.of();
     }
-    try (TraceTimer ignored =
+    try (TraceTimer _ =
         TraceContext.newTimer(
             "Loading accounts", Metadata.builder().resourceCount(accountIds.size()).build())) {
       Repository allUsers = allUsersRepository.get();
@@ -222,7 +222,7 @@
 
     @Override
     public CachedAccountDetails load(CachedAccountDetails.Key key) throws Exception {
-      try (TraceTimer ignored =
+      try (TraceTimer _ =
           TraceContext.newTimer(
               "Loading account", Metadata.builder().accountId(key.accountId().get()).build())) {
         AccountConfig cfg =
diff --git a/java/com/google/gerrit/server/account/AccountControl.java b/java/com/google/gerrit/server/account/AccountControl.java
index 73ca3f4..9e1e9eb 100644
--- a/java/com/google/gerrit/server/account/AccountControl.java
+++ b/java/com/google/gerrit/server/account/AccountControl.java
@@ -33,7 +33,10 @@
 import com.google.gerrit.server.project.ProjectCache;
 import com.google.inject.Inject;
 import com.google.inject.Provider;
+import java.util.HashSet;
+import java.util.Map;
 import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
 
 /** Access control management for one account's access to other accounts. */
 public class AccountControl {
@@ -69,7 +72,7 @@
   public static class Factory {
     private final PermissionBackend permissionBackend;
     private final ProjectCache projectCache;
-    private final GroupControl.Factory groupControlFactory;
+    private final GroupControl.GenericFactory groupControlFactory;
     private final Provider<CurrentUser> user;
     private final IdentifiedUser.GenericFactory userFactory;
     private final AccountVisibility accountVisibility;
@@ -78,7 +81,7 @@
     Factory(
         PermissionBackend permissionBackend,
         ProjectCache projectCache,
-        GroupControl.Factory groupControlFactory,
+        GroupControl.GenericFactory groupControlFactory,
         Provider<CurrentUser> user,
         IdentifiedUser.GenericFactory userFactory,
         AccountVisibility accountVisibility) {
@@ -121,18 +124,19 @@
   }
 
   private final AccountsSection accountsSection;
-  private final GroupControl.Factory groupControlFactory;
+  private final GroupControl.GenericFactory groupControlFactory;
   private final PermissionBackend.WithUser perm;
   private final CurrentUser user;
   private final IdentifiedUser.GenericFactory userFactory;
   private final AccountVisibility accountVisibility;
+  private final Map<AccountGroup.UUID, Boolean> groupVisibilityCache = new ConcurrentHashMap<>();
 
-  private Boolean viewAll;
+  private volatile Boolean viewAll;
 
   private AccountControl(
       PermissionBackend permissionBackend,
       ProjectCache projectCache,
-      GroupControl.Factory groupControlFactory,
+      GroupControl.GenericFactory groupControlFactory,
       CurrentUser user,
       IdentifiedUser.GenericFactory userFactory,
       AccountVisibility accountVisibility) {
@@ -246,27 +250,45 @@
     switch (accountVisibility) {
       case SAME_GROUP:
         {
-          Set<AccountGroup.UUID> usersGroups = groupsOf(otherUser.getUser());
+          Set<AccountGroup.UUID> blockedGroups = new HashSet<>();
           for (PermissionRule rule : accountsSection.getSameGroupVisibility()) {
             if (rule.isBlock() || rule.isDeny()) {
-              logger.atFine().log(
-                  "ignoring group %s of user %s for %s account visibility check"
-                      + " because there is a blocked/denied sameGroupVisibility rule: %s",
-                  rule.getGroup().getUUID(),
-                  otherUser.getUser().getLoggableName(),
-                  AccountVisibility.SAME_GROUP,
-                  rule);
-              usersGroups.remove(rule.getGroup().getUUID());
+              blockedGroups.add(rule.getGroup().getUUID());
             }
           }
 
-          if (user.getEffectiveGroups().containsAnyOf(usersGroups)) {
-            String reason =
-                String.format(
-                    "user %s can see account %d (they share a group (accountVisibility = %s))",
-                    user.getLoggableName(), otherUser.getId().get(), AccountVisibility.SAME_GROUP);
-            logger.atFine().log("%s", reason);
-            return VisibilityDecision.show(reason);
+          Set<AccountGroup.UUID> evaluatedGroups =
+              logger.atFine().isEnabled() ? new HashSet<>() : null;
+          for (Set<AccountGroup.UUID> backendGroups :
+              otherUser.getUser().getEffectiveGroups().getKnownGroupsByBackend()) {
+            Set<AccountGroup.UUID> candidateGroups = new HashSet<>();
+            for (AccountGroup.UUID groupUuid : backendGroups) {
+              if (SystemGroupBackend.isSystemGroup(groupUuid)) {
+                continue;
+              }
+              if (blockedGroups.contains(groupUuid)) {
+                logger.atFine().log(
+                    "ignoring group %s of user %s for %s account visibility check"
+                        + " because there is a blocked/denied sameGroupVisibility rule",
+                    groupUuid, otherUser.getUser().getLoggableName(), AccountVisibility.SAME_GROUP);
+                continue;
+              }
+              candidateGroups.add(groupUuid);
+            }
+            if (evaluatedGroups != null) {
+              evaluatedGroups.addAll(candidateGroups);
+            }
+            if (!candidateGroups.isEmpty()
+                && user.getEffectiveGroups().containsAnyOf(candidateGroups)) {
+              String reason =
+                  String.format(
+                      "user %s can see account %d (they share a group (accountVisibility = %s))",
+                      user.getLoggableName(),
+                      otherUser.getId().get(),
+                      AccountVisibility.SAME_GROUP);
+              logger.atFine().log("%s", reason);
+              return VisibilityDecision.show(reason);
+            }
           }
 
           String reason =
@@ -275,17 +297,28 @@
                       + " %s))",
                   user.getLoggableName(), otherUser.getId().get(), AccountVisibility.SAME_GROUP);
           logger.atFine().log("%s", reason);
-          logger.atFine().log("groups of user %s: %s", user.getLoggableName(), groupsOf(user));
-          logger.atFine().log(
-              "groups of other user %s: %s", otherUser.getUser().getLoggableName(), usersGroups);
+          if (evaluatedGroups != null) {
+            logger.atFine().log("groups of user %s: %s", user.getLoggableName(), groupsOf(user));
+            logger.atFine().log(
+                "groups of other user %s: %s",
+                otherUser.getUser().getLoggableName(), evaluatedGroups);
+          }
           return VisibilityDecision.hide(reason);
         }
       case VISIBLE_GROUP:
         {
-          Set<AccountGroup.UUID> usersGroups = groupsOf(otherUser.getUser());
-          for (AccountGroup.UUID usersGroup : usersGroups) {
-            try {
-              if (groupControlFactory.controlFor(usersGroup).isVisible()) {
+          Set<AccountGroup.UUID> evaluatedGroups =
+              logger.atFine().isEnabled() ? new HashSet<>() : null;
+          for (Set<AccountGroup.UUID> backendGroups :
+              otherUser.getUser().getEffectiveGroups().getKnownGroupsByBackend()) {
+            for (AccountGroup.UUID usersGroup : backendGroups) {
+              if (SystemGroupBackend.isSystemGroup(usersGroup)) {
+                continue;
+              }
+              if (evaluatedGroups != null) {
+                evaluatedGroups.add(usersGroup);
+              }
+              if (isGroupVisible(usersGroup)) {
                 String reason =
                     String.format(
                         "user %s can see account %d (account is member of the visible group %s"
@@ -297,8 +330,6 @@
                 logger.atFine().log("%s", reason);
                 return VisibilityDecision.show(reason);
               }
-            } catch (NoSuchGroupException e) {
-              continue;
             }
           }
 
@@ -308,8 +339,11 @@
                       + " (accountVisibility = %s))",
                   user.getLoggableName(), otherUser.getId().get(), AccountVisibility.VISIBLE_GROUP);
           logger.atFine().log("%s", reason);
-          logger.atFine().log(
-              "groups of other user %s: %s", otherUser.getUser().getLoggableName(), usersGroups);
+          if (evaluatedGroups != null) {
+            logger.atFine().log(
+                "groups of other user %s: %s",
+                otherUser.getUser().getLoggableName(), evaluatedGroups);
+          }
           return VisibilityDecision.hide(reason);
         }
       case NONE:
@@ -325,6 +359,18 @@
     }
   }
 
+  private boolean isGroupVisible(AccountGroup.UUID groupUuid) {
+    return groupVisibilityCache.computeIfAbsent(
+        groupUuid,
+        uuid -> {
+          try {
+            return groupControlFactory.controlFor(user, uuid).isVisible();
+          } catch (NoSuchGroupException e) {
+            return false;
+          }
+        });
+  }
+
   public boolean canViewAll() {
     if (viewAll == null) {
       try {
diff --git a/java/com/google/gerrit/server/account/AccountSshKey.java b/java/com/google/gerrit/server/account/AccountSshKey.java
index d2f8775..92c9354 100644
--- a/java/com/google/gerrit/server/account/AccountSshKey.java
+++ b/java/com/google/gerrit/server/account/AccountSshKey.java
@@ -14,48 +14,58 @@
 
 package com.google.gerrit.server.account;
 
-import com.google.auto.value.AutoValue;
 import com.google.common.base.Splitter;
+import com.google.common.collect.ImmutableMap;
 import com.google.gerrit.entities.Account;
+import com.google.gerrit.server.util.time.TimeUtil;
+import java.time.Instant;
 import java.util.List;
+import java.util.Optional;
 
-/** An SSH key approved for use by an {@link Account}. */
-@AutoValue
-public abstract class AccountSshKey {
-  public static AccountSshKey create(Account.Id accountId, int seq, String sshPublicKey) {
-    return create(accountId, seq, sshPublicKey, true);
+/**
+ * An SSH key approved for use by an {@link Account}.
+ *
+ * @param otherOptions login options of {@code authorized_keys} that are not interpreted, kept so
+ *     that they are not lost when written back
+ */
+public record AccountSshKey(
+    Account.Id accountId,
+    int seq,
+    String sshPublicKey,
+    boolean valid,
+    Optional<Instant> expiryTime,
+    ImmutableMap<String, String> otherOptions) {
+  public AccountSshKey {
+    sshPublicKey = stripOffNewLines(sshPublicKey);
+    valid = valid && seq > 0;
   }
 
-  public static AccountSshKey createInvalid(Account.Id accountId, int seq, String sshPublicKey) {
-    return create(accountId, seq, sshPublicKey, false);
+  public AccountSshKey(Account.Id accountId, int seq, String sshPublicKey, boolean valid) {
+    this(accountId, seq, sshPublicKey, valid, Optional.empty(), ImmutableMap.of());
   }
 
-  public static AccountSshKey createInvalid(AccountSshKey key) {
-    return create(key.accountId(), key.seq(), key.sshPublicKey(), false);
+  public AccountSshKey(Account.Id accountId, int seq, String sshPublicKey) {
+    this(accountId, seq, sshPublicKey, true);
   }
 
-  public static AccountSshKey create(
-      Account.Id accountId, int seq, String sshPublicKey, boolean valid) {
-    return new AutoValue_AccountSshKey.Builder()
-        .setAccountId(accountId)
-        .setSeq(seq)
-        .setSshPublicKey(stripOffNewLines(sshPublicKey))
-        .setValid(valid && seq > 0)
-        .build();
+  /** Returns a copy of this key that is flagged as invalid. */
+  public AccountSshKey asInvalid() {
+    return new AccountSshKey(accountId, seq, sshPublicKey, false, expiryTime, otherOptions);
+  }
+
+  public boolean isExpired() {
+    return expiryTime.map(t -> TimeUtil.now().isAfter(t)).orElse(false);
+  }
+
+  /** Returns a copy of this key with the given expiry time. */
+  public AccountSshKey withExpiryTime(Optional<Instant> expiryTime) {
+    return new AccountSshKey(accountId, seq, sshPublicKey, valid, expiryTime, otherOptions);
   }
 
   private static String stripOffNewLines(String s) {
     return s.replace("\n", "").replace("\r", "");
   }
 
-  public abstract Account.Id accountId();
-
-  public abstract int seq();
-
-  public abstract String sshPublicKey();
-
-  public abstract boolean valid();
-
   private String publicKeyPart(int index, String defaultValue) {
     String s = sshPublicKey();
     if (s != null && s.length() > 0) {
@@ -78,17 +88,4 @@
   public String comment() {
     return publicKeyPart(2, "");
   }
-
-  @AutoValue.Builder
-  abstract static class Builder {
-    public abstract Builder setAccountId(Account.Id accountId);
-
-    public abstract Builder setSeq(int seq);
-
-    public abstract Builder setSshPublicKey(String sshPublicKey);
-
-    public abstract Builder setValid(boolean valid);
-
-    public abstract AccountSshKey build();
-  }
 }
diff --git a/java/com/google/gerrit/server/account/AuthRequest.java b/java/com/google/gerrit/server/account/AuthRequest.java
index bb7ee97..da71215 100644
--- a/java/com/google/gerrit/server/account/AuthRequest.java
+++ b/java/com/google/gerrit/server/account/AuthRequest.java
@@ -236,8 +236,7 @@
   public boolean equals(Object obj) {
     if (this == obj) return true;
     if (obj == null) return false;
-    if (!(obj instanceof AuthRequest)) return false;
-    AuthRequest other = (AuthRequest) obj;
+    if (!(obj instanceof AuthRequest other)) return false;
     return active == other.active
         && Objects.equals(authPlugin, other.authPlugin)
         && Objects.equals(authProvider, other.authProvider)
diff --git a/java/com/google/gerrit/server/account/AuthTokenExpiryNotifier.java b/java/com/google/gerrit/server/account/AuthTokenExpiryNotifier.java
index 06038d2..1637900 100644
--- a/java/com/google/gerrit/server/account/AuthTokenExpiryNotifier.java
+++ b/java/com/google/gerrit/server/account/AuthTokenExpiryNotifier.java
@@ -17,7 +17,7 @@
 import static com.google.gerrit.server.mail.EmailFactories.AUTH_TOKEN_EXPIRED;
 import static com.google.gerrit.server.mail.EmailFactories.AUTH_TOKEN_WILL_EXPIRE;
 
-import autovalue.shaded.com.google.common.annotations.VisibleForTesting;
+import com.google.common.annotations.VisibleForTesting;
 import com.google.common.flogger.FluentLogger;
 import com.google.gerrit.entities.Account;
 import com.google.gerrit.extensions.events.LifecycleListener;
diff --git a/java/com/google/gerrit/server/account/AuthorizedKeys.java b/java/com/google/gerrit/server/account/AuthorizedKeys.java
index 203ac5c..6881ce7 100644
--- a/java/com/google/gerrit/server/account/AuthorizedKeys.java
+++ b/java/com/google/gerrit/server/account/AuthorizedKeys.java
@@ -14,14 +14,30 @@
 
 package com.google.gerrit.server.account;
 
+import static java.util.stream.Collectors.joining;
+
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Splitter;
+import com.google.common.base.Strings;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.io.BaseEncoding;
 import com.google.gerrit.entities.Account;
+import java.time.Instant;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.time.ZoneOffset;
+import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeParseException;
+import java.time.format.ResolverStyle;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.LinkedHashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.Optional;
 import java.util.regex.Pattern;
+import org.apache.sshd.common.config.keys.AuthorizedKeyEntry;
 
 public class AuthorizedKeys {
   public static final String FILE_NAME = "authorized_keys";
@@ -30,8 +46,21 @@
 
   @VisibleForTesting public static final String DELETED_KEY_COMMENT = "# DELETED";
 
+  private static final String EXPIRY_TIME_OPTION = "expiry-time";
+
+  private static final DateTimeFormatter DATE_TIME_MINUTES = formatter("uuuuMMddHHmm");
+
+  private static final DateTimeFormatter DATE_TIME_SECONDS = formatter("uuuuMMddHHmmss");
+
+  private static final DateTimeFormatter EXPIRY_TIME_FORMAT =
+      DateTimeFormatter.ofPattern("yyyyMMddHHmmss'Z'").withZone(ZoneOffset.UTC);
+
   private static final Pattern LINE_SPLIT_PATTERN = Pattern.compile("\\r?\\n");
 
+  private static DateTimeFormatter formatter(String pattern) {
+    return DateTimeFormatter.ofPattern(pattern).withResolverStyle(ResolverStyle.STRICT);
+  }
+
   public static List<Optional<AccountSshKey>> parse(Account.Id accountId, String s) {
     List<Optional<AccountSshKey>> keys = new ArrayList<>();
     int seq = 1;
@@ -41,7 +70,7 @@
         continue;
       } else if (line.startsWith(INVALID_KEY_COMMENT_PREFIX)) {
         String pub = line.substring(INVALID_KEY_COMMENT_PREFIX.length());
-        AccountSshKey key = AccountSshKey.createInvalid(accountId, seq++, pub);
+        AccountSshKey key = parseKey(accountId, seq++, pub).asInvalid();
         keys.add(Optional.of(key));
       } else if (line.startsWith(DELETED_KEY_COMMENT)) {
         keys.add(Optional.empty());
@@ -49,7 +78,7 @@
       } else if (line.startsWith("#")) {
         continue;
       } else {
-        AccountSshKey key = AccountSshKey.create(accountId, seq++, line);
+        AccountSshKey key = parseKey(accountId, seq++, line);
         keys.add(Optional.of(key));
       }
     }
@@ -63,7 +92,7 @@
         if (!key.get().valid()) {
           b.append(INVALID_KEY_COMMENT_PREFIX);
         }
-        b.append(key.get().sshPublicKey().trim());
+        b.append(format(key.get()));
       } else {
         b.append(DELETED_KEY_COMMENT);
       }
@@ -71,4 +100,72 @@
     }
     return b.toString();
   }
+
+  /** Parses a line of {@code authorized_keys}; unparsable lines are kept as the public key. */
+  public static AccountSshKey parseKey(Account.Id accountId, int seq, String line) {
+    AuthorizedKeyEntry entry;
+    try {
+      entry = AuthorizedKeyEntry.parseAuthorizedKeyEntry(line.replace("\n", "").replace("\r", ""));
+    } catch (IllegalArgumentException e) {
+      return new AccountSshKey(accountId, seq, line);
+    }
+    if (entry == null || entry.getLoginOptions().isEmpty()) {
+      return new AccountSshKey(accountId, seq, line);
+    }
+    StringBuilder pub =
+        new StringBuilder(entry.getKeyType())
+            .append(' ')
+            .append(BaseEncoding.base64().encode(entry.getKeyData()));
+    if (!Strings.isNullOrEmpty(entry.getComment())) {
+      pub.append(' ').append(entry.getComment());
+    }
+    Map<String, String> otherOptions = new LinkedHashMap<>(entry.getLoginOptions());
+    Optional<Instant> expiryTime =
+        Optional.ofNullable(otherOptions.get(EXPIRY_TIME_OPTION))
+            .flatMap(AuthorizedKeys::parseExpiryTime);
+    expiryTime.ifPresent(t -> otherOptions.remove(EXPIRY_TIME_OPTION));
+    return new AccountSshKey(
+        accountId, seq, pub.toString(), true, expiryTime, ImmutableMap.copyOf(otherOptions));
+  }
+
+  /**
+   * Parses the value of the {@code expiry-time} option, which is {@code YYYYMMDD[Z]}, {@code
+   * YYYYMMDDHHMM[Z]} or {@code YYYYMMDDHHMMSS[Z]}. Without the {@code Z} it is in the local time
+   * zone.
+   */
+  private static Optional<Instant> parseExpiryTime(String value) {
+    boolean utc = value.endsWith("Z");
+    String s = utc ? value.substring(0, value.length() - 1) : value;
+    try {
+      LocalDateTime t =
+          switch (s.length()) {
+            case 8 -> LocalDate.parse(s, DateTimeFormatter.BASIC_ISO_DATE).atStartOfDay();
+            case 12 -> LocalDateTime.parse(s, DATE_TIME_MINUTES);
+            case 14 -> LocalDateTime.parse(s, DATE_TIME_SECONDS);
+            default -> throw new DateTimeParseException("Invalid length", s, 0);
+          };
+      return Optional.of(t.atZone(utc ? ZoneOffset.UTC : ZoneId.systemDefault()).toInstant());
+    } catch (DateTimeParseException e) {
+      return Optional.empty();
+    }
+  }
+
+  public static String format(AccountSshKey key) {
+    Map<String, String> options = new LinkedHashMap<>();
+    key.expiryTime().ifPresent(t -> options.put(EXPIRY_TIME_OPTION, EXPIRY_TIME_FORMAT.format(t)));
+    options.putAll(key.otherOptions());
+    String optionsLine =
+        options.entrySet().stream().map(AuthorizedKeys::formatOption).collect(joining(","));
+    String pub = key.sshPublicKey().trim();
+    return optionsLine.isEmpty() ? pub : optionsLine + " " + pub;
+  }
+
+  private static String formatOption(Map.Entry<String, String> option) {
+    String name = option.getKey();
+    String value = option.getValue();
+    if (value.equals("true") || (name.startsWith("!") && value.equals("false"))) {
+      return name;
+    }
+    return name + "=\"" + value + "\"";
+  }
 }
diff --git a/java/com/google/gerrit/server/account/DirectAuthTokenAccessor.java b/java/com/google/gerrit/server/account/DirectAuthTokenAccessor.java
index e69addd..c282eac 100644
--- a/java/com/google/gerrit/server/account/DirectAuthTokenAccessor.java
+++ b/java/com/google/gerrit/server/account/DirectAuthTokenAccessor.java
@@ -115,8 +115,7 @@
       return;
     }
     for (AuthToken token : getTokens(accountId)) {
-      @SuppressWarnings("unused")
-      var unused = authTokens.deleteToken(token.id());
+      var _ = authTokens.deleteToken(token.id());
     }
     commit(accountId, authTokens);
   }
@@ -125,8 +124,7 @@
   public void updateToken(Account.Id accountId, AuthToken token)
       throws IOException, ConfigInvalidException, InvalidAuthTokenException {
     VersionedAuthTokens authTokens = readFromNoteDb(accountId);
-    @SuppressWarnings("unused")
-    var unused = authTokens.deleteToken(token.id());
+    var _ = authTokens.deleteToken(token.id());
     authTokens.addToken(token);
     commit(accountId, authTokens);
   }
diff --git a/java/com/google/gerrit/server/account/GroupCacheImpl.java b/java/com/google/gerrit/server/account/GroupCacheImpl.java
index 82bb4f4..5f40dd9 100644
--- a/java/com/google/gerrit/server/account/GroupCacheImpl.java
+++ b/java/com/google/gerrit/server/account/GroupCacheImpl.java
@@ -265,7 +265,7 @@
 
     @Override
     public Optional<InternalGroup> load(AccountGroup.Id key) throws Exception {
-      try (TraceTimer ignored =
+      try (TraceTimer _ =
           TraceContext.newTimer(
               "Loading group by ID", Metadata.builder().groupId(key.get()).build())) {
         return groupQueryProvider.get().byId(key);
@@ -283,7 +283,7 @@
 
     @Override
     public Optional<InternalGroup> load(String name) throws Exception {
-      try (TraceTimer ignored =
+      try (TraceTimer _ =
           TraceContext.newTimer(
               "Loading group by name", Metadata.builder().groupName(name).build())) {
         return groupQueryProvider.get().byName(AccountGroup.nameKey(name));
@@ -321,7 +321,7 @@
       }
       Iterator<? extends String> uuidIterator = uuids.iterator();
       List<Cache.GroupKeyProto> keyList = new ArrayList<>();
-      try (TraceTimer ignored =
+      try (TraceTimer _ =
               TraceContext.newTimer(
                   "Building keys to load group(s) from serialized cache",
                   Metadata.builder().cacheName(BYUUID_NAME_PERSISTED).build());
@@ -342,7 +342,7 @@
           keyList.add(key);
         }
       }
-      try (TraceTimer ignored =
+      try (TraceTimer _ =
           TraceContext.newTimer(
               "Loading group(s) from serialized cache",
               Metadata.builder().cacheName(BYUUID_NAME_PERSISTED).build())) {
@@ -363,7 +363,7 @@
 
     @Override
     public InternalGroup load(Cache.GroupKeyProto key) throws Exception {
-      try (TraceTimer ignored =
+      try (TraceTimer _ =
           TraceContext.newTimer(
               "Loading group by UUID", Metadata.builder().groupUuid(key.getUuid()).build())) {
         ObjectId sha1 = ObjectIdConverter.create().fromByteString(key.getRevision());
diff --git a/java/com/google/gerrit/server/account/GroupControl.java b/java/com/google/gerrit/server/account/GroupControl.java
index 59f56e8..00caa95 100644
--- a/java/com/google/gerrit/server/account/GroupControl.java
+++ b/java/com/google/gerrit/server/account/GroupControl.java
@@ -160,8 +160,8 @@
     }
 
     // Keep this logic in sync with DefaultRefFilter#isGroupOwner(...).
-    if (group instanceof GroupDescription.Internal) {
-      AccountGroup.UUID ownerUUID = ((GroupDescription.Internal) group).getOwnerGroupUUID();
+    if (group instanceof GroupDescription.Internal internalGroup) {
+      AccountGroup.UUID ownerUUID = internalGroup.getOwnerGroupUUID();
       if (getUser().getEffectiveGroups().contains(ownerUUID)) {
         logger.atFine().log(
             "user %s is owner of group %s", user.getLoggableName(), group.getGroupUUID().get());
@@ -228,8 +228,8 @@
     if (user.isInternalUser()) {
       return true;
     }
-    if (group instanceof GroupDescription.Internal) {
-      return ((GroupDescription.Internal) group).isVisibleToAll() || isOwner();
+    if (group instanceof GroupDescription.Internal internalGroup) {
+      return internalGroup.isVisibleToAll() || isOwner();
     }
     return canAdministrateServer();
   }
diff --git a/java/com/google/gerrit/server/account/GroupMembership.java b/java/com/google/gerrit/server/account/GroupMembership.java
index e051794..644f036 100644
--- a/java/com/google/gerrit/server/account/GroupMembership.java
+++ b/java/com/google/gerrit/server/account/GroupMembership.java
@@ -14,6 +14,7 @@
 
 package com.google.gerrit.server.account;
 
+import com.google.common.collect.Iterators;
 import com.google.gerrit.entities.AccountGroup;
 import java.util.Collections;
 import java.util.Set;
@@ -24,7 +25,28 @@
  * <p>Different accounts systems (eg. LDAP, gerrit groups) provide concrete implementations.
  */
 public interface GroupMembership {
-  GroupMembership EMPTY = new ListGroupMembership(Collections.emptySet());
+  GroupMembership EMPTY =
+      new GroupMembership() {
+        @Override
+        public boolean contains(AccountGroup.UUID groupId) {
+          return false;
+        }
+
+        @Override
+        public boolean containsAnyOf(Iterable<AccountGroup.UUID> groupIds) {
+          return false;
+        }
+
+        @Override
+        public Set<AccountGroup.UUID> intersection(Iterable<AccountGroup.UUID> groupIds) {
+          return Collections.emptySet();
+        }
+
+        @Override
+        public Set<AccountGroup.UUID> getKnownGroups() {
+          return Collections.emptySet();
+        }
+      };
 
   /**
    * Returns {@code true} when the user this object was created for is a member of the specified
@@ -59,4 +81,13 @@
    * which make it expensive to enumerate the members of a group.
    */
   Set<AccountGroup.UUID> getKnownGroups();
+
+  /**
+   * Returns known groups partitioned by their underlying backend or resolution phase, evaluated
+   * lazily as the returned {@link Iterable} is traversed. Callers that only need to find a matching
+   * group can stop iterating early to avoid querying remaining group backends.
+   */
+  default Iterable<Set<AccountGroup.UUID>> getKnownGroupsByBackend() {
+    return () -> Iterators.singletonIterator(getKnownGroups());
+  }
 }
diff --git a/java/com/google/gerrit/server/account/IncludingGroupMembership.java b/java/com/google/gerrit/server/account/IncludingGroupMembership.java
index 881a068..019dd06 100644
--- a/java/com/google/gerrit/server/account/IncludingGroupMembership.java
+++ b/java/com/google/gerrit/server/account/IncludingGroupMembership.java
@@ -14,8 +14,10 @@
 
 package com.google.gerrit.server.account;
 
+import com.google.common.collect.AbstractIterator;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Iterators;
 import com.google.common.collect.Sets;
 import com.google.gerrit.entities.AccountGroup;
 import com.google.gerrit.entities.InternalGroup;
@@ -45,6 +47,7 @@
   private final GroupIncludeCache includeCache;
   private final CurrentUser user;
   private final Map<AccountGroup.UUID, Boolean> memberOf;
+  private ImmutableSet<AccountGroup.UUID> directKnownGroups;
   private ImmutableSet<AccountGroup.UUID> knownGroups;
 
   @Inject
@@ -123,8 +126,10 @@
     return user.getEffectiveGroups().containsAnyOf(ids);
   }
 
-  private ImmutableSet<AccountGroup.UUID> computeKnownGroups() {
-    GroupMembership membership = user.getEffectiveGroups();
+  private ImmutableSet<AccountGroup.UUID> computeDirectKnownGroups() {
+    if (directKnownGroups != null) {
+      return directKnownGroups;
+    }
     Collection<AccountGroup.UUID> direct =
         user.isIdentifiedUser()
             ? includeCache.getGroupsWithMember(user.getAccountId())
@@ -133,13 +138,12 @@
     Set<AccountGroup.UUID> r = Sets.newHashSet(direct);
     r.remove(null);
 
-    Set<AccountGroup.UUID> q = Sets.newHashSet(r);
-    for (AccountGroup.UUID g : membership.intersection(includeCache.allExternalMembers())) {
-      if (g != null && r.add(g)) {
-        q.add(g);
-      }
-    }
+    expandParentGroups(r, Sets.newHashSet(r));
+    directKnownGroups = ImmutableSet.copyOf(r);
+    return directKnownGroups;
+  }
 
+  private void expandParentGroups(Set<AccountGroup.UUID> r, Set<AccountGroup.UUID> q) {
     while (!q.isEmpty()) {
       Collection<AccountGroup.UUID> parents = includeCache.parentGroupsOf(q);
       q.clear();
@@ -150,6 +154,24 @@
         }
       }
     }
+  }
+
+  private ImmutableSet<AccountGroup.UUID> computeKnownGroups() {
+    ImmutableSet<AccountGroup.UUID> direct = computeDirectKnownGroups();
+    Collection<AccountGroup.UUID> externalMembers = includeCache.allExternalMembers();
+    if (externalMembers.isEmpty()) {
+      return direct;
+    }
+
+    Set<AccountGroup.UUID> r = Sets.newHashSet(direct);
+    GroupMembership membership = user.getEffectiveGroups();
+    Set<AccountGroup.UUID> q = new HashSet<>();
+    for (AccountGroup.UUID g : membership.intersection(externalMembers)) {
+      if (g != null && r.add(g)) {
+        q.add(g);
+      }
+    }
+    expandParentGroups(r, q);
     return ImmutableSet.copyOf(r);
   }
 
@@ -160,4 +182,28 @@
     }
     return knownGroups;
   }
+
+  @Override
+  public Iterable<Set<AccountGroup.UUID>> getKnownGroupsByBackend() {
+    if (knownGroups != null || includeCache.allExternalMembers().isEmpty()) {
+      return () -> Iterators.singletonIterator(getKnownGroups());
+    }
+    return () ->
+        new AbstractIterator<Set<AccountGroup.UUID>>() {
+          private int step = 0;
+
+          @Override
+          protected Set<AccountGroup.UUID> computeNext() {
+            if (step == 0) {
+              step = 1;
+              return computeDirectKnownGroups();
+            }
+            if (step == 1) {
+              step = 2;
+              return Sets.difference(getKnownGroups(), computeDirectKnownGroups());
+            }
+            return endOfData();
+          }
+        };
+  }
 }
diff --git a/java/com/google/gerrit/server/account/InternalAccountDirectory.java b/java/com/google/gerrit/server/account/InternalAccountDirectory.java
index 45214a6..0d92024 100644
--- a/java/com/google/gerrit/server/account/InternalAccountDirectory.java
+++ b/java/com/google/gerrit/server/account/InternalAccountDirectory.java
@@ -136,7 +136,7 @@
     if (options.equals(ID_ONLY)) {
       return;
     }
-    if (in instanceof Collection && ((Collection<?>) in).isEmpty()) {
+    if (in instanceof Collection<?> collection && collection.isEmpty()) {
       return;
     }
 
@@ -201,7 +201,7 @@
 
   @Override
   public void fillAccountAttributeInfo(Iterable<? extends AccountAttribute> in) {
-    if (in instanceof Collection && ((Collection<?>) in).isEmpty()) {
+    if (in instanceof Collection<?> collection && collection.isEmpty()) {
       return;
     }
     Set<Account.Id> ids;
diff --git a/java/com/google/gerrit/server/account/PasswordMigrator.java b/java/com/google/gerrit/server/account/PasswordMigrator.java
index 892e937..c5a1cae 100644
--- a/java/com/google/gerrit/server/account/PasswordMigrator.java
+++ b/java/com/google/gerrit/server/account/PasswordMigrator.java
@@ -173,8 +173,7 @@
       if (tokenAccessor.getToken(accountId, PasswordMigrator.DEFAULT_ID).isPresent()) {
         logger.atFine().log("HTTP password of account %d was already migrated.", accountId.get());
       } else {
-        @SuppressWarnings("unused")
-        var unused =
+        var _ =
             tokenAccessor.addToken(
                 accountId, PasswordMigrator.DEFAULT_ID, hashedPassword, expirationDate);
       }
diff --git a/java/com/google/gerrit/server/account/UniversalGroupBackend.java b/java/com/google/gerrit/server/account/UniversalGroupBackend.java
index 5807d34..d206279 100644
--- a/java/com/google/gerrit/server/account/UniversalGroupBackend.java
+++ b/java/com/google/gerrit/server/account/UniversalGroupBackend.java
@@ -18,6 +18,7 @@
 
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Iterables;
+import com.google.common.collect.Iterators;
 import com.google.common.collect.ListMultimap;
 import com.google.common.collect.MultimapBuilder;
 import com.google.common.flogger.FluentLogger;
@@ -302,6 +303,21 @@
       }
       return groups;
     }
+
+    @Override
+    public Iterable<Set<AccountGroup.UUID>> getKnownGroupsByBackend() {
+      return () ->
+          Iterators.concat(
+              Iterators.transform(
+                  memberships.entrySet().iterator(),
+                  entry ->
+                      Iterators.transform(
+                          entry.getValue().getKnownGroupsByBackend().iterator(),
+                          knownGroups -> {
+                            knownGroupsCount.increment(name(entry.getKey()), knownGroups.size());
+                            return knownGroups;
+                          })));
+    }
   }
 
   @Override
diff --git a/java/com/google/gerrit/server/account/VersionedAuthTokens.java b/java/com/google/gerrit/server/account/VersionedAuthTokens.java
index dc056b3..d63e196 100644
--- a/java/com/google/gerrit/server/account/VersionedAuthTokens.java
+++ b/java/com/google/gerrit/server/account/VersionedAuthTokens.java
@@ -116,7 +116,7 @@
   public static Map<String, AuthToken> parse(String s) throws ConfigInvalidException {
     Config tokenConfig = new Config();
     tokenConfig.fromText(s);
-    Map<String, AuthToken> tokens = new HashMap<>(tokenConfig.getSubsections("token").size());
+    Map<String, AuthToken> tokens = HashMap.newHashMap(tokenConfig.getSubsections("token").size());
     for (String id : tokenConfig.getSubsections("token")) {
       String expiration = tokenConfig.getString("token", id, "expiration");
       Optional<Instant> expirationInstant =
diff --git a/java/com/google/gerrit/server/account/VersionedAuthorizedKeys.java b/java/com/google/gerrit/server/account/VersionedAuthorizedKeys.java
index 6119938..4a7bcc1 100644
--- a/java/com/google/gerrit/server/account/VersionedAuthorizedKeys.java
+++ b/java/com/google/gerrit/server/account/VersionedAuthorizedKeys.java
@@ -36,6 +36,7 @@
 import com.google.inject.Singleton;
 import com.google.inject.assistedinject.Assisted;
 import java.io.IOException;
+import java.time.Instant;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -98,10 +99,17 @@
     }
 
     @CanIgnoreReturnValue
-    public synchronized AccountSshKey addKey(Account.Id accountId, String pub)
+    public AccountSshKey addKey(Account.Id accountId, String pub)
+        throws IOException, ConfigInvalidException, InvalidSshKeyException {
+      return addKey(accountId, pub, Optional.empty());
+    }
+
+    @CanIgnoreReturnValue
+    public synchronized AccountSshKey addKey(
+        Account.Id accountId, String pub, Optional<Instant> expiryTime)
         throws IOException, ConfigInvalidException, InvalidSshKeyException {
       VersionedAuthorizedKeys authorizedKeys = read(accountId);
-      AccountSshKey key = authorizedKeys.addKey(pub);
+      AccountSshKey key = authorizedKeys.addKey(pub, expiryTime);
       commit(authorizedKeys);
       return key;
     }
@@ -144,7 +152,7 @@
   public static class SimpleSshKeyCreator implements SshKeyCreator {
     @Override
     public AccountSshKey create(Account.Id accountId, int seq, String encoded) {
-      return AccountSshKey.create(accountId, seq, encoded);
+      return new AccountSshKey(accountId, seq, encoded);
     }
   }
 
@@ -206,22 +214,28 @@
   /**
    * Adds a new public SSH key.
    *
-   * <p>If the specified public key exists already, the existing key is returned.
+   * <p>If the specified public key exists already, the existing key is returned, regardless of the
+   * comment of the specified key.
    *
    * @param pub the public SSH key to be added
+   * @param expiryTime the time the key expires, if present
    * @return the new SSH key
    */
-  private AccountSshKey addKey(String pub) throws InvalidSshKeyException {
+  private AccountSshKey addKey(String pub, Optional<Instant> expiryTime)
+      throws InvalidSshKeyException {
     checkLoaded();
 
-    for (Optional<AccountSshKey> key : keys) {
-      if (key.isPresent() && key.get().sshPublicKey().trim().equals(pub.trim())) {
-        return key.get();
+    int seq = keys.size() + 1;
+    AccountSshKey key = sshKeyCreator.create(accountId, seq, pub).withExpiryTime(expiryTime);
+    for (Optional<AccountSshKey> existing : keys) {
+      if (existing.isPresent()
+          && key.encodedKey() != null
+          && existing.get().algorithm().equals(key.algorithm())
+          && key.encodedKey().equals(existing.get().encodedKey())) {
+        return existing.get();
       }
     }
 
-    int seq = keys.size() + 1;
-    AccountSshKey key = sshKeyCreator.create(accountId, seq, pub);
     keys.add(Optional.of(key));
     return key;
   }
@@ -255,7 +269,7 @@
 
     Optional<AccountSshKey> key = keys.get(seq - 1);
     if (key.isPresent() && key.get().valid()) {
-      keys.set(seq - 1, Optional.of(AccountSshKey.createInvalid(key.get())));
+      keys.set(seq - 1, Optional.of(key.get().asInvalid()));
       return true;
     }
     return false;
diff --git a/java/com/google/gerrit/server/account/externalids/ExternalId.java b/java/com/google/gerrit/server/account/externalids/ExternalId.java
index 247efdc..6be9313 100644
--- a/java/com/google/gerrit/server/account/externalids/ExternalId.java
+++ b/java/com/google/gerrit/server/account/externalids/ExternalId.java
@@ -231,10 +231,9 @@
 
     @Override
     public final boolean equals(Object obj) {
-      if (!(obj instanceof ExternalId.Key)) {
+      if (!(obj instanceof ExternalId.Key o)) {
         return false;
       }
-      ExternalId.Key o = (ExternalId.Key) obj;
 
       return sha1().equals(o.sha1());
     }
@@ -286,10 +285,9 @@
    */
   @Override
   public final boolean equals(Object obj) {
-    if (!(obj instanceof ExternalId)) {
+    if (!(obj instanceof ExternalId o)) {
       return false;
     }
-    ExternalId o = (ExternalId) obj;
     return Objects.equals(key(), o.key())
         && Objects.equals(accountId(), o.accountId())
         && isCaseInsensitive() == o.isCaseInsensitive()
diff --git a/java/com/google/gerrit/server/account/externalids/storage/notedb/ExternalIdCacheLoader.java b/java/com/google/gerrit/server/account/externalids/storage/notedb/ExternalIdCacheLoader.java
index f2a5885..ef38936 100644
--- a/java/com/google/gerrit/server/account/externalids/storage/notedb/ExternalIdCacheLoader.java
+++ b/java/com/google/gerrit/server/account/externalids/storage/notedb/ExternalIdCacheLoader.java
@@ -30,13 +30,13 @@
 import com.google.gerrit.metrics.MetricMaker;
 import com.google.gerrit.metrics.Timer0;
 import com.google.gerrit.server.account.externalids.ExternalId;
-import com.google.gerrit.server.config.AllUsersName;
 import com.google.gerrit.server.config.GerritServerConfig;
-import com.google.gerrit.server.git.GitRepositoryManager;
+import com.google.gerrit.server.git.AllUsersRepository;
 import com.google.gerrit.server.logging.Metadata;
 import com.google.gerrit.server.logging.TraceContext;
 import com.google.gerrit.server.logging.TraceContext.TraceTimer;
 import com.google.inject.Inject;
+import com.google.inject.Provider;
 import com.google.inject.Singleton;
 import com.google.inject.name.Named;
 import java.io.IOException;
@@ -69,8 +69,7 @@
 
   private final ExternalIdReader externalIdReader;
   private final Cache<ObjectId, AllExternalIds> externalIdCache;
-  private final GitRepositoryManager gitRepositoryManager;
-  private final AllUsersName allUsersName;
+  private final Provider<Repository> allUsersRepositoryProvider;
   private final Counter1<Boolean> reloadCounter;
   private final Timer0 reloadDifferential;
   private final boolean isPersistentCache;
@@ -78,8 +77,7 @@
 
   @Inject
   ExternalIdCacheLoader(
-      GitRepositoryManager gitRepositoryManager,
-      AllUsersName allUsersName,
+      @AllUsersRepository Provider<Repository> allUsersRepositoryProvider,
       ExternalIdReader externalIdReader,
       @Named(ExternalIdCacheImpl.CACHE_NAME) Cache<ObjectId, AllExternalIds> externalIdCache,
       MetricMaker metricMaker,
@@ -87,8 +85,7 @@
       ExternalIdFactoryNoteDbImpl externalIdFactory) {
     this.externalIdReader = externalIdReader;
     this.externalIdCache = externalIdCache;
-    this.gitRepositoryManager = gitRepositoryManager;
-    this.allUsersName = allUsersName;
+    this.allUsersRepositoryProvider = allUsersRepositoryProvider;
     this.reloadCounter =
         metricMaker.newCounter(
             "notedb/external_id_cache_load_count",
@@ -130,8 +127,8 @@
     // Once we know what files changed, we apply additions and removals to the previously cached
     // state.
 
-    try (Repository repo = gitRepositoryManager.openRepository(allUsersName);
-        RevWalk rw = new RevWalk(repo)) {
+    Repository repo = allUsersRepositoryProvider.get();
+    try (RevWalk rw = new RevWalk(repo)) {
       long start = System.nanoTime();
       Ref extIdRef = repo.exactRef(RefNames.REFS_EXTERNAL_IDS);
       if (extIdRef == null) {
@@ -282,7 +279,7 @@
 
   private AllExternalIds reloadAllExternalIds(ObjectId notesRev)
       throws IOException, ConfigInvalidException {
-    try (TraceTimer ignored =
+    try (TraceTimer _ =
         TraceContext.newTimer(
             "Loading external IDs from scratch",
             Metadata.builder().revision(notesRev.name()).build())) {
diff --git a/java/com/google/gerrit/server/account/externalids/storage/notedb/ExternalIdReader.java b/java/com/google/gerrit/server/account/externalids/storage/notedb/ExternalIdReader.java
index 1d58bd2..1ff957d 100644
--- a/java/com/google/gerrit/server/account/externalids/storage/notedb/ExternalIdReader.java
+++ b/java/com/google/gerrit/server/account/externalids/storage/notedb/ExternalIdReader.java
@@ -28,8 +28,9 @@
 import com.google.gerrit.server.account.externalids.ExternalId;
 import com.google.gerrit.server.config.AllUsersName;
 import com.google.gerrit.server.config.AuthConfig;
-import com.google.gerrit.server.git.GitRepositoryManager;
+import com.google.gerrit.server.git.AllUsersRepository;
 import com.google.inject.Inject;
+import com.google.inject.Provider;
 import com.google.inject.Singleton;
 import java.io.IOException;
 import java.time.Duration;
@@ -72,8 +73,8 @@
     return NoteMap.newEmptyMap();
   }
 
-  private final GitRepositoryManager repoManager;
   private final AllUsersName allUsersName;
+  private final Provider<Repository> allUsersRepositoryProvider;
   private boolean failOnLoad = false;
   private final Timer0 readAllLatency;
   private final Timer0 readSingleLatency;
@@ -85,13 +86,13 @@
   @VisibleForTesting
   @Inject
   public ExternalIdReader(
-      GitRepositoryManager repoManager,
+      @AllUsersRepository Provider<Repository> allUsersRepositoryProvider,
       AllUsersName allUsersName,
       MetricMaker metricMaker,
       ExternalIdFactoryNoteDbImpl externalIdFactory,
       AuthConfig authConfig) {
-    this.repoManager = repoManager;
     this.allUsersName = allUsersName;
+    this.allUsersRepositoryProvider = allUsersRepositoryProvider;
     this.readAllLatency =
         metricMaker.newTimer(
             "notedb/read_all_external_ids_latency",
@@ -113,7 +114,7 @@
                 () -> {
                   try {
                     logger.atFine().log("Refreshing external-ids revision from All-Users repo");
-                    return readRevision(repoManager, allUsersName);
+                    return readRevision(allUsersRepositoryProvider.get());
                   } catch (IOException e) {
                     throw new IllegalStateException(
                         "Couldn't refresh external-ids from All-Users repo", e);
@@ -137,14 +138,7 @@
   public ObjectId readRevision() throws IOException {
     return externalIdsRefExpirySecs > 0
         ? allUsersSupplier.get()
-        : readRevision(repoManager, allUsersName);
-  }
-
-  private static ObjectId readRevision(GitRepositoryManager repoManager, AllUsersName allUsersName)
-      throws IOException {
-    try (Repository repo = repoManager.openRepository(allUsersName)) {
-      return readRevision(repo);
-    }
+        : readRevision(allUsersRepositoryProvider.get());
   }
 
   public static ObjectId readRevision(Repository repo) throws IOException {
@@ -156,11 +150,10 @@
   ImmutableSet<ExternalId> all() throws IOException, ConfigInvalidException {
     checkReadEnabled();
 
-    try (Timer0.Context ctx = readAllLatency.start();
-        Repository repo = repoManager.openRepository(allUsersName)) {
+    try (Timer0.Context ctx = readAllLatency.start()) {
       return ExternalIdNotes.loadReadOnly(
               allUsersName,
-              repo,
+              allUsersRepositoryProvider.get(),
               null,
               externalIdFactory,
               authConfig.isUserNameCaseInsensitiveMigrationMode())
@@ -182,11 +175,10 @@
       throws IOException, ConfigInvalidException {
     checkReadEnabled();
 
-    try (Timer0.Context ctx = readAllLatency.start();
-        Repository repo = repoManager.openRepository(allUsersName)) {
+    try (Timer0.Context ctx = readAllLatency.start()) {
       return ExternalIdNotes.loadReadOnly(
               allUsersName,
-              repo,
+              allUsersRepositoryProvider.get(),
               rev,
               externalIdFactory,
               authConfig.isUserNameCaseInsensitiveMigrationMode())
@@ -198,11 +190,10 @@
   Optional<ExternalId> get(ExternalId.Key key) throws IOException, ConfigInvalidException {
     checkReadEnabled();
 
-    try (Timer0.Context ctx = readSingleLatency.start();
-        Repository repo = repoManager.openRepository(allUsersName)) {
+    try (Timer0.Context ctx = readSingleLatency.start()) {
       return ExternalIdNotes.loadReadOnly(
               allUsersName,
-              repo,
+              allUsersRepositoryProvider.get(),
               null,
               externalIdFactory,
               authConfig.isUserNameCaseInsensitiveMigrationMode())
@@ -215,11 +206,10 @@
       throws IOException, ConfigInvalidException {
     checkReadEnabled();
 
-    try (Timer0.Context ctx = readSingleLatency.start();
-        Repository repo = repoManager.openRepository(allUsersName)) {
+    try (Timer0.Context ctx = readSingleLatency.start()) {
       return ExternalIdNotes.loadReadOnly(
               allUsersName,
-              repo,
+              allUsersRepositoryProvider.get(),
               rev,
               externalIdFactory,
               authConfig.isUserNameCaseInsensitiveMigrationMode())
diff --git a/java/com/google/gerrit/server/account/externalids/storage/notedb/ExternalIdsConsistencyCheckerNoteDbImpl.java b/java/com/google/gerrit/server/account/externalids/storage/notedb/ExternalIdsConsistencyCheckerNoteDbImpl.java
index db6fdce..f58e5f9 100644
--- a/java/com/google/gerrit/server/account/externalids/storage/notedb/ExternalIdsConsistencyCheckerNoteDbImpl.java
+++ b/java/com/google/gerrit/server/account/externalids/storage/notedb/ExternalIdsConsistencyCheckerNoteDbImpl.java
@@ -143,8 +143,7 @@
 
     if (extId.password() != null && extId.isScheme(SCHEME_USERNAME)) {
       try {
-        @SuppressWarnings("unused")
-        var unused = HashedPassword.decode(extId.password());
+        var _ = HashedPassword.decode(extId.password());
       } catch (HashedPassword.DecoderException e) {
         addError(
             String.format(
diff --git a/java/com/google/gerrit/server/account/externalids/storage/notedb/OnlineExternalIdCaseSensitivityMigrator.java b/java/com/google/gerrit/server/account/externalids/storage/notedb/OnlineExternalIdCaseSensitivityMigrator.java
index 2372e8a..11f83de 100644
--- a/java/com/google/gerrit/server/account/externalids/storage/notedb/OnlineExternalIdCaseSensitivityMigrator.java
+++ b/java/com/google/gerrit/server/account/externalids/storage/notedb/OnlineExternalIdCaseSensitivityMigrator.java
@@ -95,8 +95,7 @@
               }
               monitor.beginTask("Reindex accounts", ProgressMonitor.UNKNOWN);
 
-              @SuppressWarnings("unused")
-              var unused = versionManager.startReindexer("accounts", true);
+              var _ = versionManager.startReindexer("accounts", true);
             } finally {
               monitor.endTask();
             }
diff --git a/java/com/google/gerrit/server/account/storage/notedb/AccountsNoteDbImpl.java b/java/com/google/gerrit/server/account/storage/notedb/AccountsNoteDbImpl.java
index b0c35be..938216c 100644
--- a/java/com/google/gerrit/server/account/storage/notedb/AccountsNoteDbImpl.java
+++ b/java/com/google/gerrit/server/account/storage/notedb/AccountsNoteDbImpl.java
@@ -212,7 +212,7 @@
       throws IOException, ConfigInvalidException {
     AccountConfig cfg;
     CachedPreferences defaultPreferences;
-    try (Timer0.Context ignored = readSingleLatency.start()) {
+    try (Timer0.Context _ = readSingleLatency.start()) {
       cfg = new AccountConfig(accountId, allUsersName, allUsersRepository).load();
       defaultPreferences =
           CachedPreferences.fromLegacyConfig(
diff --git a/java/com/google/gerrit/server/api/accounts/AccountApiImpl.java b/java/com/google/gerrit/server/api/accounts/AccountApiImpl.java
index c22d087..8a29e95 100644
--- a/java/com/google/gerrit/server/api/accounts/AccountApiImpl.java
+++ b/java/com/google/gerrit/server/api/accounts/AccountApiImpl.java
@@ -286,11 +286,9 @@
   public void setActive(boolean active) throws RestApiException {
     try {
       if (active) {
-        @SuppressWarnings("unused")
-        var unused = putActive.apply(account, new Input());
+        var _ = putActive.apply(account, new Input());
       } else {
-        @SuppressWarnings("unused")
-        var unused = deleteActive.apply(account, new Input());
+        var _ = deleteActive.apply(account, new Input());
       }
     } catch (Exception e) {
       throw asRestApiException("Cannot set active", e);
@@ -379,8 +377,7 @@
   @Override
   public void deleteWatchedProjects(List<ProjectWatchInfo> in) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = deleteWatchedProjects.apply(account, in);
+      var _ = deleteWatchedProjects.apply(account, in);
     } catch (Exception e) {
       throw asRestApiException("Cannot delete watched projects", e);
     }
@@ -389,8 +386,7 @@
   @Override
   public void starChange(String changeId) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = starredChangesCreate.apply(account, IdString.fromUrl(changeId), new Input());
+      var _ = starredChangesCreate.apply(account, IdString.fromUrl(changeId), new Input());
     } catch (Exception e) {
       throw asRestApiException("Cannot star change", e);
     }
@@ -403,8 +399,7 @@
       AccountResource.StarredChange starredChange =
           new AccountResource.StarredChange(account.getUser(), rsrc);
 
-      @SuppressWarnings("unused")
-      var unused = starredChangesDelete.apply(starredChange, new Input());
+      var _ = starredChangesDelete.apply(starredChange, new Input());
     } catch (Exception e) {
       throw asRestApiException("Cannot unstar change", e);
     }
@@ -432,8 +427,7 @@
   public void addEmail(EmailInput input) throws RestApiException {
     AccountResource.Email rsrc = new AccountResource.Email(account.getUser(), input.email);
     try {
-      @SuppressWarnings("unused")
-      var unused = createEmail.apply(rsrc, IdString.fromDecoded(input.email), input);
+      var _ = createEmail.apply(rsrc, IdString.fromDecoded(input.email), input);
     } catch (Exception e) {
       throw asRestApiException("Cannot add email", e);
     }
@@ -443,8 +437,7 @@
   public void deleteEmail(String email) throws RestApiException {
     AccountResource.Email rsrc = new AccountResource.Email(account.getUser(), email);
     try {
-      @SuppressWarnings("unused")
-      var unused = deleteEmail.apply(rsrc, null);
+      var _ = deleteEmail.apply(rsrc, null);
     } catch (Exception e) {
       throw asRestApiException("Cannot delete email", e);
     }
@@ -454,8 +447,7 @@
   public EmailApi createEmail(EmailInput input) throws RestApiException {
     AccountResource.Email rsrc = new AccountResource.Email(account.getUser(), input.email);
     try {
-      @SuppressWarnings("unused")
-      var unused = createEmail.apply(rsrc, IdString.fromDecoded(input.email), input);
+      var _ = createEmail.apply(rsrc, IdString.fromDecoded(input.email), input);
       return email(rsrc.getEmail());
     } catch (Exception e) {
       throw asRestApiException("Cannot create email", e);
@@ -475,8 +467,7 @@
   public void setStatus(String status) throws RestApiException {
     StatusInput in = new StatusInput(status);
     try {
-      @SuppressWarnings("unused")
-      var unused = putStatus.apply(account, in);
+      var _ = putStatus.apply(account, in);
     } catch (Exception e) {
       throw asRestApiException("Cannot set status", e);
     }
@@ -486,8 +477,7 @@
   public void setDisplayName(String displayName) throws RestApiException {
     DisplayNameInput in = new DisplayNameInput(displayName);
     try {
-      @SuppressWarnings("unused")
-      var unused = putDisplayName.apply(account, in);
+      var _ = putDisplayName.apply(account, in);
     } catch (Exception e) {
       throw asRestApiException("Cannot set display name", e);
     }
@@ -504,8 +494,14 @@
 
   @Override
   public SshKeyInfo addSshKey(String key) throws RestApiException {
+    return addSshKey(key, null);
+  }
+
+  @Override
+  public SshKeyInfo addSshKey(String key, @Nullable String lifetime) throws RestApiException {
     SshKeyInput in = new SshKeyInput();
     in.raw = RawInputUtil.create(key);
+    in.lifetime = lifetime;
     try {
       return addSshKey.apply(account, in).value();
     } catch (Exception e) {
@@ -519,8 +515,7 @@
       AccountResource.SshKey sshKeyRes =
           sshKeys.parse(account, IdString.fromDecoded(Integer.toString(seq)));
 
-      @SuppressWarnings("unused")
-      var unused = deleteSshKey.apply(sshKeyRes, null);
+      var _ = deleteSshKey.apply(sshKeyRes, null);
     } catch (Exception e) {
       throw asRestApiException("Cannot delete SSH key", e);
     }
@@ -569,8 +564,7 @@
       AgreementInput input = new AgreementInput();
       input.name = agreementName;
 
-      @SuppressWarnings("unused")
-      var unused = putAgreement.apply(account, input);
+      var _ = putAgreement.apply(account, input);
     } catch (Exception e) {
       throw asRestApiException("Cannot sign agreement", e);
     }
@@ -579,8 +573,7 @@
   @Override
   public void index() throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = index.apply(account, new Input());
+      var _ = index.apply(account, new Input());
     } catch (Exception e) {
       throw asRestApiException("Cannot index account", e);
     }
@@ -598,8 +591,7 @@
   @Override
   public void deleteExternalIds(List<String> externalIds) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = deleteExternalIds.apply(account, externalIds);
+      var _ = deleteExternalIds.apply(account, externalIds);
     } catch (Exception e) {
       throw asRestApiException("Cannot delete external IDs", e);
     }
@@ -620,8 +612,7 @@
     NameInput input = new NameInput();
     input.name = name;
     try {
-      @SuppressWarnings("unused")
-      var unused = putName.apply(account, input);
+      var _ = putName.apply(account, input);
     } catch (Exception e) {
       throw asRestApiException("Cannot set account name", e);
     }
diff --git a/java/com/google/gerrit/server/api/accounts/EmailApiImpl.java b/java/com/google/gerrit/server/api/accounts/EmailApiImpl.java
index 06a74f4..7e2bf31 100644
--- a/java/com/google/gerrit/server/api/accounts/EmailApiImpl.java
+++ b/java/com/google/gerrit/server/api/accounts/EmailApiImpl.java
@@ -70,8 +70,7 @@
   @Override
   public void delete() throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = delete.apply(resource(), new Input());
+      var _ = delete.apply(resource(), new Input());
     } catch (Exception e) {
       throw asRestApiException("Cannot delete email", e);
     }
@@ -80,8 +79,7 @@
   @Override
   public void setPreferred() throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = putPreferred.apply(resource(), new Input());
+      var _ = putPreferred.apply(resource(), new Input());
     } catch (Exception e) {
       throw asRestApiException(String.format("Cannot set %s as preferred email", email), e);
     }
diff --git a/java/com/google/gerrit/server/api/changes/AttentionSetApiImpl.java b/java/com/google/gerrit/server/api/changes/AttentionSetApiImpl.java
index 534bffb..f2a3340 100644
--- a/java/com/google/gerrit/server/api/changes/AttentionSetApiImpl.java
+++ b/java/com/google/gerrit/server/api/changes/AttentionSetApiImpl.java
@@ -43,8 +43,7 @@
   @Override
   public void remove(AttentionSetInput input) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = removeFromAttentionSet.apply(attentionSetEntryResource, input);
+      var _ = removeFromAttentionSet.apply(attentionSetEntryResource, input);
     } catch (Exception e) {
       throw asRestApiException("Cannot remove from attention set", e);
     }
diff --git a/java/com/google/gerrit/server/api/changes/ChangeApiImpl.java b/java/com/google/gerrit/server/api/changes/ChangeApiImpl.java
index 8714f27..b5117df 100644
--- a/java/com/google/gerrit/server/api/changes/ChangeApiImpl.java
+++ b/java/com/google/gerrit/server/api/changes/ChangeApiImpl.java
@@ -27,6 +27,7 @@
 import com.google.gerrit.extensions.api.changes.ChangeApi;
 import com.google.gerrit.extensions.api.changes.ChangeEditApi;
 import com.google.gerrit.extensions.api.changes.ChangeMessageApi;
+import com.google.gerrit.extensions.api.changes.ChangePermissionsInfo;
 import com.google.gerrit.extensions.api.changes.Changes;
 import com.google.gerrit.extensions.api.changes.CustomKeyedValuesInput;
 import com.google.gerrit.extensions.api.changes.FixInput;
@@ -90,6 +91,7 @@
 import com.google.gerrit.server.restapi.change.DeletePrivate;
 import com.google.gerrit.server.restapi.change.EvaluateChangeQueryExpression;
 import com.google.gerrit.server.restapi.change.GetChange;
+import com.google.gerrit.server.restapi.change.GetChangePermissions;
 import com.google.gerrit.server.restapi.change.GetCustomKeyedValues;
 import com.google.gerrit.server.restapi.change.GetHashtags;
 import com.google.gerrit.server.restapi.change.GetMessage;
@@ -196,6 +198,7 @@
   private final IsFlowsEnabled isFlowsEnabled;
   private final Provider<EvaluateChangeQueryExpression> evaluateChangeQueryExpressionProvider;
   private final Provider<GetPureRevert> getPureRevertProvider;
+  private final GetChangePermissions getChangePermissions;
   private final DynamicOptionParser dynamicOptionParser;
   private final Injector injector;
   private final DynamicMap<DynamicOptions.DynamicBean> dynamicBeans;
@@ -256,6 +259,7 @@
       IsFlowsEnabled isFlowsEnabled,
       Provider<EvaluateChangeQueryExpression> evaluateChangeQueryExpressionProvider,
       Provider<GetPureRevert> getPureRevertProvider,
+      GetChangePermissions getChangePermissions,
       DynamicOptionParser dynamicOptionParser,
       @Assisted ChangeResource change,
       Injector injector,
@@ -314,6 +318,7 @@
     this.isFlowsEnabled = isFlowsEnabled;
     this.evaluateChangeQueryExpressionProvider = evaluateChangeQueryExpressionProvider;
     this.getPureRevertProvider = getPureRevertProvider;
+    this.getChangePermissions = getChangePermissions;
     this.dynamicOptionParser = dynamicOptionParser;
     this.change = change;
     this.injector = injector;
@@ -414,8 +419,7 @@
   @Override
   public void abandon(AbandonInput in) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = abandon.apply(change, in);
+      var _ = abandon.apply(change, in);
     } catch (Exception e) {
       throw asRestApiException("Cannot abandon change", e);
     }
@@ -424,8 +428,7 @@
   @Override
   public void restore(RestoreInput in) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = restore.apply(change, in);
+      var _ = restore.apply(change, in);
     } catch (Exception e) {
       throw asRestApiException("Cannot restore change", e);
     }
@@ -434,8 +437,7 @@
   @Override
   public void move(MoveInput in) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = move.apply(change, in);
+      var _ = move.apply(change, in);
     } catch (Exception e) {
       throw asRestApiException("Cannot move change", e);
     }
@@ -446,11 +448,9 @@
     try {
       InputWithMessage input = new InputWithMessage(message);
       if (value) {
-        @SuppressWarnings("unused")
-        var unused = postPrivate.apply(change, input);
+        var _ = postPrivate.apply(change, input);
       } else {
-        @SuppressWarnings("unused")
-        var unused = deletePrivate.apply(change, input);
+        var _ = deletePrivate.apply(change, input);
       }
     } catch (Exception e) {
       throw asRestApiException("Cannot change private status", e);
@@ -460,8 +460,7 @@
   @Override
   public void setWorkInProgress(@Nullable String message) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = setWip.apply(change, new WorkInProgressOp.Input(message));
+      var _ = setWip.apply(change, new WorkInProgressOp.Input(message));
     } catch (Exception e) {
       throw asRestApiException("Cannot set work in progress state", e);
     }
@@ -470,8 +469,7 @@
   @Override
   public void setReadyForReview(@Nullable String message) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = setReady.apply(change, new WorkInProgressOp.Input(message));
+      var _ = setReady.apply(change, new WorkInProgressOp.Input(message));
     } catch (Exception e) {
       throw asRestApiException("Cannot set ready for review state", e);
     }
@@ -531,8 +529,7 @@
   @Override
   public void rebase(RebaseInput in) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = rebase.apply(change, in);
+      var _ = rebase.apply(change, in);
     } catch (Exception e) {
       throw asRestApiException("Cannot rebase change", e);
     }
@@ -550,8 +547,7 @@
   @Override
   public void delete() throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = deleteChange.apply(change, null);
+      var _ = deleteChange.apply(change, null);
     } catch (Exception e) {
       throw asRestApiException("Cannot delete change", e);
     }
@@ -571,8 +567,7 @@
     TopicInput in = new TopicInput();
     in.topic = topic;
     try {
-      @SuppressWarnings("unused")
-      var unused = putTopic.apply(change, in);
+      var _ = putTopic.apply(change, in);
     } catch (Exception e) {
       throw asRestApiException("Cannot set topic", e);
     }
@@ -678,8 +673,7 @@
   @Override
   public void setMessage(CommitMessageInput in) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = putMessage.apply(change, in);
+      var _ = putMessage.apply(change, in);
     } catch (Exception e) {
       throw asRestApiException("Cannot edit commit message", e);
     }
@@ -688,8 +682,7 @@
   @Override
   public void setHashtags(HashtagsInput input) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = postHashtags.apply(change, input);
+      var _ = postHashtags.apply(change, input);
     } catch (Exception e) {
       throw asRestApiException("Cannot post hashtags", e);
     }
@@ -707,8 +700,7 @@
   @Override
   public void setCustomKeyedValues(CustomKeyedValuesInput input) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = postCustomKeyedValues.apply(change, input);
+      var _ = postCustomKeyedValues.apply(change, input);
     } catch (Exception e) {
       throw asRestApiException("Cannot post custom keyed values", e);
     }
@@ -858,8 +850,7 @@
   @Override
   public void index() throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = index.apply(change, new Input());
+      var _ = index.apply(change, new Input());
     } catch (Exception e) {
       throw asRestApiException("Cannot index change", e);
     }
@@ -900,6 +891,26 @@
     }
   }
 
+  @Override
+  public PermissionsRequest permissionsRequest() throws RestApiException {
+    return new PermissionsRequest() {
+      @Override
+      public ChangePermissionsInfo get() throws RestApiException {
+        return ChangeApiImpl.this.permissions(this);
+      }
+    };
+  }
+
+  private ChangePermissionsInfo permissions(PermissionsRequest r) throws RestApiException {
+    try {
+      getChangePermissions.setAll(r.getAll());
+      getChangePermissions.setAccount(r.getAccount());
+      return getChangePermissions.apply(change).value();
+    } catch (Exception e) {
+      throw asRestApiException("Cannot list change permissions", e);
+    }
+  }
+
   @Singleton
   static class DynamicOptionParser {
     private final CmdLineParser.Factory cmdLineParserFactory;
diff --git a/java/com/google/gerrit/server/api/changes/ChangeEditApiImpl.java b/java/com/google/gerrit/server/api/changes/ChangeEditApiImpl.java
index 8b1b4c2..56aa1ee 100644
--- a/java/com/google/gerrit/server/api/changes/ChangeEditApiImpl.java
+++ b/java/com/google/gerrit/server/api/changes/ChangeEditApiImpl.java
@@ -133,8 +133,7 @@
   @Override
   public void create() throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = changeEditsPost.apply(changeResource, null);
+      var _ = changeEditsPost.apply(changeResource, null);
     } catch (Exception e) {
       throw asRestApiException("Cannot create change edit", e);
     }
@@ -143,8 +142,7 @@
   @Override
   public void delete() throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = deleteChangeEdit.apply(changeResource, new Input());
+      var _ = deleteChangeEdit.apply(changeResource, new Input());
     } catch (Exception e) {
       throw asRestApiException("Cannot delete change edit", e);
     }
@@ -173,8 +171,7 @@
   @Override
   public void publish(PublishChangeEditInput publishChangeEditInput) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = publishChangeEdit.apply(changeResource, publishChangeEditInput);
+      var _ = publishChangeEdit.apply(changeResource, publishChangeEditInput);
     } catch (Exception e) {
       throw asRestApiException("Cannot publish change edit", e);
     }
@@ -198,8 +195,7 @@
       renameInput.oldPath = oldFilePath;
       renameInput.newPath = newFilePath;
 
-      @SuppressWarnings("unused")
-      var unused = changeEditsPost.apply(changeResource, renameInput);
+      var _ = changeEditsPost.apply(changeResource, renameInput);
     } catch (Exception e) {
       throw asRestApiException("Cannot rename file of change edit", e);
     }
@@ -211,8 +207,7 @@
       ChangeEdits.Post.Input restoreInput = new ChangeEdits.Post.Input();
       restoreInput.restorePath = filePath;
 
-      @SuppressWarnings("unused")
-      var unused = changeEditsPost.apply(changeResource, restoreInput);
+      var _ = changeEditsPost.apply(changeResource, restoreInput);
     } catch (Exception e) {
       throw asRestApiException("Cannot restore file of change edit", e);
     }
@@ -221,8 +216,7 @@
   @Override
   public void modifyFile(String filePath, FileContentInput input) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = changeEditsPut.apply(changeResource, filePath, input);
+      var _ = changeEditsPut.apply(changeResource, filePath, input);
     } catch (Exception e) {
       throw asRestApiException("Cannot modify file of change edit", e);
     }
@@ -231,8 +225,7 @@
   @Override
   public void deleteFile(String filePath) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = changeEditDeleteContent.apply(changeResource, filePath);
+      var _ = changeEditDeleteContent.apply(changeResource, filePath);
     } catch (Exception e) {
       throw asRestApiException("Cannot delete file of change edit", e);
     }
@@ -255,8 +248,7 @@
     ChangeEdits.EditMessage.Input input = new ChangeEdits.EditMessage.Input();
     input.message = newCommitMessage;
     try {
-      @SuppressWarnings("unused")
-      var unused = modifyChangeEditCommitMessage.apply(changeResource, input);
+      var _ = modifyChangeEditCommitMessage.apply(changeResource, input);
     } catch (Exception e) {
       throw asRestApiException("Cannot modify commit message of change edit", e);
     }
@@ -270,8 +262,7 @@
     input.email = email;
     input.type = type;
     try {
-      @SuppressWarnings("unused")
-      var unused = modifyIdentity.apply(changeResource, input);
+      var _ = modifyIdentity.apply(changeResource, input);
     } catch (Exception e) {
       throw asRestApiException("Cannot edit identity of change", e);
     }
diff --git a/java/com/google/gerrit/server/api/changes/DraftApiImpl.java b/java/com/google/gerrit/server/api/changes/DraftApiImpl.java
index 67f98ca..d981d37 100644
--- a/java/com/google/gerrit/server/api/changes/DraftApiImpl.java
+++ b/java/com/google/gerrit/server/api/changes/DraftApiImpl.java
@@ -72,8 +72,7 @@
   @Override
   public void delete() throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = deleteDraft.apply(draft, null);
+      var _ = deleteDraft.apply(draft, null);
     } catch (Exception e) {
       throw asRestApiException("Cannot delete draft", e);
     }
diff --git a/java/com/google/gerrit/server/api/changes/FileApiImpl.java b/java/com/google/gerrit/server/api/changes/FileApiImpl.java
index 52b7835..291a739 100644
--- a/java/com/google/gerrit/server/api/changes/FileApiImpl.java
+++ b/java/com/google/gerrit/server/api/changes/FileApiImpl.java
@@ -110,11 +110,9 @@
   public void setReviewed(boolean reviewed) throws RestApiException {
     try {
       if (reviewed) {
-        @SuppressWarnings("unused")
-        var unused = putReviewed.apply(file, new Input());
+        var _ = putReviewed.apply(file, new Input());
       } else {
-        @SuppressWarnings("unused")
-        var unused = deleteReviewed.apply(file, new Input());
+        var _ = deleteReviewed.apply(file, new Input());
       }
     } catch (RuntimeException e) {
       throw asRestApiException(String.format("Cannot set %sreviewed", reviewed ? "" : "un"), e);
diff --git a/java/com/google/gerrit/server/api/changes/ReviewerApiImpl.java b/java/com/google/gerrit/server/api/changes/ReviewerApiImpl.java
index 10973ca..5865b9b 100644
--- a/java/com/google/gerrit/server/api/changes/ReviewerApiImpl.java
+++ b/java/com/google/gerrit/server/api/changes/ReviewerApiImpl.java
@@ -63,8 +63,7 @@
   @Override
   public void deleteVote(String label) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = deleteVote.apply(new VoteResource(reviewer, label), null);
+      var _ = deleteVote.apply(new VoteResource(reviewer, label), null);
     } catch (Exception e) {
       throw asRestApiException("Cannot delete vote", e);
     }
@@ -73,8 +72,7 @@
   @Override
   public void deleteVote(DeleteVoteInput input) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = deleteVote.apply(new VoteResource(reviewer, input.label), input);
+      var _ = deleteVote.apply(new VoteResource(reviewer, input.label), input);
     } catch (Exception e) {
       throw asRestApiException("Cannot delete vote", e);
     }
@@ -88,8 +86,7 @@
   @Override
   public void remove(DeleteReviewerInput input) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = deleteReviewer.apply(reviewer, input);
+      var _ = deleteReviewer.apply(reviewer, input);
     } catch (Exception e) {
       throw asRestApiException("Cannot remove reviewer", e);
     }
diff --git a/java/com/google/gerrit/server/api/changes/RevisionApiImpl.java b/java/com/google/gerrit/server/api/changes/RevisionApiImpl.java
index b4f8c98..1c481be 100644
--- a/java/com/google/gerrit/server/api/changes/RevisionApiImpl.java
+++ b/java/com/google/gerrit/server/api/changes/RevisionApiImpl.java
@@ -341,8 +341,7 @@
         view = deleteReviewed;
       }
 
-      @SuppressWarnings("unused")
-      var unused = view.apply(files.parse(revision, IdString.fromDecoded(path)), new Input());
+      var _ = view.apply(files.parse(revision, IdString.fromDecoded(path)), new Input());
     } catch (Exception e) {
       throw asRestApiException("Cannot update reviewed flag", e);
     }
@@ -652,6 +651,9 @@
                 null,
                 approval.tag().orElse(null),
                 approval.granted());
+        if (approval.isAi()) {
+          info.isAi = true;
+        }
         accountLoader.put(info);
         result.get(label).add(info);
       }
@@ -667,8 +669,7 @@
     DescriptionInput in = new DescriptionInput();
     in.description = description;
     try {
-      @SuppressWarnings("unused")
-      var unused = putDescription.apply(revision, in);
+      var _ = putDescription.apply(revision, in);
     } catch (Exception e) {
       throw asRestApiException("Cannot set description", e);
     }
diff --git a/java/com/google/gerrit/server/api/changes/RevisionReviewerApiImpl.java b/java/com/google/gerrit/server/api/changes/RevisionReviewerApiImpl.java
index fcce2dd..dcb0395 100644
--- a/java/com/google/gerrit/server/api/changes/RevisionReviewerApiImpl.java
+++ b/java/com/google/gerrit/server/api/changes/RevisionReviewerApiImpl.java
@@ -56,8 +56,7 @@
   @Override
   public void deleteVote(String label) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = deleteVote.apply(new VoteResource(reviewer, label), null);
+      var _ = deleteVote.apply(new VoteResource(reviewer, label), null);
     } catch (Exception e) {
       throw asRestApiException("Cannot delete vote", e);
     }
@@ -66,8 +65,7 @@
   @Override
   public void deleteVote(DeleteVoteInput input) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = deleteVote.apply(new VoteResource(reviewer, input.label), input);
+      var _ = deleteVote.apply(new VoteResource(reviewer, input.label), input);
     } catch (Exception e) {
       throw asRestApiException("Cannot delete vote", e);
     }
diff --git a/java/com/google/gerrit/server/api/config/CachesApiImpl.java b/java/com/google/gerrit/server/api/config/CachesApiImpl.java
index a525508..63d4c60 100644
--- a/java/com/google/gerrit/server/api/config/CachesApiImpl.java
+++ b/java/com/google/gerrit/server/api/config/CachesApiImpl.java
@@ -54,8 +54,7 @@
   @Override
   public void flush() throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = flushCache.apply(cache, new Input());
+      var _ = flushCache.apply(cache, new Input());
     } catch (Exception e) {
       throw asRestApiException("Cannot flush cache", e);
     }
diff --git a/java/com/google/gerrit/server/api/groups/GroupApiImpl.java b/java/com/google/gerrit/server/api/groups/GroupApiImpl.java
index 872aefe..2683749 100644
--- a/java/com/google/gerrit/server/api/groups/GroupApiImpl.java
+++ b/java/com/google/gerrit/server/api/groups/GroupApiImpl.java
@@ -153,8 +153,7 @@
     NameInput in = new NameInput();
     in.name = name;
     try {
-      @SuppressWarnings("unused")
-      var unused = putName.apply(rsrc, in);
+      var _ = putName.apply(rsrc, in);
     } catch (Exception e) {
       throw asRestApiException("Cannot put group name", e);
     }
@@ -164,8 +163,7 @@
   public void delete() throws RestApiException {
     DeleteGroupInput in = new DeleteGroupInput();
     try {
-      @SuppressWarnings("unused")
-      var unused = deleteGroup.apply(rsrc, in);
+      var _ = deleteGroup.apply(rsrc, in);
     } catch (Exception e) {
       throw asRestApiException("Cannot delete group", e);
     }
@@ -185,8 +183,7 @@
     OwnerInput in = new OwnerInput();
     in.owner = owner;
     try {
-      @SuppressWarnings("unused")
-      var unused = putOwner.apply(rsrc, in);
+      var _ = putOwner.apply(rsrc, in);
     } catch (Exception e) {
       throw asRestApiException("Cannot put group owner", e);
     }
@@ -206,8 +203,7 @@
     DescriptionInput in = new DescriptionInput();
     in.description = description;
     try {
-      @SuppressWarnings("unused")
-      var unused = putDescription.apply(rsrc, in);
+      var _ = putDescription.apply(rsrc, in);
     } catch (Exception e) {
       throw asRestApiException("Cannot put group description", e);
     }
@@ -225,8 +221,7 @@
   @Override
   public void options(GroupOptionsInfo options) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = putOptions.apply(rsrc, options);
+      var _ = putOptions.apply(rsrc, options);
     } catch (Exception e) {
       throw asRestApiException("Cannot put group options", e);
     }
@@ -250,8 +245,7 @@
   @Override
   public void addMembers(List<String> members) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = addMembers.apply(rsrc, AddMembers.Input.fromMembers(members));
+      var _ = addMembers.apply(rsrc, AddMembers.Input.fromMembers(members));
     } catch (Exception e) {
       throw asRestApiException("Cannot add group members", e);
     }
@@ -260,8 +254,7 @@
   @Override
   public void removeMembers(List<String> members) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = deleteMembers.apply(rsrc, AddMembers.Input.fromMembers(members));
+      var _ = deleteMembers.apply(rsrc, AddMembers.Input.fromMembers(members));
     } catch (Exception e) {
       throw asRestApiException("Cannot remove group members", e);
     }
@@ -279,8 +272,7 @@
   @Override
   public void addGroups(List<String> groups) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = addSubgroups.apply(rsrc, AddSubgroups.Input.fromGroups(groups));
+      var _ = addSubgroups.apply(rsrc, AddSubgroups.Input.fromGroups(groups));
     } catch (Exception e) {
       throw asRestApiException("Cannot add subgroups", e);
     }
@@ -289,8 +281,7 @@
   @Override
   public void removeGroups(List<String> groups) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = deleteSubgroups.apply(rsrc, AddSubgroups.Input.fromGroups(groups));
+      var _ = deleteSubgroups.apply(rsrc, AddSubgroups.Input.fromGroups(groups));
     } catch (Exception e) {
       throw asRestApiException("Cannot remove subgroups", e);
     }
@@ -308,8 +299,7 @@
   @Override
   public void index() throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = index.apply(rsrc, new Input());
+      var _ = index.apply(rsrc, new Input());
     } catch (Exception e) {
       throw asRestApiException("Cannot index group", e);
     }
diff --git a/java/com/google/gerrit/server/api/plugins/PluginApiImpl.java b/java/com/google/gerrit/server/api/plugins/PluginApiImpl.java
index 34fb356..5732775 100644
--- a/java/com/google/gerrit/server/api/plugins/PluginApiImpl.java
+++ b/java/com/google/gerrit/server/api/plugins/PluginApiImpl.java
@@ -64,15 +64,13 @@
 
   @Override
   public void enable() throws RestApiException {
-    @SuppressWarnings("unused")
-    var unused = enable.apply(resource, new Input());
+    var _ = enable.apply(resource, new Input());
   }
 
   @Override
   public void disable() throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = disable.apply(resource, new Input());
+      var _ = disable.apply(resource, new Input());
     } catch (Exception e) {
       throw asRestApiException("Cannot disable plugin", e);
     }
@@ -80,7 +78,6 @@
 
   @Override
   public void reload() throws RestApiException {
-    @SuppressWarnings("unused")
-    var unused = reload.apply(resource, new Input());
+    var _ = reload.apply(resource, new Input());
   }
 }
diff --git a/java/com/google/gerrit/server/api/projects/BranchApiImpl.java b/java/com/google/gerrit/server/api/projects/BranchApiImpl.java
index 8dc6d06..cae8153 100644
--- a/java/com/google/gerrit/server/api/projects/BranchApiImpl.java
+++ b/java/com/google/gerrit/server/api/projects/BranchApiImpl.java
@@ -99,8 +99,7 @@
   @Override
   public BranchApi create(BranchInput input) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = createBranch.apply(project, IdString.fromDecoded(ref), input);
+      var _ = createBranch.apply(project, IdString.fromDecoded(ref), input);
       return this;
     } catch (Exception e) {
       throw asRestApiException("Cannot create branch", e);
@@ -119,8 +118,7 @@
   @Override
   public void delete() throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = deleteBranch.apply(resource(), new Input());
+      var _ = deleteBranch.apply(resource(), new Input());
     } catch (Exception e) {
       throw asRestApiException("Cannot delete branch", e);
     }
diff --git a/java/com/google/gerrit/server/api/projects/DashboardApiImpl.java b/java/com/google/gerrit/server/api/projects/DashboardApiImpl.java
index 1bb0b76..54981b2 100644
--- a/java/com/google/gerrit/server/api/projects/DashboardApiImpl.java
+++ b/java/com/google/gerrit/server/api/projects/DashboardApiImpl.java
@@ -78,8 +78,7 @@
     SetDashboardInput input = new SetDashboardInput();
     input.id = id;
     try {
-      @SuppressWarnings("unused")
-      var unused =
+      var _ =
           set.apply(
               DashboardResource.projectDefault(project.getProjectState(), project.getUser()),
               input);
diff --git a/java/com/google/gerrit/server/api/projects/LabelApiImpl.java b/java/com/google/gerrit/server/api/projects/LabelApiImpl.java
index 2a7ad0a..c5d6fcb 100644
--- a/java/com/google/gerrit/server/api/projects/LabelApiImpl.java
+++ b/java/com/google/gerrit/server/api/projects/LabelApiImpl.java
@@ -74,8 +74,7 @@
   @Override
   public LabelApi create(LabelDefinitionInput input) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = createLabel.apply(project, IdString.fromDecoded(label), input);
+      var _ = createLabel.apply(project, IdString.fromDecoded(label), input);
 
       // recreate project resource because project state was updated by creating the new label and
       // needs to be reloaded
@@ -112,8 +111,7 @@
   @Override
   public void delete(@Nullable String commitMessage) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = deleteLabel.apply(resource(), new InputWithCommitMessage(commitMessage));
+      var _ = deleteLabel.apply(resource(), new InputWithCommitMessage(commitMessage));
     } catch (Exception e) {
       throw asRestApiException("Cannot delete label", e);
     }
diff --git a/java/com/google/gerrit/server/api/projects/ProjectApiImpl.java b/java/com/google/gerrit/server/api/projects/ProjectApiImpl.java
index 5319195..676cc86 100644
--- a/java/com/google/gerrit/server/api/projects/ProjectApiImpl.java
+++ b/java/com/google/gerrit/server/api/projects/ProjectApiImpl.java
@@ -46,9 +46,11 @@
 import com.google.gerrit.extensions.api.projects.ParentInput;
 import com.google.gerrit.extensions.api.projects.ProjectApi;
 import com.google.gerrit.extensions.api.projects.ProjectInput;
+import com.google.gerrit.extensions.api.projects.RefStorageInput;
 import com.google.gerrit.extensions.api.projects.SubmitRequirementApi;
 import com.google.gerrit.extensions.api.projects.TagApi;
 import com.google.gerrit.extensions.api.projects.TagInfo;
+import com.google.gerrit.extensions.client.RefStorage;
 import com.google.gerrit.extensions.common.BatchLabelInput;
 import com.google.gerrit.extensions.common.BatchSubmitRequirementInput;
 import com.google.gerrit.extensions.common.ChangeInfo;
@@ -65,7 +67,6 @@
 import com.google.gerrit.extensions.restapi.ResourceNotFoundException;
 import com.google.gerrit.extensions.restapi.RestApiException;
 import com.google.gerrit.extensions.restapi.TopLevelResource;
-import com.google.gerrit.server.git.GitRepositoryManager;
 import com.google.gerrit.server.permissions.GlobalPermission;
 import com.google.gerrit.server.permissions.PermissionBackend;
 import com.google.gerrit.server.project.FileResource;
@@ -76,6 +77,7 @@
 import com.google.gerrit.server.restapi.project.ChildProjectsCollection;
 import com.google.gerrit.server.restapi.project.CommitsCollection;
 import com.google.gerrit.server.restapi.project.CommitsIncludedInRefs;
+import com.google.gerrit.server.restapi.project.ConvertRefStorage;
 import com.google.gerrit.server.restapi.project.CreateAccessChange;
 import com.google.gerrit.server.restapi.project.CreateProject;
 import com.google.gerrit.server.restapi.project.DeleteBranches;
@@ -169,8 +171,8 @@
   private final PostSubmitRequirementsReview postSubmitRequirementsReview;
   private final LabelApiImpl.Factory labelApi;
   private final SubmitRequirementApiImpl.Factory submitRequirementApi;
-  private final GitRepositoryManager repoManager;
   private final Provider<GetDiffFile> getDiffFile;
+  private final ConvertRefStorage convertRefStorage;
 
   @AssistedInject
   ProjectApiImpl(
@@ -178,7 +180,6 @@
       CreateProject createProject,
       ProjectApiImpl.Factory projectApi,
       ProjectsCollection projects,
-      GitRepositoryManager repoManager,
       GetDescription getDescription,
       PutDescription putDescription,
       ChildProjectApiImpl.Factory childApi,
@@ -219,13 +220,13 @@
       PostSubmitRequirements postSubmitRequirements,
       PostSubmitRequirementsReview postSubmitRequirementsReview,
       Provider<GetDiffFile> getDiffFile,
+      ConvertRefStorage convertRefStorage,
       @Assisted ProjectResource project) {
     this(
         permissionBackend,
         createProject,
         projectApi,
         projects,
-        repoManager,
         getDescription,
         putDescription,
         childApi,
@@ -267,6 +268,7 @@
         postSubmitRequirements,
         postSubmitRequirementsReview,
         getDiffFile,
+        convertRefStorage,
         null);
   }
 
@@ -276,7 +278,6 @@
       CreateProject createProject,
       ProjectApiImpl.Factory projectApi,
       ProjectsCollection projects,
-      GitRepositoryManager repoManager,
       GetDescription getDescription,
       PutDescription putDescription,
       ChildProjectApiImpl.Factory childApi,
@@ -317,13 +318,13 @@
       PostSubmitRequirements postSubmitRequirements,
       PostSubmitRequirementsReview postSubmitRequirementsReview,
       Provider<GetDiffFile> getDiffFile,
+      ConvertRefStorage convertRefStorage,
       @Assisted String name) {
     this(
         permissionBackend,
         createProject,
         projectApi,
         projects,
-        repoManager,
         getDescription,
         putDescription,
         childApi,
@@ -365,6 +366,7 @@
         postSubmitRequirements,
         postSubmitRequirementsReview,
         getDiffFile,
+        convertRefStorage,
         name);
   }
 
@@ -373,7 +375,6 @@
       CreateProject createProject,
       ProjectApiImpl.Factory projectApi,
       ProjectsCollection projects,
-      GitRepositoryManager repoManager,
       GetDescription getDescription,
       PutDescription putDescription,
       ChildProjectApiImpl.Factory childApi,
@@ -415,12 +416,12 @@
       PostSubmitRequirements postSubmitRequirements,
       PostSubmitRequirementsReview postSubmitRequirementsReview,
       Provider<GetDiffFile> getDiffFile,
+      ConvertRefStorage convertRefStorage,
       String name) {
     this.permissionBackend = permissionBackend;
     this.createProject = createProject;
     this.projectApi = projectApi;
     this.projects = projects;
-    this.repoManager = repoManager;
     this.getDescription = getDescription;
     this.putDescription = putDescription;
     this.childApi = childApi;
@@ -463,6 +464,7 @@
     this.postSubmitRequirements = postSubmitRequirements;
     this.postSubmitRequirementsReview = postSubmitRequirementsReview;
     this.getDiffFile = getDiffFile;
+    this.convertRefStorage = convertRefStorage;
   }
 
   @Override
@@ -483,8 +485,7 @@
           .currentUser()
           .checkAny(GlobalPermission.fromAnnotation(createProject.getClass()));
 
-      @SuppressWarnings("unused")
-      var unused = createProject.apply(TopLevelResource.INSTANCE, IdString.fromDecoded(name), in);
+      var _ = createProject.apply(TopLevelResource.INSTANCE, IdString.fromDecoded(name), in);
 
       return projectApi.create(projects.parse(name));
     } catch (Exception e) {
@@ -557,8 +558,7 @@
   @Override
   public void description(DescriptionInput in) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = putDescription.apply(checkExists(), in);
+      var _ = putDescription.apply(checkExists(), in);
     } catch (Exception e) {
       throw asRestApiException("Cannot put project description", e);
     }
@@ -617,8 +617,7 @@
       throws RestApiException {
     try {
       FileResource resource =
-          FileResource.create(
-              repoManager, checkExists().getProjectState(), ObjectId.fromString(newCommit), path);
+          new FileResource(checkExists().getProjectState(), ObjectId.fromString(newCommit), path);
       return getDiffFile.get().setBase(oldCommit).apply(resource).value();
     } catch (Exception e) {
       throw asRestApiException("Cannot get diff file", e);
@@ -699,8 +698,7 @@
   public void deleteBranches(DeleteBranchesInput in) throws RestApiException {
     try {
       try (RefUpdateContext ctx = RefUpdateContext.open(BRANCH_MODIFICATION)) {
-        @SuppressWarnings("unused")
-        var unused = deleteBranches.apply(checkExists(), in);
+        var _ = deleteBranches.apply(checkExists(), in);
       }
     } catch (Exception e) {
       throw asRestApiException("Cannot delete branches", e);
@@ -720,8 +718,7 @@
   @Override
   public void deleteTags(DeleteTagsInput in) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = deleteTags.apply(checkExists(), in);
+      var _ = deleteTags.apply(checkExists(), in);
     } catch (Exception e) {
       throw asRestApiException("Cannot delete tags", e);
     }
@@ -799,13 +796,22 @@
   }
 
   @Override
+  public RefStorage convertRefStorage(RefStorageInput input) throws RestApiException {
+    try {
+      // value() is the resulting format's enum name, so valueOf round-trips.
+      return RefStorage.valueOf(convertRefStorage.apply(checkExists(), input).value());
+    } catch (Exception e) {
+      throw asRestApiException("Cannot convert ref storage", e);
+    }
+  }
+
+  @Override
   public void head(String head) throws RestApiException {
     HeadInput input = new HeadInput();
     input.ref = head;
     try {
       try (RefUpdateContext ctx = RefUpdateContext.open(HEAD_MODIFICATION)) {
-        @SuppressWarnings("unused")
-        var unused = setHead.apply(checkExists(), input);
+        var _ = setHead.apply(checkExists(), input);
       }
     } catch (Exception e) {
       throw asRestApiException("Cannot set HEAD", e);
@@ -827,8 +833,7 @@
       ParentInput input = new ParentInput();
       input.parent = parent;
 
-      @SuppressWarnings("unused")
-      var unused = setParent.apply(checkExists(), input);
+      var _ = setParent.apply(checkExists(), input);
     } catch (Exception e) {
       throw asRestApiException("Cannot set parent", e);
     }
@@ -840,8 +845,7 @@
       IndexProjectInput input = new IndexProjectInput();
       input.indexChildren = indexChildren;
 
-      @SuppressWarnings("unused")
-      var unused = index.apply(checkExists(), input);
+      var _ = index.apply(checkExists(), input);
     } catch (Exception e) {
       throw asRestApiException("Cannot index project", e);
     }
@@ -850,8 +854,7 @@
   @Override
   public void indexChanges() throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = indexChanges.apply(checkExists(), new Input());
+      var _ = indexChanges.apply(checkExists(), new Input());
     } catch (Exception e) {
       throw asRestApiException("Cannot index changes", e);
     }
@@ -918,8 +921,7 @@
   @Override
   public void labels(BatchLabelInput input) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = postLabels.apply(checkExists(), input);
+      var _ = postLabels.apply(checkExists(), input);
     } catch (Exception e) {
       throw asRestApiException("Cannot update labels", e);
     }
@@ -937,8 +939,7 @@
   @Override
   public void submitRequirements(BatchSubmitRequirementInput input) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = postSubmitRequirements.apply(checkExists(), input);
+      var _ = postSubmitRequirements.apply(checkExists(), input);
     } catch (Exception e) {
       throw asRestApiException("Cannot update submit requirements", e);
     }
diff --git a/java/com/google/gerrit/server/api/projects/SubmitRequirementApiImpl.java b/java/com/google/gerrit/server/api/projects/SubmitRequirementApiImpl.java
index 73be088..8bebebb 100644
--- a/java/com/google/gerrit/server/api/projects/SubmitRequirementApiImpl.java
+++ b/java/com/google/gerrit/server/api/projects/SubmitRequirementApiImpl.java
@@ -73,8 +73,7 @@
   @Override
   public SubmitRequirementApi create(SubmitRequirementInput input) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = createSubmitRequirement.apply(project, IdString.fromDecoded(name), input);
+      var _ = createSubmitRequirement.apply(project, IdString.fromDecoded(name), input);
 
       // recreate project resource because project state was updated
       project =
@@ -111,8 +110,7 @@
   @Override
   public void delete() throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = deleteSubmitRequirement.apply(resource(), new Input());
+      var _ = deleteSubmitRequirement.apply(resource(), new Input());
     } catch (Exception e) {
       throw asRestApiException("Cannot delete submit requirement", e);
     }
diff --git a/java/com/google/gerrit/server/api/projects/TagApiImpl.java b/java/com/google/gerrit/server/api/projects/TagApiImpl.java
index 6585093..d786d0a 100644
--- a/java/com/google/gerrit/server/api/projects/TagApiImpl.java
+++ b/java/com/google/gerrit/server/api/projects/TagApiImpl.java
@@ -66,8 +66,7 @@
   @Override
   public TagApi create(TagInput input) throws RestApiException {
     try {
-      @SuppressWarnings("unused")
-      var unused = createTag.apply(project, IdString.fromDecoded(ref), input);
+      var _ = createTag.apply(project, IdString.fromDecoded(ref), input);
       return this;
     } catch (Exception e) {
       throw asRestApiException("Cannot create tag", e);
@@ -87,8 +86,7 @@
   public void delete() throws RestApiException {
     try {
       try (RefUpdateContext ctx = RefUpdateContext.open(TAG_MODIFICATION)) {
-        @SuppressWarnings("unused")
-        var unused = deleteTag.apply(resource(), new Input());
+        var _ = deleteTag.apply(resource(), new Input());
       }
     } catch (Exception e) {
       throw asRestApiException("Cannot delete tag", e);
diff --git a/java/com/google/gerrit/server/approval/ApprovalCopier.java b/java/com/google/gerrit/server/approval/ApprovalCopier.java
index 9d0fd15..fc1e272 100644
--- a/java/com/google/gerrit/server/approval/ApprovalCopier.java
+++ b/java/com/google/gerrit/server/approval/ApprovalCopier.java
@@ -430,7 +430,7 @@
     // so that the output of the copy condition does not depend on who is running the current
     // request (e.g. a group used in this query might not be visible to the person sending this
     // request).
-    try (ManualRequestContext ignored = requestContext.open()) {
+    try (ManualRequestContext _ = requestContext.open()) {
       LinkedHashSet<String> passingAtoms = new LinkedHashSet<>();
       LinkedHashSet<String> failingAtoms = new LinkedHashSet<>();
       boolean labelCopy = evaluateCondition(labelCopyCondition, ctx, passingAtoms, failingAtoms);
diff --git a/java/com/google/gerrit/server/approval/ApprovalsUtil.java b/java/com/google/gerrit/server/approval/ApprovalsUtil.java
index 59959ed..f01934b 100644
--- a/java/com/google/gerrit/server/approval/ApprovalsUtil.java
+++ b/java/com/google/gerrit/server/approval/ApprovalsUtil.java
@@ -834,7 +834,7 @@
     // so that the output of the copy condition does not depend on who is running the current
     // request (e.g. a group used in this query might not be visible to the person sending this
     // request).
-    try (ManualRequestContext ignored = requestContext.open()) {
+    try (ManualRequestContext _ = requestContext.open()) {
       return approvalQueryBuilderProvider
           .get()
           .parse(copyCondition)
diff --git a/java/com/google/gerrit/server/auth/AuthUser.java b/java/com/google/gerrit/server/auth/AuthUser.java
index 9e1c5ec..b71fa21 100644
--- a/java/com/google/gerrit/server/auth/AuthUser.java
+++ b/java/com/google/gerrit/server/auth/AuthUser.java
@@ -70,8 +70,8 @@
 
   @Override
   public boolean equals(Object obj) {
-    if (obj instanceof AuthUser) {
-      return getUUID().equals(((AuthUser) obj).getUUID());
+    if (obj instanceof AuthUser authUser) {
+      return getUUID().equals(authUser.getUUID());
     }
     return false;
   }
diff --git a/java/com/google/gerrit/server/cache/CacheInfoFactory.java b/java/com/google/gerrit/server/cache/CacheInfoFactory.java
index 48122db..3a2de36 100644
--- a/java/com/google/gerrit/server/cache/CacheInfoFactory.java
+++ b/java/com/google/gerrit/server/cache/CacheInfoFactory.java
@@ -42,10 +42,10 @@
     cacheInfo.hitRatio = new HitRatioInfo();
     cacheInfo.hitRatio.setMem(stat.hitCount(), stat.requestCount());
 
-    if (cache instanceof PersistentCache) {
+    if (cache instanceof PersistentCache persistentCache) {
       cacheInfo.type = CacheType.DISK;
       if (includeDiskStats) {
-        PersistentCache.DiskStats diskStats = ((PersistentCache) cache).diskStats();
+        PersistentCache.DiskStats diskStats = persistentCache.diskStats();
         cacheInfo.entries.setDisk(diskStats.size());
         cacheInfo.entries.setSpace(diskStats.space());
         cacheInfo.hitRatio.setDisk(diskStats.hitCount(), diskStats.requestCount());
diff --git a/java/com/google/gerrit/server/cache/CacheRemovalListener.java b/java/com/google/gerrit/server/cache/CacheRemovalListener.java
index 2f9ed59..e08c35e 100644
--- a/java/com/google/gerrit/server/cache/CacheRemovalListener.java
+++ b/java/com/google/gerrit/server/cache/CacheRemovalListener.java
@@ -17,5 +17,9 @@
 import com.google.common.cache.RemovalNotification;
 
 public interface CacheRemovalListener<K, V> {
+  /**
+   * Explicit keyed invalidations from the default memory cache implementation also notify when the
+   * key is absent. In that case the cause is {@code EXPLICIT} and the value is {@code null}.
+   */
   void onRemoval(String pluginName, String cacheName, RemovalNotification<K, V> notification);
 }
diff --git a/java/com/google/gerrit/server/cache/PerThreadCache.java b/java/com/google/gerrit/server/cache/PerThreadCache.java
index 8ae9710..b4f3feb 100644
--- a/java/com/google/gerrit/server/cache/PerThreadCache.java
+++ b/java/com/google/gerrit/server/cache/PerThreadCache.java
@@ -84,10 +84,9 @@
 
     @Override
     public boolean equals(Object o) {
-      if (!(o instanceof Key)) {
+      if (!(o instanceof Key<?> other)) {
         return false;
       }
-      Key<?> other = (Key<?>) o;
       return this.clazz == other.clazz && this.identifiers.equals(other.identifiers);
     }
   }
diff --git a/java/com/google/gerrit/server/cache/h2/H2CacheFactory.java b/java/com/google/gerrit/server/cache/h2/H2CacheFactory.java
index 83878fe..a12a2f6 100644
--- a/java/com/google/gerrit/server/cache/h2/H2CacheFactory.java
+++ b/java/com/google/gerrit/server/cache/h2/H2CacheFactory.java
@@ -34,6 +34,7 @@
 import com.google.gerrit.server.config.GerritServerConfig;
 import com.google.gerrit.server.config.ScheduleConfig;
 import com.google.gerrit.server.config.ScheduleConfig.Schedule;
+import com.google.gerrit.server.util.H2Url;
 import com.google.inject.Inject;
 import com.google.inject.Provider;
 import com.google.inject.Singleton;
@@ -229,7 +230,7 @@
   private <V, K> SqlStore<K, V> newSqlStore(PersistentCacheDef<K, V> def, long maxSize) {
     String cacheName = def.name() + "-v" + COMPATIBILITY_VERSION;
     StringBuilder url = new StringBuilder();
-    url.append("jdbc:h2:file:")
+    url.append(H2Url.ASYNC_PREFIX)
         .append(cacheDir.resolve(cacheName).toAbsolutePath().toString().replace(";", "\\;"));
     if (h2CacheSize >= 0) {
       url.append(";CACHE_SIZE=");
diff --git a/java/com/google/gerrit/server/cache/h2/H2CacheImpl.java b/java/com/google/gerrit/server/cache/h2/H2CacheImpl.java
index d4a6052..f69fdc3 100644
--- a/java/com/google/gerrit/server/cache/h2/H2CacheImpl.java
+++ b/java/com/google/gerrit/server/cache/h2/H2CacheImpl.java
@@ -493,7 +493,7 @@
         warmupOsPageCache();
       }
       SqlHandle c = null;
-      try (TraceTimer ignored = TraceContext.newTimer("Build bloom filter", Metadata.empty())) {
+      try (TraceTimer _ = TraceContext.newTimer("Build bloom filter", Metadata.empty())) {
         c = acquire();
         if (bloomFilter.getEstimatedSize() <= 0) {
           try (PreparedStatement ps =
diff --git a/java/com/google/gerrit/server/cache/h2/H2CacheModule.java b/java/com/google/gerrit/server/cache/h2/H2CacheModule.java
index 0ac8123..ec21530 100644
--- a/java/com/google/gerrit/server/cache/h2/H2CacheModule.java
+++ b/java/com/google/gerrit/server/cache/h2/H2CacheModule.java
@@ -127,7 +127,8 @@
     if (startupThreads > 1) {
       return new LoggingContextAwareExecutorService(
           Executors.newFixedThreadPool(
-              1, new ThreadFactoryBuilder().setNameFormat("DiskCache-Store-Startup-%d").build()));
+              startupThreads,
+              new ThreadFactoryBuilder().setNameFormat("DiskCache-Store-Startup-%d").build()));
     }
     return null;
   }
diff --git a/java/com/google/gerrit/server/cache/mem/BUILD b/java/com/google/gerrit/server/cache/mem/BUILD
index a0cc079..669ea4d 100644
--- a/java/com/google/gerrit/server/cache/mem/BUILD
+++ b/java/com/google/gerrit/server/cache/mem/BUILD
@@ -13,6 +13,7 @@
         "//lib:guava",
         "//lib:jgit",
         "//lib/errorprone:annotations",
+        "//lib/flogger:api",
         "//lib/guice",
     ],
 )
diff --git a/java/com/google/gerrit/server/cache/mem/DefaultMemoryCacheFactory.java b/java/com/google/gerrit/server/cache/mem/DefaultMemoryCacheFactory.java
index a580f6d..32ed4ef 100644
--- a/java/com/google/gerrit/server/cache/mem/DefaultMemoryCacheFactory.java
+++ b/java/com/google/gerrit/server/cache/mem/DefaultMemoryCacheFactory.java
@@ -68,14 +68,21 @@
 
   @Override
   public <K, V> Cache<K, V> build(CacheDef<K, V> def) {
-    return CaffeinatedGuava.build(create(def));
+    return new InvalidationTrackingCache<>(
+        CaffeinatedGuava.build(create(def)),
+        def.keyType().getRawType(),
+        newRemovalListener(def.name()),
+        executor);
   }
 
   @Override
   public <K, V> LoadingCache<K, V> build(CacheDef<K, V> def, CacheLoader<K, V> loader) {
-    return cacheMaximumWeight(def) == 0
-        ? new PassthroughLoadingCache<>(loader)
-        : CaffeinatedGuava.build(create(def), loader);
+    LoadingCache<K, V> cache =
+        cacheMaximumWeight(def) == 0
+            ? new PassthroughLoadingCache<>(loader)
+            : CaffeinatedGuava.build(create(def), loader);
+    return new InvalidationTrackingCache.Loading<>(
+        cache, def.keyType().getRawType(), newRemovalListener(def.name()), executor);
   }
 
   private <K, V> Caffeine<K, V> create(CacheDef<K, V> def) {
diff --git a/java/com/google/gerrit/server/cache/mem/InvalidationTrackingCache.java b/java/com/google/gerrit/server/cache/mem/InvalidationTrackingCache.java
new file mode 100644
index 0000000..3caa66e
--- /dev/null
+++ b/java/com/google/gerrit/server/cache/mem/InvalidationTrackingCache.java
@@ -0,0 +1,103 @@
+// Copyright (C) 2026 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.google.gerrit.server.cache.mem;
+
+import static java.util.Objects.requireNonNull;
+
+import com.github.benmanes.caffeine.cache.RemovalCause;
+import com.github.benmanes.caffeine.cache.RemovalListener;
+import com.google.common.cache.Cache;
+import com.google.common.cache.ForwardingCache;
+import com.google.common.cache.ForwardingLoadingCache;
+import com.google.common.cache.LoadingCache;
+import com.google.common.flogger.FluentLogger;
+import com.google.gerrit.common.Nullable;
+import java.util.concurrent.Executor;
+import java.util.concurrent.ForkJoinPool;
+
+/** Reports explicit invalidations even when the cache has no entry for the key. */
+class InvalidationTrackingCache<K, V> extends ForwardingCache.SimpleForwardingCache<K, V> {
+  private static final FluentLogger logger = FluentLogger.forEnclosingClass();
+
+  private final Class<?> keyType;
+  private final RemovalListener<K, V> removalListener;
+  private final Executor executor;
+
+  InvalidationTrackingCache(
+      Cache<K, V> delegate,
+      Class<?> keyType,
+      RemovalListener<K, V> removalListener,
+      @Nullable Executor executor) {
+    super(delegate);
+    this.keyType = keyType;
+    this.removalListener = removalListener;
+    this.executor = executor != null ? executor : ForkJoinPool.commonPool();
+  }
+
+  @Override
+  @SuppressWarnings("unchecked")
+  public void invalidate(Object key) {
+    requireNonNull(key);
+    // Removing atomically avoids racing a presence check against another cache operation.
+    // The delegate already notifies the listener when it removes a live entry.
+    // Cache values cannot be null, so a null result means no live entry was removed.
+    if (delegate().asMap().remove(key) == null && keyType.isInstance(key)) {
+      // Match Caffeine's bounded cache handling of listener and executor failures.
+      Runnable notification =
+          () -> {
+            try {
+              removalListener.onRemoval((K) key, null, RemovalCause.EXPLICIT);
+            } catch (Throwable t) {
+              logger.atWarning().withCause(t).log("Exception thrown by removal listener");
+            }
+          };
+      try {
+        executor.execute(notification);
+      } catch (Throwable t) {
+        logger.atSevere().withCause(t).log("Exception thrown when submitting removal listener");
+        notification.run();
+      }
+    }
+  }
+
+  @Override
+  public void invalidateAll(Iterable<?> keys) {
+    keys.forEach(this::invalidate);
+  }
+
+  static class Loading<K, V> extends ForwardingLoadingCache.SimpleForwardingLoadingCache<K, V> {
+    private final InvalidationTrackingCache<K, V> invalidationTrackingCache;
+
+    Loading(
+        LoadingCache<K, V> delegate,
+        Class<?> keyType,
+        RemovalListener<K, V> removalListener,
+        @Nullable Executor executor) {
+      super(delegate);
+      invalidationTrackingCache =
+          new InvalidationTrackingCache<>(delegate, keyType, removalListener, executor);
+    }
+
+    @Override
+    public void invalidate(Object key) {
+      invalidationTrackingCache.invalidate(key);
+    }
+
+    @Override
+    public void invalidateAll(Iterable<?> keys) {
+      invalidationTrackingCache.invalidateAll(keys);
+    }
+  }
+}
diff --git a/java/com/google/gerrit/server/change/ActionJson.java b/java/com/google/gerrit/server/change/ActionJson.java
index fee664e..6c3840d 100644
--- a/java/com/google/gerrit/server/change/ActionJson.java
+++ b/java/com/google/gerrit/server/change/ActionJson.java
@@ -19,7 +19,6 @@
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
-import com.google.common.flogger.FluentLogger;
 import com.google.gerrit.common.Nullable;
 import com.google.gerrit.extensions.api.changes.ActionVisitor;
 import com.google.gerrit.extensions.common.ActionInfo;
@@ -35,9 +34,6 @@
 import com.google.gerrit.server.logging.Metadata;
 import com.google.gerrit.server.logging.TraceContext;
 import com.google.gerrit.server.logging.TraceContext.TraceTimer;
-import com.google.gerrit.server.permissions.ChangePermission;
-import com.google.gerrit.server.permissions.PermissionBackend;
-import com.google.gerrit.server.permissions.PermissionBackendException;
 import com.google.gerrit.server.query.change.ChangeData;
 import com.google.inject.Inject;
 import com.google.inject.Provider;
@@ -50,10 +46,6 @@
 
 @Singleton
 public class ActionJson {
-  private static final FluentLogger logger = FluentLogger.forEnclosingClass();
-
-  private static final String AI_REVIEW_ACTION_ID = "aiReview";
-
   private final DynamicMap<RestView<RevisionResource>> revisionViews;
   private final ChangeJson.Factory changeJsonFactory;
   private final ChangeResource.Factory changeResourceFactory;
@@ -61,7 +53,6 @@
   private final DynamicMap<RestView<ChangeResource>> changeViews;
   private final DynamicSet<ActionVisitor> visitorSet;
   private final Provider<CurrentUser> userProvider;
-  private final PermissionBackend permissionBackend;
 
   @Inject
   ActionJson(
@@ -71,8 +62,7 @@
       UiActions uiActions,
       DynamicMap<RestView<ChangeResource>> changeViews,
       DynamicSet<ActionVisitor> visitorSet,
-      Provider<CurrentUser> userProvider,
-      PermissionBackend permissionBackend) {
+      Provider<CurrentUser> userProvider) {
     this.revisionViews = views;
     this.changeJsonFactory = changeJsonFactory;
     this.changeResourceFactory = changeResourceFactory;
@@ -80,7 +70,6 @@
     this.changeViews = changeViews;
     this.visitorSet = visitorSet;
     this.userProvider = userProvider;
-    this.permissionBackend = permissionBackend;
   }
 
   public Map<String, ActionInfo> format(RevisionResource rsrc) {
@@ -240,18 +229,10 @@
       return ImmutableMap.of();
     }
 
-    Iterable<UiAction.Description> uiActionsDescs =
-        addAiReviewAction(rsrc, uiActions.from(revisionViews, rsrc));
     Map<String, ActionInfo> out = new LinkedHashMap<>();
     ACTION:
-    for (UiAction.Description d : uiActionsDescs) {
+    for (UiAction.Description d : uiActions.from(revisionViews, rsrc)) {
       ActionInfo actionInfo = new ActionInfo(d);
-      // Preserve explicit Description.enabled=false for aiReview; see
-      // ActionInfo(Description) which otherwise maps it to null and would
-      // drop the denied state from JSON.
-      if (AI_REVIEW_ACTION_ID.equals(d.getId())) {
-        actionInfo.enabled = false;
-      }
       for (ActionVisitor visitor : visitors) {
         if (!visitor.visit(d.getId(), actionInfo, changeInfo, revisionInfo)) {
           continue ACTION;
@@ -262,30 +243,6 @@
     return ImmutableMap.copyOf(out);
   }
 
-  private Iterable<UiAction.Description> addAiReviewAction(
-      RevisionResource rsrc, Iterable<UiAction.Description> uiActionsDescs) {
-    // The aiReview action is a client-side only operation that does not have a
-    // server side handler. It is emitted only when AI review is denied; the
-    // frontend treats an absent entry as the default-allow state.
-    try {
-      boolean permitted =
-          permissionBackend
-              .user(rsrc.getUser())
-              .change(rsrc.getChangeResource().getChangeData())
-              .test(ChangePermission.AI_REVIEW);
-      if (!permitted) {
-        UiAction.Description aiReview =
-            clientSideAction(AI_REVIEW_ACTION_ID, "AI Review", "Run AI Review on this change");
-        aiReview.setEnabled(false);
-        uiActionsDescs = Iterables.concat(uiActionsDescs, Collections.singleton(aiReview));
-      }
-    } catch (PermissionBackendException e) {
-      logger.atWarning().withCause(e).log(
-          "Failed to check AI review permission for change %s", rsrc.getChange().getId());
-    }
-    return uiActionsDescs;
-  }
-
   private static UiAction.Description clientSideAction(String id, String label, String title) {
     UiAction.Description descr = new UiAction.Description();
     PrivateInternals_UiActionDescription.setId(descr, id);
diff --git a/java/com/google/gerrit/server/change/ChangeCleanupRunner.java b/java/com/google/gerrit/server/change/ChangeCleanupRunner.java
index 821424c..5c58809 100644
--- a/java/com/google/gerrit/server/change/ChangeCleanupRunner.java
+++ b/java/com/google/gerrit/server/change/ChangeCleanupRunner.java
@@ -139,8 +139,7 @@
       // abandonInactiveOpenChanges skips failures instead of throwing, so retrying will never
       // actually happen. For the purposes of this class that is fine: they'll get tried again the
       // next time the scheduled task is run.
-      @SuppressWarnings("unused")
-      var unused =
+      var _ =
           retryHelper
               .changeUpdate(
                   "abandonInactiveOpenChanges",
diff --git a/java/com/google/gerrit/server/change/ChangeJson.java b/java/com/google/gerrit/server/change/ChangeJson.java
index 16b6cf3..5f91cfb 100644
--- a/java/com/google/gerrit/server/change/ChangeJson.java
+++ b/java/com/google/gerrit/server/change/ChangeJson.java
@@ -106,6 +106,7 @@
 import com.google.gerrit.server.experiments.ExperimentFeatures;
 import com.google.gerrit.server.git.GitRepositoryManager;
 import com.google.gerrit.server.index.change.ChangeField;
+import com.google.gerrit.server.logging.LoggingContext;
 import com.google.gerrit.server.logging.Metadata;
 import com.google.gerrit.server.logging.TraceContext;
 import com.google.gerrit.server.logging.TraceContext.TraceTimer;
@@ -138,6 +139,7 @@
 import java.util.Map;
 import java.util.Optional;
 import java.util.Set;
+import java.util.concurrent.Callable;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.stream.Collectors;
 import java.util.stream.IntStream;
@@ -341,7 +343,7 @@
 
   public List<List<ChangeInfo>> format(List<QueryResult<ChangeData>> in)
       throws PermissionBackendException {
-    try (Timer0.Context ignored = metrics.formatQueryResultsLatency.start()) {
+    try (Timer0.Context _ = metrics.formatQueryResultsLatency.start()) {
       accountLoader = accountLoaderFactory.create(has(DETAILED_ACCOUNTS));
       CurrentUser user = userProvider.get();
       List<List<ChangeInfo>> res = new ArrayList<>(in.size());
@@ -369,20 +371,24 @@
     // CurrentUser is thread-safe for reading. It is not mutated during the parallel formatting.
     CurrentUser user = userProvider.get();
     ImmutableListMultimap<Change.Id, PluginDefinedInfo> pluginInfosByChange = getPluginInfos(in);
-    List<ChangeInfo> out =
-        in.parallelStream()
-            .map(
-                cd -> {
-                  try (ManualRequestContext ctx = new ManualRequestContext(user, requestContext)) {
-                    return format(
-                        cd, Optional.empty(), false, pluginInfosByChange.get(cd.getId()), user);
-                  }
-                })
+    List<Callable<ChangeInfo>> tasks =
+        in.stream()
+            .map(cd -> LoggingContext.copy(() -> formatChange(cd, pluginInfosByChange, user)))
             .collect(toList());
+    List<ChangeInfo> out = tasks.parallelStream().map(ChangeJson::call).collect(toList());
     accountLoader.fill();
     return out;
   }
 
+  private ChangeInfo formatChange(
+      ChangeData cd,
+      ImmutableListMultimap<Change.Id, PluginDefinedInfo> pluginInfosByChange,
+      CurrentUser user) {
+    try (ManualRequestContext ctx = new ManualRequestContext(user, requestContext)) {
+      return format(cd, Optional.empty(), false, pluginInfosByChange.get(cd.getId()), user);
+    }
+  }
+
   public ChangeInfo format(Project.NameKey project, Change.Id id) {
     return format(project, id, null);
   }
@@ -530,30 +536,13 @@
           TraceContext.newTimer(
               "Load change data for lazyLoad options",
               Metadata.builder().resourceCount(all.size()).build())) {
-        boolean isIdentifiedUser = userProvider.get().isIdentifiedUser();
-        all.parallelStream()
-            .forEach(
-                cd -> {
-                  // Mark all ChangeDatas as coming from the index, but allow backfilling data from
-                  // NoteDb
-                  cd.setStorageConstraint(
-                      ChangeData.StorageConstraint.INDEX_PRIMARY_NOTEDB_SECONDARY);
-
-                  Set<ChangeData> singleCdSet = Collections.singleton(cd);
-                  ChangeData.ensureChangeLoaded(singleCdSet);
-                  if (has(ALL_REVISIONS)) {
-                    ChangeData.ensureAllPatchSetsLoaded(singleCdSet);
-                  } else if (has(CURRENT_REVISION) || has(MESSAGES)) {
-                    ChangeData.ensureCurrentPatchSetLoaded(singleCdSet);
-                  }
-                  if (has(REVIEWED) && isIdentifiedUser) {
-                    ChangeData.ensureReviewedByLoadedForOpenChanges(singleCdSet);
-                  }
-                  if (has(STAR) && isIdentifiedUser) {
-                    ChangeData.ensureChangeServerId(singleCdSet);
-                  }
-                  ChangeData.ensureCurrentApprovalsLoaded(singleCdSet);
-                });
+        CurrentUser user = userProvider.get();
+        boolean isIdentifiedUser = user.isIdentifiedUser();
+        List<Runnable> tasks =
+            all.stream()
+                .map(cd -> LoggingContext.copy(() -> loadChangeData(cd, user, isIdentifiedUser)))
+                .collect(toList());
+        tasks.parallelStream().forEach(Runnable::run);
       }
     } else {
       all.parallelStream()
@@ -565,6 +554,29 @@
     }
   }
 
+  private void loadChangeData(ChangeData cd, CurrentUser user, boolean isIdentifiedUser) {
+    try (ManualRequestContext ctx = new ManualRequestContext(user, requestContext)) {
+      // Mark all ChangeDatas as coming from the index, but allow backfilling data from
+      // NoteDb
+      cd.setStorageConstraint(ChangeData.StorageConstraint.INDEX_PRIMARY_NOTEDB_SECONDARY);
+
+      Set<ChangeData> singleCdSet = Collections.singleton(cd);
+      ChangeData.ensureChangeLoaded(singleCdSet);
+      if (has(ALL_REVISIONS)) {
+        ChangeData.ensureAllPatchSetsLoaded(singleCdSet);
+      } else if (has(CURRENT_REVISION) || has(MESSAGES)) {
+        ChangeData.ensureCurrentPatchSetLoaded(singleCdSet);
+      }
+      if (has(REVIEWED) && isIdentifiedUser) {
+        ChangeData.ensureReviewedByLoadedForOpenChanges(singleCdSet);
+      }
+      if (has(STAR) && isIdentifiedUser) {
+        ChangeData.ensureChangeServerId(singleCdSet);
+      }
+      ChangeData.ensureCurrentApprovalsLoaded(singleCdSet);
+    }
+  }
+
   private boolean has(ListChangesOption option) {
     return options.contains(option);
   }
@@ -574,56 +586,17 @@
       Map<Change.Id, ChangeInfo> cache,
       ImmutableListMultimap<Change.Id, PluginDefinedInfo> pluginInfosByChange,
       CurrentUser user) {
-    try (Timer0.Context ignored = metrics.toChangeInfosLatency.start()) {
-      List<ChangeInfo> changeInfos =
+    try (Timer0.Context _ = metrics.toChangeInfosLatency.start()) {
+      List<Callable<ChangeInfo>> tasks =
           IntStream.range(0, changes.size())
-              .parallel()
               .mapToObj(
-                  i -> {
-                    try (ManualRequestContext ctx =
-                        new ManualRequestContext(user, requestContext)) {
-                      ChangeData cd = changes.get(i);
-                      // Cache/re-use only if it is not the last entity in the list.
-                      // The last entity may have _moreChanges set later, which would
-                      // propagate to the original cached/re-used entity, yielding
-                      // incorrect results. This applies to both caching and reusing.
-                      boolean isCacheable =
-                          cacheQueryResultsByChangeNum && (i != changes.size() - 1);
-                      if (cd.hasFailedParsingFromIndex()) {
-                        return createFaultyChangeInfo(cd).orElse(null);
-                      }
-                      try {
-                        Change.Id cdUniqueId = cd.virtualId();
-                        if (isCacheable) {
-                          ChangeInfo info = cache.get(cdUniqueId);
-                          if (info != null) {
-                            return info;
-                          }
-                        }
-
-                        ChangeInfo info =
-                            format(
-                                cd,
-                                Optional.empty(),
-                                false,
-                                pluginInfosByChange.get(cd.getId()),
-                                user);
-                        if (isCacheable) {
-                          cache.put(cdUniqueId, info);
-                        }
-                        return info;
-                      } catch (RuntimeException e) {
-                        Optional<RequestCancelledException> requestCancelledException =
-                            RequestCancelledException.getFromCausalChain(e);
-                        if (requestCancelledException.isPresent()) {
-                          throw e;
-                        }
-                        logger.atWarning().withCause(e).log(
-                            "Omitting corrupt change %s from results", cd.getId());
-                        return null;
-                      }
-                    }
-                  })
+                  i ->
+                      LoggingContext.copy(
+                          () -> toChangeInfo(changes, i, cache, pluginInfosByChange, user)))
+              .collect(toList());
+      List<ChangeInfo> changeInfos =
+          tasks.parallelStream()
+              .map(ChangeJson::call)
               .filter(java.util.Objects::nonNull)
               .collect(toList());
 
@@ -634,6 +607,59 @@
     }
   }
 
+  @Nullable
+  private ChangeInfo toChangeInfo(
+      List<ChangeData> changes,
+      int i,
+      Map<Change.Id, ChangeInfo> cache,
+      ImmutableListMultimap<Change.Id, PluginDefinedInfo> pluginInfosByChange,
+      CurrentUser user) {
+    try (ManualRequestContext ctx = new ManualRequestContext(user, requestContext)) {
+      ChangeData cd = changes.get(i);
+      // Cache/re-use only if it is not the last entity in the list.
+      // The last entity may have _moreChanges set later, which would
+      // propagate to the original cached/re-used entity, yielding
+      // incorrect results. This applies to both caching and reusing.
+      boolean isCacheable = cacheQueryResultsByChangeNum && (i != changes.size() - 1);
+      if (cd.hasFailedParsingFromIndex()) {
+        return createFaultyChangeInfo(cd).orElse(null);
+      }
+      try {
+        Change.Id cdUniqueId = cd.virtualId();
+        if (isCacheable) {
+          ChangeInfo info = cache.get(cdUniqueId);
+          if (info != null) {
+            return info;
+          }
+        }
+
+        ChangeInfo info =
+            format(cd, Optional.empty(), false, pluginInfosByChange.get(cd.getId()), user);
+        if (isCacheable) {
+          cache.put(cdUniqueId, info);
+        }
+        return info;
+      } catch (RuntimeException e) {
+        Optional<RequestCancelledException> requestCancelledException =
+            RequestCancelledException.getFromCausalChain(e);
+        if (requestCancelledException.isPresent()) {
+          throw e;
+        }
+        logger.atWarning().withCause(e).log("Omitting corrupt change %s from results", cd.getId());
+        return null;
+      }
+    }
+  }
+
+  private static <T> T call(Callable<T> callable) {
+    try {
+      return callable.call();
+    } catch (Exception e) {
+      Throwables.throwIfUnchecked(e);
+      throw new RuntimeException(e);
+    }
+  }
+
   private ChangeInfo checkOnly(ChangeData cd) {
     ChangeNotes notes;
     try {
@@ -682,7 +708,7 @@
       List<PluginDefinedInfo> pluginInfosForChange,
       CurrentUser user)
       throws PatchListNotAvailableException, GpgException, PermissionBackendException, IOException {
-    try (Timer0.Context ignored = metrics.toChangeInfoLatency.start()) {
+    try (Timer0.Context _ = metrics.toChangeInfoLatency.start()) {
       return toChangeInfoImpl(cd, limitToPsId, pluginInfosForChange, user);
     }
   }
diff --git a/java/com/google/gerrit/server/change/EmailNewPatchSet.java b/java/com/google/gerrit/server/change/EmailNewPatchSet.java
index dc6935e..8baa825 100644
--- a/java/com/google/gerrit/server/change/EmailNewPatchSet.java
+++ b/java/com/google/gerrit/server/change/EmailNewPatchSet.java
@@ -158,8 +158,7 @@
                   try {
                     asyncSenderSupplier.get().run();
                   } finally {
-                    @SuppressWarnings("unused")
-                    var unused = threadLocalRequestContext.setContext(old);
+                    var _ = threadLocalRequestContext.setContext(old);
                   }
                 });
   }
diff --git a/java/com/google/gerrit/server/change/EmailReviewComments.java b/java/com/google/gerrit/server/change/EmailReviewComments.java
index 880cca3..9bc7829 100644
--- a/java/com/google/gerrit/server/change/EmailReviewComments.java
+++ b/java/com/google/gerrit/server/change/EmailReviewComments.java
@@ -240,8 +240,7 @@
       } catch (Exception e) {
         logger.atSevere().withCause(e).log("Cannot email comments for %s", patchSet.id());
       } finally {
-        @SuppressWarnings("unused")
-        var unused = requestContext.setContext(old);
+        var _ = requestContext.setContext(old);
       }
     }
 
diff --git a/java/com/google/gerrit/server/change/LabelNormalizer.java b/java/com/google/gerrit/server/change/LabelNormalizer.java
index b1fcf48..71be2ed 100644
--- a/java/com/google/gerrit/server/change/LabelNormalizer.java
+++ b/java/com/google/gerrit/server/change/LabelNormalizer.java
@@ -98,9 +98,9 @@
    * @param approvals list of approvals.
    */
   public Result normalize(ChangeNotes notes, Collection<PatchSetApproval> approvals) {
-    Set<PatchSetApproval> unchanged = new HashSet<>(approvals.size());
-    Set<PatchSetApproval> updated = new HashSet<>(approvals.size());
-    Set<PatchSetApproval> deleted = new HashSet<>(approvals.size());
+    Set<PatchSetApproval> unchanged = HashSet.newHashSet(approvals.size());
+    Set<PatchSetApproval> updated = HashSet.newHashSet(approvals.size());
+    Set<PatchSetApproval> deleted = HashSet.newHashSet(approvals.size());
     LabelTypes labelTypes =
         projectCache
             .get(notes.getProjectName())
diff --git a/java/com/google/gerrit/server/change/LabelsJson.java b/java/com/google/gerrit/server/change/LabelsJson.java
index 2c79ad4..cc14e54 100644
--- a/java/com/google/gerrit/server/change/LabelsJson.java
+++ b/java/com/google/gerrit/server/change/LabelsJson.java
@@ -48,6 +48,7 @@
 import com.google.gerrit.server.logging.TraceContext;
 import com.google.gerrit.server.logging.TraceContext.TraceTimer;
 import com.google.gerrit.server.notedb.ReviewerStateInternal;
+import com.google.gerrit.server.permissions.GlobalPermission;
 import com.google.gerrit.server.permissions.LabelPermission;
 import com.google.gerrit.server.permissions.PermissionBackend;
 import com.google.gerrit.server.permissions.PermissionBackendException;
@@ -195,7 +196,12 @@
         TraceContext.newTimer(
             "Get removable labels",
             Metadata.builder().changeId(cd.change().getId().get()).build())) {
-      if (cd.change().isMerged()) {
+
+      boolean isMerged = cd.change().isMerged();
+      boolean canRemoveVotesOnMergedChange =
+          !isMerged || permissionBackend.user(user).test(GlobalPermission.ADMINISTRATE_SERVER);
+
+      if (!canRemoveVotesOnMergedChange) {
         return new HashMap<>();
       }
 
@@ -387,6 +393,9 @@
           if (psa.postSubmit()) {
             info.postSubmit = true;
           }
+          if (psa.isAi()) {
+            info.isAi = true;
+          }
         }
         if (!standard) {
           continue;
@@ -539,9 +548,12 @@
           // user can vote on this label.
           value = perm != null && perm.test(new LabelPermission(lt.get())) ? 0 : null;
         }
-        addApproval(
-            e.getValue(),
-            approvalInfo(accountLoader, accountId, value, permittedVotingRange, tag, date));
+        ApprovalInfo ai =
+            approvalInfo(accountLoader, accountId, value, permittedVotingRange, tag, date);
+        if (psa != null && psa.isAi()) {
+          ai.isAi = true;
+        }
+        addApproval(e.getValue(), ai);
       }
     }
   }
diff --git a/java/com/google/gerrit/server/change/LabelsJsonRules.java b/java/com/google/gerrit/server/change/LabelsJsonRules.java
index d952c82..0e02f6d 100644
--- a/java/com/google/gerrit/server/change/LabelsJsonRules.java
+++ b/java/com/google/gerrit/server/change/LabelsJsonRules.java
@@ -388,6 +388,9 @@
           if (psa.postSubmit()) {
             info.postSubmit = true;
           }
+          if (psa.isAi()) {
+            info.isAi = true;
+          }
         }
         if (!standard) {
           continue;
@@ -547,9 +550,12 @@
           // user can vote on this label.
           value = perm != null && perm.test(new LabelPermission(lt.get())) ? 0 : null;
         }
-        addApproval(
-            e.getValue().label(),
-            approvalInfo(accountLoader, accountId, value, permittedVotingRange, tag, date));
+        ApprovalInfo ai =
+            approvalInfo(accountLoader, accountId, value, permittedVotingRange, tag, date);
+        if (psa != null && psa.isAi()) {
+          ai.isAi = true;
+        }
+        addApproval(e.getValue().label(), ai);
       }
     }
   }
diff --git a/java/com/google/gerrit/server/change/MergeabilityCacheImpl.java b/java/com/google/gerrit/server/change/MergeabilityCacheImpl.java
index 7097eb8..79618bf 100644
--- a/java/com/google/gerrit/server/change/MergeabilityCacheImpl.java
+++ b/java/com/google/gerrit/server/change/MergeabilityCacheImpl.java
@@ -39,14 +39,11 @@
 import com.google.inject.Module;
 import com.google.inject.Singleton;
 import com.google.inject.name.Named;
-import java.util.Arrays;
 import java.util.Objects;
-import java.util.Set;
 import java.util.concurrent.ExecutionException;
 import org.eclipse.jgit.lib.ObjectId;
 import org.eclipse.jgit.lib.Ref;
 import org.eclipse.jgit.lib.Repository;
-import org.eclipse.jgit.revwalk.RevCommit;
 
 @Singleton
 public class MergeabilityCacheImpl implements MergeabilityCache {
@@ -109,8 +106,7 @@
 
     @Override
     public boolean equals(Object o) {
-      if (o instanceof EntryKey) {
-        EntryKey k = (EntryKey) o;
+      if (o instanceof EntryKey k) {
         return commit.equals(k.commit)
             && into.equals(k.into)
             && submitType == k.submitType
@@ -203,11 +199,17 @@
               return true; // Assume yes on new branch.
             }
             try (CodeReviewRevWalk rw = CodeReviewCommit.newRevWalk(repo)) {
-              Set<RevCommit> accepted = SubmitDryRun.getAlreadyAccepted(repo, rw);
-              accepted.add(rw.parseCommit(key.into));
-              accepted.addAll(Arrays.asList(rw.parseCommit(key.commit).getParents()));
+              // Dry runs do not need message bodies.
+              rw.setRetainBody(false);
               return submitDryRun.run(
-                  null, key.submitType, repo, rw, dest, key.into, key.commit, accepted);
+                  null,
+                  key.submitType,
+                  repo,
+                  rw,
+                  dest,
+                  key.into,
+                  key.commit,
+                  SubmitDryRun.getParents(rw, key.commit));
             }
           });
     } catch (ExecutionException | UncheckedExecutionException e) {
diff --git a/java/com/google/gerrit/server/change/ParentDataProvider.java b/java/com/google/gerrit/server/change/ParentDataProvider.java
index 16b9f71..275dedf 100644
--- a/java/com/google/gerrit/server/change/ParentDataProvider.java
+++ b/java/com/google/gerrit/server/change/ParentDataProvider.java
@@ -14,29 +14,59 @@
 
 package com.google.gerrit.server.change;
 
+import com.google.common.collect.HashMultimap;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.MoreCollectors;
+import com.google.common.collect.SetMultimap;
 import com.google.common.flogger.FluentLogger;
+import com.google.gerrit.common.Nullable;
+import com.google.gerrit.entities.BranchNameKey;
 import com.google.gerrit.entities.ParentCommitData;
+import com.google.gerrit.entities.PatchSet;
 import com.google.gerrit.entities.Project;
+import com.google.gerrit.server.index.change.ChangeField;
 import com.google.gerrit.server.query.change.ChangeData;
 import com.google.gerrit.server.query.change.InternalChangeQuery;
 import com.google.inject.Inject;
 import com.google.inject.Provider;
-import com.google.inject.Singleton;
 import java.io.IOException;
+import java.util.Collection;
+import java.util.LinkedHashSet;
 import java.util.List;
+import java.util.Map;
 import java.util.Optional;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
 import org.eclipse.jgit.lib.ObjectId;
 import org.eclipse.jgit.lib.Ref;
 import org.eclipse.jgit.lib.Repository;
 import org.eclipse.jgit.revwalk.RevWalk;
 
-@Singleton
+/**
+ * Provides information about parent commits of patch sets.
+ *
+ * <p>Instances are not singletons so that each {@link RevisionJson} formatting operation receives a
+ * fresh instance with an isolated request-scoped cache. This prevents stale parent data across
+ * requests while enabling request-scoped memoization and batch prefetching across revisions.
+ * Internal caches use {@link ConcurrentHashMap} so cache lookups are thread-safe if a provider
+ * instance is shared across concurrent formatting tasks within a request (note that any caller-
+ * supplied {@link RevWalk} remains non-thread-safe and must be confined to the calling thread).
+ */
 public class ParentDataProvider {
   private static final FluentLogger logger = FluentLogger.forEnclosingClass();
 
+  private record ProjectCommitKey(Project.NameKey project, ObjectId commitId) {}
+
+  private record ParentDataCacheKey(
+      Project.NameKey project, ObjectId commitId, String targetBranch) {}
+
   private final Provider<InternalChangeQuery> queryProvider;
+  private final Map<ProjectCommitKey, Optional<ChangeData>> parentChangeCache =
+      new ConcurrentHashMap<>();
+  private final Map<ParentDataCacheKey, ParentCommitData> parentCommitDataCache =
+      new ConcurrentHashMap<>();
+  private final Map<BranchNameKey, Optional<ObjectId>> targetBranchRefCache =
+      new ConcurrentHashMap<>();
 
   @Inject
   public ParentDataProvider(Provider<InternalChangeQuery> queryProvider) {
@@ -44,34 +74,124 @@
   }
 
   /**
+   * Batches index queries for all specified parent commit IDs in {@code project} across revisions,
+   * populating the request-scoped cache to prevent N+1 sequential index round-trips.
+   */
+  public void prefetch(Project.NameKey project, Collection<ObjectId> parentCommitIds) {
+    if (parentCommitIds.isEmpty()) {
+      return;
+    }
+    Set<ObjectId> toQuery = new LinkedHashSet<>();
+    for (ObjectId id : parentCommitIds) {
+      if (!parentChangeCache.containsKey(new ProjectCommitKey(project, id))) {
+        toQuery.add(id);
+      }
+    }
+    if (toQuery.isEmpty()) {
+      return;
+    }
+    InternalChangeQuery query =
+        queryProvider.get().setRequestedFields(ChangeField.CHANGE_SPEC, ChangeField.PATCH_SET_SPEC);
+    List<ChangeData> changeDataList;
+    if (toQuery.size() == 1) {
+      changeDataList = query.byProjectCommit(project, toQuery.iterator().next());
+    } else {
+      ImmutableList<String> hashes =
+          toQuery.stream().map(ObjectId::name).collect(ImmutableList.toImmutableList());
+      changeDataList = query.byProjectCommits(project, hashes);
+    }
+    SetMultimap<ObjectId, ChangeData> changesByCommit = HashMultimap.create();
+    for (ChangeData cd : changeDataList) {
+      if (cd == null || cd.change() == null) {
+        continue;
+      }
+      for (PatchSet ps : cd.patchSets()) {
+        if (toQuery.contains(ps.commitId())) {
+          changesByCommit.put(ps.commitId(), cd);
+        }
+      }
+    }
+    for (ObjectId parentCommitId : toQuery) {
+      Set<ChangeData> matches = changesByCommit.get(parentCommitId);
+      if (matches.size() > 1) {
+        logger.atWarning().log(
+            "Found more than one change associated with parent revision %s (project: %s). Found"
+                + " changes %s.",
+            parentCommitId.name(),
+            project.get(),
+            matches.stream().map(ChangeData::getId).collect(ImmutableList.toImmutableList()));
+      }
+      Optional<ChangeData> singleDataOpt =
+          matches.size() == 1 ? Optional.of(matches.iterator().next()) : Optional.empty();
+      parentChangeCache.put(new ProjectCommitKey(project, parentCommitId), singleDataOpt);
+    }
+  }
+
+  /**
    * Returns data about a specific {@code revCommit}, specifically whether it's merged in a {@code
    * targetBranch}, or if it's a patch-set commit of some Gerrit change otherwise. This can be used
    * to get more information of parent commits of patch-sets.
    */
   public ParentCommitData get(
       Project.NameKey project, Repository repo, ObjectId parentCommitId, String targetBranch) {
+    return get(project, repo, /* rw= */ null, parentCommitId, targetBranch);
+  }
+
+  /**
+   * Returns data about a specific {@code parentCommitId}, reusing the provided {@link RevWalk} when
+   * checking target branch reachability.
+   */
+  public ParentCommitData get(
+      Project.NameKey project,
+      Repository repo,
+      @Nullable RevWalk rw,
+      ObjectId parentCommitId,
+      String targetBranch) {
+    ParentDataCacheKey cacheKey = new ParentDataCacheKey(project, parentCommitId, targetBranch);
+    ParentCommitData cached = parentCommitDataCache.get(cacheKey);
+    if (cached != null) {
+      return cached;
+    }
+
     Optional<ParentCommitData> fromGerritChange =
         getFromGerritChange(project, parentCommitId, targetBranch);
     if (fromGerritChange.isPresent()) {
-      return fromGerritChange.get();
+      ParentCommitData result = fromGerritChange.get();
+      parentCommitDataCache.put(cacheKey, result);
+      return result;
     }
 
-    boolean inTargetBranch = isMergedInTargetBranch(project, repo, parentCommitId, targetBranch);
-    return ParentCommitData.builder()
-        .branchName(Optional.of(targetBranch))
-        .commitId(Optional.of(parentCommitId))
-        .isMergedInTargetBranch(inTargetBranch)
-        .autoBuild();
+    boolean inTargetBranch =
+        isMergedInTargetBranch(project, repo, rw, parentCommitId, targetBranch);
+    ParentCommitData result =
+        ParentCommitData.builder()
+            .branchName(Optional.of(targetBranch))
+            .commitId(Optional.of(parentCommitId))
+            .isMergedInTargetBranch(inTargetBranch)
+            .autoBuild();
+    parentCommitDataCache.put(cacheKey, result);
+    return result;
   }
 
   /** Returns true if the parent commit {@code parentCommitId} is merged in the target branch. */
   private boolean isMergedInTargetBranch(
-      Project.NameKey project, Repository repo, ObjectId parentCommitId, String targetBranch) {
-    try (RevWalk rw = new RevWalk(repo)) {
-      Ref targetBranchRef = repo.exactRef(targetBranch);
-      if (targetBranchRef != null) {
+      Project.NameKey project,
+      Repository repo,
+      @Nullable RevWalk rw,
+      ObjectId parentCommitId,
+      String targetBranch) {
+    try {
+      Optional<ObjectId> targetBranchTip = getTargetBranchTip(project, repo, targetBranch);
+      if (targetBranchTip.isEmpty()) {
+        return false;
+      }
+      if (rw != null) {
         return rw.isMergedInto(
-            rw.parseCommit(parentCommitId), rw.parseCommit(targetBranchRef.getObjectId()));
+            rw.parseCommit(parentCommitId), rw.parseCommit(targetBranchTip.get()));
+      }
+      try (RevWalk localRw = new RevWalk(repo)) {
+        return localRw.isMergedInto(
+            localRw.parseCommit(parentCommitId), localRw.parseCommit(targetBranchTip.get()));
       }
     } catch (IOException e) {
       logger.atWarning().withCause(e).log(
@@ -81,24 +201,53 @@
     return false;
   }
 
+  private Optional<ObjectId> getTargetBranchTip(
+      Project.NameKey project, Repository repo, String targetBranch) throws IOException {
+    BranchNameKey branchKey = BranchNameKey.create(project, targetBranch);
+    Optional<ObjectId> cached = targetBranchRefCache.get(branchKey);
+    if (cached != null) {
+      return cached;
+    }
+    Ref targetBranchRef = repo.exactRef(targetBranch);
+    Optional<ObjectId> tip =
+        targetBranchRef != null && targetBranchRef.getObjectId() != null
+            ? Optional.of(targetBranchRef.getObjectId())
+            : Optional.empty();
+    targetBranchRefCache.put(branchKey, tip);
+    return tip;
+  }
+
   /**
    * Returns {@link ParentCommitData} if there is a change associated with {@code parentCommitId}.
    */
   private Optional<ParentCommitData> getFromGerritChange(
       Project.NameKey project, ObjectId parentCommitId, String targetBranch) {
-    List<ChangeData> changeData = queryProvider.get().byCommit(parentCommitId.name());
-    if (changeData.size() > 1) {
-      logger.atWarning().log(
-          "Found more than one change associated with parent revision %s (project: %s). Found"
-              + " changes %s.",
-          parentCommitId.name(),
-          project.get(),
-          changeData.stream().map(ChangeData::getId).collect(ImmutableList.toImmutableList()));
+    ProjectCommitKey projectCommitKey = new ProjectCommitKey(project, parentCommitId);
+    Optional<ChangeData> singleDataOpt = parentChangeCache.get(projectCommitKey);
+    if (singleDataOpt == null) {
+      List<ChangeData> changeData =
+          queryProvider
+              .get()
+              .setRequestedFields(ChangeField.CHANGE_SPEC, ChangeField.PATCH_SET_SPEC)
+              .byProjectCommit(project, parentCommitId);
+      if (changeData.size() > 1) {
+        logger.atWarning().log(
+            "Found more than one change associated with parent revision %s (project: %s). Found"
+                + " changes %s.",
+            parentCommitId.name(),
+            project.get(),
+            changeData.stream().map(ChangeData::getId).collect(ImmutableList.toImmutableList()));
+      }
+      singleDataOpt =
+          changeData.size() == 1 && changeData.get(0) != null && changeData.get(0).change() != null
+              ? Optional.of(changeData.get(0))
+              : Optional.empty();
+      parentChangeCache.put(projectCommitKey, singleDataOpt);
     }
-    if (changeData.size() != 1) {
+    if (singleDataOpt.isEmpty()) {
       return Optional.empty();
     }
-    ChangeData singleData = changeData.get(0);
+    ChangeData singleData = singleDataOpt.get();
     int patchSetNumber =
         singleData.patchSets().stream()
             .filter(p -> p.commitId().equals(parentCommitId))
diff --git a/java/com/google/gerrit/server/change/RebaseChangeOp.java b/java/com/google/gerrit/server/change/RebaseChangeOp.java
index 4716a8c..a5d75f6 100644
--- a/java/com/google/gerrit/server/change/RebaseChangeOp.java
+++ b/java/com/google/gerrit/server/change/RebaseChangeOp.java
@@ -498,23 +498,22 @@
         firstNonNull(Strings.emptyToNull(mergeStrategy), mergeUtil.mergeStrategyName());
 
     Merger merger = MergeUtil.newMerger(ctx.getInserter(), ctx.getRepoView().getConfig(), strategy);
-    if (merger instanceof ThreeWayMerger) {
-      ((ThreeWayMerger) merger).setBase(parentCommit);
+    if (merger instanceof ThreeWayMerger threeWayMerger) {
+      threeWayMerger.setBase(parentCommit);
     }
 
     DirCache dc = DirCache.newInCore();
-    if (merger instanceof ResolveMerger) {
+    if (merger instanceof ResolveMerger resolveMerger) {
       if (useGitattributesForMerge) {
         // We need to set the attributes provider before attempting the merge in order to read and
         // honor gitattributes merge settings correctly
-        ((ResolveMerger) merger)
-            .setAttributesNodeProvider(ctx.getRepoView().getAttributesNodeProvider());
+        resolveMerger.setAttributesNodeProvider(ctx.getRepoView().getAttributesNodeProvider());
       }
       if (allowConflicts) {
         // The DirCache must be set on ResolveMerger before calling
         // ResolveMerger#merge(AnyObjectId...) otherwise the entries in DirCache don't get
         // populated.
-        ((ResolveMerger) merger).setDirCache(dc);
+        resolveMerger.setDirCache(dc);
       }
     }
 
@@ -531,9 +530,9 @@
     } else {
       List<String> conflicts = ImmutableList.of();
       Map<String, ResolveMerger.MergeFailureReason> failed = ImmutableMap.of();
-      if (merger instanceof ResolveMerger) {
-        conflicts = ((ResolveMerger) merger).getUnmergedPaths();
-        failed = ((ResolveMerger) merger).getFailingPaths();
+      if (merger instanceof ResolveMerger resolveMerger) {
+        conflicts = resolveMerger.getUnmergedPaths();
+        failed = resolveMerger.getFailingPaths();
       }
 
       if (merger.getResultTreeId() != null) {
diff --git a/java/com/google/gerrit/server/change/RelatedChangesSorter.java b/java/com/google/gerrit/server/change/RelatedChangesSorter.java
index b95d592..d4d5bfd 100644
--- a/java/com/google/gerrit/server/change/RelatedChangesSorter.java
+++ b/java/com/google/gerrit/server/change/RelatedChangesSorter.java
@@ -301,10 +301,9 @@
 
     @Override
     public final boolean equals(Object obj) {
-      if (!(obj instanceof PatchSetData)) {
+      if (!(obj instanceof PatchSetData o)) {
         return false;
       }
-      PatchSetData o = (PatchSetData) obj;
       return Objects.equals(patchSet().id(), o.patchSet().id())
           && Objects.equals(commit(), o.commit());
     }
diff --git a/java/com/google/gerrit/server/change/ReviewerModifier.java b/java/com/google/gerrit/server/change/ReviewerModifier.java
index 1808ff5..851bfb3 100644
--- a/java/com/google/gerrit/server/change/ReviewerModifier.java
+++ b/java/com/google/gerrit/server/change/ReviewerModifier.java
@@ -248,7 +248,7 @@
   public ReviewerModification prepare(
       ChangeNotes notes, CurrentUser user, ReviewerInput input, boolean allowGroup)
       throws IOException, PermissionBackendException, ConfigInvalidException {
-    try (TraceContext.TraceTimer ignored =
+    try (TraceContext.TraceTimer _ =
         TraceContext.newTimer(getClass().getSimpleName() + "#prepare", Metadata.empty())) {
       if (Strings.nullToEmpty(input.reviewer).trim().isEmpty()) {
         return fail(input, FailureType.NOT_FOUND, "reviewer user identifier is required");
@@ -309,8 +309,8 @@
     boolean exactMatchFound = false;
     try {
       if (ReviewerState.REMOVED.equals(input.state)
-          || (input instanceof InternalReviewerInput
-              && ((InternalReviewerInput) input).skipVisibilityCheck)) {
+          || (input instanceof InternalReviewerInput internalInput
+              && internalInput.skipVisibilityCheck)) {
         reviewerUser =
             accountResolver.resolveIncludeInactiveIgnoreVisibility(input.reviewer).asUniqueUser();
       } else {
@@ -719,8 +719,7 @@
       for (ReviewerModification addition : modifications()) {
         addition.op.setPatchSet(patchSet);
 
-        @SuppressWarnings("unused")
-        var unused = addition.op.updateChange(ctx);
+        var _ = addition.op.updateChange(ctx);
       }
     }
 
diff --git a/java/com/google/gerrit/server/change/RevisionJson.java b/java/com/google/gerrit/server/change/RevisionJson.java
index 2d3f72a..6f97bea 100644
--- a/java/com/google/gerrit/server/change/RevisionJson.java
+++ b/java/com/google/gerrit/server/change/RevisionJson.java
@@ -86,9 +86,11 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Optional;
+import java.util.Set;
 import org.eclipse.jgit.attributes.AttributesNodeProvider;
 import org.eclipse.jgit.lib.ObjectId;
 import org.eclipse.jgit.lib.Ref;
@@ -283,19 +285,32 @@
           RevWalk rw = newRevWalk(repo)) {
         AttributesNodeProvider attributesNodeProvider =
             repo != null ? repo.createAttributesNodeProvider() : null;
+        if (has(PARENTS) && rw != null) {
+          try (Timer0.Context _ = metrics.parentDataLatency.start()) {
+            Set<ObjectId> parentCommitIds = new LinkedHashSet<>();
+            for (PatchSet in : map.values()) {
+              if (!isWanted(in.id(), cd, limitToPsId)) {
+                continue;
+              }
+              boolean isCurrent = in.id().equals(cd.change().currentPatchSetId());
+              boolean setCommit = has(ALL_COMMITS) || (isCurrent && has(CURRENT_COMMIT));
+              boolean addFooters = isCurrent && has(COMMIT_FOOTERS);
+              if (setCommit || addFooters) {
+                RevCommit commit = rw.parseCommit(in.commitId());
+                for (RevCommit parent : commit.getParents()) {
+                  parentCommitIds.add(parent.getId());
+                }
+              }
+            }
+            if (!parentCommitIds.isEmpty()) {
+              parentDataProvider.prefetch(cd.project(), parentCommitIds);
+            }
+          }
+        }
         boolean allPatchSetsLoaded = has(ALL_REVISIONS) || has(MESSAGES);
         PatchSet priorPs = null;
         for (PatchSet in : map.values()) {
-          PatchSet.Id id = in.id();
-          boolean want;
-          if (has(ALL_REVISIONS)) {
-            want = true;
-          } else if (limitToPsId.isPresent()) {
-            want = id.equals(limitToPsId.get());
-          } else {
-            want = id.equals(cd.change().currentPatchSetId());
-          }
-          if (want) {
+          if (isWanted(in.id(), cd, limitToPsId)) {
             res.put(
                 in.commitId().name(),
                 toRevisionInfo(
@@ -438,8 +453,7 @@
       checkState(rw != null);
       checkState(repo != null);
       Project.NameKey project = c.getProject();
-      String rev = in.commitId().name();
-      RevCommit commit = rw.parseCommit(ObjectId.fromString(rev));
+      RevCommit commit = rw.parseCommit(in.commitId());
       rw.parseBody(commit);
       // out.branch is unset for patch sets that have no per-patch-set branch and are not the last
       // patch set. Fall back to the change's destination branch in that case, as callers below
@@ -458,10 +472,19 @@
                 c.getId().get());
       }
       if (has(PARENTS)) {
-        try (Timer0.Context ignored = metrics.parentDataLatency.start()) {
-          List<ParentCommitData> parentData = new ArrayList<>();
-          for (RevCommit parent : commit.getParents()) {
-            ParentCommitData p = parentDataProvider.get(project, repo, parent.getId(), branchName);
+        try (Timer0.Context _ = metrics.parentDataLatency.start()) {
+          RevCommit[] parents = commit.getParents();
+          if (parents.length > 1) {
+            List<ObjectId> parentIds = new ArrayList<>(parents.length);
+            for (RevCommit parent : parents) {
+              parentIds.add(parent.getId());
+            }
+            parentDataProvider.prefetch(project, parentIds);
+          }
+          List<ParentCommitData> parentData = new ArrayList<>(parents.length);
+          for (RevCommit parent : parents) {
+            ParentCommitData p =
+                parentDataProvider.get(project, repo, rw, parent.getId(), branchName);
             parentData.add(p);
           }
           out.parentsData = getParentInfo(parentData);
@@ -515,6 +538,16 @@
     return options.contains(option);
   }
 
+  private boolean isWanted(PatchSet.Id id, ChangeData cd, Optional<PatchSet.Id> limitToPsId) {
+    if (has(ALL_REVISIONS)) {
+      return true;
+    }
+    if (limitToPsId.isPresent()) {
+      return id.equals(limitToPsId.get());
+    }
+    return id.equals(cd.change().currentPatchSetId());
+  }
+
   private boolean isWorldReadable(ChangeData cd) throws PermissionBackendException {
     if (!permissionBackend.user(anonymous).change(cd).test(ChangePermission.READ)) {
       return false;
diff --git a/java/com/google/gerrit/server/config/AdministrateServerGroupsProvider.java b/java/com/google/gerrit/server/config/AdministrateServerGroupsProvider.java
index 1551df7..3804544 100644
--- a/java/com/google/gerrit/server/config/AdministrateServerGroupsProvider.java
+++ b/java/com/google/gerrit/server/config/AdministrateServerGroupsProvider.java
@@ -54,8 +54,7 @@
       }
       groups = builder.build();
     } finally {
-      @SuppressWarnings("unused")
-      var unused = threadContext.setContext(ctx);
+      var _ = threadContext.setContext(ctx);
     }
   }
 
diff --git a/java/com/google/gerrit/server/config/GerritServerConfig.java b/java/com/google/gerrit/server/config/GerritServerConfig.java
index 484c1e9..02ed013 100644
--- a/java/com/google/gerrit/server/config/GerritServerConfig.java
+++ b/java/com/google/gerrit/server/config/GerritServerConfig.java
@@ -16,8 +16,8 @@
 
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
+import jakarta.inject.Qualifier;
 import java.lang.annotation.Retention;
-import javax.inject.Qualifier;
 
 /**
  * Marker on {@link org.eclipse.jgit.lib.Config} holding {@code gerrit.config} .
diff --git a/java/com/google/gerrit/server/config/GroupSetProvider.java b/java/com/google/gerrit/server/config/GroupSetProvider.java
index 1a7f14c..c25b2a1 100644
--- a/java/com/google/gerrit/server/config/GroupSetProvider.java
+++ b/java/com/google/gerrit/server/config/GroupSetProvider.java
@@ -51,8 +51,7 @@
       }
       groupIds = builder.build();
     } finally {
-      @SuppressWarnings("unused")
-      var unused = threadContext.setContext(ctx);
+      var _ = threadContext.setContext(ctx);
     }
   }
 
diff --git a/java/com/google/gerrit/server/config/ScheduleConfig.java b/java/com/google/gerrit/server/config/ScheduleConfig.java
index 77f648c..5b700b9 100644
--- a/java/com/google/gerrit/server/config/ScheduleConfig.java
+++ b/java/com/google/gerrit/server/config/ScheduleConfig.java
@@ -340,7 +340,7 @@
       try {
         DayOfWeek dayOfWeek = formatter.parse(start, DayOfWeek::from);
         startTime = startTime.with(dayOfWeek);
-      } catch (DateTimeParseException ignored) {
+      } catch (DateTimeParseException _) {
         // Day of week is an optional parameter.
       }
       startTime = startTime.truncatedTo(ChronoUnit.MINUTES);
diff --git a/java/com/google/gerrit/server/config/SitePaths.java b/java/com/google/gerrit/server/config/SitePaths.java
index cc9f8e0..b38678c 100644
--- a/java/com/google/gerrit/server/config/SitePaths.java
+++ b/java/com/google/gerrit/server/config/SitePaths.java
@@ -14,6 +14,7 @@
 
 package com.google.gerrit.server.config;
 
+import com.google.common.base.Strings;
 import com.google.common.collect.Iterables;
 import com.google.gerrit.common.Nullable;
 import com.google.inject.Inject;
@@ -23,6 +24,9 @@
 import java.nio.file.Files;
 import java.nio.file.NoSuchFileException;
 import java.nio.file.Path;
+import org.eclipse.jgit.errors.ConfigInvalidException;
+import org.eclipse.jgit.storage.file.FileBasedConfig;
+import org.eclipse.jgit.util.FS;
 
 /** Important paths within a {@link SitePath}. */
 @Singleton
@@ -44,6 +48,7 @@
   public final Path mail_dir;
   public final Path hooks_dir;
   public final Path static_dir;
+  public final Path index_dir;
 
   public final Path gerrit_sh;
   public final Path gerrit_service;
@@ -90,6 +95,7 @@
     mail_dir = etc_dir.resolve("mail");
     hooks_dir = p.resolve("hooks");
     static_dir = p.resolve("static");
+    index_dir = resolveIndexDir(p, etc_dir.resolve("gerrit.config"));
 
     gerrit_sh = bin_dir.resolve("gerrit.sh");
     gerrit_service = bin_dir.resolve("gerrit.service");
@@ -126,6 +132,28 @@
     this.isNew = isNew;
   }
 
+  private static Path resolveIndexDir(Path sitePath, Path gerritConfig) throws IOException {
+    if (!Files.exists(gerritConfig)) {
+      return sitePath.resolve("index");
+    }
+    FileBasedConfig cfg = new FileBasedConfig(gerritConfig.toFile(), FS.DETECTED);
+    try {
+      cfg.load();
+    } catch (ConfigInvalidException e) {
+      throw new IOException("Invalid config file " + gerritConfig, e);
+    }
+    String configured = cfg.getString("index", null, "directory");
+    if (!Strings.isNullOrEmpty(configured)) {
+      Path loc = sitePath.resolve(configured).normalize();
+      try {
+        return loc.toRealPath();
+      } catch (IOException e) {
+        return loc.toAbsolutePath();
+      }
+    }
+    return sitePath.resolve("index");
+  }
+
   /**
    * Resolve an absolute or relative path.
    *
diff --git a/java/com/google/gerrit/server/data/PatchSetCommentAttribute.java b/java/com/google/gerrit/server/data/PatchSetCommentAttribute.java
index d004e6c..1309310 100644
--- a/java/com/google/gerrit/server/data/PatchSetCommentAttribute.java
+++ b/java/com/google/gerrit/server/data/PatchSetCommentAttribute.java
@@ -15,6 +15,7 @@
 package com.google.gerrit.server.data;
 
 public class PatchSetCommentAttribute {
+  public String id;
   public String file;
   public Integer line;
   public AccountAttribute reviewer;
diff --git a/java/com/google/gerrit/server/documentation/MarkdownFormatter.java b/java/com/google/gerrit/server/documentation/MarkdownFormatter.java
index dc52f87..6733097 100644
--- a/java/com/google/gerrit/server/documentation/MarkdownFormatter.java
+++ b/java/com/google/gerrit/server/documentation/MarkdownFormatter.java
@@ -128,8 +128,7 @@
 
   @Nullable
   private String findTitle(Node root) {
-    if (root instanceof Heading) {
-      Heading h = (Heading) root;
+    if (root instanceof Heading h) {
       if (h.getLevel() == 1 && h.hasChildren()) {
         TextCollectingVisitor collectingVisitor = new TextCollectingVisitor();
         return collectingVisitor.collectAndGetText(h);
diff --git a/java/com/google/gerrit/server/documentation/MarkdownFormatterHeader.java b/java/com/google/gerrit/server/documentation/MarkdownFormatterHeader.java
index 04d2e5b..f408547 100644
--- a/java/com/google/gerrit/server/documentation/MarkdownFormatterHeader.java
+++ b/java/com/google/gerrit/server/documentation/MarkdownFormatterHeader.java
@@ -66,7 +66,7 @@
     void render(final AnchorLink node, final NodeRendererContext context) {
       Node parent = node.getParent();
 
-      if (parent instanceof Heading && ((Heading) parent).getLevel() == 1) {
+      if (parent instanceof Heading heading && heading.getLevel() == 1) {
         // render without anchor link
         context.renderChildren(node);
       } else {
diff --git a/java/com/google/gerrit/server/edit/ChangeEditModifier.java b/java/com/google/gerrit/server/edit/ChangeEditModifier.java
index ad271b6..7a843b6 100644
--- a/java/com/google/gerrit/server/edit/ChangeEditModifier.java
+++ b/java/com/google/gerrit/server/edit/ChangeEditModifier.java
@@ -634,11 +634,11 @@
       merger.setBase(basePatchSetCommitId);
 
       DirCache dc = DirCache.newInCore();
-      if (allowConflicts && merger instanceof ResolveMerger) {
+      if (allowConflicts && merger instanceof ResolveMerger resolveMerger) {
         // The DirCache must be set on ResolveMerger before calling
         // ResolveMerger#merge(AnyObjectId...) otherwise the entries in DirCache don't get
         // populated.
-        ((ResolveMerger) merger).setDirCache(dc);
+        resolveMerger.setDirCache(dc);
       }
 
       boolean successful = merger.merge(basePatchSetCommit, editCommitId);
@@ -650,8 +650,8 @@
         filesWithGitConflicts = null;
       } else {
         List<String> conflicts = ImmutableList.of();
-        if (merger instanceof ResolveMerger) {
-          conflicts = ((ResolveMerger) merger).getUnmergedPaths();
+        if (merger instanceof ResolveMerger resolveMerger) {
+          conflicts = resolveMerger.getUnmergedPaths();
         }
 
         if (!allowConflicts || !(merger instanceof ResolveMerger)) {
diff --git a/java/com/google/gerrit/server/edit/tree/ChangeFileContentModification.java b/java/com/google/gerrit/server/edit/tree/ChangeFileContentModification.java
index f4e1598..be41045 100644
--- a/java/com/google/gerrit/server/edit/tree/ChangeFileContentModification.java
+++ b/java/com/google/gerrit/server/edit/tree/ChangeFileContentModification.java
@@ -64,7 +64,19 @@
   public List<DirCacheEditor.PathEdit> getPathEdits(
       Repository repository, ObjectId treeId, ImmutableList<? extends ObjectId> parents) {
     DirCacheEditor.PathEdit changeContentEdit =
-        new ChangeContent(filePath, newContent, repository, newGitFileMode);
+        new ChangeContent(
+            filePath, newContent, repository, /* objectInserter= */ null, newGitFileMode);
+    return Collections.singletonList(changeContentEdit);
+  }
+
+  @Override
+  public List<DirCacheEditor.PathEdit> getPathEdits(
+      Repository repository,
+      ObjectInserter objectInserter,
+      ObjectId treeId,
+      ImmutableList<? extends ObjectId> parents) {
+    DirCacheEditor.PathEdit changeContentEdit =
+        new ChangeContent(filePath, newContent, repository, objectInserter, newGitFileMode);
     return Collections.singletonList(changeContentEdit);
   }
 
@@ -82,17 +94,20 @@
     private final String filePath;
     private final RawInput newContent;
     private final Repository repository;
+    private final @Nullable ObjectInserter objectInserter;
     private final Integer newGitFileMode;
 
     ChangeContent(
         String filePath,
         RawInput newContent,
         Repository repository,
+        @Nullable ObjectInserter objectInserter,
         @Nullable Integer newGitFileMode) {
       super(filePath);
       this.filePath = filePath;
       this.newContent = newContent;
       this.repository = repository;
+      this.objectInserter = objectInserter;
       this.newGitFileMode = newGitFileMode;
     }
 
@@ -141,21 +156,24 @@
     }
 
     private ObjectId createNewBlobAndGetItsId() throws IOException {
-      try (ObjectInserter objectInserter = repository.newObjectInserter()) {
-        ObjectId blobObjectId = createNewBlobAndGetItsId(objectInserter);
-        objectInserter.flush();
+      if (objectInserter != null) {
+        return createNewBlobAndGetItsId(objectInserter);
+      }
+      try (ObjectInserter inserter = repository.newObjectInserter()) {
+        ObjectId blobObjectId = createNewBlobAndGetItsId(inserter);
+        inserter.flush();
         return blobObjectId;
       }
     }
 
-    private ObjectId createNewBlobAndGetItsId(ObjectInserter objectInserter) throws IOException {
+    private ObjectId createNewBlobAndGetItsId(ObjectInserter inserter) throws IOException {
       long contentLength = newContent.getContentLength();
       if (contentLength < 0) {
-        return objectInserter.insert(OBJ_BLOB, getNewContentBytes());
+        return inserter.insert(OBJ_BLOB, getNewContentBytes());
       }
       try {
         InputStream contentInputStream = newContent.getInputStream();
-        return objectInserter.insert(OBJ_BLOB, contentLength, contentInputStream);
+        return inserter.insert(OBJ_BLOB, contentLength, contentInputStream);
       } catch (EOFException e) {
         if (e.getMessage().equals(JGitText.get().shortReadOfBlock)) {
           throw new BadContentLengthException(
diff --git a/java/com/google/gerrit/server/edit/tree/TreeCreator.java b/java/com/google/gerrit/server/edit/tree/TreeCreator.java
index ae80fe4..314b9dd 100644
--- a/java/com/google/gerrit/server/edit/tree/TreeCreator.java
+++ b/java/com/google/gerrit/server/edit/tree/TreeCreator.java
@@ -113,8 +113,15 @@
    */
   public ObjectId createNewTreeAndGetId(Repository repository) throws IOException {
     ensureTreeModificationsDoNotTouchSameFiles();
-    DirCache newTree = createNewTree(repository);
-    return writeAndGetId(repository, newTree);
+    ObjectInserter oi = objectInserter.orElseGet(() -> repository.newObjectInserter());
+    try {
+      DirCache newTree = createNewTree(repository, oi);
+      return writeAndGetId(oi, newTree);
+    } finally {
+      if (objectInserter.isEmpty()) {
+        oi.close();
+      }
+    }
   }
 
   private void ensureTreeModificationsDoNotTouchSameFiles() {
@@ -139,9 +146,9 @@
     }
   }
 
-  private DirCache createNewTree(Repository repository) throws IOException {
+  private DirCache createNewTree(Repository repository, ObjectInserter oi) throws IOException {
     DirCache newTree = readBaseTree(repository);
-    List<DirCacheEditor.PathEdit> pathEdits = getPathEdits(repository);
+    List<DirCacheEditor.PathEdit> pathEdits = getPathEdits(repository, oi);
     applyPathEdits(newTree, pathEdits);
     return newTree;
   }
@@ -166,26 +173,21 @@
     }
   }
 
-  private List<DirCacheEditor.PathEdit> getPathEdits(Repository repository) throws IOException {
+  private List<DirCacheEditor.PathEdit> getPathEdits(Repository repository, ObjectInserter oi)
+      throws IOException {
     List<DirCacheEditor.PathEdit> pathEdits = new ArrayList<>();
     for (TreeModification treeModification : treeModifications) {
       pathEdits.addAll(
-          treeModification.getPathEdits(repository, baseTreeId, ImmutableList.copyOf(baseParents)));
+          treeModification.getPathEdits(
+              repository, oi, baseTreeId, ImmutableList.copyOf(baseParents)));
     }
     return pathEdits;
   }
 
-  private ObjectId writeAndGetId(Repository repository, DirCache tree) throws IOException {
-    ObjectInserter oi = objectInserter.orElseGet(() -> repository.newObjectInserter());
-    try {
-      ObjectId treeId = tree.writeTree(oi);
-      oi.flush();
-      return treeId;
-    } finally {
-      if (objectInserter.isEmpty()) {
-        oi.close();
-      }
-    }
+  private static ObjectId writeAndGetId(ObjectInserter oi, DirCache tree) throws IOException {
+    ObjectId treeId = tree.writeTree(oi);
+    oi.flush();
+    return treeId;
   }
 
   private static void applyPathEdits(DirCache tree, List<DirCacheEditor.PathEdit> pathEdits) {
diff --git a/java/com/google/gerrit/server/edit/tree/TreeModification.java b/java/com/google/gerrit/server/edit/tree/TreeModification.java
index ba301fc..e376361 100644
--- a/java/com/google/gerrit/server/edit/tree/TreeModification.java
+++ b/java/com/google/gerrit/server/edit/tree/TreeModification.java
@@ -20,6 +20,7 @@
 import java.util.List;
 import org.eclipse.jgit.dircache.DirCacheEditor;
 import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.ObjectInserter;
 import org.eclipse.jgit.lib.Repository;
 
 /** A specific modification of a Git tree. */
@@ -42,6 +43,33 @@
       throws IOException;
 
   /**
+   * Returns a list of {@code PathEdit}s which are necessary in order to achieve the desired
+   * modification of the Git tree. The order of the {@code PathEdit}s can be crucial and hence
+   * shouldn't be changed.
+   *
+   * <p>The default implementation delegates to {@link #getPathEdits(Repository, ObjectId,
+   * ImmutableList)}. Implementations that create new Git objects should override this method to
+   * insert them into the provided {@link ObjectInserter} rather than creating and flushing a
+   * separate inserter.
+   *
+   * @param repository the affected Git repository
+   * @param objectInserter the {@code ObjectInserter} to use for inserting new Git objects
+   * @param treeId tree to which the modification is applied. A value of {@code ObjectId.zero()}
+   *     indicates an empty tree.
+   * @param parents parent commits of the commit to whose tree this modification is applied
+   * @return an ordered list of necessary {@code PathEdit}s
+   * @throws IOException if problems arise when accessing the repository
+   */
+  default List<DirCacheEditor.PathEdit> getPathEdits(
+      Repository repository,
+      ObjectInserter objectInserter,
+      ObjectId treeId,
+      ImmutableList<? extends ObjectId> parents)
+      throws IOException {
+    return getPathEdits(repository, treeId, parents);
+  }
+
+  /**
    * Indicates all file paths affected by this {@code TreeModification}. If the modification refers
    * to several file paths (e.g. renaming a file), all of them must be returned.
    *
diff --git a/java/com/google/gerrit/server/events/EventBroker.java b/java/com/google/gerrit/server/events/EventBroker.java
index 2edc642..73543cd 100644
--- a/java/com/google/gerrit/server/events/EventBroker.java
+++ b/java/com/google/gerrit/server/events/EventBroker.java
@@ -208,8 +208,7 @@
   }
 
   protected boolean isVisibleTo(Event event, CurrentUser user) throws PermissionBackendException {
-    if (event instanceof RefEvent) {
-      RefEvent refEvent = (RefEvent) event;
+    if (event instanceof RefEvent refEvent) {
       String ref = refEvent.getRefName();
       if (PatchSet.isChangeRef(ref)) {
         Change.Id cid = PatchSet.Id.fromRef(ref).changeId();
@@ -222,8 +221,8 @@
         }
       }
       return isVisibleTo(refEvent.getBranchNameKey(), user);
-    } else if (event instanceof ProjectEvent) {
-      return isVisibleTo(((ProjectEvent) event).getProjectNameKey(), user);
+    } else if (event instanceof ProjectEvent projectEvent) {
+      return isVisibleTo(projectEvent.getProjectNameKey(), user);
     }
     return true;
   }
diff --git a/java/com/google/gerrit/server/events/EventFactory.java b/java/com/google/gerrit/server/events/EventFactory.java
index fd571fc..b268233 100644
--- a/java/com/google/gerrit/server/events/EventFactory.java
+++ b/java/com/google/gerrit/server/events/EventFactory.java
@@ -36,6 +36,7 @@
 import com.google.gerrit.entities.UserIdentity;
 import com.google.gerrit.exceptions.StorageException;
 import com.google.gerrit.extensions.registration.DynamicItem;
+import com.google.gerrit.extensions.restapi.Url;
 import com.google.gerrit.index.IndexConfig;
 import com.google.gerrit.server.GerritPersonIdent;
 import com.google.gerrit.server.account.AccountAttributeLoader;
@@ -598,6 +599,7 @@
   public PatchSetCommentAttribute asPatchSetLineAttribute(
       HumanComment c, AccountAttributeLoader accountLoader) {
     PatchSetCommentAttribute a = new PatchSetCommentAttribute();
+    a.id = Url.encode(c.key.uuid);
     a.reviewer = asAccountAttribute(c.author.getId(), accountLoader);
     a.file = c.key.filename;
     a.line = c.lineNbr;
diff --git a/java/com/google/gerrit/server/events/ProjectCreatedEvent.java b/java/com/google/gerrit/server/events/ProjectCreatedEvent.java
index d092b39..1c2ed4b 100644
--- a/java/com/google/gerrit/server/events/ProjectCreatedEvent.java
+++ b/java/com/google/gerrit/server/events/ProjectCreatedEvent.java
@@ -14,6 +14,7 @@
 
 package com.google.gerrit.server.events;
 
+import com.google.gerrit.common.Nullable;
 import com.google.gerrit.entities.Project;
 
 public class ProjectCreatedEvent extends ProjectEvent {
@@ -21,6 +22,9 @@
   public String projectName;
   public String headName;
 
+  /** Repository Git configuration in Git config file format. */
+  @Nullable public String gitConfig;
+
   public ProjectCreatedEvent() {
     super(TYPE);
   }
diff --git a/java/com/google/gerrit/server/events/ReviewerAddedEvent.java b/java/com/google/gerrit/server/events/ReviewerAddedEvent.java
index 5d2b7a5..516af9a 100644
--- a/java/com/google/gerrit/server/events/ReviewerAddedEvent.java
+++ b/java/com/google/gerrit/server/events/ReviewerAddedEvent.java
@@ -19,7 +19,7 @@
 import com.google.gerrit.server.data.AccountAttribute;
 
 public class ReviewerAddedEvent extends PatchSetEvent {
-  static final String TYPE = "reviewer-added";
+  public static final String TYPE = "reviewer-added";
   public Supplier<AccountAttribute> reviewer;
   public Supplier<AccountAttribute> adder;
 
diff --git a/java/com/google/gerrit/server/events/StreamEventsApiListener.java b/java/com/google/gerrit/server/events/StreamEventsApiListener.java
index 07ec120..228ea84 100644
--- a/java/com/google/gerrit/server/events/StreamEventsApiListener.java
+++ b/java/com/google/gerrit/server/events/StreamEventsApiListener.java
@@ -356,7 +356,7 @@
         event.patchSet = patchSetAttrs;
         event.adder = adderAccountAttrs;
         event.reviewer = accountAttributeSupplier(reviewer);
-        dispatcher.run(d -> d.postEvent(event));
+        dispatcher.run(d -> d.postEvent(change, event));
       }
     } catch (StorageException e) {
       logger.atSevere().withCause(e).log("Failed to dispatch event");
@@ -374,6 +374,7 @@
     ProjectCreatedEvent event = new ProjectCreatedEvent();
     event.projectName = ev.getProjectName();
     event.headName = ev.getHeadName();
+    event.gitConfig = ev.getGitConfig();
 
     dispatcher.run(d -> d.postEvent(event.getProjectNameKey(), event));
   }
diff --git a/java/com/google/gerrit/server/experiments/ExperimentFeaturesConstants.java b/java/com/google/gerrit/server/experiments/ExperimentFeaturesConstants.java
index 30c0ffe..4af476e 100644
--- a/java/com/google/gerrit/server/experiments/ExperimentFeaturesConstants.java
+++ b/java/com/google/gerrit/server/experiments/ExperimentFeaturesConstants.java
@@ -19,10 +19,6 @@
 /** Constants for Gerrit {@link ExperimentFeatures} */
 public class ExperimentFeaturesConstants {
 
-  /** Features that are known experiments and can be referenced in the code. */
-  public static String GERRIT_BACKEND_FEATURE_ATTACH_NONCE_TO_DOCUMENTATION =
-      "GerritBackendFeature__attach_nonce_to_documentation";
-
   /** Features, enabled by default in the current release. */
   public static final ImmutableSet<String> DEFAULT_ENABLED_FEATURES = ImmutableSet.of();
 
@@ -45,4 +41,13 @@
   /** Whether we restrict the creation of branch permissions. */
   public static final String GERRIT_BACKEND_FEATURE_RESTRICT_BRANCH_PERMISSIONS =
       "GerritBackendFeature__restrict_branch_permissions";
+
+  /**
+   * Whether registered users may use AI Review even when no explicit {@code aiReview} rule is
+   * configured. Lets sites enable the feature before adding the permission to {@code
+   * project.config}. Like all experiments, it is read at startup, so toggling it requires a server
+   * restart.
+   */
+  public static final String ALLOW_AI_REVIEW_FOR_REGISTERED_USERS =
+      "GerritBackendFeature__allow_ai_review_for_registered_users";
 }
diff --git a/java/com/google/gerrit/server/extensions/webui/UiActions.java b/java/com/google/gerrit/server/extensions/webui/UiActions.java
index 34c3c20..10f32c5 100644
--- a/java/com/google/gerrit/server/extensions/webui/UiActions.java
+++ b/java/com/google/gerrit/server/extensions/webui/UiActions.java
@@ -105,7 +105,7 @@
   static void evaluatePermissionBackendConditions(
       PermissionBackend perm, List<PermissionBackendCondition> conds) {
     Map<PermissionBackendCondition, PermissionBackendCondition> dedupedConds =
-        new HashMap<>(conds.size());
+        HashMap.newHashMap(conds.size());
     for (PermissionBackendCondition cond : conds) {
       dedupedConds.put(cond, cond);
     }
@@ -146,7 +146,7 @@
 
     String name = e.getExportName().substring(d + 1);
     UiAction.Description dsc = null;
-    try (Timer1.Context<String> ignored = uiActionLatency.start(name)) {
+    try (Timer1.Context<String> _ = uiActionLatency.start(name)) {
       dsc = ((UiAction<R>) view).getDescription(resource);
     } catch (Exception ex) {
       logger.atSevere().withCause(ex).log("Unable to render UIAction. Will omit from actions");
diff --git a/java/com/google/gerrit/server/git/ChangesByProjectCacheImpl.java b/java/com/google/gerrit/server/git/ChangesByProjectCacheImpl.java
index c0ca50b..17d776d 100644
--- a/java/com/google/gerrit/server/git/ChangesByProjectCacheImpl.java
+++ b/java/com/google/gerrit/server/git/ChangesByProjectCacheImpl.java
@@ -251,7 +251,7 @@
 
     public Map<Change.Id, ChangeData> getChangeDataByChange(
         Project.NameKey project, ChangeData.Factory cdFactory) {
-      Map<Change.Id, ChangeData> cdByChange = new HashMap<>(privateChangeById.size());
+      Map<Change.Id, ChangeData> cdByChange = HashMap.newHashMap(privateChangeById.size());
       for (PrivateChange pc : privateChangeById.values()) {
         try {
           ChangeData cd = cdFactory.create(pc.change());
diff --git a/java/com/google/gerrit/server/git/CodeReviewCommit.java b/java/com/google/gerrit/server/git/CodeReviewCommit.java
index 9c05763..2074863 100644
--- a/java/com/google/gerrit/server/git/CodeReviewCommit.java
+++ b/java/com/google/gerrit/server/git/CodeReviewCommit.java
@@ -77,8 +77,8 @@
     }
 
     @Override
-    protected CodeReviewCommit createCommit(AnyObjectId id) {
-      return new CodeReviewCommit(id);
+    protected CodeReviewCommit createCommit(AnyObjectId id, int graphPos) {
+      return new CodeReviewCommit(id, graphPos);
     }
 
     @Override
@@ -153,6 +153,10 @@
     super(id);
   }
 
+  private CodeReviewCommit(AnyObjectId id, int graphPosition) {
+    super(id, graphPosition);
+  }
+
   public ChangeNotes notes() {
     return notes;
   }
diff --git a/java/com/google/gerrit/server/git/GitModule.java b/java/com/google/gerrit/server/git/GitModule.java
index 0aa0239..c84a281 100644
--- a/java/com/google/gerrit/server/git/GitModule.java
+++ b/java/com/google/gerrit/server/git/GitModule.java
@@ -24,7 +24,6 @@
 public class GitModule extends LifecycleModule {
   @Override
   protected void configure() {
-    install(new AllUsersRepositoryProvider.Module());
     factory(MetaDataUpdate.InternalFactory.class);
     bind(MetaDataUpdate.Server.class);
     DynamicSet.bind(binder(), PostUploadHook.class).to(UploadPackMetricsHook.class);
diff --git a/java/com/google/gerrit/server/git/GitRepositoryManager.java b/java/com/google/gerrit/server/git/GitRepositoryManager.java
index e61540a..2a32500 100644
--- a/java/com/google/gerrit/server/git/GitRepositoryManager.java
+++ b/java/com/google/gerrit/server/git/GitRepositoryManager.java
@@ -15,11 +15,13 @@
 package com.google.gerrit.server.git;
 
 import com.google.gerrit.entities.Project;
+import com.google.gerrit.extensions.client.RefStorage;
 import com.google.inject.ImplementedBy;
 import com.google.inject.Singleton;
 import java.io.IOException;
 import java.util.NavigableSet;
 import org.eclipse.jgit.errors.RepositoryNotFoundException;
+import org.eclipse.jgit.lib.RefStorageFormat;
 import org.eclipse.jgit.lib.Repository;
 
 /**
@@ -73,6 +75,33 @@
   Repository createRepository(Project.NameKey name)
       throws RepositoryNotFoundException, RepositoryExistsException, IOException;
 
+  /**
+   * Create (and open) a repository with the given ref storage format.
+   *
+   * <p>The default implementation supports only the existing files-backed creation path.
+   * Implementations supporting reftable must override this method to honor the requested format;
+   * accepting it here would silently create a repository in an unsupported format instead.
+   *
+   * @param name name of the repository to be created.
+   * @param refStorage ref storage format, or {@code null} for the default. Only honored when
+   *     creating a new repository.
+   * @return the newly created Repository instance. Caller must call {@code close()} when done.
+   * @throws RepositoryExistsException repository exists.
+   * @throws RepositoryCaseMismatchException the name collides with an existing name.
+   * @throws RepositoryNotFoundException the name is invalid.
+   * @throws RefStorageNotSupportedException the requested format is not supported by this
+   *     repository manager.
+   * @throws IOException the repository cannot be created.
+   */
+  default Repository createRepository(Project.NameKey name, RefStorage refStorage)
+      throws RepositoryNotFoundException, RepositoryExistsException, IOException {
+    if (refStorage != null && refStorage != RefStorage.FILES) {
+      throw new RefStorageNotSupportedException(
+          "Ref storage format " + refStorage + " is not supported by this repository manager");
+    }
+    return createRepository(name);
+  }
+
   /** Returns set of all known projects, sorted by natural NameKey order. */
   NavigableSet<Project.NameKey> list();
 
@@ -91,4 +120,22 @@
    * @param name – the repository name, relative to the base directory.
    */
   default void repositoryDeleted(Project.NameKey name) {}
+
+  /**
+   * Convert a repository's reference storage and invalidate its cached state.
+   *
+   * @param name repository to convert.
+   * @param format requested ref storage format.
+   * @param writeLogs whether to retain reflogs in the converted storage.
+   * @param backup whether to keep the previous storage as a backup.
+   * @return {@code true} if converted, or {@code false} if already in the requested format.
+   * @throws RefStorageNotSupportedException this manager does not support conversion.
+   * @throws IOException the repository cannot be opened or converted.
+   */
+  default boolean convertRefStorage(
+      Project.NameKey name, RefStorageFormat format, boolean writeLogs, boolean backup)
+      throws IOException {
+    throw new RefStorageNotSupportedException(
+        "Ref storage conversion is not supported by this repository manager");
+  }
 }
diff --git a/java/com/google/gerrit/server/git/LocalDiskRepositoryManager.java b/java/com/google/gerrit/server/git/LocalDiskRepositoryManager.java
index f6c4bf2..e372ff6 100644
--- a/java/com/google/gerrit/server/git/LocalDiskRepositoryManager.java
+++ b/java/com/google/gerrit/server/git/LocalDiskRepositoryManager.java
@@ -18,6 +18,7 @@
 import com.google.gerrit.entities.Project;
 import com.google.gerrit.entities.Project.NameKey;
 import com.google.gerrit.entities.RefNames;
+import com.google.gerrit.extensions.client.RefStorage;
 import com.google.gerrit.extensions.events.LifecycleListener;
 import com.google.gerrit.lifecycle.LifecycleModule;
 import com.google.gerrit.server.cache.PerThreadRefDbCache;
@@ -39,15 +40,20 @@
 import java.util.NavigableSet;
 import java.util.TreeSet;
 import java.util.concurrent.ConcurrentHashMap;
+import org.eclipse.jgit.errors.ConfigInvalidException;
 import org.eclipse.jgit.errors.RepositoryNotFoundException;
+import org.eclipse.jgit.internal.storage.file.FileRepository;
 import org.eclipse.jgit.lib.Config;
 import org.eclipse.jgit.lib.ConfigConstants;
 import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.lib.RefStorageFormat;
 import org.eclipse.jgit.lib.Repository;
 import org.eclipse.jgit.lib.RepositoryCache;
 import org.eclipse.jgit.lib.RepositoryCache.FileKey;
 import org.eclipse.jgit.lib.RepositoryCacheConfig;
 import org.eclipse.jgit.lib.StoredConfig;
+import org.eclipse.jgit.storage.file.FileBasedConfig;
+import org.eclipse.jgit.storage.file.FileRepositoryBuilder;
 import org.eclipse.jgit.storage.file.WindowCacheConfig;
 import org.eclipse.jgit.util.FS;
 
@@ -113,6 +119,8 @@
 
   private final Path basePath;
   private final Map<Project.NameKey, FileKey> fileKeyByProject = new ConcurrentHashMap<>();
+  // Keep the config snapshot so external format changes are detected before using cached keys.
+  private final Map<Project.NameKey, FileBasedConfig> reftableByProject = new ConcurrentHashMap<>();
   private final boolean usePerRequestRefCache;
   private final boolean useFileKeyByProjectCache;
 
@@ -161,26 +169,30 @@
 
   @Override
   public Repository openRepository(Project.NameKey name) throws RepositoryNotFoundException {
-    FileKey cachedLocation = useFileKeyByProjectCache ? fileKeyByProject.get(name) : null;
-    if (cachedLocation != null) {
-      try {
-        return RepositoryCache.open(cachedLocation);
-      } catch (IOException e) {
-        fileKeyByProject.remove(name, cachedLocation);
-      }
-    }
-
     if (isUnreasonableName(name)) {
       throw new RepositoryNotFoundException("Invalid name: " + name);
     }
-    FileKey location =
-        usePerRequestRefCache
-            ? DynamicRefDbRepository.FileKey.lenient(
-                getBasePath(name).resolve(name.get()).toFile(),
-                FS.DETECTED,
-                (path, refDb) -> PerThreadRefDbCache.getRefDatabase(path, refDb))
-            : FileKey.lenient(getBasePath(name).resolve(name.get()).toFile(), FS.DETECTED);
     try {
+      // Refresh the config before the cached-key fast path: a repository may have been
+      // converted by another process without notifying this manager.
+      boolean reftable = usesReftable(name);
+      FileKey cachedLocation = useFileKeyByProjectCache ? fileKeyByProject.get(name) : null;
+      if (cachedLocation != null) {
+        try {
+          return RepositoryCache.open(cachedLocation);
+        } catch (IOException e) {
+          fileKeyByProject.remove(name, cachedLocation);
+        }
+      }
+
+      boolean snapshot = usePerRequestRefCache && !reftable;
+      FileKey location =
+          snapshot
+              ? DynamicRefDbRepository.FileKey.lenient(
+                  getBasePath(name).resolve(name.get()).toFile(),
+                  FS.DETECTED,
+                  (path, refDb) -> PerThreadRefDbCache.getRefDatabase(path, refDb))
+              : FileKey.lenient(getBasePath(name).resolve(name.get()).toFile(), FS.DETECTED);
       Repository repo = RepositoryCache.open(location);
       if (useFileKeyByProjectCache) {
         fileKeyByProject.put(name, location);
@@ -191,9 +203,67 @@
     }
   }
 
+  private boolean usesReftable(Project.NameKey name) throws IOException {
+    FileBasedConfig config = reftableByProject.get(name);
+    if (config == null) {
+      File dir = FileKey.resolve(getBasePath(name).resolve(name.get()).toFile(), FS.DETECTED);
+      if (dir == null) {
+        throw new RepositoryNotFoundException(name.get());
+      }
+      FileBasedConfig loaded = new FileBasedConfig(new File(dir, Constants.CONFIG), FS.DETECTED);
+      loadRepositoryConfig(loaded);
+      FileBasedConfig existing = reftableByProject.putIfAbsent(name, loaded);
+      config = existing != null ? existing : loaded;
+    }
+    synchronized (config) {
+      boolean reftable = isReftable(config);
+      // Detect ref storage conversions performed outside this repository manager.
+      if (config.isOutdated()) {
+        loadRepositoryConfig(config);
+        if (reftable != isReftable(config)) {
+          evictRepository(name, config.getFile().getParentFile());
+        }
+      }
+      return isReftable(config);
+    }
+  }
+
+  private static void loadRepositoryConfig(FileBasedConfig config) throws IOException {
+    try {
+      config.load();
+    } catch (ConfigInvalidException e) {
+      throw new IOException("Invalid repository config " + config.getFile(), e);
+    }
+  }
+
+  private void evictRepository(Project.NameKey name, File directory) {
+    fileKeyByProject.remove(name);
+    RepositoryCache.unregister(FileKey.exact(directory, FS.DETECTED));
+  }
+
+  /**
+   * Returns whether a repository config selects the reftable backend.
+   *
+   * @param repoConfig repository config to inspect.
+   * @return {@code true} when {@code extensions.refStorage} is {@code reftable}.
+   */
+  static boolean isReftable(Config repoConfig) {
+    return ConfigConstants.CONFIG_REF_STORAGE_REFTABLE.equalsIgnoreCase(
+        repoConfig.getString(
+            ConfigConstants.CONFIG_EXTENSIONS_SECTION,
+            null,
+            ConfigConstants.CONFIG_KEY_REF_STORAGE));
+  }
+
   @Override
   public Repository createRepository(Project.NameKey name)
       throws RepositoryNotFoundException, RepositoryExistsException, IOException {
+    return createRepository(name, null);
+  }
+
+  @Override
+  public Repository createRepository(Project.NameKey name, RefStorage refStorage)
+      throws RepositoryNotFoundException, RepositoryExistsException, IOException {
     if (isUnreasonableName(name)) {
       throw new RepositoryNotFoundException("Invalid name: " + name);
     }
@@ -215,11 +285,32 @@
     // of the repository name, so prefer the standard bare name.
     //
     String n = name.get() + Constants.DOT_GIT_EXT;
-    FileKey loc = FileKey.exact(path.resolve(n).toFile(), FS.DETECTED);
+    File gitDir = path.resolve(n).toFile();
 
+    Repository db;
     try {
-      Repository db = RepositoryCache.open(loc, false);
+      if (refStorage != null) {
+        // Select the requested backend explicitly, without mutating global
+        // configuration (which would race under concurrent creation).
+        db =
+            new FileRepositoryBuilder()
+                .setGitDir(gitDir)
+                .setRefStorageFormat(
+                    refStorage == RefStorage.REFTABLE
+                        ? RefStorageFormat.REFTABLE
+                        : RefStorageFormat.FILES)
+                .build();
+      } else {
+        db = RepositoryCache.open(FileKey.exact(gitDir, FS.DETECTED), false);
+      }
       db.create(true /* bare */);
+      if (refStorage != null) {
+        // The repository was created outside the RepositoryCache (via the
+        // builder, to select the backend). Register it so project initialization
+        // (refs/meta/config, the initial empty commit) operates on a single shared
+        // instance instead of a stale second one, which would fail with a lock error.
+        RepositoryCache.register(db);
+      }
 
       StoredConfig config = db.getConfig();
       config.setBoolean(
@@ -229,13 +320,15 @@
           true);
       config.save();
 
-      // JGit only writes to the reflog for refs/meta/config if the log file
-      // already exists.
-      //
-      File metaConfigLog = new File(db.getDirectory(), "logs/" + RefNames.REFS_CONFIG);
-      if (!metaConfigLog.getParentFile().mkdirs() || !metaConfigLog.createNewFile()) {
-        logger.atSevere().log(
-            "Failed to create ref log for %s in repository %s", RefNames.REFS_CONFIG, name);
+      if (!isReftable(config)) {
+        // JGit only writes to the reflog for refs/meta/config if the log file
+        // already exists. Reftable stores reflogs in the reftable itself, so
+        // this loose-reflog precreation is RefDirectory-specific.
+        File metaConfigLog = new File(db.getDirectory(), "logs/" + RefNames.REFS_CONFIG);
+        if (!metaConfigLog.getParentFile().mkdirs() || !metaConfigLog.createNewFile()) {
+          logger.atSevere().log(
+              "Failed to create ref log for %s in repository %s", RefNames.REFS_CONFIG, name);
+        }
       }
 
       return db;
@@ -284,11 +377,43 @@
 
   @Override
   public void repositoryDeleted(NameKey name) {
+    reftableByProject.remove(name);
     if (useFileKeyByProjectCache) {
       fileKeyByProject.remove(name);
     }
   }
 
+  @Override
+  public boolean convertRefStorage(
+      Project.NameKey name, RefStorageFormat format, boolean writeLogs, boolean backup)
+      throws IOException {
+    try (Repository repo = openRepository(name)) {
+      Repository real = repo;
+      while (real instanceof DelegateRepository delegate) {
+        real = delegate.delegate();
+      }
+      if (!(real instanceof FileRepository local)) {
+        throw new RefStorageNotSupportedException(
+            "Ref storage can only be converted for a local repository");
+      }
+      if (isReftable(local.getConfig()) == (format == RefStorageFormat.REFTABLE)) {
+        return false;
+      }
+      try {
+        if (repo instanceof DelegateRepository delegate) {
+          delegate.convertRefStorage(format.toConfigValue(), writeLogs, backup);
+        } else {
+          local.convertRefStorage(format, writeLogs, backup);
+        }
+        return true;
+      } finally {
+        // A failed conversion can also leave the cached instance unsuitable for reuse.
+        reftableByProject.remove(name);
+        evictRepository(name, local.getDirectory());
+      }
+    }
+  }
+
   protected void scanProjects(ProjectVisitor visitor) {
     try {
       Files.walkFileTree(
diff --git a/java/com/google/gerrit/server/git/MergeUtil.java b/java/com/google/gerrit/server/git/MergeUtil.java
index 9a2d3e9..c194443 100644
--- a/java/com/google/gerrit/server/git/MergeUtil.java
+++ b/java/com/google/gerrit/server/git/MergeUtil.java
@@ -242,10 +242,10 @@
     m.setBase(baseCommit);
 
     DirCache dc = DirCache.newInCore();
-    if (allowConflicts && m instanceof ResolveMerger) {
+    if (allowConflicts && m instanceof ResolveMerger resolveMerger) {
       // The DirCache must be set on ResolveMerger before calling
       // ResolveMerger#merge(AnyObjectId...) otherwise the entries in DirCache don't get populated.
-      ((ResolveMerger) m).setDirCache(dc);
+      resolveMerger.setDirCache(dc);
     }
 
     ObjectId tree;
@@ -488,10 +488,10 @@
     Merger m = newMerger(inserter, repoConfig, mergeStrategy);
 
     DirCache dc = DirCache.newInCore();
-    if (allowConflicts && m instanceof ResolveMerger) {
+    if (allowConflicts && m instanceof ResolveMerger resolveMerger) {
       // The DirCache must be set on ResolveMerger before calling
       // ResolveMerger#merge(AnyObjectId...) otherwise the entries in DirCache don't get populated.
-      ((ResolveMerger) m).setDirCache(dc);
+      resolveMerger.setDirCache(dc);
     }
 
     ObjectId tree;
@@ -512,9 +512,9 @@
     } else {
       List<String> conflicts = ImmutableList.of();
       Map<String, ResolveMerger.MergeFailureReason> failed = ImmutableMap.of();
-      if (m instanceof ResolveMerger) {
-        conflicts = ((ResolveMerger) m).getUnmergedPaths();
-        failed = ((ResolveMerger) m).getFailingPaths();
+      if (m instanceof ResolveMerger resolveMerger) {
+        conflicts = resolveMerger.getUnmergedPaths();
+        failed = resolveMerger.getFailingPaths();
       }
 
       if (m.getResultTreeId() != null) {
@@ -1092,8 +1092,8 @@
         m instanceof ThreeWayMerger,
         "merge strategy %s does not support three-way merging",
         strategyName);
-    if (m instanceof ResolveMerger && useGitattributesForMerge) {
-      ((ResolveMerger) m).setAttributesNodeProvider(attributesNodeProvider);
+    if (m instanceof ResolveMerger resolveMerger && useGitattributesForMerge) {
+      resolveMerger.setAttributesNodeProvider(attributesNodeProvider);
     }
     return (ThreeWayMerger) m;
   }
diff --git a/java/com/google/gerrit/server/git/PermissionAwareReadOnlyRefDatabase.java b/java/com/google/gerrit/server/git/PermissionAwareReadOnlyRefDatabase.java
index fb34753..b3929fd 100644
--- a/java/com/google/gerrit/server/git/PermissionAwareReadOnlyRefDatabase.java
+++ b/java/com/google/gerrit/server/git/PermissionAwareReadOnlyRefDatabase.java
@@ -94,8 +94,8 @@
     try {
       result = forProject.filter(ImmutableList.of(ref), getDelegate(), RefFilterOptions.defaults());
     } catch (PermissionBackendException e) {
-      if (e.getCause() instanceof IOException) {
-        throw (IOException) e.getCause();
+      if (e.getCause() instanceof IOException ioe) {
+        throw ioe;
       }
       throw new IOException(e);
     }
@@ -165,7 +165,7 @@
   @Override
   @NonNull
   public Map<String, Ref> exactRef(String... refs) throws IOException {
-    Map<String, Ref> result = new HashMap<>(refs.length);
+    Map<String, Ref> result = HashMap.newHashMap(refs.length);
     for (String name : refs) {
       Ref ref = exactRef(name);
       if (ref != null) {
@@ -196,7 +196,7 @@
   @NonNull
   public Set<Ref> getTipsWithSha1(ObjectId id) throws IOException {
     Set<Ref> unfiltered = super.getTipsWithSha1(id);
-    Set<Ref> result = new HashSet<>(unfiltered.size());
+    Set<Ref> result = HashSet.newHashSet(unfiltered.size());
     for (Ref ref : unfiltered) {
       if (exactRef(ref.getName()) != null) {
         result.add(ref);
diff --git a/java/com/google/gerrit/server/git/PureRevertCache.java b/java/com/google/gerrit/server/git/PureRevertCache.java
index 05fd9bf..dc22d9e 100644
--- a/java/com/google/gerrit/server/git/PureRevertCache.java
+++ b/java/com/google/gerrit/server/git/PureRevertCache.java
@@ -154,7 +154,7 @@
 
     @Override
     public Boolean load(PureRevertKeyProto key) throws BadRequestException, IOException {
-      try (TraceContext.TraceTimer ignored =
+      try (TraceContext.TraceTimer _ =
           TraceContext.newTimer(
               "Loading pure revert",
               Metadata.builder()
diff --git a/java/com/google/gerrit/server/git/RefStorageNotSupportedException.java b/java/com/google/gerrit/server/git/RefStorageNotSupportedException.java
new file mode 100644
index 0000000..8ddfc18
--- /dev/null
+++ b/java/com/google/gerrit/server/git/RefStorageNotSupportedException.java
@@ -0,0 +1,26 @@
+// Copyright (C) 2026 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.google.gerrit.server.git;
+
+import java.io.IOException;
+
+/** Thrown when the requested ref storage format is not supported in the current configuration. */
+public class RefStorageNotSupportedException extends IOException {
+  private static final long serialVersionUID = 1L;
+
+  public RefStorageNotSupportedException(String message) {
+    super(message);
+  }
+}
diff --git a/java/com/google/gerrit/server/git/SearchingChangeCacheImpl.java b/java/com/google/gerrit/server/git/SearchingChangeCacheImpl.java
index d8afbbb..2d10e89 100644
--- a/java/com/google/gerrit/server/git/SearchingChangeCacheImpl.java
+++ b/java/com/google/gerrit/server/git/SearchingChangeCacheImpl.java
@@ -153,7 +153,7 @@
                 .get()
                 .setRequestedFields(ChangeField.CHANGE_SPEC, ChangeField.REVIEWER_SPEC)
                 .byProject(key);
-        Map<Change.Id, CachedChange> result = new HashMap<>(cds.size());
+        Map<Change.Id, CachedChange> result = HashMap.newHashMap(cds.size());
         for (ChangeData cd : cds) {
           final Change.Id cdUniqueId = cd.virtualId();
           if (result.containsKey(cdUniqueId)) {
diff --git a/java/com/google/gerrit/server/git/TagSet.java b/java/com/google/gerrit/server/git/TagSet.java
index 6888a79..6ffb370 100644
--- a/java/com/google/gerrit/server/git/TagSet.java
+++ b/java/com/google/gerrit/server/git/TagSet.java
@@ -21,6 +21,7 @@
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Maps;
 import com.google.common.flogger.FluentLogger;
+import com.google.gerrit.common.Nullable;
 import com.google.gerrit.entities.Project;
 import com.google.gerrit.entities.RefNames;
 import com.google.gerrit.server.cache.proto.Cache.TagSetHolderProto.TagSetProto;
@@ -30,6 +31,7 @@
 import com.google.protobuf.ByteString;
 import java.io.DataOutputStream;
 import java.io.IOException;
+import java.io.InterruptedIOException;
 import java.nio.ByteBuffer;
 import java.util.HashMap;
 import java.util.Map;
@@ -205,9 +207,16 @@
     }
   }
 
-  void build(Repository git, TagSet old, TagMatcher m) {
+  /**
+   * Populates this set from {@code git}, by copying and extending {@code old} if possible and by
+   * walking the full history otherwise.
+   *
+   * @return {@code false} if the build was aborted because the thread was interrupted, in which
+   *     case the tag set is incomplete and must not be cached.
+   */
+  boolean build(Repository git, @Nullable TagSet old, @Nullable TagMatcher m) {
     if (old != null && m != null && refresh(old, m)) {
-      return;
+      return true;
     }
 
     try (TagWalk rw = new TagWalk(git)) {
@@ -223,6 +232,8 @@
           // For a tag, remember where it points to.
           try {
             addTag(rw, git.getRefDatabase().peel(ref), isTag);
+          } catch (InterruptedIOException e) {
+            throw e;
           } catch (IOException e) {
             addTag(rw, ref, isTag);
           }
@@ -238,9 +249,15 @@
       while ((c = (TagCommit) rw.next()) != null) {
         c.propagateReachabilityToParents(isTag);
       }
+    } catch (InterruptedIOException e) {
+      // The calling thread was interrupted, e.g. because the client disconnected. All further
+      // object reads would fail as well, so give up on the whole build.
+      logger.atFine().log("Interrupted while building tags for repository %s", projectName);
+      return false;
     } catch (IOException e) {
       logger.atWarning().withCause(e).log("Error building tags for repository %s", projectName);
     }
+    return true;
   }
 
   static TagSet fromProto(TagSetProto proto) {
@@ -364,7 +381,7 @@
     }
   }
 
-  private void addTag(TagWalk rw, Ref ref, RevFlag isTag) {
+  private void addTag(TagWalk rw, Ref ref, RevFlag isTag) throws InterruptedIOException {
     ObjectId id = ref.getPeeledObjectId();
     if (id == null) {
       id = ref.getObjectId();
@@ -381,6 +398,8 @@
         flags = commit.refFlags;
       } catch (IncorrectObjectTypeException notCommit) {
         flags = new RoaringBitmap();
+      } catch (InterruptedIOException e) {
+        throw e;
       } catch (IOException e) {
         logger.atWarning().withCause(e).log("Error on %s of %s", ref.getName(), projectName);
         flags = new RoaringBitmap();
@@ -389,7 +408,7 @@
     }
   }
 
-  private void addRef(TagWalk rw, Ref ref) {
+  private void addRef(TagWalk rw, Ref ref) throws InterruptedIOException {
     try {
       TagCommit commit = (TagCommit) rw.parseCommit(ref.getObjectId());
       rw.markStart(commit);
@@ -405,6 +424,8 @@
       // Quite many refs will point to non-commits.
       // For instance, refs from refs/cache-automerge
       // will often end up here.
+    } catch (InterruptedIOException e) {
+      throw e;
     } catch (IOException e) {
       logger.atWarning().withCause(e).log("Error on %s of %s", ref.getName(), projectName);
     }
@@ -488,8 +509,8 @@
     }
 
     @Override
-    protected TagCommit createCommit(AnyObjectId id) {
-      return new TagCommit(id);
+    protected TagCommit createCommit(AnyObjectId id, int graphPos) {
+      return new TagCommit(id, graphPos);
     }
   }
 
@@ -499,8 +520,8 @@
     /** CachedRef.flag => isVisible, indicating if this commit is reachable from the ref. */
     RoaringBitmap refFlags;
 
-    TagCommit(AnyObjectId id) {
-      super(id);
+    TagCommit(AnyObjectId id, int graphPos) {
+      super(id, graphPos);
     }
 
     /**
diff --git a/java/com/google/gerrit/server/git/TagSetHolder.java b/java/com/google/gerrit/server/git/TagSetHolder.java
index 0fc935d..f4663e8 100644
--- a/java/com/google/gerrit/server/git/TagSetHolder.java
+++ b/java/com/google/gerrit/server/git/TagSetHolder.java
@@ -80,9 +80,10 @@
       TagSet tags = this.tags;
       if (tags == null) {
         tags = new TagSet(projectName);
-        tags.build(db, null, null);
-        this.tags = tags;
-        cache.put(projectName, this);
+        if (tags.build(db, null, null)) {
+          this.tags = tags;
+          cache.put(projectName, this);
+        }
       }
       return tags;
     }
@@ -93,9 +94,10 @@
       TagSet cur = this.tags;
       if (identity().equivalent(cur, old)) {
         cur = new TagSet(projectName);
-        cur.build(db, old, m);
-        this.tags = cur;
-        cache.put(projectName, this);
+        if (cur.build(db, old, m)) {
+          this.tags = cur;
+          cache.put(projectName, this);
+        }
       }
       return cur;
     }
diff --git a/java/com/google/gerrit/server/git/TaskInfo.java b/java/com/google/gerrit/server/git/TaskInfo.java
new file mode 100644
index 0000000..0a8a6f7
--- /dev/null
+++ b/java/com/google/gerrit/server/git/TaskInfo.java
@@ -0,0 +1,51 @@
+// Copyright (C) 2014 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.google.gerrit.server.git;
+
+import com.google.gerrit.entities.Project;
+import com.google.gerrit.server.git.WorkQueue.ProjectTask;
+import com.google.gerrit.server.git.WorkQueue.Task;
+import com.google.gerrit.server.ioutil.HexFormat;
+import java.sql.Timestamp;
+import java.util.concurrent.TimeUnit;
+
+public class TaskInfo {
+  public String id;
+  public Task.State state;
+  public Timestamp startTime;
+  public long delay;
+  public String command;
+  public String remoteName;
+  public String projectName;
+  public String queueName;
+
+  public TaskInfo(Task<?> task) {
+    this.id = HexFormat.fromInt(task.getTaskId());
+    this.state = task.getState();
+    this.startTime = Timestamp.from(task.getStartTime());
+    this.delay = task.getDelay(TimeUnit.MILLISECONDS);
+    this.command = task.toString();
+    this.queueName = task.getQueueName();
+
+    if (task instanceof ProjectTask) {
+      ProjectTask<?> projectTask = ((ProjectTask<?>) task);
+      Project.NameKey name = projectTask.getProjectNameKey();
+      if (name != null) {
+        this.projectName = name.get();
+      }
+      this.remoteName = projectTask.getRemoteName();
+    }
+  }
+}
diff --git a/java/com/google/gerrit/server/git/WorkQueue.java b/java/com/google/gerrit/server/git/WorkQueue.java
index 888205d..f22c7f6 100644
--- a/java/com/google/gerrit/server/git/WorkQueue.java
+++ b/java/com/google/gerrit/server/git/WorkQueue.java
@@ -644,8 +644,8 @@
       // Periodic Tasks may get rescheduled if the previous run has yet to fully complete (and thus
       // passed to decorateTask() more than once), and there is no need to redecorate them if they
       // are already decorated.
-      if (runnable instanceof LoggingContextAwareRunnable) {
-        Runnable unwrappedTask = ((LoggingContextAwareRunnable) runnable).unwrap();
+      if (runnable instanceof LoggingContextAwareRunnable loggingContextAwareRunnable) {
+        Runnable unwrappedTask = loggingContextAwareRunnable.unwrap();
         if (unwrappedTask instanceof Task<?>) {
           return r;
         }
@@ -657,12 +657,12 @@
 
         Task<V> task;
 
-        if (runnable instanceof LoggingContextAwareRunnable) {
-          runnable = ((LoggingContextAwareRunnable) runnable).unwrap();
+        if (runnable instanceof LoggingContextAwareRunnable loggingContextAwareRunnable) {
+          runnable = loggingContextAwareRunnable.unwrap();
         }
 
-        if (runnable instanceof ProjectRunnable) {
-          task = new ProjectTask<>((ProjectRunnable) runnable, r, nanosPeriod, this, id);
+        if (runnable instanceof ProjectRunnable projectRunnable) {
+          task = new ProjectTask<>(projectRunnable, r, nanosPeriod, this, id);
         } else {
           task = new Task<>(runnable, r, nanosPeriod, this, id);
         }
@@ -725,8 +725,7 @@
           extension -> {
             if (isReady.isTrue()) {
               TaskListener listener = extension.get();
-              if (listener instanceof TaskParker) {
-                TaskParker parker = (TaskParker) listener;
+              if (listener instanceof TaskParker parker) {
                 if (parker.isReadyToStart(task)) {
                   readyParkers.add(parker);
                 } else {
@@ -914,23 +913,23 @@
         // as running and allow it to clean up. This ensures we do
         // not invoke cancel twice.
         //
-        if (runnable instanceof CancelableRunnable) {
+        if (runnable instanceof CancelableRunnable cancelableRunnable) {
           if (runningState.compareAndSet(null, State.RUNNING)) {
             isSetRunningDuringCancellation = true;
-            ((CancelableRunnable) runnable).cancel();
+            cancelableRunnable.cancel();
           } else if (isWaitingToStart()) {
-            ((CancelableRunnable) runnable).cancel();
-          } else if (runnable instanceof CanceledWhileRunning) {
-            ((CanceledWhileRunning) runnable).setCanceledWhileRunning();
+            cancelableRunnable.cancel();
+          } else if (runnable instanceof CanceledWhileRunning canceledWhileRunning) {
+            canceledWhileRunning.setCanceledWhileRunning();
           }
         }
-        if (runnable instanceof Future<?>) {
+        if (runnable instanceof Future<?> future) {
           // Creating new futures eventually passes through
           // AbstractExecutorService#schedule, which will convert the Guava
           // Future to a Runnable, thereby making it impossible for the
           // cancellation to propagate from ScheduledThreadPool's task back to
           // the Guava future, so kludge it here.
-          ((Future<?>) runnable).cancel(mayInterruptIfRunning);
+          future.cancel(mayInterruptIfRunning);
         }
 
         if (isSetRunningDuringCancellation || runningState.get() == null) {
@@ -1001,7 +1000,7 @@
             executor.remove(this);
           }
         }
-      } else {
+      } else if (isPeriodic() && !isDone()) {
         Future<?> unusedFuture = executor.schedule(this, nanosPeriod / 3, TimeUnit.NANOSECONDS);
       }
     }
diff --git a/java/com/google/gerrit/server/git/meta/TabFile.java b/java/com/google/gerrit/server/git/meta/TabFile.java
index 5f76b39..ece8dc6 100644
--- a/java/com/google/gerrit/server/git/meta/TabFile.java
+++ b/java/com/google/gerrit/server/git/meta/TabFile.java
@@ -78,7 +78,7 @@
   }
 
   protected static Map<String, String> toMap(List<Row> rows) {
-    Map<String, String> map = new HashMap<>(rows.size());
+    Map<String, String> map = HashMap.newHashMap(rows.size());
     for (Row row : rows) {
       map.put(row.left, row.right);
     }
diff --git a/java/com/google/gerrit/server/git/receive/ReceiveCommits.java b/java/com/google/gerrit/server/git/receive/ReceiveCommits.java
index 174f1ed..49d1c31 100644
--- a/java/com/google/gerrit/server/git/receive/ReceiveCommits.java
+++ b/java/com/google/gerrit/server/git/receive/ReceiveCommits.java
@@ -19,6 +19,7 @@
 import static com.google.common.base.Preconditions.checkState;
 import static com.google.common.collect.ImmutableList.toImmutableList;
 import static com.google.common.collect.ImmutableListMultimap.toImmutableListMultimap;
+import static com.google.common.collect.ImmutableSet.toImmutableSet;
 import static com.google.common.flogger.LazyArgs.lazy;
 import static com.google.gerrit.entities.RefNames.REFS_CHANGES;
 import static com.google.gerrit.entities.RefNames.isConfigRef;
@@ -333,10 +334,11 @@
   }
 
   private static RestApiException asRestApiException(Exception e) {
-    if (e instanceof RestApiException) {
-      return (RestApiException) e;
-    } else if ((e instanceof ExecutionException) && (e.getCause() instanceof RestApiException)) {
-      return (RestApiException) e.getCause();
+    if (e instanceof RestApiException restApiException) {
+      return restApiException;
+    } else if ((e instanceof ExecutionException)
+        && (e.getCause() instanceof RestApiException rae)) {
+      return rae;
     }
     return RestApiException.wrap("Error inserting change/patchset", e);
   }
@@ -1192,8 +1194,7 @@
             insertChangesAndPatchSets(
                 globalRevWalk, ins, magicBranchCmd, newChanges, replaceProgress);
           } else {
-            @SuppressWarnings("unused")
-            var unused =
+            var _ =
                 retryHelper
                     .changeUpdate(
                         "insertPatchSets",
@@ -1756,8 +1757,7 @@
 
       Optional<AuthException> err = checkRefPermission(cmd, RefPermission.DELETE);
       if (!err.isPresent()) {
-        @SuppressWarnings("unused")
-        var unused = validRefOperation(cmd);
+        var _ = validRefOperation(cmd);
       } else {
         rejectProhibited(cmd, err.get());
       }
@@ -1827,8 +1827,7 @@
   }
 
   private static RejectionReason prohibited(AuthException e, String alreadyDisplayedResource) {
-    if (e instanceof PermissionDeniedException) {
-      PermissionDeniedException pde = (PermissionDeniedException) e;
+    if (e instanceof PermissionDeniedException pde) {
       if (pde.getResource().isPresent()
           && pde.getResource().get().equals(alreadyDisplayedResource)) {
         // Avoid repeating resource name if exactly the given name was already displayed by the
@@ -3337,8 +3336,7 @@
         for (ReplaceRequest req : replaceByChange.values()) {
           if (req.inputCommand.getResult() == NOT_ATTEMPTED) {
             // TODO: Is it OK to ignore the return value?
-            @SuppressWarnings("unused")
-            var unused = req.validateNewPatchSet(globalRevWalk);
+            var _ = req.validateNewPatchSet(globalRevWalk);
           }
         }
       } catch (IOException | PermissionBackendException e) {
@@ -3434,7 +3432,7 @@
     boolean validateNewPatchSet(RevWalk globalRevWalk)
         throws IOException, PermissionBackendException {
       try (TraceTimer traceTimer = newTimer("validateNewPatchSet")) {
-        if (!validateNewPatchSetNoteDb(globalRevWalk)) {
+        if (!validateNewPatchSetNoteDb(globalRevWalk, /* forAutoClose= */ false)) {
           return false;
         }
         sameTreeWarning(globalRevWalk);
@@ -3457,7 +3455,7 @@
 
     boolean validateNewPatchSetForAutoClose(RevWalk globalRevWalk)
         throws IOException, PermissionBackendException {
-      if (!validateNewPatchSetNoteDb(globalRevWalk)) {
+      if (!validateNewPatchSetNoteDb(globalRevWalk, /* forAutoClose= */ true)) {
         return false;
       }
 
@@ -3466,7 +3464,7 @@
     }
 
     /** Validates the new PS against permissions and notedb status. */
-    private boolean validateNewPatchSetNoteDb(RevWalk globalRevWalk)
+    private boolean validateNewPatchSetNoteDb(RevWalk globalRevWalk, boolean forAutoClose)
         throws IOException, PermissionBackendException {
       try (TraceTimer traceTimer = newTimer("validateNewPatchSetNoteDb")) {
         if (notes == null) {
@@ -3500,22 +3498,25 @@
 
         RevCommit newCommit = globalRevWalk.parseCommit(newCommitId);
 
-        // Not allowed to create a new patch set if the current patch set is locked.
-        if (psUtil.isPatchSetLocked(notes)) {
-          reject(
-              inputCommand,
-              RejectionReason.create(
-                  MetricBucket.PATCH_SET_LOCKED, "cannot add patch set to " + ontoChange + "."));
-          return false;
-        }
+        // If the commit is already in the target branch, the change must be closed even if its
+        // current patch set is locked or the pusher cannot add patch sets to it.
+        if (!forAutoClose) {
+          if (psUtil.isPatchSetLocked(notes)) {
+            reject(
+                inputCommand,
+                RejectionReason.create(
+                    MetricBucket.PATCH_SET_LOCKED, "cannot add patch set to " + ontoChange + "."));
+            return false;
+          }
 
-        if (!permissions.change(notes).test(ChangePermission.ADD_PATCH_SET)) {
-          reject(
-              inputCommand,
-              RejectionReason.create(
-                  MetricBucket.CANNOT_ADD_PATCH_SET,
-                  "cannot add patch set to " + ontoChange + "."));
-          return false;
+          if (!permissions.change(notes).test(ChangePermission.ADD_PATCH_SET)) {
+            reject(
+                inputCommand,
+                RejectionReason.create(
+                    MetricBucket.CANNOT_ADD_PATCH_SET,
+                    "cannot add patch set to " + ontoChange + "."));
+            return false;
+          }
         }
 
         if (change.isClosed()) {
@@ -3979,8 +3980,7 @@
       // TODO(dborowitz): Combine this BatchUpdate with the main one in
       // handleRegularCommands
       try {
-        @SuppressWarnings("unused")
-        var unused =
+        var _ =
             retryHelper
                 .changeUpdate(
                     "autoCloseChanges",
@@ -4009,7 +4009,7 @@
                         rw.markStart(newTip);
                         rw.markUninteresting(rw.parseCommit(cmd.getOldId()));
 
-                        Map<Change.Key, ChangeData> changeDataByKey = null;
+                        Map<RevCommit, List<String>> changeIdsByCommit = new LinkedHashMap<>();
                         List<ReplaceRequest> replaceAndClose = new ArrayList<>();
 
                         int existingPatchSets = 0;
@@ -4045,28 +4045,43 @@
                             }
                           }
 
-                          for (String changeId : changeUtil.getChangeIdsFromFooter(c)) {
-                            if (changeDataByKey == null) {
-                              changeDataByKey =
-                                  retryHelper
-                                      .changeIndexQuery(
-                                          "queryOpenChangesByKeyByBranch",
-                                          q -> openChangesByKeyByBranch(q, branch))
-                                      .call();
-                            }
+                          List<String> changeIds = changeUtil.getChangeIdsFromFooter(c);
+                          if (!changeIds.isEmpty()) {
+                            changeIdsByCommit.put(c, changeIds);
+                          }
+                        }
 
-                            ChangeData onto = changeDataByKey.get(Change.key(changeId.trim()));
-                            if (onto != null) {
-                              newPatchSets++;
-                              // Hold onto this until we're done with the walk, as the call to
-                              // req.validate below calls isMergedInto which resets the walk.
-                              ChangeNotes ontoNotes = onto.notes();
-                              ReplaceRequest req =
-                                  new ReplaceRequest(
-                                      globalRevWalk, ontoNotes.getChangeId(), c, cmd, false);
-                              req.notes = ontoNotes;
-                              replaceAndClose.add(req);
-                              continue COMMIT;
+                        if (!changeIdsByCommit.isEmpty()) {
+                          ImmutableSet<Change.Key> keys =
+                              changeIdsByCommit.values().stream()
+                                  .flatMap(List::stream)
+                                  .map(id -> Change.key(id.trim()))
+                                  .collect(toImmutableSet());
+                          Map<Change.Key, ChangeData> changeDataByKey =
+                              retryHelper
+                                  .changeIndexQuery(
+                                      "queryOpenChangesByKeysByBranch",
+                                      q -> openChangesByKeysByBranch(q, branch, keys))
+                                  .call();
+
+                          for (Map.Entry<RevCommit, List<String>> e :
+                              changeIdsByCommit.entrySet()) {
+                            for (String changeId : e.getValue()) {
+                              ChangeData onto = changeDataByKey.get(Change.key(changeId.trim()));
+                              if (onto != null) {
+                                newPatchSets++;
+                                ChangeNotes ontoNotes = onto.notes();
+                                ReplaceRequest req =
+                                    new ReplaceRequest(
+                                        globalRevWalk,
+                                        ontoNotes.getChangeId(),
+                                        e.getKey(),
+                                        cmd,
+                                        false);
+                                req.notes = ontoNotes;
+                                replaceAndClose.add(req);
+                                break;
+                              }
                             }
                           }
                         }
@@ -4140,12 +4155,12 @@
     }
   }
 
-  private Map<Change.Key, ChangeData> openChangesByKeyByBranch(
-      InternalChangeQuery internalChangeQuery, BranchNameKey branch) {
+  private Map<Change.Key, ChangeData> openChangesByKeysByBranch(
+      InternalChangeQuery internalChangeQuery, BranchNameKey branch, Set<Change.Key> keys) {
     try (TraceTimer traceTimer =
-        newTimer("openChangesByKeyByBranch", Metadata.builder().branchName(branch.branch()))) {
+        newTimer("openChangesByKeysByBranch", Metadata.builder().branchName(branch.branch()))) {
       Map<Change.Key, ChangeData> r = new HashMap<>();
-      for (ChangeData cd : internalChangeQuery.byBranchOpen(branch)) {
+      for (ChangeData cd : internalChangeQuery.byBranchKeysOpen(branch, keys)) {
         try {
           // ChangeData is not materialised into a ChangeNotes for avoiding
           // to load a potentially large number of changes meta-data into memory
diff --git a/java/com/google/gerrit/server/git/receive/ReplaceOp.java b/java/com/google/gerrit/server/git/receive/ReplaceOp.java
index 6d07735..4f00447 100644
--- a/java/com/google/gerrit/server/git/receive/ReplaceOp.java
+++ b/java/com/google/gerrit/server/git/receive/ReplaceOp.java
@@ -24,6 +24,7 @@
 import static java.util.stream.Collectors.joining;
 import static org.eclipse.jgit.lib.Constants.R_HEADS;
 
+import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Strings;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableListMultimap;
@@ -33,6 +34,7 @@
 import com.google.common.flogger.FluentLogger;
 import com.google.gerrit.common.Nullable;
 import com.google.gerrit.entities.Account;
+import com.google.gerrit.entities.BooleanProjectConfig;
 import com.google.gerrit.entities.Change;
 import com.google.gerrit.entities.LabelType;
 import com.google.gerrit.entities.PatchSet;
@@ -402,8 +404,7 @@
     if (mergedByPushOp == null) {
       resetChange(ctx);
     } else {
-      @SuppressWarnings("unused")
-      var unused = mergedByPushOp.setPatchSetProvider(Providers.of(newPatchSet)).updateChange(ctx);
+      var _ = mergedByPushOp.setPatchSetProvider(Providers.of(newPatchSet)).updateChange(ctx);
     }
 
     return true;
@@ -414,21 +415,23 @@
     // Disable individual emails when adding reviewers, as all reviewers will receive the single
     // bulk new change email.
     Stream<ReviewerInput> inputs =
-        Streams.concat(
-            newReviewerInputFromCommitIdentity(
-                change,
-                psInfo.getCommitId(),
-                psInfo.getAuthor().getAccount(),
-                NotifyHandling.NONE,
-                newPatchSet.uploader())
-                .stream(),
-            newReviewerInputFromCommitIdentity(
-                change,
-                psInfo.getCommitId(),
-                psInfo.getCommitter().getAccount(),
-                NotifyHandling.NONE,
-                newPatchSet.uploader())
-                .stream());
+        projectState.is(BooleanProjectConfig.SKIP_ADDING_AUTHOR_AND_COMMITTER_AS_REVIEWERS)
+            ? Stream.empty()
+            : Streams.concat(
+                newReviewerInputFromCommitIdentity(
+                    change,
+                    psInfo.getCommitId(),
+                    psInfo.getAuthor().getAccount(),
+                    NotifyHandling.NONE,
+                    newPatchSet.uploader())
+                    .stream(),
+                newReviewerInputFromCommitIdentity(
+                    change,
+                    psInfo.getCommitId(),
+                    psInfo.getCommitter().getAccount(),
+                    NotifyHandling.NONE,
+                    newPatchSet.uploader())
+                    .stream());
     if (magicBranch != null) {
       inputs =
           Streams.concat(
@@ -484,27 +487,23 @@
 
   @Nullable
   private String changeKindMessage(ChangeKind changeKind) {
-    switch (changeKind) {
-      case MERGE_FIRST_PARENT_UPDATE:
-        return ": New merge patch set was added with a new first parent relative to Patch Set "
-            + priorPatchSetId.get()
-            + ".";
-      case TRIVIAL_REBASE:
-        return ": Patch Set " + priorPatchSetId.get() + " was rebased.";
-      case TRIVIAL_REBASE_WITH_MESSAGE_UPDATE:
-        return ": Patch Set " + priorPatchSetId.get() + " was rebased. Commit message was updated.";
-      case NO_CHANGE:
-        return ": New patch set was added with same tree, parent "
-            + (commit.getParentCount() != 1 ? "trees" : "tree")
-            + ", and commit message as Patch Set "
-            + priorPatchSetId.get()
-            + ".";
-      case NO_CODE_CHANGE:
-        return ": Commit message was updated.";
-      case REWORK:
-      default:
-        return null;
-    }
+    return switch (changeKind) {
+      case MERGE_FIRST_PARENT_UPDATE ->
+          ": New merge patch set was added with a new first parent relative to Patch Set "
+              + priorPatchSetId.get()
+              + ".";
+      case TRIVIAL_REBASE -> ": Patch Set " + priorPatchSetId.get() + " was rebased.";
+      case TRIVIAL_REBASE_WITH_MESSAGE_UPDATE ->
+          ": Patch Set " + priorPatchSetId.get() + " was rebased. Commit message was updated.";
+      case NO_CHANGE ->
+          ": New patch set was added with same tree, parent "
+              + (commit.getParentCount() != 1 ? "trees" : "tree")
+              + ", and commit message as Patch Set "
+              + priorPatchSetId.get()
+              + ".";
+      case NO_CODE_CHANGE -> ": Commit message was updated.";
+      case REWORK -> null;
+    };
   }
 
   private Map<String, PatchSetApproval> scanLabels(
@@ -694,17 +693,23 @@
     return cmd;
   }
 
+  @VisibleForTesting
   @Nullable
-  private static String findMergedInto(Context ctx, String first, RevCommit commit) {
+  static String findMergedInto(Context ctx, String first, RevCommit commit) {
     try {
       RevWalk rw = ctx.getRevWalk();
+      Set<ObjectId> checkedTips = new HashSet<>();
       Optional<ObjectId> firstId = ctx.getRepoView().getRef(first);
-      if (firstId.isPresent() && rw.isMergedInto(commit, rw.parseCommit(firstId.get()))) {
-        return first;
+      if (firstId.isPresent()) {
+        checkedTips.add(firstId.get());
+        if (rw.isMergedInto(commit, rw.parseCommit(firstId.get()))) {
+          return first;
+        }
       }
 
       for (Map.Entry<String, ObjectId> e : ctx.getRepoView().getRefs(R_HEADS).entrySet()) {
-        if (rw.isMergedInto(commit, rw.parseCommit(e.getValue()))) {
+        if (checkedTips.add(e.getValue())
+            && rw.isMergedInto(commit, rw.parseCommit(e.getValue()))) {
           return R_HEADS + e.getKey();
         }
       }
diff --git a/java/com/google/gerrit/server/git/validators/TopicValidator.java b/java/com/google/gerrit/server/git/validators/TopicValidator.java
index d51e102..0cc4725 100644
--- a/java/com/google/gerrit/server/git/validators/TopicValidator.java
+++ b/java/com/google/gerrit/server/git/validators/TopicValidator.java
@@ -46,7 +46,7 @@
     if (Strings.isNullOrEmpty(topic)) {
       return;
     }
-    try (TraceTimer ignored = TraceContext.newTimer("Validate Topic Size", Metadata.empty())) {
+    try (TraceTimer _ = TraceContext.newTimer("Validate Topic Size", Metadata.empty())) {
       int topicSize =
           queryProvider.get().noFields().setLimit(topicLimit + 1).byTopicOpen(topic).size();
       if (topicSize >= topicLimit) {
diff --git a/java/com/google/gerrit/server/git/validators/ValidationMessage.java b/java/com/google/gerrit/server/git/validators/ValidationMessage.java
index 93cb682..b039c3f 100644
--- a/java/com/google/gerrit/server/git/validators/ValidationMessage.java
+++ b/java/com/google/gerrit/server/git/validators/ValidationMessage.java
@@ -84,8 +84,7 @@
 
   @Override
   public boolean equals(Object obj) {
-    if (obj instanceof ValidationMessage) {
-      ValidationMessage other = (ValidationMessage) obj;
+    if (obj instanceof ValidationMessage other) {
       return Objects.equals(message, other.message) && Objects.equals(type, other.type);
     }
     return false;
diff --git a/java/com/google/gerrit/server/group/GroupResolver.java b/java/com/google/gerrit/server/group/GroupResolver.java
index 001a153..73dacba 100644
--- a/java/com/google/gerrit/server/group/GroupResolver.java
+++ b/java/com/google/gerrit/server/group/GroupResolver.java
@@ -71,8 +71,8 @@
    */
   public GroupDescription.Internal parseInternal(String id) throws UnprocessableEntityException {
     GroupDescription.Basic group = parse(id);
-    if (group instanceof GroupDescription.Internal) {
-      return (GroupDescription.Internal) group;
+    if (group instanceof GroupDescription.Internal internalGroup) {
+      return internalGroup;
     }
 
     throw new UnprocessableEntityException(String.format("External Group Not Allowed: %s", id));
diff --git a/java/com/google/gerrit/server/group/GroupResource.java b/java/com/google/gerrit/server/group/GroupResource.java
index dfcdbd7..e999350 100644
--- a/java/com/google/gerrit/server/group/GroupResource.java
+++ b/java/com/google/gerrit/server/group/GroupResource.java
@@ -49,8 +49,8 @@
 
   public Optional<GroupDescription.Internal> asInternalGroup() {
     GroupDescription.Basic group = getGroup();
-    if (group instanceof GroupDescription.Internal) {
-      return Optional.of((GroupDescription.Internal) group);
+    if (group instanceof GroupDescription.Internal internalGroup) {
+      return Optional.of(internalGroup);
     }
     return Optional.empty();
   }
diff --git a/java/com/google/gerrit/server/group/SystemGroupBackend.java b/java/com/google/gerrit/server/group/SystemGroupBackend.java
index 0471acc..99d7971 100644
--- a/java/com/google/gerrit/server/group/SystemGroupBackend.java
+++ b/java/com/google/gerrit/server/group/SystemGroupBackend.java
@@ -237,7 +237,7 @@
                 .filter(group -> hasConfiguredName(byLowerCaseConfiguredName, group))
                 .findAny();
 
-      } catch (IOException | ConfigInvalidException ignored) {
+      } catch (IOException | ConfigInvalidException _) {
         return;
       }
 
diff --git a/java/com/google/gerrit/server/group/db/GroupNameNotes.java b/java/com/google/gerrit/server/group/db/GroupNameNotes.java
index 3c7e012..0af91c5 100644
--- a/java/com/google/gerrit/server/group/db/GroupNameNotes.java
+++ b/java/com/google/gerrit/server/group/db/GroupNameNotes.java
@@ -244,7 +244,7 @@
     if (ref == null) {
       return ImmutableList.of();
     }
-    try (TraceTimer ignored =
+    try (TraceTimer _ =
             TraceContext.newTimer(
                 "Loading all groups",
                 Metadata.builder().noteDbRefName(RefNames.REFS_GROUPNAMES).build());
diff --git a/java/com/google/gerrit/server/group/db/GroupsUpdate.java b/java/com/google/gerrit/server/group/db/GroupsUpdate.java
index ab77c9d..6d6aad2 100644
--- a/java/com/google/gerrit/server/group/db/GroupsUpdate.java
+++ b/java/com/google/gerrit/server/group/db/GroupsUpdate.java
@@ -274,7 +274,7 @@
   @CanIgnoreReturnValue
   public InternalGroup createGroup(InternalGroupCreation groupCreation, GroupDelta groupDelta)
       throws DuplicateKeyException, IOException, ConfigInvalidException {
-    try (TraceTimer ignored =
+    try (TraceTimer _ =
         TraceContext.newTimer(
             "Creating group",
             Metadata.builder()
@@ -298,7 +298,7 @@
    */
   public void updateGroup(AccountGroup.UUID groupUuid, GroupDelta groupDelta)
       throws DuplicateKeyException, IOException, NoSuchGroupException, ConfigInvalidException {
-    try (TraceTimer ignored =
+    try (TraceTimer _ =
         TraceContext.newTimer(
             "Updating group", Metadata.builder().groupUuid(groupUuid.get()).build())) {
       Optional<Instant> updatedOn = groupDelta.getUpdatedOn();
@@ -322,7 +322,7 @@
    * @throws IOException if indexing fails, or an error occurs while reading/writing from/to NoteDb
    */
   public void deleteGroup(AccountGroup.UUID groupUuid) throws ConfigInvalidException, IOException {
-    try (TraceTimer ignored =
+    try (TraceTimer _ =
         TraceContext.newTimer(
             "Deleting group", Metadata.builder().groupUuid(groupUuid.get()).build())) {
       DeleteResult result = deleteGroupInNoteDbWithRetry(groupUuid);
diff --git a/java/com/google/gerrit/server/index/GerritIndexStatus.java b/java/com/google/gerrit/server/index/GerritIndexStatus.java
index 3be4ab5..9f0622e 100644
--- a/java/com/google/gerrit/server/index/GerritIndexStatus.java
+++ b/java/com/google/gerrit/server/index/GerritIndexStatus.java
@@ -15,9 +15,9 @@
 package com.google.gerrit.server.index;
 
 import com.google.common.primitives.Ints;
+import com.google.gerrit.server.config.SitePaths;
 import com.google.gerrit.server.index.change.ChangeSchemaDefinitions;
 import java.io.IOException;
-import java.nio.file.Path;
 import org.eclipse.jgit.errors.ConfigInvalidException;
 import org.eclipse.jgit.storage.file.FileBasedConfig;
 import org.eclipse.jgit.util.FS;
@@ -32,8 +32,10 @@
 
   private final FileBasedConfig cfg;
 
-  public GerritIndexStatus(Path indexDir) throws ConfigInvalidException, IOException {
-    cfg = new FileBasedConfig(indexDir.resolve("gerrit_index.config").toFile(), FS.detect());
+  public GerritIndexStatus(SitePaths sitePaths) throws ConfigInvalidException, IOException {
+    cfg =
+        new FileBasedConfig(
+            sitePaths.index_dir.resolve("gerrit_index.config").toFile(), FS.detect());
     cfg.load();
     convertLegacyConfig();
   }
diff --git a/java/com/google/gerrit/server/index/IndexDir.java b/java/com/google/gerrit/server/index/IndexDir.java
deleted file mode 100644
index 499c237..0000000
--- a/java/com/google/gerrit/server/index/IndexDir.java
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (C) 2026 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.google.gerrit.server.index;
-
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import com.google.inject.BindingAnnotation;
-import java.lang.annotation.Retention;
-
-/**
- * Marker on {@link java.nio.file.Path} holding the resolved Gerrit secondary index directory.
- *
- * <p>Honors {@code index.directory} in {@code gerrit.config} if set, defaulting to {@code
- * site_path/index} otherwise.
- */
-@Retention(RUNTIME)
-@BindingAnnotation
-public @interface IndexDir {}
diff --git a/java/com/google/gerrit/server/index/IndexModule.java b/java/com/google/gerrit/server/index/IndexModule.java
index c29c08e..7b22f3a 100644
--- a/java/com/google/gerrit/server/index/IndexModule.java
+++ b/java/com/google/gerrit/server/index/IndexModule.java
@@ -17,7 +17,6 @@
 import static com.google.gerrit.server.git.QueueProvider.QueueType.BATCH;
 import static com.google.gerrit.server.git.QueueProvider.QueueType.INTERACTIVE;
 
-import com.google.common.base.Strings;
 import com.google.common.base.Ticker;
 import com.google.common.collect.FluentIterable;
 import com.google.common.collect.ImmutableList;
@@ -36,7 +35,6 @@
 import com.google.gerrit.index.project.ProjectSchemaDefinitions;
 import com.google.gerrit.lifecycle.LifecycleModule;
 import com.google.gerrit.server.config.GerritServerConfig;
-import com.google.gerrit.server.config.SitePaths;
 import com.google.gerrit.server.git.GitRepositoryManager;
 import com.google.gerrit.server.git.MultiProgressMonitor;
 import com.google.gerrit.server.git.WorkQueue;
@@ -67,14 +65,9 @@
 import com.google.inject.ProvisionException;
 import com.google.inject.Singleton;
 import com.google.inject.multibindings.OptionalBinder;
-import java.io.IOException;
-import java.nio.file.Path;
 import java.util.Collection;
 import java.util.concurrent.TimeUnit;
-import org.eclipse.jgit.errors.ConfigInvalidException;
 import org.eclipse.jgit.lib.Config;
-import org.eclipse.jgit.storage.file.FileBasedConfig;
-import org.eclipse.jgit.util.FS;
 
 /**
  * Module for non-indexer-specific secondary index setup.
@@ -84,7 +77,6 @@
  */
 @SuppressWarnings("ProvidesMethodOutsideOfModule")
 public class IndexModule extends LifecycleModule {
-  public static final String INDEX = "index";
   public static final ImmutableList<SchemaDefinitions<?>> ALL_SCHEMA_DEFS =
       ImmutableList.of(
           AccountSchemaDefinitions.INSTANCE,
@@ -95,7 +87,7 @@
   /** Type of secondary index. */
   public static IndexType getIndexType(Injector injector) {
     Config cfg = injector.getInstance(Key.get(Config.class, GerritServerConfig.class));
-    String configValue = cfg != null ? cfg.getString(INDEX, null, "type") : null;
+    String configValue = cfg != null ? cfg.getString("index", null, "type") : null;
     return new IndexType(configValue);
   }
 
@@ -227,7 +219,8 @@
     int threads = this.threads;
     if (threads == 0) {
       threads =
-          config.getInt(INDEX, null, "threads", Runtime.getRuntime().availableProcessors() / 2 + 1);
+          config.getInt(
+              "index", null, "threads", Runtime.getRuntime().availableProcessors() / 2 + 1);
     }
     if (threads < 0) {
       return MoreExecutors.newDirectExecutorService();
@@ -247,7 +240,7 @@
     int threads = this.threads;
     if (threads == 0) {
       threads =
-          config.getInt(INDEX, null, "batchThreads", Runtime.getRuntime().availableProcessors());
+          config.getInt("index", null, "batchThreads", Runtime.getRuntime().availableProcessors());
     }
     if (threads < 0) {
       return MoreExecutors.newDirectExecutorService();
@@ -262,35 +255,6 @@
     return new StalenessChecker(indexes, repoManager, indexConfig);
   }
 
-  @Provides
-  @Singleton
-  @IndexDir
-  Path getIndexDirectory(@GerritServerConfig Config cfg, SitePaths site) {
-    return indexDirectory(cfg, site);
-  }
-
-  /**
-   * Resolves the index directory before the Guice injector exists (e.g. during {@code Init}), by
-   * reading {@code gerrit.config} directly from disk.
-   */
-  public static Path indexDirectory(SitePaths sitePaths) throws IOException {
-    FileBasedConfig cfg = new FileBasedConfig(sitePaths.gerrit_config.toFile(), FS.DETECTED);
-    if (cfg.getFile().exists()) {
-      try {
-        cfg.load();
-      } catch (ConfigInvalidException e) {
-        throw new IOException("Invalid config file " + sitePaths.gerrit_config, e);
-      }
-    }
-    return indexDirectory(cfg, sitePaths);
-  }
-
-  /** Resolves the index directory from an already-loaded {@code gerrit.config}. */
-  public static Path indexDirectory(Config cfg, SitePaths site) {
-    String name = cfg.getString(INDEX, null, "directory");
-    return Strings.isNullOrEmpty(name) ? site.resolve(INDEX) : site.resolve(name);
-  }
-
   @Singleton
   private static class ShutdownIndexExecutors implements LifecycleListener {
     private final ListeningExecutorService interactiveExecutor;
diff --git a/java/com/google/gerrit/server/index/IndexUtils.java b/java/com/google/gerrit/server/index/IndexUtils.java
index 8c07af3..f81a9ce 100644
--- a/java/com/google/gerrit/server/index/IndexUtils.java
+++ b/java/com/google/gerrit/server/index/IndexUtils.java
@@ -25,11 +25,11 @@
 import com.google.gerrit.index.QueryOptions;
 import com.google.gerrit.index.project.ProjectField;
 import com.google.gerrit.server.CurrentUser;
+import com.google.gerrit.server.config.SitePaths;
 import com.google.gerrit.server.index.account.AccountField;
 import com.google.gerrit.server.index.group.GroupField;
 import com.google.gerrit.server.query.change.GroupBackedUser;
 import java.io.IOException;
-import java.nio.file.Path;
 import java.util.Set;
 import org.eclipse.jgit.errors.ConfigInvalidException;
 
@@ -37,9 +37,9 @@
 public final class IndexUtils {
 
   /** Mark an index version as ready to serve queries. */
-  public static void setReady(Path indexDir, String name, int version, boolean ready) {
+  public static void setReady(SitePaths sitePaths, String name, int version, boolean ready) {
     try {
-      GerritIndexStatus cfg = new GerritIndexStatus(indexDir);
+      GerritIndexStatus cfg = new GerritIndexStatus(sitePaths);
       cfg.setReady(name, version, ready);
       cfg.save();
     } catch (ConfigInvalidException | IOException e) {
diff --git a/java/com/google/gerrit/server/index/VersionManager.java b/java/com/google/gerrit/server/index/VersionManager.java
index e3c1c96..d4f55ba 100644
--- a/java/com/google/gerrit/server/index/VersionManager.java
+++ b/java/com/google/gerrit/server/index/VersionManager.java
@@ -32,7 +32,6 @@
 import com.google.gerrit.server.plugincontext.PluginSetContext;
 import com.google.inject.ProvisionException;
 import java.io.IOException;
-import java.nio.file.Path;
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
@@ -100,7 +99,6 @@
   protected final boolean reuseExistingDocuments;
   protected final String runReindexMsg;
   protected final SitePaths sitePaths;
-  protected final Path indexDir;
 
   private final PluginSetContext<OnlineUpgradeListener> listeners;
 
@@ -110,13 +108,11 @@
 
   protected VersionManager(
       SitePaths sitePaths,
-      Path indexDir,
       PluginSetContext<OnlineUpgradeListener> listeners,
       Collection<IndexDefinition<?, ?, ?>> defs,
       boolean onlineUpgrade,
       boolean reuseExistingDocuments) {
     this.sitePaths = sitePaths;
-    this.indexDir = indexDir;
     this.listeners = listeners;
     this.defs = Maps.newHashMapWithExpectedSize(defs.size());
     for (IndexDefinition<?, ?, ?> def : defs) {
@@ -271,7 +267,7 @@
 
   protected GerritIndexStatus createIndexStatus() {
     try {
-      return new GerritIndexStatus(indexDir);
+      return new GerritIndexStatus(sitePaths);
     } catch (ConfigInvalidException | IOException e) {
       throw fail(e);
     }
diff --git a/java/com/google/gerrit/server/index/change/AllChangesIndexer.java b/java/com/google/gerrit/server/index/change/AllChangesIndexer.java
index 6ef9b03..dbfd2dd 100644
--- a/java/com/google/gerrit/server/index/change/AllChangesIndexer.java
+++ b/java/com/google/gerrit/server/index/change/AllChangesIndexer.java
@@ -295,7 +295,7 @@
       if (reuseExistingDocuments) {
         indexAction =
             cd -> {
-              var unused = indexer.reindexIfStale(cd);
+              var _ = indexer.reindexIfStale(cd);
             };
       } else {
         indexAction = cd -> indexer.index(cd);
diff --git a/java/com/google/gerrit/server/index/change/ChangeIndexRewriter.java b/java/com/google/gerrit/server/index/change/ChangeIndexRewriter.java
index 0a743de..a40ec11 100644
--- a/java/com/google/gerrit/server/index/change/ChangeIndexRewriter.java
+++ b/java/com/google/gerrit/server/index/change/ChangeIndexRewriter.java
@@ -95,8 +95,8 @@
   }
 
   private static @Nullable EnumSet<Change.Status> extractStatus(Predicate<ChangeData> in) {
-    if (in instanceof ChangeStatusPredicate) {
-      Status status = ((ChangeStatusPredicate) in).getStatus();
+    if (in instanceof ChangeStatusPredicate changeStatusPredicate) {
+      Status status = changeStatusPredicate.getStatus();
       return status != null ? EnumSet.of(status) : null;
     } else if (in instanceof NotPredicate) {
       EnumSet<Status> s = extractStatus(in.getChild(0));
diff --git a/java/com/google/gerrit/server/index/change/ChangeIndexer.java b/java/com/google/gerrit/server/index/change/ChangeIndexer.java
index 8dfca33..6a0cff6 100644
--- a/java/com/google/gerrit/server/index/change/ChangeIndexer.java
+++ b/java/com/google/gerrit/server/index/change/ChangeIndexer.java
@@ -565,8 +565,7 @@
         try {
           return callImpl();
         } finally {
-          @SuppressWarnings("unused")
-          var unused = context.setContext(oldCtx);
+          var _ = context.setContext(oldCtx);
         }
       } catch (Exception e) {
         logger.atSevere().withCause(e).log("Failed to execute %s", this);
@@ -629,10 +628,9 @@
 
     @Override
     public boolean equals(Object obj) {
-      if (!(obj instanceof IndexTask)) {
+      if (!(obj instanceof IndexTask other)) {
         return false;
       }
-      IndexTask other = (IndexTask) obj;
       return id.get() == other.id.get();
     }
 
@@ -705,10 +703,9 @@
 
     @Override
     public boolean equals(Object obj) {
-      if (!(obj instanceof ReindexIfStaleTask)) {
+      if (!(obj instanceof ReindexIfStaleTask other)) {
         return false;
       }
-      ReindexIfStaleTask other = (ReindexIfStaleTask) obj;
       return id.get() == other.id.get();
     }
 
diff --git a/java/com/google/gerrit/server/index/change/IndexedChangeQuery.java b/java/com/google/gerrit/server/index/change/IndexedChangeQuery.java
index 0f129cd..df4f2d2 100644
--- a/java/com/google/gerrit/server/index/change/IndexedChangeQuery.java
+++ b/java/com/google/gerrit/server/index/change/IndexedChangeQuery.java
@@ -23,6 +23,7 @@
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Iterables;
+import com.google.common.collect.Sets;
 import com.google.gerrit.entities.Change;
 import com.google.gerrit.index.IndexConfig;
 import com.google.gerrit.index.QueryOptions;
@@ -36,10 +37,8 @@
 import com.google.gerrit.server.query.change.ChangeData;
 import com.google.gerrit.server.query.change.ChangeDataSource;
 import com.google.gerrit.server.query.change.ChangeIndexPostFilterPredicate;
-import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
-import java.util.Map;
 import java.util.Set;
 
 /**
@@ -108,12 +107,18 @@
         opts.fields());
   }
 
-  private final Map<ChangeData, DataSource<ChangeData>> fromSource;
+  /**
+   * Changes read from {@link #fromSourceOwner}, so that {@link #match(ChangeData)} can skip the
+   * index predicates for them. Only the changes of the latest source are kept: a paginated scan
+   * replaces the source for every page, and changes of older sources never take the shortcut.
+   */
+  private final Set<ChangeData> fromSource = Sets.newIdentityHashSet();
+
+  private DataSource<ChangeData> fromSourceOwner;
 
   public IndexedChangeQuery(ChangeIndex index, Predicate<ChangeData> pred, QueryOptions opts)
       throws QueryParseException {
     super(index, pred, convertOptions(opts));
-    this.fromSource = new HashMap<>();
   }
 
   @Override
@@ -127,7 +132,7 @@
         return Iterables.transform(
                 rs,
                 cd -> {
-                  fromSource.put(cd, currSource);
+                  markFromSource(cd, currSource);
                   return cd;
                 })
             .iterator();
@@ -137,7 +142,7 @@
       public ImmutableList<ChangeData> toList() {
         ImmutableList<ChangeData> r = rs.toList();
         for (ChangeData cd : r) {
-          fromSource.put(cd, currSource);
+          markFromSource(cd, currSource);
         }
         return r;
       }
@@ -154,6 +159,19 @@
     };
   }
 
+  private void markFromSource(ChangeData cd, DataSource<ChangeData> s) {
+    if (!identity().equivalent(fromSourceOwner, s)) {
+      fromSource.clear();
+      fromSourceOwner = s;
+    }
+    fromSource.add(cd);
+  }
+
+  @VisibleForTesting
+  int fromSourceSize() {
+    return fromSource.size();
+  }
+
   public boolean postIndexMatch(Predicate<ChangeData> pred, ChangeData cd) {
     if (pred instanceof ChangeIndexPostFilterPredicate) {
       checkState(
@@ -181,7 +199,8 @@
     }
     Predicate<ChangeData> pred = getChild(0);
     if (source != null
-        && identity().equivalent(fromSource.get(cd), source)
+        && identity().equivalent(fromSourceOwner, source)
+        && fromSource.contains(cd)
         && postIndexMatch(pred, cd)) {
       return true;
     }
diff --git a/java/com/google/gerrit/server/index/change/PendingIndexUpdate.java b/java/com/google/gerrit/server/index/change/PendingIndexUpdate.java
index 2c67a51..38f4d06 100644
--- a/java/com/google/gerrit/server/index/change/PendingIndexUpdate.java
+++ b/java/com/google/gerrit/server/index/change/PendingIndexUpdate.java
@@ -106,7 +106,7 @@
   public void cleanIfEmpty(Path dir) {
     try {
       Files.delete(dir);
-    } catch (NoSuchFileException | DirectoryNotEmptyException ignored) {
+    } catch (NoSuchFileException | DirectoryNotEmptyException _) {
       // Already gone or not empty.
     } catch (IOException e) {
       logger.atWarning().withCause(e).log("Failed to delete directory %s", dir);
diff --git a/java/com/google/gerrit/server/mail/MailUtil.java b/java/com/google/gerrit/server/mail/MailUtil.java
index 9357e4b..22c7cc5 100644
--- a/java/com/google/gerrit/server/mail/MailUtil.java
+++ b/java/com/google/gerrit/server/mail/MailUtil.java
@@ -68,7 +68,7 @@
     }
 
     public Set<Account.Id> getAll() {
-      final Set<Account.Id> all = new HashSet<>(reviewers.size() + cc.size());
+      final Set<Account.Id> all = HashSet.newHashSet(reviewers.size() + cc.size());
       all.addAll(reviewers);
       all.addAll(cc);
       return Collections.unmodifiableSet(all);
diff --git a/java/com/google/gerrit/server/mail/receive/MailProcessor.java b/java/com/google/gerrit/server/mail/receive/MailProcessor.java
index 912425a..535b023 100644
--- a/java/com/google/gerrit/server/mail/receive/MailProcessor.java
+++ b/java/com/google/gerrit/server/mail/receive/MailProcessor.java
@@ -168,8 +168,7 @@
    * @param message {@link MailMessage} to process
    */
   public void process(MailMessage message) throws RestApiException, UpdateException {
-    @SuppressWarnings("unused")
-    var unused =
+    var _ =
         retryHelper
             .changeUpdate(
                 "processCommentsReceivedByEmail",
diff --git a/java/com/google/gerrit/server/mail/send/OutgoingEmail.java b/java/com/google/gerrit/server/mail/send/OutgoingEmail.java
index 8701403..f8f04f3 100644
--- a/java/com/google/gerrit/server/mail/send/OutgoingEmail.java
+++ b/java/com/google/gerrit/server/mail/send/OutgoingEmail.java
@@ -187,8 +187,7 @@
   /** Format and send the message synchronously. */
   public void send() throws EmailException {
     try {
-      @SuppressWarnings("unused")
-      var unused =
+      var _ =
           args.retryHelper
               .action(
                   ActionType.SEND_EMAIL,
@@ -877,8 +876,8 @@
     }
     for (Map.Entry<String, EmailHeader> entry : headers.entrySet()) {
       // Don't remove fromEmail from the "From" header though!
-      if (entry.getValue() instanceof AddressList && !entry.getKey().equals("From")) {
-        ((AddressList) entry.getValue()).remove(fromEmail);
+      if (entry.getValue() instanceof AddressList addressList && !entry.getKey().equals("From")) {
+        addressList.remove(fromEmail);
       }
     }
   }
diff --git a/java/com/google/gerrit/server/mail/send/SmtpEmailSender.java b/java/com/google/gerrit/server/mail/send/SmtpEmailSender.java
index c050c13..4676ab0 100644
--- a/java/com/google/gerrit/server/mail/send/SmtpEmailSender.java
+++ b/java/com/google/gerrit/server/mail/send/SmtpEmailSender.java
@@ -121,18 +121,11 @@
     smtpEncryption = cfg.getEnum("sendemail", null, "smtpencryption", Encryption.NONE);
     sslVerify = cfg.getBoolean("sendemail", null, "sslverify", true);
 
-    final int defaultPort;
-    switch (smtpEncryption) {
-      case SSL:
-        defaultPort = 465;
-        break;
-
-      case NONE:
-      case TLS:
-      default:
-        defaultPort = 25;
-        break;
-    }
+    final int defaultPort =
+        switch (smtpEncryption) {
+          case SSL -> 465;
+          case NONE, TLS -> 25;
+        };
     smtpPort = cfg.getInt("sendemail", null, "smtpserverport", defaultPort);
 
     smtpUser = cfg.getString("sendemail", null, "smtpuser");
@@ -272,8 +265,7 @@
                 "Server " + smtpHost + " rejected message body: " + client.getReplyString());
           }
 
-          @SuppressWarnings("unused")
-          var unused = client.logout();
+          var _ = client.logout();
           if (rejected.length() > 0) {
             throw new EmailException(rejected.toString());
           }
@@ -451,8 +443,8 @@
           // Ignored
         }
       }
-      if (e instanceof EmailException) {
-        throw (EmailException) e;
+      if (e instanceof EmailException emailException) {
+        throw emailException;
       }
       throw new EmailException(e.getMessage(), e);
     }
diff --git a/java/com/google/gerrit/server/notedb/ChangeDraftNotesUpdate.java b/java/com/google/gerrit/server/notedb/ChangeDraftNotesUpdate.java
index 0d8c971..347b4de 100644
--- a/java/com/google/gerrit/server/notedb/ChangeDraftNotesUpdate.java
+++ b/java/com/google/gerrit/server/notedb/ChangeDraftNotesUpdate.java
@@ -186,7 +186,7 @@
       if (allUsersRepo == null) {
         return Optional.empty();
       }
-      try (TraceContext.TraceTimer ignored =
+      try (TraceContext.TraceTimer _ =
           newTimer("ChangeDraftNotesUpdate#Executor#updateAllUsersSync", Metadata.empty())) {
         return noteDbUpdateExecutor.execute(
             allUsersRepo,
diff --git a/java/com/google/gerrit/server/notedb/ChangeNoteFooters.java b/java/com/google/gerrit/server/notedb/ChangeNoteFooters.java
index 1bec73e..e36ef36 100644
--- a/java/com/google/gerrit/server/notedb/ChangeNoteFooters.java
+++ b/java/com/google/gerrit/server/notedb/ChangeNoteFooters.java
@@ -44,6 +44,7 @@
   public static final FooterKey FOOTER_SUBMITTED_WITH = new FooterKey("Submitted-with");
   public static final FooterKey FOOTER_TOPIC = new FooterKey("Topic");
   public static final FooterKey FOOTER_TAG = new FooterKey("Tag");
+  public static final FooterKey FOOTER_IS_AI = new FooterKey("Is-ai");
   public static final FooterKey FOOTER_THEIRS = new FooterKey("Theirs");
   public static final FooterKey FOOTER_WORK_IN_PROGRESS = new FooterKey("Work-in-progress");
   public static final FooterKey FOOTER_REVERT_OF = new FooterKey("Revert-of");
diff --git a/java/com/google/gerrit/server/notedb/ChangeNotesCommit.java b/java/com/google/gerrit/server/notedb/ChangeNotesCommit.java
index df60789..a7fac73 100644
--- a/java/com/google/gerrit/server/notedb/ChangeNotesCommit.java
+++ b/java/com/google/gerrit/server/notedb/ChangeNotesCommit.java
@@ -75,8 +75,8 @@
     }
 
     @Override
-    protected ChangeNotesCommit createCommit(AnyObjectId id) {
-      return new ChangeNotesCommit(id);
+    protected ChangeNotesCommit createCommit(AnyObjectId id, int graphPos) {
+      return new ChangeNotesCommit(id, graphPos);
     }
 
     @Override
@@ -117,6 +117,10 @@
     super(id);
   }
 
+  private ChangeNotesCommit(AnyObjectId id, int graphPosition) {
+    super(id, graphPosition);
+  }
+
   private void initFooterLines() {
     if (footerLines == null) {
       footerLines = getFooterLines();
diff --git a/java/com/google/gerrit/server/notedb/ChangeNotesParser.java b/java/com/google/gerrit/server/notedb/ChangeNotesParser.java
index cc4174b..9a773ff 100644
--- a/java/com/google/gerrit/server/notedb/ChangeNotesParser.java
+++ b/java/com/google/gerrit/server/notedb/ChangeNotesParser.java
@@ -28,6 +28,7 @@
 import static com.google.gerrit.server.notedb.ChangeNoteFooters.FOOTER_CUSTOM_KEYED_VALUE;
 import static com.google.gerrit.server.notedb.ChangeNoteFooters.FOOTER_GROUPS;
 import static com.google.gerrit.server.notedb.ChangeNoteFooters.FOOTER_HASHTAGS;
+import static com.google.gerrit.server.notedb.ChangeNoteFooters.FOOTER_IS_AI;
 import static com.google.gerrit.server.notedb.ChangeNoteFooters.FOOTER_LABEL;
 import static com.google.gerrit.server.notedb.ChangeNoteFooters.FOOTER_MERGE_STRATEGY;
 import static com.google.gerrit.server.notedb.ChangeNoteFooters.FOOTER_NO_BASE_REASON;
@@ -182,6 +183,7 @@
   private final TreeMap<String, String> customKeyedValues;
   private final Map<PatchSetApproval.Key, PatchSetApproval.Builder> approvals;
   private final List<PatchSetApproval.Builder> bufferedApprovals;
+  private final Set<PatchSetApproval.UUID> aiApprovalUuids;
   private final List<ChangeMessage> allChangeMessages;
 
   private final Set<Account.Id> removedReviewers;
@@ -201,6 +203,7 @@
   private String originalSubject;
   private String submissionId;
   private String tag;
+  private boolean isAi;
   private RevisionNoteMap revisionNoteMap;
   private Boolean isPrivate;
   private Boolean workInProgress;
@@ -232,6 +235,7 @@
     this.noteDbUtil = noteDbUtil;
     approvals = new LinkedHashMap<>();
     bufferedApprovals = new ArrayList<>();
+    aiApprovalUuids = new HashSet<>();
     reviewers = HashBasedTable.create();
     reviewersByEmail = HashBasedTable.create();
     pendingReviewers = ReviewerSet.empty();
@@ -371,6 +375,9 @@
           && !reviewers.containsRow(a.key().accountId())) {
         continue; // Reviewer was explicitly removed.
       }
+      if (a.copied() && a.uuid().isPresent() && aiApprovalUuids.contains(a.uuid().get())) {
+        a.isAi(true);
+      }
       result.put(a.key().patchSetId(), a.build());
     }
     if (status != null && status.isClosed() && !isAnyApprovalCopied(result)) {
@@ -481,6 +488,7 @@
 
     createdOn = commitTimestamp;
     parseTag(commit);
+    parseIsAi(commit);
 
     PatchSetIdAndState psIdAndState = parsePatchSetIdAndState(commit);
     PatchSet.Id psId = psIdAndState.id;
@@ -562,6 +570,16 @@
     }
 
     if (deletedPatchSets.contains(psId)) {
+      if (isAi) {
+        for (String line : commit.getFooterLineValues(FOOTER_LABEL)) {
+          if (!line.startsWith("-")) {
+            ChangeNotesParseApprovalUtil.parseApproval(line)
+                .uuid()
+                .map(PatchSetApproval::uuid)
+                .ifPresent(aiApprovalUuids::add);
+          }
+        }
+      }
       // Do not update PS details as PS was deleted and this meta data is of no relevance.
       return;
     }
@@ -939,6 +957,21 @@
     }
   }
 
+  private void parseIsAi(ChangeNotesCommit commit) throws ConfigInvalidException {
+    isAi = false;
+    String raw = parseOneFooter(commit, FOOTER_IS_AI);
+    if (raw == null) {
+      return;
+    } else if ("true".equalsIgnoreCase(raw)) {
+      isAi = true;
+      return;
+    } else if ("false".equalsIgnoreCase(raw)) {
+      isAi = false;
+      return;
+    }
+    throw invalidFooter(FOOTER_IS_AI, raw);
+  }
+
   @Nullable
   private Change.Status parseStatus(ChangeNotesCommit commit) throws ConfigInvalidException {
     List<String> statusLines = commit.getFooterLineValues(FOOTER_STATUS);
@@ -1227,10 +1260,14 @@
             .uuid(parsedPatchSetApproval.uuid().map(PatchSetApproval::uuid))
             .value(removedReviewers.contains(approverId) ? 0 : l.value())
             .granted(ts)
-            .tag(Optional.ofNullable(tag));
+            .tag(Optional.ofNullable(tag))
+            .isAi(isAi);
     if (!Objects.equals(realAccountId, committerId)) {
       psa.realAccountId(realAccountId);
     }
+    if (isAi) {
+      psa.uuid().ifPresent(aiApprovalUuids::add);
+    }
     approvals.putIfAbsent(psa.key(), psa);
     return psa;
   }
diff --git a/java/com/google/gerrit/server/notedb/ChangeUpdate.java b/java/com/google/gerrit/server/notedb/ChangeUpdate.java
index 444da63..9bfa236 100644
--- a/java/com/google/gerrit/server/notedb/ChangeUpdate.java
+++ b/java/com/google/gerrit/server/notedb/ChangeUpdate.java
@@ -31,6 +31,7 @@
 import static com.google.gerrit.server.notedb.ChangeNoteFooters.FOOTER_CUSTOM_KEYED_VALUE;
 import static com.google.gerrit.server.notedb.ChangeNoteFooters.FOOTER_GROUPS;
 import static com.google.gerrit.server.notedb.ChangeNoteFooters.FOOTER_HASHTAGS;
+import static com.google.gerrit.server.notedb.ChangeNoteFooters.FOOTER_IS_AI;
 import static com.google.gerrit.server.notedb.ChangeNoteFooters.FOOTER_LABEL;
 import static com.google.gerrit.server.notedb.ChangeNoteFooters.FOOTER_MERGE_STRATEGY;
 import static com.google.gerrit.server.notedb.ChangeNoteFooters.FOOTER_NO_BASE_REASON;
@@ -187,6 +188,7 @@
   private TreeMap<String, String> customKeyedValues = new TreeMap<>();
   private String changeMessage;
   private String tag;
+  private Boolean isAi;
   private PatchSetState psState;
   private List<String> groups;
   private String pushCert;
@@ -322,6 +324,7 @@
             .key(PatchSetApproval.key(getPatchSetId(), reviewer, LabelId.create(label)))
             .value(value)
             .granted(when)
+            .isAi(Boolean.TRUE.equals(isAi))
             .uuid(patchSetApprovalUuidGenerator.get(getPatchSetId(), reviewer, label, value, when))
             .build();
     approvals.put(label, reviewer, Optional.of(psa));
@@ -393,6 +396,10 @@
     this.tag = tag;
   }
 
+  public void setIsAi(boolean isAi) {
+    this.isAi = isAi;
+  }
+
   public void setPsDescription(String psDescription) {
     this.psDescription = psDescription;
   }
@@ -816,6 +823,10 @@
       addFooter(msg, FOOTER_TAG, tag);
     }
 
+    if (Boolean.TRUE.equals(isAi)) {
+      addFooter(msg, FOOTER_IS_AI, true);
+    }
+
     if (groups != null) {
       addFooter(msg, FOOTER_GROUPS, comma.join(groups));
     }
diff --git a/java/com/google/gerrit/server/notedb/NoteDbUpdateManager.java b/java/com/google/gerrit/server/notedb/NoteDbUpdateManager.java
index ef24a2f..430bb2f 100644
--- a/java/com/google/gerrit/server/notedb/NoteDbUpdateManager.java
+++ b/java/com/google/gerrit/server/notedb/NoteDbUpdateManager.java
@@ -324,7 +324,7 @@
       // we may have stale draft comments. Doing it in this order allows stale
       // comments to be filtered out by ChangeNotes, reflecting the fact that
       // comments can only go from DRAFT to PUBLISHED, not vice versa.
-      try (TraceContext.TraceTimer ignored =
+      try (TraceContext.TraceTimer _ =
           newTimer("NoteDbUpdateManager#updateRepo", Metadata.empty())) {
         execute(changeRepo, dryrun, pushCert).ifPresent(bru -> resultBuilder.put(projectName, bru));
       }
diff --git a/java/com/google/gerrit/server/notedb/RepoSequence.java b/java/com/google/gerrit/server/notedb/RepoSequence.java
index fc7e450..f8797de 100644
--- a/java/com/google/gerrit/server/notedb/RepoSequence.java
+++ b/java/com/google/gerrit/server/notedb/RepoSequence.java
@@ -427,8 +427,7 @@
   @Override
   public int last() {
     if (counter == 0) {
-      @SuppressWarnings("unused")
-      var unused = next();
+      var _ = next();
     }
     return counter - 1;
   }
diff --git a/java/com/google/gerrit/server/patch/AutoMerger.java b/java/com/google/gerrit/server/patch/AutoMerger.java
index 3aed6b0..0e9498b 100644
--- a/java/com/google/gerrit/server/patch/AutoMerger.java
+++ b/java/com/google/gerrit/server/patch/AutoMerger.java
@@ -153,7 +153,7 @@
       }
       counter.increment(OperationType.IN_MEMORY_WRITE);
       logger.atInfo().log("Computing in-memory AutoMerge for %s", merge.name());
-      try (Timer1.Context<OperationType> ignored = latency.start(OperationType.IN_MEMORY_WRITE)) {
+      try (Timer1.Context<OperationType> _ = latency.start(OperationType.IN_MEMORY_WRITE)) {
         return rw.parseCommit(
             createAutoMergeCommit(repo.getConfig(), rw, ins, merge, configuredMergeStrategy));
       }
@@ -205,7 +205,7 @@
   ObjectId createAutoMergeCommit(RepoView repoView, ObjectInserter ins, RevCommit mergeCommit)
       throws IOException {
     ObjectId autoMerge;
-    try (Timer1.Context<OperationType> ignored = latency.start(OperationType.ON_DISK_WRITE)) {
+    try (Timer1.Context<OperationType> _ = latency.start(OperationType.ON_DISK_WRITE)) {
       autoMerge =
           createAutoMergeCommit(
               repoView.getConfig(),
@@ -222,8 +222,8 @@
     Optional<ObjectId> commit = repoView.getRef(refName);
     if (commit.isPresent()) {
       RevObject obj = repoView.getRevWalk().parseAny(commit.get());
-      if (obj instanceof RevCommit) {
-        return Optional.of((RevCommit) obj);
+      if (obj instanceof RevCommit revCommit) {
+        return Optional.of(revCommit);
       }
     }
     return Optional.empty();
diff --git a/java/com/google/gerrit/server/patch/DiffSummaryKey.java b/java/com/google/gerrit/server/patch/DiffSummaryKey.java
index 1f4fa07..3e2e0dc 100644
--- a/java/com/google/gerrit/server/patch/DiffSummaryKey.java
+++ b/java/com/google/gerrit/server/patch/DiffSummaryKey.java
@@ -62,8 +62,7 @@
 
   @Override
   public boolean equals(Object o) {
-    if (o instanceof DiffSummaryKey) {
-      DiffSummaryKey k = (DiffSummaryKey) o;
+    if (o instanceof DiffSummaryKey k) {
       return Objects.equals(oldId, k.oldId)
           && Objects.equals(parentNum, k.parentNum)
           && Objects.equals(newId, k.newId)
diff --git a/java/com/google/gerrit/server/patch/IntraLineDiff.java b/java/com/google/gerrit/server/patch/IntraLineDiff.java
index fb13207..6c79761 100644
--- a/java/com/google/gerrit/server/patch/IntraLineDiff.java
+++ b/java/com/google/gerrit/server/patch/IntraLineDiff.java
@@ -84,8 +84,7 @@
     for (Edit e : edits) {
       writeEdit(out, e);
 
-      if (e instanceof ReplaceEdit) {
-        ReplaceEdit r = (ReplaceEdit) e;
+      if (e instanceof ReplaceEdit r) {
         writeVarInt32(out, r.getInternalEdits().size());
         for (Edit i : r.getInternalEdits()) {
           writeEdit(out, i);
@@ -120,8 +119,8 @@
   }
 
   private static Edit copy(Edit edit) {
-    if (edit instanceof ReplaceEdit) {
-      return copy((ReplaceEdit) edit);
+    if (edit instanceof ReplaceEdit replaceEdit) {
+      return copy(replaceEdit);
     }
     return new Edit(edit.getBeginA(), edit.getEndA(), edit.getBeginB(), edit.getEndB());
   }
diff --git a/java/com/google/gerrit/server/patch/IntraLineLoader.java b/java/com/google/gerrit/server/patch/IntraLineLoader.java
index 3eb50d3..68e5651 100644
--- a/java/com/google/gerrit/server/patch/IntraLineLoader.java
+++ b/java/com/google/gerrit/server/patch/IntraLineLoader.java
@@ -322,7 +322,7 @@
         }
       }
       return Optional.of(target.toString());
-    } catch (StringIndexOutOfBoundsException unused) {
+    } catch (StringIndexOutOfBoundsException _) {
       return Optional.empty();
     }
   }
diff --git a/java/com/google/gerrit/server/patch/MagicFile.java b/java/com/google/gerrit/server/patch/MagicFile.java
index ec4b9d8..bb779e4 100644
--- a/java/com/google/gerrit/server/patch/MagicFile.java
+++ b/java/com/google/gerrit/server/patch/MagicFile.java
@@ -35,8 +35,8 @@
       throws IOException {
     try (RevWalk rw = new RevWalk(reader)) {
       RevCommit c;
-      if (commitId instanceof RevCommit) {
-        c = (RevCommit) commitId;
+      if (commitId instanceof RevCommit revCommit) {
+        c = revCommit;
       } else {
         c = rw.parseCommit(commitId);
       }
diff --git a/java/com/google/gerrit/server/patch/PatchListKey.java b/java/com/google/gerrit/server/patch/PatchListKey.java
index 386c50d..29bfe6a 100644
--- a/java/com/google/gerrit/server/patch/PatchListKey.java
+++ b/java/com/google/gerrit/server/patch/PatchListKey.java
@@ -136,8 +136,7 @@
 
   @Override
   public boolean equals(Object o) {
-    if (o instanceof PatchListKey) {
-      PatchListKey k = (PatchListKey) o;
+    if (o instanceof PatchListKey k) {
       return Objects.equals(oldId, k.oldId)
           && Objects.equals(parentNum, k.parentNum)
           && Objects.equals(newId, k.newId)
diff --git a/java/com/google/gerrit/server/patch/filediff/FileDiffCacheImpl.java b/java/com/google/gerrit/server/patch/filediff/FileDiffCacheImpl.java
index 9abbe45..426928e 100644
--- a/java/com/google/gerrit/server/patch/filediff/FileDiffCacheImpl.java
+++ b/java/com/google/gerrit/server/patch/filediff/FileDiffCacheImpl.java
@@ -438,11 +438,11 @@
                 FileDiffOutput.createExpensive(
                     key.newFilePath(), key.oldCommit(), key.newCommit()));
           } catch (ExecutionException e) {
-            if (e.getCause() instanceof DiffNotAvailableException) {
-              throw (DiffNotAvailableException) e.getCause();
+            if (e.getCause() instanceof DiffNotAvailableException dnae) {
+              throw dnae;
             }
-            if (e.getCause() instanceof IOException) {
-              throw (IOException) e.getCause();
+            if (e.getCause() instanceof IOException ioe) {
+              throw ioe;
             }
             throw new DiffNotAvailableException(e);
           }
diff --git a/java/com/google/gerrit/server/permissions/AbstractChangeControl.java b/java/com/google/gerrit/server/permissions/AbstractChangeControl.java
index 07a0833..0949c50 100644
--- a/java/com/google/gerrit/server/permissions/AbstractChangeControl.java
+++ b/java/com/google/gerrit/server/permissions/AbstractChangeControl.java
@@ -20,6 +20,7 @@
 import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
 import com.google.gerrit.common.Nullable;
+import com.google.gerrit.common.UsedAt;
 import com.google.gerrit.entities.Change;
 import com.google.gerrit.entities.Permission;
 import com.google.gerrit.entities.PermissionRange;
@@ -42,42 +43,36 @@
 abstract class AbstractChangeControl {
   protected final ProjectControl projectControl;
   protected final RefControl refControl;
-  protected final boolean isNew;
   protected final PermissionBackend permissionBackend;
 
-  /** Is this user the owner of the change? */
-  protected final boolean isOwner;
-
   private Map<String, PermissionRange> labels;
 
   AbstractChangeControl(
-      ProjectControl projectControl,
-      RefControl refControl,
-      PermissionBackend permissionBackend,
-      boolean isNew,
-      boolean isOwner) {
+      ProjectControl projectControl, RefControl refControl, PermissionBackend permissionBackend) {
     this.projectControl = projectControl;
     this.refControl = refControl;
     this.permissionBackend = permissionBackend;
-    this.isNew = isNew;
-    this.isOwner = isOwner;
   }
 
   protected abstract ForChange asForChange();
 
+  protected abstract boolean isNew();
+
+  /** Is this user the owner of the change? */
+  protected abstract boolean isOwner();
+
   protected CurrentUser getUser() {
     return refControl.getUser();
   }
 
   protected boolean can(ChangePermissionOrLabel perm) throws PermissionBackendException {
-    if (perm instanceof ChangePermission) {
-      return can((ChangePermission) perm);
-    } else if (perm instanceof AbstractLabelPermission) {
-      return can((AbstractLabelPermission) perm);
-    } else if (perm instanceof AbstractLabelPermission.WithValue) {
-      return can((AbstractLabelPermission.WithValue) perm);
-    }
-    throw new PermissionBackendException(perm + " unsupported");
+    return switch (perm) {
+      case ChangePermission changePermission -> can(changePermission);
+      case AbstractLabelPermission abstractLabelPermission -> can(abstractLabelPermission);
+      case AbstractLabelPermission.WithValue labelPermissionWithValue ->
+          can(labelPermissionWithValue);
+      case null, default -> throw new PermissionBackendException(perm + " unsupported");
+    };
   }
 
   protected boolean can(ChangePermission perm) throws PermissionBackendException {
@@ -85,7 +80,8 @@
       return switch (perm) {
         case READ -> isVisible();
         case ABANDON -> canAbandon();
-        case DELETE -> projectControl.isAdmin() || refControl.canDeleteChanges(isOwner);
+        case DELETE -> projectControl.isAdmin() || refControl.canDeleteChanges(isOwner());
+        case DELETE_COMMENT -> canDeleteComment();
         case ADD_PATCH_SET -> canAddPatchSet();
         case EDIT_DESCRIPTION -> canEditDescription();
         case EDIT_HASHTAGS -> canEditHashtags();
@@ -95,7 +91,7 @@
         case REBASE_ON_BEHALF_OF_UPLOADER -> canRebaseOnBehalfOfUploader();
         case RESTORE -> canRestore();
         case REVERT -> canRevert();
-        case SUBMIT -> refControl.canSubmit(isOwner);
+        case SUBMIT -> refControl.canSubmit(isOwner());
         case TOGGLE_WORK_IN_PROGRESS_STATE -> canToggleWorkInProgressState();
         case REMOVE_REVIEWER -> refControl.canPerform(changePermissionName(perm));
         case SUBMIT_AS ->
@@ -108,9 +104,15 @@
     }
   }
 
-  /** Can this user perform AI review for this change? */
-  private boolean canAiReview() {
-    return refControl.canPerformDefaultAllow(Permission.AI_REVIEW);
+  /**
+   * Whether the user may use AI Review on this change. The base check is the standard default-deny
+   * model (an explicit {@code aiReview} rule is required). {@link ChangeControl} overrides this to
+   * also allow registered users when the {@code allow_ai_review_for_registered_users} experiment is
+   * enabled, which overrides the ACL (including a {@code block}) for identified users.
+   */
+  @UsedAt(UsedAt.Project.GOOGLE)
+  protected boolean canAiReview() {
+    return refControl.canPerform(Permission.AI_REVIEW);
   }
 
   /** Can this user see this change? */
@@ -121,7 +123,7 @@
 
   /** Can this user abandon this change? */
   private boolean canAbandon() {
-    return isOwner // owner (aka creator) of the change can abandon
+    return isOwner() // owner (aka creator) of the change can abandon
         || refControl.isOwner() // branch owner can abandon
         || projectControl.isOwner() // project owner can abandon
         || refControl.canPerform(Permission.ABANDON) // user can abandon a specific ref
@@ -133,7 +135,7 @@
     if (!refControl.asForRef().testOrFalse(RefPermission.CREATE_CHANGE)) {
       return false;
     }
-    if (isOwner) {
+    if (isOwner()) {
       return true;
     }
     return refControl.canAddPatchSet();
@@ -141,21 +143,21 @@
 
   /** Can this user edit the topic name? */
   private boolean canEditTopicName() {
-    if (isNew) {
-      return isOwner // owner (aka creator) of the change can edit topic
+    if (isNew()) {
+      return isOwner() // owner (aka creator) of the change can edit topic
           || refControl.isOwner() // branch owner can edit topic
           || projectControl.isOwner() // project owner can edit topic
           || refControl.canPerform(
               Permission.EDIT_TOPIC_NAME) // user can edit topic on a specific ref
           || projectControl.isAdmin();
     }
-    return refControl.canForceEditTopicName(isOwner);
+    return refControl.canForceEditTopicName(isOwner());
   }
 
   /** Can this user edit the description? */
   private boolean canEditDescription() {
-    if (isNew) {
-      return isOwner // owner (aka creator) of the change can edit desc
+    if (isNew()) {
+      return isOwner() // owner (aka creator) of the change can edit desc
           || refControl.isOwner() // branch owner can edit desc
           || projectControl.isOwner() // project owner can edit desc
           || projectControl.isAdmin();
@@ -165,7 +167,7 @@
 
   /** Can this user edit the hashtag name? */
   private boolean canEditHashtags() {
-    return isOwner // owner (aka creator) of the change can edit hashtags
+    return isOwner() // owner (aka creator) of the change can edit hashtags
         || refControl.isOwner() // branch owner can edit hashtags
         || projectControl.isOwner() // project owner can edit hashtags
         || refControl.canPerform(
@@ -175,13 +177,13 @@
 
   /** Can this user edit the custom keyed values? */
   private boolean canEditCustomKeyedValues() {
-    return isOwner // owner (aka creator) of the change can edit custom keyed values
+    return isOwner() // owner (aka creator) of the change can edit custom keyed values
         || projectControl.isAdmin();
   }
 
   /** Can this user rebase this change? */
   private boolean canRebase() {
-    return (isOwner || refControl.canSubmit(isOwner) || refControl.canRebase())
+    return (isOwner() || refControl.canSubmit(isOwner()) || refControl.canRebase())
         && refControl.asForRef().testOrFalse(RefPermission.CREATE_CHANGE);
   }
 
@@ -195,7 +197,7 @@
    * separately.
    */
   private boolean canRebaseOnBehalfOfUploader() {
-    return (isOwner || refControl.canSubmit(isOwner) || refControl.canRebase());
+    return (isOwner() || refControl.canSubmit(isOwner()) || refControl.canRebase());
   }
 
   /** Can this user restore this change? */
@@ -211,12 +213,17 @@
 
   /** Can this user toggle WorkInProgress state? */
   private boolean canToggleWorkInProgressState() {
-    return isOwner
+    return isOwner()
         || projectControl.isOwner()
         || refControl.canPerform(Permission.TOGGLE_WORK_IN_PROGRESS_STATE)
         || projectControl.isAdmin();
   }
 
+  /** Can this user delete published comments or change messages on this change? */
+  private boolean canDeleteComment() {
+    return refControl.canPerform(Permission.DELETE_COMMENT) || projectControl.isAdmin();
+  }
+
   private boolean can(AbstractLabelPermission perm) {
     return !label(labelPermissionName(perm)).isEmpty();
   }
@@ -247,7 +254,7 @@
 
   /** The range of permitted values associated with a label permission. */
   private PermissionRange getRange(String permission) {
-    return refControl.getRange(permission, isOwner);
+    return refControl.getRange(permission, isOwner());
   }
 
   protected class ForChangeImpl extends ForChange {
@@ -300,9 +307,9 @@
   }
 
   protected static <T extends ChangePermissionOrLabel> Set<T> newSet(Collection<T> permSet) {
-    if (permSet instanceof EnumSet) {
+    if (permSet instanceof EnumSet enumSet) {
       @SuppressWarnings({"unchecked", "rawtypes"})
-      Set<T> s = ((EnumSet) permSet).clone();
+      Set<T> s = enumSet.clone();
       s.clear();
       return s;
     }
diff --git a/java/com/google/gerrit/server/permissions/AbstractLabelPermission.java b/java/com/google/gerrit/server/permissions/AbstractLabelPermission.java
index ba7caed..a1a500d 100644
--- a/java/com/google/gerrit/server/permissions/AbstractLabelPermission.java
+++ b/java/com/google/gerrit/server/permissions/AbstractLabelPermission.java
@@ -21,7 +21,8 @@
 import com.google.gerrit.server.util.LabelVote;
 
 /** Abstract permission representing a label. */
-public abstract class AbstractLabelPermission implements ChangePermissionOrLabel {
+public abstract sealed class AbstractLabelPermission implements ChangePermissionOrLabel
+    permits LabelPermission, LabelRemovalPermission {
   public enum ForUser {
     SELF,
     ON_BEHALF_OF
@@ -90,7 +91,8 @@
   }
 
   /** A {@link AbstractLabelPermission} at a specific value. */
-  public abstract static class WithValue implements ChangePermissionOrLabel {
+  public abstract static sealed class WithValue implements ChangePermissionOrLabel
+      permits LabelPermission.WithValue, LabelRemovalPermission.WithValue {
     private final ForUser forUser;
     private final LabelVote label;
 
diff --git a/java/com/google/gerrit/server/permissions/ChangeControl.java b/java/com/google/gerrit/server/permissions/ChangeControl.java
index 3941975..525eda7 100644
--- a/java/com/google/gerrit/server/permissions/ChangeControl.java
+++ b/java/com/google/gerrit/server/permissions/ChangeControl.java
@@ -16,9 +16,12 @@
 
 import com.google.common.collect.ImmutableSet;
 import com.google.common.flogger.FluentLogger;
+import com.google.gerrit.common.UsedAt;
 import com.google.gerrit.entities.Account;
 import com.google.gerrit.entities.Permission;
 import com.google.gerrit.server.CurrentUser;
+import com.google.gerrit.server.experiments.ExperimentFeatures;
+import com.google.gerrit.server.experiments.ExperimentFeaturesConstants;
 import com.google.gerrit.server.permissions.PermissionBackend.ForChange;
 import com.google.gerrit.server.query.change.ChangeData;
 import com.google.inject.Inject;
@@ -34,24 +37,28 @@
   private static final FluentLogger logger = FluentLogger.forEnclosingClass();
 
   private final ChangeData changeData;
+  private final ExperimentFeatures experimentFeatures;
 
   @Inject
   protected ChangeControl(
       PermissionBackend permissionBackend,
+      ExperimentFeatures experimentFeatures,
       @Assisted ProjectControl projectControl,
       @Assisted RefControl refControl,
       @Assisted ChangeData changeData) {
-    super(
-        projectControl,
-        refControl,
-        permissionBackend,
-        changeData.change().isNew(),
-        isOwner(refControl, changeData));
+    super(projectControl, refControl, permissionBackend);
     this.changeData = changeData;
+    this.experimentFeatures = experimentFeatures;
   }
 
-  private static boolean isOwner(RefControl refControl, ChangeData changeData) {
-    CurrentUser user = refControl.getUser();
+  @Override
+  protected boolean isNew() {
+    return changeData.change().isNew();
+  }
+
+  @Override
+  protected boolean isOwner() {
+    CurrentUser user = getUser();
     if (user.isIdentifiedUser()) {
       Account.Id id = user.asIdentifiedUser().getAccountId();
       return id.equals(changeData.change().getOwner());
@@ -64,6 +71,15 @@
     return new ForChangeImpl(changeData.getId());
   }
 
+  @UsedAt(UsedAt.Project.GOOGLE)
+  @Override
+  protected boolean canAiReview() {
+    return super.canAiReview()
+        || (experimentFeatures.isFeatureEnabled(
+                ExperimentFeaturesConstants.ALLOW_AI_REVIEW_FOR_REGISTERED_USERS)
+            && getUser().isIdentifiedUser());
+  }
+
   /** Can this user see this change? */
   @Override
   protected boolean isVisible() {
@@ -81,7 +97,7 @@
       return true;
     }
 
-    if (isOwner) {
+    if (isOwner()) {
       logger.atFine().log(
           "%s can see private change %s because this user is the change owner",
           getUser().getLoggableName(), cd.getId());
diff --git a/java/com/google/gerrit/server/permissions/ChangeControlForChangeToBeCreated.java b/java/com/google/gerrit/server/permissions/ChangeControlForChangeToBeCreated.java
index 2cb9d32..51db156 100644
--- a/java/com/google/gerrit/server/permissions/ChangeControlForChangeToBeCreated.java
+++ b/java/com/google/gerrit/server/permissions/ChangeControlForChangeToBeCreated.java
@@ -18,13 +18,25 @@
 
 /** Access control management for a user accessing a change that has not been created yet. */
 public class ChangeControlForChangeToBeCreated extends AbstractChangeControl {
+  private final boolean isOwner;
 
   public ChangeControlForChangeToBeCreated(
       ProjectControl projectControl,
       RefControl refControl,
       PermissionBackend permissionBackend,
       boolean isOwner) {
-    super(projectControl, refControl, permissionBackend, /* isNew= */ true, isOwner);
+    super(projectControl, refControl, permissionBackend);
+    this.isOwner = isOwner;
+  }
+
+  @Override
+  protected boolean isNew() {
+    return true;
+  }
+
+  @Override
+  protected boolean isOwner() {
+    return isOwner;
   }
 
   @Override
diff --git a/java/com/google/gerrit/server/permissions/ChangePermission.java b/java/com/google/gerrit/server/permissions/ChangePermission.java
index 8b2567a..04f896f 100644
--- a/java/com/google/gerrit/server/permissions/ChangePermission.java
+++ b/java/com/google/gerrit/server/permissions/ChangePermission.java
@@ -30,6 +30,7 @@
    */
   RESTORE,
   DELETE,
+  DELETE_COMMENT,
   /**
    * The change can't be abandoned if its current patch set is locked.
    *
diff --git a/java/com/google/gerrit/server/permissions/DefaultPermissionBackend.java b/java/com/google/gerrit/server/permissions/DefaultPermissionBackend.java
index 0e5820a..a0e18fb 100644
--- a/java/com/google/gerrit/server/permissions/DefaultPermissionBackend.java
+++ b/java/com/google/gerrit/server/permissions/DefaultPermissionBackend.java
@@ -178,14 +178,13 @@
     }
 
     private boolean can(GlobalOrPluginPermission perm) throws PermissionBackendException {
-      if (perm instanceof GlobalPermission) {
-        return can((GlobalPermission) perm);
-      } else if (perm instanceof PluginPermission) {
-        PluginPermission pluginPermission = (PluginPermission) perm;
-        return has(DefaultPermissionMappings.pluginCapabilityName(pluginPermission))
-            || (pluginPermission.fallBackToAdmin() && isAdmin());
-      }
-      throw new PermissionBackendException(perm + " unsupported");
+      return switch (perm) {
+        case GlobalPermission globalPermission -> can(globalPermission);
+        case PluginPermission pluginPermission ->
+            has(DefaultPermissionMappings.pluginCapabilityName(pluginPermission))
+                || (pluginPermission.fallBackToAdmin() && isAdmin());
+        case null, default -> throw new PermissionBackendException(perm + " unsupported");
+      };
     }
 
     private boolean can(GlobalPermission perm) throws PermissionBackendException {
diff --git a/java/com/google/gerrit/server/permissions/DefaultPermissionMappings.java b/java/com/google/gerrit/server/permissions/DefaultPermissionMappings.java
index 4db3add..d4342e9 100644
--- a/java/com/google/gerrit/server/permissions/DefaultPermissionMappings.java
+++ b/java/com/google/gerrit/server/permissions/DefaultPermissionMappings.java
@@ -111,6 +111,7 @@
           .put(ChangePermission.READ, Permission.READ)
           .put(ChangePermission.RESTORE, "restore")
           .put(ChangePermission.DELETE, Permission.DELETE)
+          .put(ChangePermission.DELETE_COMMENT, Permission.DELETE_COMMENT)
           .put(ChangePermission.ABANDON, Permission.ABANDON)
           .put(ChangePermission.EDIT_DESCRIPTION, "editDescription")
           .put(ChangePermission.EDIT_CUSTOM_KEYED_VALUES, Permission.EDIT_CUSTOM_KEYED_VALUES)
@@ -193,28 +194,22 @@
   }
 
   public static String labelPermissionName(AbstractLabelPermission labelPermission) {
-    if (labelPermission instanceof LabelPermission) {
-      if (labelPermission.forUser() == ForUser.ON_BEHALF_OF) {
-        return Permission.forLabelAs(labelPermission.label());
-      }
-      return Permission.forLabel(labelPermission.label());
-    } else if (labelPermission instanceof LabelRemovalPermission) {
-      return Permission.forRemoveLabel(labelPermission.label());
-    }
-    throw new IllegalStateException("invalid AbstractLabelPermission subtype");
+    return switch (labelPermission) {
+      case LabelPermission lp when lp.forUser() == ForUser.ON_BEHALF_OF ->
+          Permission.forLabelAs(lp.label());
+      case LabelPermission lp -> Permission.forLabel(lp.label());
+      case LabelRemovalPermission lrp -> Permission.forRemoveLabel(lrp.label());
+    };
   }
 
   // TODO(dborowitz): Can these share a common superinterface?
   public static String labelPermissionName(AbstractLabelPermission.WithValue labelPermission) {
-    if (labelPermission instanceof LabelPermission.WithValue) {
-      if (labelPermission.forUser() == ForUser.ON_BEHALF_OF) {
-        return Permission.forLabelAs(labelPermission.label());
-      }
-      return Permission.forLabel(labelPermission.label());
-    } else if (labelPermission instanceof LabelRemovalPermission.WithValue) {
-      return Permission.forRemoveLabel(labelPermission.label());
-    }
-    throw new IllegalStateException("invalid AbstractLabelPermission.WithValue subtype");
+    return switch (labelPermission) {
+      case LabelPermission.WithValue lp when lp.forUser() == ForUser.ON_BEHALF_OF ->
+          Permission.forLabelAs(lp.label());
+      case LabelPermission.WithValue lp -> Permission.forLabel(lp.label());
+      case LabelRemovalPermission.WithValue lrp -> Permission.forRemoveLabel(lrp.label());
+    };
   }
 
   private DefaultPermissionMappings() {}
diff --git a/java/com/google/gerrit/server/permissions/GitVisibleChangeFilter.java b/java/com/google/gerrit/server/permissions/GitVisibleChangeFilter.java
index e7aa70ee..3f0f46b 100644
--- a/java/com/google/gerrit/server/permissions/GitVisibleChangeFilter.java
+++ b/java/com/google/gerrit/server/permissions/GitVisibleChangeFilter.java
@@ -111,8 +111,7 @@
                 // Make sure notes are available. This will trigger loading notes and throw an
                 // exception in case the change is corrupt and can't be loaded. It will then be
                 // omitted from the result.
-                @SuppressWarnings("unused")
-                var unused = cd.notes();
+                var _ = cd.notes();
 
                 return cd;
               } catch (RuntimeException e) {
diff --git a/java/com/google/gerrit/server/permissions/LabelPermission.java b/java/com/google/gerrit/server/permissions/LabelPermission.java
index 4652364..62f49ae 100644
--- a/java/com/google/gerrit/server/permissions/LabelPermission.java
+++ b/java/com/google/gerrit/server/permissions/LabelPermission.java
@@ -21,7 +21,7 @@
 import com.google.gerrit.server.util.LabelVote;
 
 /** Permission representing a label. */
-public class LabelPermission extends AbstractLabelPermission {
+public non-sealed class LabelPermission extends AbstractLabelPermission {
   /**
    * Construct a reference to a label permission.
    *
@@ -66,7 +66,7 @@
   }
 
   /** A {@link LabelPermission} at a specific value. */
-  public static class WithValue extends AbstractLabelPermission.WithValue {
+  public static non-sealed class WithValue extends AbstractLabelPermission.WithValue {
     /**
      * Construct a reference to a label at a specific value.
      *
diff --git a/java/com/google/gerrit/server/permissions/LabelRemovalPermission.java b/java/com/google/gerrit/server/permissions/LabelRemovalPermission.java
index 2553601..ea682e0 100644
--- a/java/com/google/gerrit/server/permissions/LabelRemovalPermission.java
+++ b/java/com/google/gerrit/server/permissions/LabelRemovalPermission.java
@@ -21,7 +21,7 @@
 import com.google.gerrit.server.util.LabelVote;
 
 /** Permission representing a label removal. */
-public class LabelRemovalPermission extends AbstractLabelPermission {
+public non-sealed class LabelRemovalPermission extends AbstractLabelPermission {
   /**
    * Construct a reference to a label removal permission.
    *
@@ -46,7 +46,7 @@
   }
 
   /** A {@link LabelRemovalPermission} at a specific value. */
-  public static class WithValue extends AbstractLabelPermission.WithValue {
+  public static non-sealed class WithValue extends AbstractLabelPermission.WithValue {
     /**
      * Construct a reference to a label removal at a specific value.
      *
diff --git a/java/com/google/gerrit/server/permissions/PermissionBackend.java b/java/com/google/gerrit/server/permissions/PermissionBackend.java
index 93be379..dc9d020 100644
--- a/java/com/google/gerrit/server/permissions/PermissionBackend.java
+++ b/java/com/google/gerrit/server/permissions/PermissionBackend.java
@@ -333,8 +333,8 @@
         throws PermissionBackendException;
 
     public boolean test(CoreOrPluginProjectPermission perm) throws PermissionBackendException {
-      if (perm instanceof ProjectPermission) {
-        return test(EnumSet.of((ProjectPermission) perm)).contains(perm);
+      if (perm instanceof ProjectPermission projectPermission) {
+        return test(EnumSet.of(projectPermission)).contains(perm);
       }
 
       // TODO(xchangcheng): implement for plugin defined project permissions.
diff --git a/java/com/google/gerrit/server/permissions/PermissionBackendCondition.java b/java/com/google/gerrit/server/permissions/PermissionBackendCondition.java
index a92e504..b469b10 100644
--- a/java/com/google/gerrit/server/permissions/PermissionBackendCondition.java
+++ b/java/com/google/gerrit/server/permissions/PermissionBackendCondition.java
@@ -91,10 +91,9 @@
 
     @Override
     public boolean equals(Object obj) {
-      if (!(obj instanceof WithUser)) {
+      if (!(obj instanceof WithUser other)) {
         return false;
       }
-      WithUser other = (WithUser) obj;
       return Objects.equals(perm, other.perm) && usersAreEqual(user, other.user);
     }
   }
@@ -136,10 +135,9 @@
 
     @Override
     public boolean equals(Object obj) {
-      if (!(obj instanceof ForProject)) {
+      if (!(obj instanceof ForProject other)) {
         return false;
       }
-      ForProject other = (ForProject) obj;
       return Objects.equals(perm, other.perm)
           && Objects.equals(impl.resourcePath(), other.impl.resourcePath())
           && usersAreEqual(user, other.user);
@@ -182,10 +180,9 @@
 
     @Override
     public boolean equals(Object obj) {
-      if (!(obj instanceof ForRef)) {
+      if (!(obj instanceof ForRef other)) {
         return false;
       }
-      ForRef other = (ForRef) obj;
       return Objects.equals(perm, other.perm)
           && Objects.equals(impl.resourcePath(), other.impl.resourcePath())
           && usersAreEqual(user, other.user);
@@ -229,10 +226,9 @@
 
     @Override
     public boolean equals(Object obj) {
-      if (!(obj instanceof ForChange)) {
+      if (!(obj instanceof ForChange other)) {
         return false;
       }
-      ForChange other = (ForChange) obj;
       return Objects.equals(perm, other.perm)
           && Objects.equals(impl.resourcePath(), other.impl.resourcePath())
           && usersAreEqual(user, other.user);
diff --git a/java/com/google/gerrit/server/permissions/PermissionCollection.java b/java/com/google/gerrit/server/permissions/PermissionCollection.java
index 4847c14..7612023 100644
--- a/java/com/google/gerrit/server/permissions/PermissionCollection.java
+++ b/java/com/google/gerrit/server/permissions/PermissionCollection.java
@@ -23,6 +23,7 @@
 import com.google.auto.value.AutoValue;
 import com.google.common.collect.Lists;
 import com.google.gerrit.common.Nullable;
+import com.google.gerrit.common.UsedAt;
 import com.google.gerrit.entities.AccessSection;
 import com.google.gerrit.entities.AccountGroup;
 import com.google.gerrit.entities.Permission;
@@ -101,8 +102,8 @@
         // use a common prefix like "refs/sandbox/" or "refs/heads/users/"
         // that will never be shared with non-user references, and the per-user
         // references are usually less frequent than the non-user references.
-        if (sm.getMatcher() instanceof ExpandParameters) {
-          if (!((ExpandParameters) sm.getMatcher()).matchPrefix(ref)) {
+        if (sm.getMatcher() instanceof ExpandParameters ep) {
+          if (!ep.matchPrefix(ref)) {
             continue;
           }
           perUser = true;
@@ -130,7 +131,7 @@
      */
     PermissionCollection filter(
         Iterable<SectionMatcher> matcherList, String ref, CurrentUser user) {
-      try (Timer0.Context ignored = filterLatency.start()) {
+      try (Timer0.Context _ = filterLatency.start()) {
         if (isRE(ref)) {
           if (!containsParameters(ref)) {
             ref = RefPattern.shortestExample(ref);
@@ -171,23 +172,6 @@
     }
   }
 
-  /** Returns DENY rules for the given permission. */
-  List<PermissionRule> getDenyRules(String perm) {
-    List<PermissionRule> result = new ArrayList<>();
-    for (AccessSection s : accessSectionsUpward) {
-      Permission p = s.getPermission(perm);
-      if (p == null) {
-        continue;
-      }
-      for (PermissionRule pr : p.getRules()) {
-        if (pr.getAction() == PermissionRule.Action.DENY) {
-          result.add(pr);
-        }
-      }
-    }
-    return result;
-  }
-
   /** Returns permissions in the right order for evaluating BLOCK status. */
   List<List<Permission>> getBlockRules(String perm) {
     List<List<Permission>> ps = blockPerProjectByPermission.get(perm);
@@ -199,7 +183,8 @@
   }
 
   /** Returns permissions in the right order for evaluating ALLOW/DENY status. */
-  List<PermissionRule> getAllowRules(String perm) {
+  @UsedAt(UsedAt.Project.GOOGLE)
+  public List<PermissionRule> getAllowRules(String perm) {
     List<PermissionRule> ps = rulesByPermission.get(perm);
     if (ps == null) {
       ps = calculateAllowRules(perm);
@@ -208,6 +193,12 @@
     return ps;
   }
 
+  /** Returns the access sections that apply to this reference, ordered from child to parent. */
+  @UsedAt(UsedAt.Project.GOOGLE)
+  public List<AccessSection> getAccessSectionsUpward() {
+    return accessSectionsUpward;
+  }
+
   /** calculates permissions for ALLOW processing. */
   private List<PermissionRule> calculateAllowRules(String permName) {
     Set<SeenRule> seen = new HashSet<>();
diff --git a/java/com/google/gerrit/server/permissions/ProjectControl.java b/java/com/google/gerrit/server/permissions/ProjectControl.java
index 9cab8b2..5fbf9f6 100644
--- a/java/com/google/gerrit/server/permissions/ProjectControl.java
+++ b/java/com/google/gerrit/server/permissions/ProjectControl.java
@@ -182,7 +182,8 @@
     }
   }
 
-  boolean match(PermissionRule rule, boolean isChangeOwner) {
+  @UsedAt(UsedAt.Project.GOOGLE)
+  protected boolean match(PermissionRule rule, boolean isChangeOwner) {
     return match(rule.getGroup().getUUID(), isChangeOwner);
   }
 
@@ -463,14 +464,13 @@
     }
 
     private boolean can(CoreOrPluginProjectPermission perm) throws PermissionBackendException {
-      if (perm instanceof ProjectPermission) {
-        return can((ProjectPermission) perm);
-      } else if (perm instanceof PluginProjectPermission) {
+      return switch (perm) {
+        case ProjectPermission projectPermission -> can(projectPermission);
         // TODO(xchangcheng): implement for plugin defined project permissions.
-        return false;
-      }
-
-      throw new PermissionBackendException(perm.describeForException() + " unsupported");
+        case PluginProjectPermission _ -> false;
+        case null, default ->
+            throw new PermissionBackendException(perm.describeForException() + " unsupported");
+      };
     }
 
     private boolean can(ProjectPermission perm) {
diff --git a/java/com/google/gerrit/server/permissions/RefControl.java b/java/com/google/gerrit/server/permissions/RefControl.java
index 1823be6..55bf6bb 100644
--- a/java/com/google/gerrit/server/permissions/RefControl.java
+++ b/java/com/google/gerrit/server/permissions/RefControl.java
@@ -19,6 +19,7 @@
 import com.google.common.collect.ImmutableList;
 import com.google.common.flogger.FluentLogger;
 import com.google.gerrit.common.Nullable;
+import com.google.gerrit.common.UsedAt;
 import com.google.gerrit.entities.Change;
 import com.google.gerrit.entities.Permission;
 import com.google.gerrit.entities.PermissionRange;
@@ -99,7 +100,8 @@
     return projectControl;
   }
 
-  CurrentUser getUser() {
+  @UsedAt(UsedAt.Project.GOOGLE)
+  protected CurrentUser getUser() {
     return projectControl.getUser();
   }
 
@@ -107,6 +109,11 @@
     return refName;
   }
 
+  @UsedAt(UsedAt.Project.GOOGLE)
+  protected PermissionCollection getRelevantPermissions() {
+    return relevant;
+  }
+
   /** Is this user a ref owner? */
   boolean isOwner() {
     if (owner == null) {
@@ -194,43 +201,11 @@
   }
 
   /** True if the user has this permission. Works only for non labels. */
-  boolean canPerform(String permissionName) {
+  @UsedAt(UsedAt.Project.GOOGLE)
+  protected boolean canPerform(String permissionName) {
     return canPerform(permissionName, false, false);
   }
 
-  /**
-   * Default-allow variant of {@link #canPerform}: grants access unless explicitly restricted.
-   *
-   * <p>Unlike standard Gerrit permissions which are default-deny, this method defaults to granting
-   * access. It denies when the user matches an explicit DENY or BLOCK rule. When ALLOW rules are
-   * configured, it falls back to standard {@link #canPerform} evaluation.
-   *
-   * <p>This is used for opt-out permissions such as AI Review, where access is available by default
-   * unless an admin explicitly restricts it.
-   */
-  boolean canPerformDefaultAllow(String permissionName) {
-    if (!relevant.getAllowRules(permissionName).isEmpty()) {
-      return canPerform(permissionName);
-    }
-    for (PermissionRule pr : relevant.getDenyRules(permissionName)) {
-      if (projectControl.match(pr, false)) {
-        if (logger.atFine().isEnabled() || LoggingContext.getInstance().isAclLogging()) {
-          String logMessage =
-              String.format(
-                  "'%s' cannot perform '%s' on project '%s' for ref '%s'"
-                      + " because this permission is denied",
-                  getUser().getLoggableName(),
-                  permissionName,
-                  projectControl.getProject().getName(),
-                  refName);
-          LoggingContext.getInstance().addAclLogRecord(logMessage);
-        }
-        return false;
-      }
-    }
-    return !isBlocked(permissionName, false, false);
-  }
-
   ForRef asForRef() {
     return new ForRefImpl();
   }
@@ -400,7 +375,8 @@
         /* max= */ Math.min(voteMax, blockAllowMax));
   }
 
-  private boolean isBlocked(String permissionName, boolean isChangeOwner, boolean withForce) {
+  @UsedAt(UsedAt.Project.GOOGLE)
+  protected boolean isBlocked(String permissionName, boolean isChangeOwner, boolean withForce) {
     // Permissions are ordered by (more general project, more specific ref). Because Permission
     // does not have back pointers, we can't tell what ref-pattern or project each permission comes
     // from.
diff --git a/java/com/google/gerrit/server/plugins/AutoRegisterModules.java b/java/com/google/gerrit/server/plugins/AutoRegisterModules.java
index 1942193..2b5463b 100644
--- a/java/com/google/gerrit/server/plugins/AutoRegisterModules.java
+++ b/java/com/google/gerrit/server/plugins/AutoRegisterModules.java
@@ -198,10 +198,10 @@
   private void listen(java.lang.reflect.Type type, Class<?> clazz) throws InvalidPluginException {
     while (type != null) {
       Class<?> rawType;
-      if (type instanceof ParameterizedType) {
-        rawType = (Class<?>) ((ParameterizedType) type).getRawType();
-      } else if (type instanceof Class) {
-        rawType = (Class<?>) type;
+      if (type instanceof ParameterizedType parameterizedType) {
+        rawType = (Class<?>) parameterizedType.getRawType();
+      } else if (type instanceof Class<?> typeClass) {
+        rawType = typeClass;
       } else {
         return;
       }
diff --git a/java/com/google/gerrit/server/plugins/Plugin.java b/java/com/google/gerrit/server/plugins/Plugin.java
index 3de7e27..917c931 100644
--- a/java/com/google/gerrit/server/plugins/Plugin.java
+++ b/java/com/google/gerrit/server/plugins/Plugin.java
@@ -150,11 +150,11 @@
 
   public void add(RegistrationHandle handle) {
     if (manager != null) {
-      if (handle instanceof ReloadableRegistrationHandle) {
+      if (handle instanceof ReloadableRegistrationHandle<?> reloadableHandle) {
         if (reloadableHandles == null) {
           reloadableHandles = new ArrayList<>();
         }
-        reloadableHandles.add((ReloadableRegistrationHandle<?>) handle);
+        reloadableHandles.add(reloadableHandle);
       }
       manager.add(handle);
     }
diff --git a/java/com/google/gerrit/server/plugins/PluginGuiceEnvironment.java b/java/com/google/gerrit/server/plugins/PluginGuiceEnvironment.java
index c2ae910..856a7b0 100644
--- a/java/com/google/gerrit/server/plugins/PluginGuiceEnvironment.java
+++ b/java/com/google/gerrit/server/plugins/PluginGuiceEnvironment.java
@@ -252,8 +252,7 @@
   }
 
   public void exit(RequestContext old) {
-    @SuppressWarnings("unused")
-    var unused = local.setContext(old);
+    var _ = local.setContext(old);
   }
 
   public void onStartPlugin(Plugin plugin) {
diff --git a/java/com/google/gerrit/server/plugins/ServerPlugin.java b/java/com/google/gerrit/server/plugins/ServerPlugin.java
index 18ab2ab..01b2c03 100644
--- a/java/com/google/gerrit/server/plugins/ServerPlugin.java
+++ b/java/com/google/gerrit/server/plugins/ServerPlugin.java
@@ -347,11 +347,11 @@
   @Override
   public void add(RegistrationHandle handle) {
     if (serverManager != null) {
-      if (handle instanceof ReloadableRegistrationHandle) {
+      if (handle instanceof ReloadableRegistrationHandle<?> reloadableHandle) {
         if (reloadableHandles == null) {
           reloadableHandles = new ArrayList<>();
         }
-        reloadableHandles.add((ReloadableRegistrationHandle<?>) handle);
+        reloadableHandles.add(reloadableHandle);
       }
       serverManager.add(handle);
     }
diff --git a/java/com/google/gerrit/server/project/CreateProjectArgs.java b/java/com/google/gerrit/server/project/CreateProjectArgs.java
index dbfbb87..60f43cf 100644
--- a/java/com/google/gerrit/server/project/CreateProjectArgs.java
+++ b/java/com/google/gerrit/server/project/CreateProjectArgs.java
@@ -19,6 +19,7 @@
 import com.google.gerrit.entities.Project;
 import com.google.gerrit.entities.RefNames;
 import com.google.gerrit.extensions.client.InheritableBoolean;
+import com.google.gerrit.extensions.client.RefStorage;
 import com.google.gerrit.extensions.client.SubmitType;
 import java.util.List;
 
@@ -42,6 +43,7 @@
   public boolean createEmptyCommit;
   public String maxObjectSizeLimit;
   public boolean initOnly;
+  public RefStorage refStorage;
 
   public CreateProjectArgs() {
     contributorAgreements = InheritableBoolean.INHERIT;
diff --git a/java/com/google/gerrit/server/project/CreateRefControl.java b/java/com/google/gerrit/server/project/CreateRefControl.java
index 955ff95..19babe6 100644
--- a/java/com/google/gerrit/server/project/CreateRefControl.java
+++ b/java/com/google/gerrit/server/project/CreateRefControl.java
@@ -101,10 +101,10 @@
     ps.checkStatePermitsWrite();
 
     PermissionBackend.ForRef perm = permissionBackend.user(user.get()).ref(destBranch);
-    if (object instanceof RevCommit) {
+    if (object instanceof RevCommit commit) {
       perm.check(RefPermission.CREATE);
       if (sourceBranches.length == 0) {
-        checkCreateCommit(user, repo, (RevCommit) object, ps.getNameKey(), perm, forPush);
+        checkCreateCommit(user, repo, commit, ps.getNameKey(), perm, forPush);
       } else {
         List<Ref> sourceRefs = new ArrayList<>();
         for (BranchNameKey src : sourceBranches) {
@@ -113,7 +113,7 @@
         if (reachable.fromRefs(
             destBranch.project(),
             repo,
-            (RevCommit) object,
+            commit,
             ImmutableList.copyOf(sourceRefs),
             Optional.of(user.get()))) {
           return;
@@ -128,8 +128,7 @@
       }
       return;
     }
-    if (object instanceof RevTag) {
-      RevTag tag = (RevTag) object;
+    if (object instanceof RevTag tag) {
       try (RevWalk rw = new RevWalk(repo)) {
         rw.parseBody(tag);
       } catch (IOException e) {
@@ -147,8 +146,8 @@
       }
 
       RevObject target = tag.getObject();
-      if (target instanceof RevCommit) {
-        checkCreateCommit(user, repo, (RevCommit) target, ps.getNameKey(), perm, forPush);
+      if (target instanceof RevCommit revCommit) {
+        checkCreateCommit(user, repo, revCommit, ps.getNameKey(), perm, forPush);
       } else {
         checkCreateRef(user, repo, destBranch, target, forPush);
       }
diff --git a/java/com/google/gerrit/server/project/GroupList.java b/java/com/google/gerrit/server/project/GroupList.java
index 1b0ba97..62d941d 100644
--- a/java/com/google/gerrit/server/project/GroupList.java
+++ b/java/com/google/gerrit/server/project/GroupList.java
@@ -49,7 +49,7 @@
   public static GroupList parse(Project.NameKey project, String text, ValidationError.Sink errors)
       throws IOException {
     List<Row> rows = parse(text, FILE_NAME, TRIM, TRIM, errors);
-    Map<AccountGroup.UUID, GroupReference> groupsByUUID = new HashMap<>(rows.size());
+    Map<AccountGroup.UUID, GroupReference> groupsByUUID = HashMap.newHashMap(rows.size());
     for (Row row : rows) {
       if (row.left == null) {
         logger.atWarning().log("null field in group list for %s:\n%s", project, text);
diff --git a/java/com/google/gerrit/server/project/LabelConfigValidator.java b/java/com/google/gerrit/server/project/LabelConfigValidator.java
index 07165f2..9e01661 100644
--- a/java/com/google/gerrit/server/project/LabelConfigValidator.java
+++ b/java/com/google/gerrit/server/project/LabelConfigValidator.java
@@ -279,8 +279,7 @@
       String copyCondition =
           newConfig.getString(ProjectConfig.LABEL, labelName, ProjectConfig.KEY_COPY_CONDITION);
       try {
-        @SuppressWarnings("unused")
-        var unused = approvalQueryBuilder.parse(copyCondition);
+        var _ = approvalQueryBuilder.parse(copyCondition);
       } catch (QueryParseException e) {
         validationMessageBuilder.add(
             new CommitValidationMessage(
@@ -309,8 +308,7 @@
     String oldCopyCondition =
         oldConfig.getString(ProjectConfig.LABEL, labelName, ProjectConfig.KEY_COPY_CONDITION);
     try {
-      @SuppressWarnings("unused")
-      var unused = approvalQueryBuilder.parse(oldCopyCondition);
+      var _ = approvalQueryBuilder.parse(oldCopyCondition);
       return false;
     } catch (QueryParseException e) {
       return true;
diff --git a/java/com/google/gerrit/server/project/ProjectCacheImpl.java b/java/com/google/gerrit/server/project/ProjectCacheImpl.java
index 807ceeb..041786f 100644
--- a/java/com/google/gerrit/server/project/ProjectCacheImpl.java
+++ b/java/com/google/gerrit/server/project/ProjectCacheImpl.java
@@ -14,12 +14,13 @@
 
 package com.google.gerrit.server.project;
 
+import static com.google.common.collect.ImmutableSet.toImmutableSet;
 import static com.google.gerrit.server.project.ProjectCache.illegalState;
 import static java.nio.charset.StandardCharsets.UTF_8;
-import static java.util.stream.Collectors.toSet;
 
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.cache.CacheLoader;
+import com.google.common.cache.CacheStats;
 import com.google.common.cache.LoadingCache;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.ImmutableSortedSet;
@@ -74,6 +75,7 @@
 import java.util.Optional;
 import java.util.Set;
 import java.util.concurrent.ExecutionException;
+import java.util.concurrent.atomic.AtomicLong;
 import java.util.concurrent.locks.Lock;
 import java.util.concurrent.locks.ReentrantLock;
 import org.eclipse.jgit.errors.ConfigInvalidException;
@@ -167,7 +169,7 @@
     };
   }
 
-  private final Config config;
+  private final ImmutableSet<AccountGroup.UUID> configuredRelevantGroupUuids;
   private final AllProjectsName allProjectsName;
   private final AllUsersName allUsersName;
   private final LoadingCache<Project.NameKey, Optional<CachedProjectConfig>> inMemoryProjectCache;
@@ -176,6 +178,15 @@
   private final Provider<ProjectIndexer> indexer;
   private final Timer0 guessRelevantGroupsLatency;
   private final ProjectState.Factory projectStateFactory;
+  private final AtomicLong relevantGroupsMutationCount = new AtomicLong();
+  private volatile RelevantGroupsCacheEntry relevantGroupsCacheEntry;
+
+  private record RelevantGroupsCacheEntry(
+      long mutationCount,
+      long loadCount,
+      long evictionCount,
+      long cacheSize,
+      ImmutableSet<AccountGroup.UUID> groupUuids) {}
 
   @Inject
   ProjectCacheImpl(
@@ -189,7 +200,10 @@
       MetricMaker metricMaker,
       ProjectState.Factory projectStateFactory,
       GitRepositoryManager repositoryManager) {
-    this.config = config;
+    this.configuredRelevantGroupUuids =
+        Arrays.stream(config.getStringList("groups", /* subsection= */ null, "relevantGroup"))
+            .map(AccountGroup::uuid)
+            .collect(toImmutableSet());
     this.allProjectsName = allProjectsName;
     this.allUsersName = allUsersName;
     this.inMemoryProjectCache = inMemoryProjectCache;
@@ -236,6 +250,7 @@
     if (p != null) {
       logger.atFine().log("Evict project '%s'", p.get());
       inMemoryProjectCache.invalidate(p);
+      relevantGroupsMutationCount.incrementAndGet();
     }
   }
 
@@ -300,16 +315,30 @@
   @Override
   public void refreshProjectList() {
     list.refresh(ListKey.ALL);
+    relevantGroupsMutationCount.incrementAndGet();
   }
 
   @Override
   public Set<AccountGroup.UUID> guessRelevantGroupUUIDs() {
-    try (Timer0.Context ignored = guessRelevantGroupsLatency.start()) {
-      Set<AccountGroup.UUID> relevantGroupUuids =
+    try (Timer0.Context _ = guessRelevantGroupsLatency.start()) {
+      long mutationCount = relevantGroupsMutationCount.get();
+      CacheStats stats = inMemoryProjectCache.stats();
+      long loadCount = stats.loadCount();
+      long evictionCount = stats.evictionCount();
+      long cacheSize = inMemoryProjectCache.size();
+
+      RelevantGroupsCacheEntry cached = relevantGroupsCacheEntry;
+      if (cached != null
+          && cached.mutationCount() == mutationCount
+          && cached.loadCount() == loadCount
+          && cached.evictionCount() == evictionCount
+          && cached.cacheSize() == cacheSize) {
+        return cached.groupUuids();
+      }
+
+      ImmutableSet<AccountGroup.UUID> relevantGroupUuids =
           Streams.concat(
-                  Arrays.stream(
-                          config.getStringList("groups", /* subsection= */ null, "relevantGroup"))
-                      .map(AccountGroup::uuid),
+                  configuredRelevantGroupUuids.stream(),
                   all().stream()
                       .map(n -> inMemoryProjectCache.getIfPresent(n))
                       .filter(Objects::nonNull)
@@ -318,7 +347,10 @@
                       // getAllGroupUUIDs shouldn't really return null UUIDs, but harden
                       // against them just in case there is a bug or corner case.
                       .filter(id -> id != null && id.get() != null))
-              .collect(toSet());
+              .collect(toImmutableSet());
+      relevantGroupsCacheEntry =
+          new RelevantGroupsCacheEntry(
+              mutationCount, loadCount, evictionCount, cacheSize, relevantGroupUuids);
       logger.atFine().log("relevant group UUIDs: %s", relevantGroupUuids);
       return relevantGroupUuids;
     }
@@ -400,7 +432,7 @@
     public Optional<CachedProjectConfig> load(Project.NameKey key)
         throws IOException, ExecutionException {
       try {
-        try (TraceTimer ignored =
+        try (TraceTimer _ =
                 TraceContext.newTimer(
                     "Loading project from serialized cache",
                     Metadata.builder().projectName(key.get()).build());
@@ -427,7 +459,7 @@
     @Override
     public ListenableFuture<Optional<CachedProjectConfig>> reload(
         Project.NameKey key, Optional<CachedProjectConfig> oldState) throws Exception {
-      try (TraceTimer ignored =
+      try (TraceTimer _ =
           TraceContext.newTimer(
               "Reload project", Metadata.builder().projectName(key.get()).build())) {
         try (Repository git = repoManager.openRepository(key)) {
@@ -475,7 +507,7 @@
           key.getRevision().isEmpty()
               ? null
               : ObjectIdConverter.create().fromByteString(key.getRevision());
-      try (TraceTimer ignored =
+      try (TraceTimer _ =
           TraceContext.newTimer(
               "Loading project from repo", Metadata.builder().projectName(nameKey.get()).build())) {
         try (Repository git = repoManager.openRepository(nameKey)) {
@@ -527,6 +559,7 @@
   @VisibleForTesting
   public void evictAllByName() {
     inMemoryProjectCache.invalidateAll();
+    relevantGroupsMutationCount.incrementAndGet();
   }
 
   @VisibleForTesting
diff --git a/java/com/google/gerrit/server/project/ProjectCreator.java b/java/com/google/gerrit/server/project/ProjectCreator.java
index 7f6634c..d46460f0 100644
--- a/java/com/google/gerrit/server/project/ProjectCreator.java
+++ b/java/com/google/gerrit/server/project/ProjectCreator.java
@@ -157,7 +157,7 @@
                     if (!status.equals(Status.NON_EXISTENT)) {
                       throw new RepositoryExistsException(nameKey, "Repository status: " + status);
                     }
-                    try (Repository repo = repoManager.createRepository(nameKey)) {
+                    try (Repository repo = repoManager.createRepository(nameKey, args.refStorage)) {
                       initProject(nameKey, repo, args);
                       return projectCache.get(nameKey).orElseThrow(illegalState(nameKey));
                     }
@@ -300,7 +300,7 @@
       md.getRepository().setGitwebDescription(args.projectDescription);
     } finally {
       if (configRevCommit != null) {
-        fireEvents(args.getProject(), args.getHead(), configRevCommit);
+        fireEvents(args.getProject(), args.getHead(), repo.getConfig().toText(), configRevCommit);
       }
     }
     projectCache.onCreateProject(args.getProject());
@@ -371,9 +371,11 @@
     }
   }
 
-  private void fireEvents(Project.NameKey name, String head, ObjectId configNewObjectId) {
+  private void fireEvents(
+      Project.NameKey name, String head, String gitConfig, ObjectId configNewObjectId) {
     if (!createdListeners.isEmpty()) {
-      ProjectCreator.Event event = new ProjectCreator.Event(name, head, gerritInstanceId);
+      ProjectCreator.Event event =
+          new ProjectCreator.Event(name, head, gerritInstanceId, gitConfig);
       createdListeners.runEach(l -> l.onNewProjectCreated(event));
     }
 
@@ -389,11 +391,13 @@
     private final Project.NameKey name;
     private final String head;
     private final String gerritInstanceId;
+    private final String gitConfig;
 
-    Event(Project.NameKey name, String head, @Nullable String gerritInstanceId) {
+    Event(Project.NameKey name, String head, @Nullable String gerritInstanceId, String gitConfig) {
       this.name = name;
       this.head = head;
       this.gerritInstanceId = gerritInstanceId;
+      this.gitConfig = gitConfig;
     }
 
     @Override
@@ -407,6 +411,11 @@
     }
 
     @Override
+    public String getGitConfig() {
+      return gitConfig;
+    }
+
+    @Override
     public String getInstanceId() {
       return gerritInstanceId;
     }
diff --git a/java/com/google/gerrit/server/project/ProjectsConsistencyChecker.java b/java/com/google/gerrit/server/project/ProjectsConsistencyChecker.java
index a317361..8c86488 100644
--- a/java/com/google/gerrit/server/project/ProjectsConsistencyChecker.java
+++ b/java/com/google/gerrit/server/project/ProjectsConsistencyChecker.java
@@ -273,8 +273,7 @@
         // Skip changes that we have already processed, either by this query or by
         // earlier queries.
         if (seenChanges.add(autoCloseableChange.getId())) {
-          @SuppressWarnings("unused")
-          var unused =
+          var _ =
               retryHelper
                   .changeUpdate(
                       "projectsConsistencyCheckerAutoCloseChanges",
diff --git a/java/com/google/gerrit/server/project/RemoveReviewerControl.java b/java/com/google/gerrit/server/project/RemoveReviewerControl.java
index ee8cf05..c929d20 100644
--- a/java/com/google/gerrit/server/project/RemoveReviewerControl.java
+++ b/java/com/google/gerrit/server/project/RemoveReviewerControl.java
@@ -56,9 +56,14 @@
   public void checkRemoveReviewerApproval(
       ChangeNotes notes, CurrentUser currentUser, PatchSetApproval approval)
       throws PermissionBackendException, AuthException, ResourceConflictException {
-    if (notes.getChange().isMerged() && approval.value() != 0) {
+    if (notes.getChange().isMerged()
+        && approval.value() != 0
+        && !permissionBackend.user(currentUser).test(GlobalPermission.ADMINISTRATE_SERVER)) {
       throw new ResourceConflictException("cannot remove votes from merged change");
     }
+    if (notes.getChange().isMerged() && approval.isLegacySubmit()) {
+      throw new ResourceConflictException("cannot remove the submit record from a merged change");
+    }
 
     checkRemoveReviewer(notes, currentUser, approval.accountId(), approval.value());
   }
@@ -98,7 +103,9 @@
   public boolean testRemoveReviewer(
       ChangeData cd, CurrentUser currentUser, @Nullable Account.Id reviewer, int value)
       throws PermissionBackendException {
-    if (cd.change().isMerged() && value != 0) {
+    if (cd.change().isMerged()
+        && value != 0
+        && !permissionBackend.user(currentUser).test(GlobalPermission.ADMINISTRATE_SERVER)) {
       return false;
     }
 
diff --git a/java/com/google/gerrit/server/project/SubmitRequirementsEvaluatorImpl.java b/java/com/google/gerrit/server/project/SubmitRequirementsEvaluatorImpl.java
index db1a3b8..6353dd8 100644
--- a/java/com/google/gerrit/server/project/SubmitRequirementsEvaluatorImpl.java
+++ b/java/com/google/gerrit/server/project/SubmitRequirementsEvaluatorImpl.java
@@ -190,9 +190,8 @@
     // Use a request context to execute predicates as an internal user with expanded visibility.
     // This is so that the evaluation does not depend on who is running the current request (e.g.
     // a "ownerin" predicate with group that is not visible to the person making this request).
-    try (ManualRequestContext ignored = requestContext.open()) {
-      @SuppressWarnings("unused")
-      var unused =
+    try (ManualRequestContext _ = requestContext.open()) {
+      var _ =
           queryBuilderFactory.create(requireOperatorForUpdate).parse(expression.expressionString());
     }
   }
@@ -216,7 +215,7 @@
     // change, therefore it must return the same information and result regardless of the
     // user that is running the request (e.g. a "ownerin" predicate with group that is not visible
     // to the person making this request).
-    try (ManualRequestContext ignored = requestContext.open()) {
+    try (ManualRequestContext _ = requestContext.open()) {
       return getRequirements(cd);
     }
   }
@@ -225,7 +224,7 @@
   public SubmitRequirementResult evaluateRequirement(SubmitRequirement sr, ChangeData cd) {
     // This method is never used in Gerrit production code, however, its JavaDoc asserts that it
     // should be executed by running inside an internal user request context.
-    try (ManualRequestContext ignored = requestContext.open()) {
+    try (ManualRequestContext _ = requestContext.open()) {
       return evaluateRequirementInternal(sr, cd);
     }
   }
@@ -292,7 +291,7 @@
             Metadata.builder().changeId(cd.change().getId().get()).build())) {
       Callable<SubmitRequirementResult> task =
           () -> {
-            try (Timer0.Context ignored = metrics.submitRequirementEvaluatorLatency.start()) {
+            try (Timer0.Context _ = metrics.submitRequirementEvaluatorLatency.start()) {
               try (ManualRequestContext ctx =
                   userAccountId.map(requestContext::openAs).orElseGet(requestContext::open)) {
                 Optional<SubmitRequirementExpressionResult> applicabilityResult =
diff --git a/java/com/google/gerrit/server/project/SubmitRuleEvaluator.java b/java/com/google/gerrit/server/project/SubmitRuleEvaluator.java
index 8a60a40..c746761 100644
--- a/java/com/google/gerrit/server/project/SubmitRuleEvaluator.java
+++ b/java/com/google/gerrit/server/project/SubmitRuleEvaluator.java
@@ -117,7 +117,7 @@
             TraceContext.newTimer(
                 "Evaluate submit rules",
                 Metadata.builder().changeId(cd.change().getId().get()).build());
-        Timer0.Context ignored = metrics.submitRuleEvaluationLatency.start()) {
+        Timer0.Context _ = metrics.submitRuleEvaluationLatency.start()) {
       ProjectState projectState =
           projectCache
               .get(cd.project())
@@ -182,7 +182,7 @@
    * @return record from the evaluated rules.
    */
   public SubmitTypeRecord getSubmitType(ChangeData cd) {
-    try (Timer0.Context ignored = metrics.submitTypeEvaluationLatency.start()) {
+    try (Timer0.Context _ = metrics.submitTypeEvaluationLatency.start()) {
       ProjectState projectState =
           projectCache.get(cd.project()).orElseThrow(illegalState(cd.project()));
       if (!prologSubmitRuleUtil.isProjectRulesEnabled()) {
diff --git a/java/com/google/gerrit/server/query/approval/ChangeKindPredicate.java b/java/com/google/gerrit/server/query/approval/ChangeKindPredicate.java
index daf437b..f44706e 100644
--- a/java/com/google/gerrit/server/query/approval/ChangeKindPredicate.java
+++ b/java/com/google/gerrit/server/query/approval/ChangeKindPredicate.java
@@ -48,9 +48,9 @@
 
   @Override
   public boolean equals(Object other) {
-    if (!(other instanceof ChangeKindPredicate)) {
+    if (!(other instanceof ChangeKindPredicate p)) {
       return false;
     }
-    return ((ChangeKindPredicate) other).changeKind.equals(changeKind);
+    return p.changeKind.equals(changeKind);
   }
 }
diff --git a/java/com/google/gerrit/server/query/approval/ExactValuePredicate.java b/java/com/google/gerrit/server/query/approval/ExactValuePredicate.java
index 3021534..0280770 100644
--- a/java/com/google/gerrit/server/query/approval/ExactValuePredicate.java
+++ b/java/com/google/gerrit/server/query/approval/ExactValuePredicate.java
@@ -43,7 +43,6 @@
 
   @Override
   public boolean equals(Object other) {
-    return (other instanceof ExactValuePredicate)
-        && votingValue == ((ExactValuePredicate) other).votingValue;
+    return (other instanceof ExactValuePredicate p) && votingValue == p.votingValue;
   }
 }
diff --git a/java/com/google/gerrit/server/query/approval/ListOfFilesUnchangedPredicate.java b/java/com/google/gerrit/server/query/approval/ListOfFilesUnchangedPredicate.java
index 3b3a2dd..b60ea9b 100644
--- a/java/com/google/gerrit/server/query/approval/ListOfFilesUnchangedPredicate.java
+++ b/java/com/google/gerrit/server/query/approval/ListOfFilesUnchangedPredicate.java
@@ -146,10 +146,9 @@
 
   @Override
   public boolean equals(Object other) {
-    if (!(other instanceof ListOfFilesUnchangedPredicate)) {
+    if (!(other instanceof ListOfFilesUnchangedPredicate o)) {
       return false;
     }
-    ListOfFilesUnchangedPredicate o = (ListOfFilesUnchangedPredicate) other;
     return Objects.equals(o.diffOperations, diffOperations)
         && Objects.equals(o.repositoryManager, repositoryManager);
   }
diff --git a/java/com/google/gerrit/server/query/approval/MagicValuePredicate.java b/java/com/google/gerrit/server/query/approval/MagicValuePredicate.java
index c969baf..431da2e 100644
--- a/java/com/google/gerrit/server/query/approval/MagicValuePredicate.java
+++ b/java/com/google/gerrit/server/query/approval/MagicValuePredicate.java
@@ -68,9 +68,9 @@
 
   @Override
   public boolean equals(Object other) {
-    if (!(other instanceof MagicValuePredicate)) {
+    if (!(other instanceof MagicValuePredicate p)) {
       return false;
     }
-    return ((MagicValuePredicate) other).value.equals(value);
+    return p.value.equals(value);
   }
 }
diff --git a/java/com/google/gerrit/server/query/approval/UserInPredicate.java b/java/com/google/gerrit/server/query/approval/UserInPredicate.java
index 10c072f..764dbf9 100644
--- a/java/com/google/gerrit/server/query/approval/UserInPredicate.java
+++ b/java/com/google/gerrit/server/query/approval/UserInPredicate.java
@@ -76,10 +76,9 @@
 
   @Override
   public boolean equals(Object other) {
-    if (!(other instanceof UserInPredicate)) {
+    if (!(other instanceof UserInPredicate o)) {
       return false;
     }
-    UserInPredicate o = (UserInPredicate) other;
     return Objects.equals(o.field, field) && Objects.equals(o.group, group);
   }
 }
diff --git a/java/com/google/gerrit/server/query/change/AndChangeSource.java b/java/com/google/gerrit/server/query/change/AndChangeSource.java
index 755ca69..ae41a36 100644
--- a/java/com/google/gerrit/server/query/change/AndChangeSource.java
+++ b/java/com/google/gerrit/server/query/change/AndChangeSource.java
@@ -39,9 +39,7 @@
   @Override
   public int compare(Predicate<ChangeData> a, Predicate<ChangeData> b) {
     int cmp = super.compare(a, b);
-    if (cmp == 0 && a instanceof ChangeDataSource && b instanceof ChangeDataSource) {
-      ChangeDataSource as = (ChangeDataSource) a;
-      ChangeDataSource bs = (ChangeDataSource) b;
+    if (cmp == 0 && a instanceof ChangeDataSource as && b instanceof ChangeDataSource bs) {
       cmp = (as.hasChange() ? 0 : 1) - (bs.hasChange() ? 0 : 1);
     }
     return cmp;
diff --git a/java/com/google/gerrit/server/query/change/ChangeData.java b/java/com/google/gerrit/server/query/change/ChangeData.java
index a649617..2946cb8 100644
--- a/java/com/google/gerrit/server/query/change/ChangeData.java
+++ b/java/com/google/gerrit/server/query/change/ChangeData.java
@@ -178,8 +178,7 @@
     }
 
     for (ChangeData cd : changes) {
-      @SuppressWarnings("unused")
-      var unused = cd.change();
+      var _ = cd.change();
     }
   }
 
@@ -190,8 +189,7 @@
     }
 
     for (ChangeData cd : changes) {
-      @SuppressWarnings("unused")
-      var unused = cd.patchSets();
+      var _ = cd.patchSets();
     }
   }
 
@@ -202,8 +200,7 @@
     }
 
     for (ChangeData cd : changes) {
-      @SuppressWarnings("unused")
-      var unused = cd.currentPatchSet();
+      var _ = cd.currentPatchSet();
     }
   }
 
@@ -214,8 +211,7 @@
     }
 
     for (ChangeData cd : changes) {
-      @SuppressWarnings("unused")
-      var unused = cd.currentApprovals();
+      var _ = cd.currentApprovals();
     }
   }
 
@@ -226,8 +222,7 @@
     }
 
     for (ChangeData cd : changes) {
-      @SuppressWarnings("unused")
-      var unused = cd.messages();
+      var _ = cd.messages();
     }
   }
 
@@ -242,8 +237,7 @@
     if (!pending.isEmpty()) {
       ensureMessagesLoaded(pending);
       for (ChangeData cd : pending) {
-        @SuppressWarnings("unused")
-        var unused = cd.reviewedBy();
+        var _ = cd.reviewedBy();
       }
     }
   }
@@ -743,7 +737,7 @@
     }
 
     for (ChangeData cd : changes) {
-      var unused = cd.changeServerId();
+      var _ = cd.changeServerId();
     }
   }
 
@@ -781,8 +775,7 @@
       }
       throwIfNotLazyLoad("branch");
 
-      @SuppressWarnings("unused")
-      var unused = change();
+      var _ = change();
     }
     return change.getDest();
   }
@@ -794,8 +787,7 @@
       }
       throwIfNotLazyLoad("isPrivate");
 
-      @SuppressWarnings("unused")
-      var unused = change();
+      var _ = change();
     }
     return change.isPrivate();
   }
@@ -825,8 +817,7 @@
         return Optional.empty();
       }
 
-      @SuppressWarnings("unused")
-      var unused = notes();
+      var _ = notes();
     }
     metaRevision = notes.getRevision();
     return Optional.of(metaRevision);
diff --git a/java/com/google/gerrit/server/query/change/ChangeStatusPredicate.java b/java/com/google/gerrit/server/query/change/ChangeStatusPredicate.java
index 2303e96..09c135a 100644
--- a/java/com/google/gerrit/server/query/change/ChangeStatusPredicate.java
+++ b/java/com/google/gerrit/server/query/change/ChangeStatusPredicate.java
@@ -139,8 +139,7 @@
 
   @Override
   public boolean equals(Object other) {
-    return (other instanceof ChangeStatusPredicate)
-        && Objects.equals(status, ((ChangeStatusPredicate) other).status);
+    return (other instanceof ChangeStatusPredicate p) && Objects.equals(status, p.status);
   }
 
   @Override
diff --git a/java/com/google/gerrit/server/query/change/ConflictKey.java b/java/com/google/gerrit/server/query/change/ConflictKey.java
index 01fdbfa..ea763825 100644
--- a/java/com/google/gerrit/server/query/change/ConflictKey.java
+++ b/java/com/google/gerrit/server/query/change/ConflictKey.java
@@ -33,9 +33,11 @@
       AnyObjectId commit, AnyObjectId otherCommit, SubmitType submitType, boolean contentMerge) {
     ObjectId commitCopy = commit.copy();
     ObjectId otherCommitCopy = otherCommit.copy();
-    if (submitType == SubmitType.FAST_FORWARD_ONLY) {
-      // The conflict check for FF-only is non-symmetrical, and we need to treat (X, Y) differently
-      // from (Y, X). Store the commits in the input order.
+    if (submitType == SubmitType.FAST_FORWARD_ONLY || submitType == SubmitType.CHERRY_PICK) {
+      // The conflict checks for FF-only and cherry-pick are non-symmetrical, and we need to treat
+      // (X, Y) differently from (Y, X). A cherry-pick applies the delta of the commit relative to
+      // its own parent, so e.g. cherry-picking an ancestor onto its descendant may fail while the
+      // reverse succeeds. Store the commits in the input order.
       return new AutoValue_ConflictKey(commitCopy, otherCommitCopy, submitType, contentMerge);
     }
     // Otherwise, the check is symmetrical; sort commit/otherCommit before storing, so the actual
diff --git a/java/com/google/gerrit/server/query/change/ConflictsCacheImpl.java b/java/com/google/gerrit/server/query/change/ConflictsCacheImpl.java
index 4926314..a89899f 100644
--- a/java/com/google/gerrit/server/query/change/ConflictsCacheImpl.java
+++ b/java/com/google/gerrit/server/query/change/ConflictsCacheImpl.java
@@ -33,7 +33,7 @@
       @Override
       protected void configure() {
         persist(NAME, ConflictKey.class, Boolean.class)
-            .version(1)
+            .version(3)
             .keySerializer(ConflictKey.Serializer.INSTANCE)
             .valueSerializer(BooleanCacheSerializer.INSTANCE)
             .maximumWeight(37400);
diff --git a/java/com/google/gerrit/server/query/change/ConflictsPredicate.java b/java/com/google/gerrit/server/query/change/ConflictsPredicate.java
index 3bb42dc..8dda1c4 100644
--- a/java/com/google/gerrit/server/query/change/ConflictsPredicate.java
+++ b/java/com/google/gerrit/server/query/change/ConflictsPredicate.java
@@ -37,7 +37,6 @@
 import com.google.gerrit.server.submit.SubmitDryRun;
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 import java.util.concurrent.Callable;
@@ -165,7 +164,6 @@
 
     private ObjectId testAgainst;
     private ProjectState projectState;
-    private Set<ObjectId> alreadyAccepted;
 
     ChangeDataCache(ChangeData cd, ProjectCache projectCache) {
       this.cd = cd;
@@ -185,13 +183,6 @@
       }
       return projectState;
     }
-
-    Set<ObjectId> getAlreadyAccepted(Repository repo) throws IOException {
-      if (alreadyAccepted == null) {
-        alreadyAccepted = SubmitDryRun.getAlreadyAccepted(repo);
-      }
-      return alreadyAccepted;
-    }
   }
 
   private static void warnWithOccasionalStackTrace(Throwable cause, String format, Object... args) {
@@ -223,6 +214,14 @@
       ObjectId other = changeData.currentPatchSet().commitId();
       try (Repository repo = args.repoManager.openRepository(otherChange.getProject());
           CodeReviewCommit.CodeReviewRevWalk rw = CodeReviewCommit.newRevWalk(repo)) {
+        // Dry runs do not need message bodies.
+        rw.setRetainBody(false);
+        // Only check whether the other change itself conflicts with the tested change. Whether the
+        // other change's own dependencies are open or already merged is irrelevant for this, so
+        // treat its parents as already accepted. Since all ancestors of already accepted commits
+        // are excluded from the missing dependency check, no further commits, e.g. branch tips,
+        // need to be accepted.
+        Set<RevCommit> alreadyAccepted = getParents(rw, other);
         return !args.submitDryRun.run(
             null,
             changeData.submitTypeRecord().type,
@@ -231,7 +230,7 @@
             otherChange.getDest(),
             changeDataCache.getTestAgainst(),
             other,
-            getAlreadyAccepted(repo, rw));
+            alreadyAccepted);
       } catch (NoSuchProjectException | IOException e) {
         warnWithOccasionalStackTrace(
             e,
@@ -244,17 +243,12 @@
       }
     }
 
-    private Set<RevCommit> getAlreadyAccepted(Repository repo, RevWalk rw) {
+    private Set<RevCommit> getParents(RevWalk rw, ObjectId commitId) {
       try {
-        Set<RevCommit> accepted = new HashSet<>();
-        SubmitDryRun.addCommits(changeDataCache.getAlreadyAccepted(repo), rw, accepted);
-        ObjectId tip = changeDataCache.getTestAgainst();
-        if (tip != null) {
-          accepted.add(rw.parseCommit(tip));
-        }
-        return accepted;
-      } catch (StorageException | IOException e) {
-        throw new StorageException("Failed to determine already accepted commits.", e);
+        return SubmitDryRun.getParents(rw, commitId);
+      } catch (IOException e) {
+        throw new StorageException(
+            String.format("Failed to determine parents of commit %s.", commitId.name()), e);
       }
     }
   }
diff --git a/java/com/google/gerrit/server/query/change/InternalChangeQuery.java b/java/com/google/gerrit/server/query/change/InternalChangeQuery.java
index ea833dc..9ed024b 100644
--- a/java/com/google/gerrit/server/query/change/InternalChangeQuery.java
+++ b/java/com/google/gerrit/server/query/change/InternalChangeQuery.java
@@ -15,6 +15,7 @@
 package com.google.gerrit.server.query.change;
 
 import static com.google.common.base.Preconditions.checkArgument;
+import static com.google.common.collect.ImmutableList.toImmutableList;
 import static com.google.gerrit.index.query.Predicate.and;
 import static com.google.gerrit.index.query.Predicate.not;
 import static com.google.gerrit.index.query.Predicate.or;
@@ -184,6 +185,23 @@
     return query(and(ref(branch), project(branch.project()), open()));
   }
 
+  public ImmutableList<ChangeData> byBranchKeysOpen(
+      BranchNameKey branch, Collection<Change.Key> keys) {
+    if (keys.isEmpty()) {
+      return ImmutableList.of();
+    }
+    int batchSize = indexConfig.maxTerms() - 3;
+    List<Predicate<ChangeData>> queries = new ArrayList<>();
+    for (List<Change.Key> part : Iterables.partition(keys, batchSize)) {
+      List<Predicate<ChangeData>> keyPredicates = new ArrayList<>(part.size());
+      for (Change.Key key : part) {
+        keyPredicates.add(change(key));
+      }
+      queries.add(and(ref(branch), project(branch.project()), open(), or(keyPredicates)));
+    }
+    return query(queries).stream().flatMap(List::stream).collect(toImmutableList());
+  }
+
   public List<ChangeData> byBranchNew(BranchNameKey branch) {
     return query(and(ref(branch), project(branch.project()), status(Change.Status.NEW)));
   }
diff --git a/java/com/google/gerrit/server/query/change/IsConsistentPredicate.java b/java/com/google/gerrit/server/query/change/IsConsistentPredicate.java
index d6ca5f5..90ce674 100644
--- a/java/com/google/gerrit/server/query/change/IsConsistentPredicate.java
+++ b/java/com/google/gerrit/server/query/change/IsConsistentPredicate.java
@@ -27,7 +27,7 @@
   @Override
   public boolean match(ChangeData cd) {
     try {
-      ChangeNotes ignored = cd.notes();
+      ChangeNotes _ = cd.notes();
       return true;
     } catch (NoSuchChangeException nsce) {
       return false;
diff --git a/java/com/google/gerrit/server/query/change/OrSource.java b/java/com/google/gerrit/server/query/change/OrSource.java
index 8894287..a137ae4 100644
--- a/java/com/google/gerrit/server/query/change/OrSource.java
+++ b/java/com/google/gerrit/server/query/change/OrSource.java
@@ -81,8 +81,8 @@
     if (cardinality < 0) {
       cardinality = 0;
       for (Predicate<ChangeData> p : getChildren()) {
-        if (p instanceof ChangeDataSource) {
-          cardinality += ((ChangeDataSource) p).getCardinality();
+        if (p instanceof ChangeDataSource changeDataSource) {
+          cardinality += changeDataSource.getCardinality();
         }
       }
     }
diff --git a/java/com/google/gerrit/server/query/change/OutputStreamQuery.java b/java/com/google/gerrit/server/query/change/OutputStreamQuery.java
index cc186c3..ca41ce5 100644
--- a/java/com/google/gerrit/server/query/change/OutputStreamQuery.java
+++ b/java/com/google/gerrit/server/query/change/OutputStreamQuery.java
@@ -30,8 +30,7 @@
 import com.google.gerrit.index.query.QueryResult;
 import com.google.gerrit.server.DynamicOptions;
 import com.google.gerrit.server.account.AccountAttributeLoader;
-import com.google.gerrit.server.cancellation.RequestCancelledException;
-import com.google.gerrit.server.cancellation.RequestStateProvider;
+import com.google.gerrit.server.cancellation.RequestStateContext;
 import com.google.gerrit.server.config.TrackingFooters;
 import com.google.gerrit.server.data.ChangeAttribute;
 import com.google.gerrit.server.data.PatchSetAttribute;
@@ -223,10 +222,7 @@
           AccountAttributeLoader accountLoader = accountAttributeLoaderFactory.create();
           List<ChangeAttribute> changeAttributes = new ArrayList<>();
           for (ChangeData d : results.entities()) {
-            if (Thread.currentThread().isInterrupted()) {
-              throw new RequestCancelledException(
-                  RequestStateProvider.Reason.CLIENT_CLOSED_REQUEST, null);
-            }
+            RequestStateContext.abortIfCancelled();
             changeAttributes.add(
                 buildChangeAttribute(d, repos, revWalks, accountLoader, attributesNodeProviders));
           }
@@ -392,9 +388,9 @@
     switch (outputFormat) {
       default:
       case TEXT:
-        if (data instanceof ChangeAttribute) {
+        if (data instanceof ChangeAttribute changeAttribute) {
           out.print("change ");
-          out.print(((ChangeAttribute) data).id);
+          out.print(changeAttribute.id);
           out.print("\n");
           showText(data, 1);
         } else {
@@ -441,25 +437,25 @@
     out.print(indent);
     out.print(field);
     out.print(':');
-    if (value instanceof String && ((String) value).contains("\n")) {
+    if (value instanceof String string && string.contains("\n")) {
       out.print(' ');
       // Idention for multi-line text is
       // current depth indetion + length of field + length of ": "
       indent = indent(indent.length() + field.length() + spacesDepthRatio);
-      out.print(((String) value).replace("\n", "\n" + indent).trim());
+      out.print(string.replace("\n", "\n" + indent).trim());
       out.print('\n');
-    } else if (value instanceof Long && isDateField(field)) {
+    } else if (value instanceof Long l && isDateField(field)) {
       out.print(' ');
-      out.print(dtf.format(Instant.ofEpochSecond((Long) value)));
+      out.print(dtf.format(Instant.ofEpochSecond(l)));
       out.print('\n');
     } else if (isPrimitive(value)) {
       out.print(' ');
       out.print(value);
       out.print('\n');
-    } else if (value instanceof Collection) {
+    } else if (value instanceof Collection<?> collection) {
       out.print('\n');
       boolean firstElement = true;
-      for (Object thing : ((Collection<?>) value)) {
+      for (Object thing : collection) {
         // The name of the collection was initially printed at the beginning
         // of this routine.  Beginning at the second sub-element, reprint
         // the collection name so humans can separate individual elements
diff --git a/java/com/google/gerrit/server/restapi/account/AddSshKey.java b/java/com/google/gerrit/server/restapi/account/AddSshKey.java
index 04b046a..0c243c5 100644
--- a/java/com/google/gerrit/server/restapi/account/AddSshKey.java
+++ b/java/com/google/gerrit/server/restapi/account/AddSshKey.java
@@ -17,6 +17,7 @@
 import static com.google.gerrit.server.mail.EmailFactories.KEY_ADDED;
 import static java.nio.charset.StandardCharsets.UTF_8;
 
+import com.google.common.base.Strings;
 import com.google.common.flogger.FluentLogger;
 import com.google.common.io.ByteSource;
 import com.google.gerrit.exceptions.EmailException;
@@ -33,24 +34,29 @@
 import com.google.gerrit.server.account.AccountResource;
 import com.google.gerrit.server.account.AccountSshKey;
 import com.google.gerrit.server.account.VersionedAuthorizedKeys;
+import com.google.gerrit.server.config.ConfigUtil;
 import com.google.gerrit.server.mail.EmailFactories;
 import com.google.gerrit.server.permissions.GlobalPermission;
 import com.google.gerrit.server.permissions.PermissionBackend;
 import com.google.gerrit.server.permissions.PermissionBackendException;
 import com.google.gerrit.server.ssh.SshKeyCache;
+import com.google.gerrit.server.util.time.TimeUtil;
 import com.google.inject.Inject;
 import com.google.inject.Provider;
-import com.google.inject.Singleton;
 import java.io.IOException;
 import java.io.InputStream;
+import java.time.Duration;
+import java.time.Instant;
+import java.util.Optional;
+import java.util.concurrent.TimeUnit;
 import org.eclipse.jgit.errors.ConfigInvalidException;
+import org.kohsuke.args4j.Option;
 
 /**
  * REST endpoint to add an SSH key for an account.
  *
  * <p>This REST endpoint handles {@code POST /accounts/<account-identifier>/sshkeys/} requests.
  */
-@Singleton
 public class AddSshKey
     implements RestCollectionModifyView<AccountResource, AccountResource.SshKey, SshKeyInput> {
   private static final FluentLogger logger = FluentLogger.forEnclosingClass();
@@ -61,6 +67,12 @@
   private final SshKeyCache sshKeyCache;
   private final EmailFactories emailFactories;
 
+  @Option(
+      name = "--lifetime",
+      metaVar = "LIFETIME",
+      usage = "How long the key can be used, for example 30d.")
+  private String lifetime;
+
   @Inject
   AddSshKey(
       Provider<CurrentUser> self,
@@ -107,7 +119,8 @@
         }.asCharSource(UTF_8).read();
 
     try {
-      AccountSshKey sshKey = authorizedKeys.addKey(user.getAccountId(), sshPublicKey);
+      AccountSshKey sshKey =
+          authorizedKeys.addKey(user.getAccountId(), sshPublicKey, expiryFromLifetime(input));
 
       try {
         emailFactories
@@ -124,4 +137,22 @@
       throw new BadRequestException(e.getMessage());
     }
   }
+
+  private Optional<Instant> expiryFromLifetime(SshKeyInput input) throws BadRequestException {
+    String value = lifetime != null ? lifetime : input.lifetime;
+    if (Strings.isNullOrEmpty(value)) {
+      return Optional.empty();
+    }
+
+    long seconds;
+    try {
+      seconds = ConfigUtil.getTimeUnit(value, 0, TimeUnit.SECONDS);
+    } catch (IllegalArgumentException e) {
+      throw new BadRequestException("invalid lifetime: " + value, e);
+    }
+    if (seconds <= 0) {
+      throw new BadRequestException("lifetime must be positive: " + value);
+    }
+    return Optional.of(TimeUtil.now().plus(Duration.ofSeconds(seconds)));
+  }
 }
diff --git a/java/com/google/gerrit/server/restapi/account/CreateEmail.java b/java/com/google/gerrit/server/restapi/account/CreateEmail.java
index 18b4f7e..fdbf57f 100644
--- a/java/com/google/gerrit/server/restapi/account/CreateEmail.java
+++ b/java/com/google/gerrit/server/restapi/account/CreateEmail.java
@@ -170,8 +170,7 @@
         throw new ResourceConflictException(e.getMessage());
       }
       if (input.preferred) {
-        @SuppressWarnings("unused")
-        var unused = putPreferred.apply(new AccountResource.Email(user, email), null);
+        var _ = putPreferred.apply(new AccountResource.Email(user, email), null);
 
         info.preferred = true;
       }
diff --git a/java/com/google/gerrit/server/restapi/account/GetCapabilities.java b/java/com/google/gerrit/server/restapi/account/GetCapabilities.java
index 2f871c1..428aa74b 100644
--- a/java/com/google/gerrit/server/restapi/account/GetCapabilities.java
+++ b/java/com/google/gerrit/server/restapi/account/GetCapabilities.java
@@ -175,8 +175,7 @@
 
     @Override
     public boolean equals(Object o) {
-      if (o instanceof Range) {
-        Range range = (Range) o;
+      if (o instanceof Range range) {
         return min == range.min && max == range.max;
       }
       return false;
diff --git a/java/com/google/gerrit/server/restapi/account/GetSshKeys.java b/java/com/google/gerrit/server/restapi/account/GetSshKeys.java
index 9952987..b276fb3 100644
--- a/java/com/google/gerrit/server/restapi/account/GetSshKeys.java
+++ b/java/com/google/gerrit/server/restapi/account/GetSshKeys.java
@@ -32,6 +32,7 @@
 import com.google.inject.Provider;
 import com.google.inject.Singleton;
 import java.io.IOException;
+import java.sql.Timestamp;
 import java.util.List;
 import org.eclipse.jgit.errors.ConfigInvalidException;
 import org.eclipse.jgit.errors.RepositoryNotFoundException;
@@ -80,6 +81,7 @@
     info.algorithm = sshKey.algorithm();
     info.comment = Strings.emptyToNull(sshKey.comment());
     info.valid = sshKey.valid();
+    sshKey.expiryTime().ifPresent(t -> info.expiration = Timestamp.from(t));
     return info;
   }
 }
diff --git a/java/com/google/gerrit/server/restapi/account/GetWatchedProjects.java b/java/com/google/gerrit/server/restapi/account/GetWatchedProjects.java
index 0b43118..4257d50 100644
--- a/java/com/google/gerrit/server/restapi/account/GetWatchedProjects.java
+++ b/java/com/google/gerrit/server/restapi/account/GetWatchedProjects.java
@@ -97,7 +97,7 @@
     pwi.filter = key.filter();
     pwi.project = key.project().get();
     try {
-      var unused = projectsCollection.parse(key.project().get());
+      var _ = projectsCollection.parse(key.project().get());
     } catch (RestApiException | IOException | PermissionBackendException e) {
       pwi.problem = e.getMessage();
     }
diff --git a/java/com/google/gerrit/server/restapi/account/PostWatchedProjects.java b/java/com/google/gerrit/server/restapi/account/PostWatchedProjects.java
index 112019c..599e503 100644
--- a/java/com/google/gerrit/server/restapi/account/PostWatchedProjects.java
+++ b/java/com/google/gerrit/server/restapi/account/PostWatchedProjects.java
@@ -110,8 +110,7 @@
 
       if (!Strings.isNullOrEmpty(info.filter)) {
         try {
-          @SuppressWarnings("unused")
-          var unused = QueryParser.parse(info.filter);
+          var _ = QueryParser.parse(info.filter);
         } catch (QueryParseException e) {
           throw new BadRequestException(
               String.format(
diff --git a/java/com/google/gerrit/server/restapi/change/ChangeEdits.java b/java/com/google/gerrit/server/restapi/change/ChangeEdits.java
index 9b80512..af2f2fd 100644
--- a/java/com/google/gerrit/server/restapi/change/ChangeEdits.java
+++ b/java/com/google/gerrit/server/restapi/change/ChangeEdits.java
@@ -635,16 +635,11 @@
       input.name = Strings.nullToEmpty(input.name);
       input.email = Strings.nullToEmpty(input.email);
 
-      RefPermission perm;
-      switch (input.type) {
-        case AUTHOR:
-          perm = RefPermission.FORGE_AUTHOR;
-          break;
-        case COMMITTER:
-        default:
-          perm = RefPermission.FORGE_COMMITTER;
-          break;
-      }
+      RefPermission perm =
+          switch (input.type) {
+            case AUTHOR -> RefPermission.FORGE_AUTHOR;
+            case COMMITTER -> RefPermission.FORGE_COMMITTER;
+          };
 
       PersonIdent newIdent =
           new PersonIdent(input.name, input.email, TimeUtil.now(), serverIdent.get().getZoneId());
diff --git a/java/com/google/gerrit/server/restapi/change/ChangeRestApiModule.java b/java/com/google/gerrit/server/restapi/change/ChangeRestApiModule.java
index 58f56e9..bff6b3d 100644
--- a/java/com/google/gerrit/server/restapi/change/ChangeRestApiModule.java
+++ b/java/com/google/gerrit/server/restapi/change/ChangeRestApiModule.java
@@ -110,6 +110,7 @@
 
     post(CHANGE_KIND, "move").to(Move.class);
     post(CHANGE_KIND, "patch:apply").to(ApplyPatch.class);
+    get(CHANGE_KIND, "permissions").to(GetChangePermissions.class);
     post(CHANGE_KIND, "private").to(PostPrivate.class);
     post(CHANGE_KIND, "private.delete").to(DeletePrivateByPost.class);
     delete(CHANGE_KIND, "private").to(DeletePrivate.class);
diff --git a/java/com/google/gerrit/server/restapi/change/CommentPorter.java b/java/com/google/gerrit/server/restapi/change/CommentPorter.java
index 24a9c83..613ed0d 100644
--- a/java/com/google/gerrit/server/restapi/change/CommentPorter.java
+++ b/java/com/google/gerrit/server/restapi/change/CommentPorter.java
@@ -145,7 +145,7 @@
       PatchSet targetPatchset,
       List<HumanComment> comments,
       List<HumanCommentFilter> filters) {
-    try (TraceTimer ignored =
+    try (TraceTimer _ =
         TraceContext.newTimer(
             "Porting comments", Metadata.builder().patchSetId(targetPatchset.number()).build())) {
       ImmutableList<HumanCommentFilter> allFilters = addDefaultFilters(filters, targetPatchset);
@@ -208,7 +208,7 @@
       PatchSet originalPatchset,
       PatchSet targetPatchset,
       ImmutableList<HumanComment> comments) {
-    try (TraceTimer ignored =
+    try (TraceTimer _ =
         TraceContext.newTimer(
             "Porting comments same patchset",
             Metadata.builder()
@@ -240,7 +240,7 @@
       PatchSet targetPatchset,
       List<HumanComment> comments,
       short side) {
-    try (TraceTimer ignored =
+    try (TraceTimer _ =
         TraceContext.newTimer(
             "Porting comments same patchset and side",
             Metadata.builder()
@@ -283,7 +283,7 @@
       PatchSet targetPatchset,
       short side)
       throws DiffNotAvailableException {
-    try (TraceTimer ignored =
+    try (TraceTimer _ =
         TraceContext.newTimer(
             "Loading commit mappings",
             Metadata.builder()
@@ -311,7 +311,7 @@
   private ImmutableSet<Mapping> loadCommitMappings(
       Project.NameKey project, ObjectId originalCommit, ObjectId targetCommit)
       throws DiffNotAvailableException {
-    try (TraceTimer ignored =
+    try (TraceTimer _ =
         TraceContext.newTimer(
             "Computing diffs", Metadata.builder().commit(originalCommit.name()).build())) {
       Map<String, FileDiffOutput> modifiedFiles =
diff --git a/java/com/google/gerrit/server/restapi/change/DeleteChangeMessage.java b/java/com/google/gerrit/server/restapi/change/DeleteChangeMessage.java
index ca6bfad..f322966 100644
--- a/java/com/google/gerrit/server/restapi/change/DeleteChangeMessage.java
+++ b/java/com/google/gerrit/server/restapi/change/DeleteChangeMessage.java
@@ -35,7 +35,7 @@
 import com.google.gerrit.server.account.AccountLoader;
 import com.google.gerrit.server.change.ChangeMessageResource;
 import com.google.gerrit.server.notedb.ChangeNotes;
-import com.google.gerrit.server.permissions.GlobalPermission;
+import com.google.gerrit.server.permissions.ChangePermission;
 import com.google.gerrit.server.permissions.PermissionBackend;
 import com.google.gerrit.server.permissions.PermissionBackendException;
 import com.google.gerrit.server.update.BatchUpdate;
@@ -84,7 +84,10 @@
       ChangeMessageResource resource, DeleteChangeMessageInput input)
       throws RestApiException, PermissionBackendException, UpdateException, IOException {
     CurrentUser user = userProvider.get();
-    permissionBackend.user(user).check(GlobalPermission.ADMINISTRATE_SERVER);
+    permissionBackend
+        .user(user)
+        .change(resource.getChangeResource().getNotes())
+        .check(ChangePermission.DELETE_COMMENT);
 
     String newChangeMessage =
         createNewChangeMessage(user.asIdentifiedUser().getAccountId(), input.reason);
diff --git a/java/com/google/gerrit/server/restapi/change/DeleteComment.java b/java/com/google/gerrit/server/restapi/change/DeleteComment.java
index d72f077..5814dbe 100644
--- a/java/com/google/gerrit/server/restapi/change/DeleteComment.java
+++ b/java/com/google/gerrit/server/restapi/change/DeleteComment.java
@@ -30,7 +30,7 @@
 import com.google.gerrit.server.CurrentUser;
 import com.google.gerrit.server.change.HumanCommentResource;
 import com.google.gerrit.server.notedb.ChangeNotes;
-import com.google.gerrit.server.permissions.GlobalPermission;
+import com.google.gerrit.server.permissions.ChangePermission;
 import com.google.gerrit.server.permissions.PermissionBackend;
 import com.google.gerrit.server.permissions.PermissionBackendException;
 import com.google.gerrit.server.update.BatchUpdate;
@@ -81,7 +81,10 @@
           PermissionBackendException,
           UpdateException {
     CurrentUser user = userProvider.get();
-    permissionBackend.user(user).check(GlobalPermission.ADMINISTRATE_SERVER);
+    permissionBackend
+        .user(user)
+        .change(rsrc.getRevisionResource().getChangeResource().getNotes())
+        .check(ChangePermission.DELETE_COMMENT);
 
     if (input == null) {
       input = new DeleteCommentInput();
diff --git a/java/com/google/gerrit/server/restapi/change/DeleteVote.java b/java/com/google/gerrit/server/restapi/change/DeleteVote.java
index 4c6ee9a..66b87cc 100644
--- a/java/com/google/gerrit/server/restapi/change/DeleteVote.java
+++ b/java/com/google/gerrit/server/restapi/change/DeleteVote.java
@@ -32,6 +32,9 @@
 import com.google.gerrit.server.change.NotifyResolver;
 import com.google.gerrit.server.change.ReviewerResource;
 import com.google.gerrit.server.change.VoteResource;
+import com.google.gerrit.server.permissions.GlobalPermission;
+import com.google.gerrit.server.permissions.PermissionBackend;
+import com.google.gerrit.server.permissions.PermissionBackendException;
 import com.google.gerrit.server.update.BatchUpdate;
 import com.google.gerrit.server.update.UpdateException;
 import com.google.gerrit.server.update.context.RefUpdateContext;
@@ -48,6 +51,7 @@
   private final NotifyResolver notifyResolver;
 
   private final AddToAttentionSetOp.Factory attentionSetOpFactory;
+  private final PermissionBackend permissionBackend;
   private final Provider<CurrentUser> currentUserProvider;
   private final DeleteVoteOp.Factory deleteVoteOpFactory;
 
@@ -56,18 +60,24 @@
       BatchUpdate.Factory updateFactory,
       NotifyResolver notifyResolver,
       AddToAttentionSetOp.Factory attentionSetOpFactory,
+      PermissionBackend permissionBackend,
       Provider<CurrentUser> currentUserProvider,
       DeleteVoteOp.Factory deleteVoteOpFactory) {
     this.updateFactory = updateFactory;
     this.notifyResolver = notifyResolver;
     this.attentionSetOpFactory = attentionSetOpFactory;
+    this.permissionBackend = permissionBackend;
     this.currentUserProvider = currentUserProvider;
     this.deleteVoteOpFactory = deleteVoteOpFactory;
   }
 
   @Override
   public Response<Object> apply(VoteResource rsrc, DeleteVoteInput input)
-      throws RestApiException, UpdateException, IOException, ConfigInvalidException {
+      throws RestApiException,
+          UpdateException,
+          IOException,
+          ConfigInvalidException,
+          PermissionBackendException {
     if (input == null) {
       input = new DeleteVoteInput();
     }
@@ -79,8 +89,10 @@
     }
     ReviewerResource r = rsrc.getReviewer();
     Change change = r.getChange();
+    CurrentUser user = currentUserProvider.get();
 
-    if (change.isMerged()) {
+    if (change.isMerged()
+        && !permissionBackend.user(user).test(GlobalPermission.ADMINISTRATE_SERVER)) {
       throw new ResourceConflictException("cannot remove votes from merged change");
     }
     if (r.getRevisionResource() != null && !r.getRevisionResource().isCurrent()) {
@@ -102,9 +114,7 @@
                 input,
                 true));
         if (!input.ignoreAutomaticAttentionSetRules
-            && !r.getReviewerUser()
-                .getAccountId()
-                .equals(currentUserProvider.get().getAccountId())) {
+            && !r.getReviewerUser().getAccountId().equals(user.getAccountId())) {
           bu.addOp(
               change.getId(),
               attentionSetOpFactory.create(
diff --git a/java/com/google/gerrit/server/restapi/change/GetBlame.java b/java/com/google/gerrit/server/restapi/change/GetBlame.java
index 3f2d0b5..08cd6f0 100644
--- a/java/com/google/gerrit/server/restapi/change/GetBlame.java
+++ b/java/com/google/gerrit/server/restapi/change/GetBlame.java
@@ -14,8 +14,10 @@
 
 package com.google.gerrit.server.restapi.change;
 
+import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.ListMultimap;
 import com.google.common.collect.MultimapBuilder;
+import com.google.common.flogger.FluentLogger;
 import com.google.gerrit.entities.Project;
 import com.google.gerrit.extensions.common.BlameInfo;
 import com.google.gerrit.extensions.common.RangeInfo;
@@ -32,6 +34,8 @@
 import com.google.gerrit.server.patch.AutoMerger;
 import com.google.gerrit.server.project.InvalidChangeOperationException;
 import com.google.gitiles.blame.cache.BlameCache;
+import com.google.gitiles.blame.cache.IgnoreRevFileReader;
+import com.google.gitiles.blame.cache.IgnoreRevFileReader.IgnoreRevsFile;
 import com.google.gitiles.blame.cache.Region;
 import com.google.inject.Inject;
 import java.io.IOException;
@@ -48,6 +52,7 @@
 import org.kohsuke.args4j.Option;
 
 public class GetBlame implements RestReadView<FileResource> {
+  private static final FluentLogger logger = FluentLogger.forEnclosingClass();
 
   private final GitRepositoryManager repoManager;
   private final BlameCache blameCache;
@@ -129,7 +134,7 @@
     ListMultimap<BlameInfo, RangeInfo> ranges =
         MultimapBuilder.hashKeys().arrayListValues().build();
     List<BlameInfo> result = new ArrayList<>();
-    try (TraceContext.TraceTimer ignored =
+    try (TraceContext.TraceTimer _ =
         TraceContext.newTimer("blameCache.findLastCommit", Metadata.empty())) {
       if (blameCache.findLastCommit(repository, id, path) == null) {
         return result;
@@ -137,14 +142,13 @@
     }
 
     List<Region> blameRegions;
-    try (TraceContext.TraceTimer ignored =
-        TraceContext.newTimer("blameCache.get", Metadata.empty())) {
-      blameRegions = blameCache.get(repository, id, path);
+    try (TraceContext.TraceTimer _ = TraceContext.newTimer("blameCache.get", Metadata.empty())) {
+      blameRegions = blameCache.get(repository, id, path, getIgnoreIds(revWalk, id));
     }
 
     int from = 1;
     for (Region region : blameRegions) {
-      try (TraceContext.TraceTimer ignored =
+      try (TraceContext.TraceTimer _ =
           TraceContext.newTimer("process blame region", Metadata.empty())) {
         RevCommit commit = revWalk.parseCommit(region.getSourceCommit());
         BlameInfo blameInfo = toBlameInfo(commit, region.getSourceAuthor());
@@ -160,6 +164,28 @@
     return result;
   }
 
+  private static ImmutableSet<ObjectId> getIgnoreIds(RevWalk rw, ObjectId id) {
+    IgnoreRevsFile file;
+    try {
+      file = IgnoreRevFileReader.read(rw, id);
+    } catch (IOException e) {
+      logger.atWarning().withCause(e).log(
+          "Cannot read %s at %s", IgnoreRevFileReader.DEFAULT_PATH, id.name());
+      return ImmutableSet.of();
+    }
+    if (file.tooLarge()) {
+      logger.atWarning().log(
+          "%s at %s is larger than %d bytes, not ignoring any revisions",
+          IgnoreRevFileReader.DEFAULT_PATH, id.name(), IgnoreRevFileReader.MAX_SIZE);
+      return ImmutableSet.of();
+    } else if (file.truncated()) {
+      logger.atInfo().log(
+          "Ignoring only the first %d revisions listed in %s at %s",
+          IgnoreRevFileReader.MAX_REVS, IgnoreRevFileReader.DEFAULT_PATH, id.name());
+    }
+    return file.ids();
+  }
+
   private static BlameInfo toBlameInfo(RevCommit commit, PersonIdent sourceAuthor) {
     BlameInfo blameInfo = new BlameInfo();
     blameInfo.author = sourceAuthor.getName();
diff --git a/java/com/google/gerrit/server/restapi/change/GetChangePermissions.java b/java/com/google/gerrit/server/restapi/change/GetChangePermissions.java
new file mode 100644
index 0000000..ad0b1dd
--- /dev/null
+++ b/java/com/google/gerrit/server/restapi/change/GetChangePermissions.java
@@ -0,0 +1,104 @@
+// Copyright (C) 2026 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.google.gerrit.server.restapi.change;
+
+import com.google.common.base.Strings;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Sets;
+import com.google.gerrit.entities.Account;
+import com.google.gerrit.extensions.api.changes.ChangePermissionsInfo;
+import com.google.gerrit.extensions.restapi.Response;
+import com.google.gerrit.extensions.restapi.RestApiException;
+import com.google.gerrit.extensions.restapi.RestReadView;
+import com.google.gerrit.server.account.AccountResolver;
+import com.google.gerrit.server.change.ChangeResource;
+import com.google.gerrit.server.permissions.ChangePermission;
+import com.google.gerrit.server.permissions.DefaultPermissionMappings;
+import com.google.gerrit.server.permissions.GlobalPermission;
+import com.google.gerrit.server.permissions.PermissionBackend;
+import com.google.gerrit.server.permissions.PermissionBackendException;
+import com.google.inject.Inject;
+import java.io.IOException;
+import java.util.EnumSet;
+import java.util.Set;
+import org.eclipse.jgit.errors.ConfigInvalidException;
+import org.kohsuke.args4j.Option;
+
+public class GetChangePermissions implements RestReadView<ChangeResource> {
+
+  /** Change-scoped permissions surfaced by default through this endpoint. */
+  private static final ImmutableSet<ChangePermission> EXPOSED_PERMISSIONS =
+      Sets.immutableEnumSet(ChangePermission.AI_REVIEW);
+
+  private final PermissionBackend permissionBackend;
+  private final AccountResolver accountResolver;
+
+  private boolean all;
+  private String account;
+
+  @Inject
+  GetChangePermissions(PermissionBackend permissionBackend, AccountResolver accountResolver) {
+    this.permissionBackend = permissionBackend;
+    this.accountResolver = accountResolver;
+  }
+
+  @Option(name = "-o", usage = "the ALL option returns every granted change permission")
+  void addOption(String option) {
+    if ("ALL".equalsIgnoreCase(option)) {
+      all = true;
+      return;
+    }
+    throw new IllegalArgumentException("option not recognized: " + option);
+  }
+
+  public void setAll(boolean all) {
+    this.all = all;
+  }
+
+  @Option(
+      name = "--account",
+      usage = "report permissions for this account instead of the caller, requires Run As")
+  public void setAccount(String account) {
+    this.account = account;
+  }
+
+  @Override
+  public Response<ChangePermissionsInfo> apply(ChangeResource rsrc)
+      throws PermissionBackendException, RestApiException, IOException, ConfigInvalidException {
+    PermissionBackend.ForChange forChange = forChange(rsrc);
+    Set<ChangePermission> candidates =
+        all ? EnumSet.allOf(ChangePermission.class) : EXPOSED_PERMISSIONS;
+    ChangePermissionsInfo info = new ChangePermissionsInfo();
+    for (ChangePermission permission : candidates) {
+      if (forChange.testOrFalse(permission)) {
+        info.permissions.add(
+            DefaultPermissionMappings.changePermissionName(permission)
+                .orElseThrow(
+                    () -> new IllegalStateException("no permission name for " + permission)));
+      }
+    }
+    return Response.ok(info);
+  }
+
+  private PermissionBackend.ForChange forChange(ChangeResource rsrc)
+      throws PermissionBackendException, RestApiException, IOException, ConfigInvalidException {
+    if (Strings.isNullOrEmpty(account)) {
+      return rsrc.permissions();
+    }
+    permissionBackend.user(rsrc.getUser()).check(GlobalPermission.RUN_AS);
+    Account.Id target = accountResolver.resolve(account).asUnique().account().id();
+    return permissionBackend.absentUser(target).change(rsrc.getNotes());
+  }
+}
diff --git a/java/com/google/gerrit/server/restapi/change/PostReview.java b/java/com/google/gerrit/server/restapi/change/PostReview.java
index e388e3f..d8f6aca 100644
--- a/java/com/google/gerrit/server/restapi/change/PostReview.java
+++ b/java/com/google/gerrit/server/restapi/change/PostReview.java
@@ -496,7 +496,7 @@
       Change change,
       List<ReviewerModification> reviewerModifications,
       NotifyResolver.Result notify) {
-    try (TraceContext.TraceTimer ignored =
+    try (TraceContext.TraceTimer _ =
         TraceContext.newTimer(
             getClass().getSimpleName() + "#batchEmailReviewers", Metadata.empty())) {
       List<Account.Id> to = new ArrayList<>();
diff --git a/java/com/google/gerrit/server/restapi/change/PostReviewOp.java b/java/com/google/gerrit/server/restapi/change/PostReviewOp.java
index 66b0a13..aeecca7 100644
--- a/java/com/google/gerrit/server/restapi/change/PostReviewOp.java
+++ b/java/com/google/gerrit/server/restapi/change/PostReviewOp.java
@@ -307,16 +307,16 @@
     notes = ctx.getNotes();
     ps = psUtil.get(ctx.getNotes(), psId);
     boolean dirty = false;
-    try (TraceContext.TraceTimer ignored = newTimer("insertComments")) {
+    try (TraceContext.TraceTimer _ = newTimer("insertComments")) {
       dirty |= insertComments(ctx);
     }
-    try (TraceContext.TraceTimer ignored = newTimer("updateLabels")) {
+    try (TraceContext.TraceTimer _ = newTimer("updateLabels")) {
       dirty |= updateLabels(projectState, ctx);
     }
-    try (TraceContext.TraceTimer ignored = newTimer("updateCopiedApprovals")) {
+    try (TraceContext.TraceTimer _ = newTimer("updateCopiedApprovals")) {
       dirty |= updateCopiedApprovalsOnFollowUpPatchSets(ctx);
     }
-    try (TraceContext.TraceTimer ignored = newTimer("insertMessage")) {
+    try (TraceContext.TraceTimer _ = newTimer("insertMessage")) {
       dirty |= insertMessage(ctx);
     }
 
@@ -638,6 +638,9 @@
         getPreviousApprovals(allApprovals, approvalsByKey(current.values()));
 
     ChangeUpdate update = ctx.getUpdate(psId);
+    if (Boolean.TRUE.equals(in.isAi)) {
+      update.setIsAi(true);
+    }
     for (Map.Entry<String, Short> ent : allApprovals.entrySet()) {
       String name = ent.getKey();
       LabelType lt =
@@ -664,12 +667,15 @@
       } else if (c != null
           && (c.value() != ent.getValue()
               || !c.realAccountId().equals(reviewerId)
-              || (inLabels.containsKey(c.label()) && isApprovalCopiedOver(c, ctx.getNotes())))) {
+              || (inLabels.containsKey(c.label())
+                  && (c.isAi() != Boolean.TRUE.equals(in.isAi)
+                      || isApprovalCopiedOver(c, ctx.getNotes()))))) {
         PatchSetApproval.Builder b =
             c.toBuilder()
                 .value(ent.getValue())
                 .granted(ctx.getWhen())
-                .tag(Optional.ofNullable(in.tag));
+                .tag(Optional.ofNullable(in.tag))
+                .isAi(Boolean.TRUE.equals(in.isAi));
         ctx.getUser().updateRealAccountId(b::realAccountId);
         c = b.build();
         ups.add(c);
@@ -685,6 +691,7 @@
         c =
             ApprovalsUtil.newApproval(psId, user, lt.getLabelId(), ent.getValue(), ctx.getWhen())
                 .tag(Optional.ofNullable(in.tag))
+                .isAi(Boolean.TRUE.equals(in.isAi))
                 .granted(ctx.getWhen())
                 .build();
         ups.add(c);
@@ -997,7 +1004,8 @@
         .anyMatch(
             psa ->
                 areAccountAndLabelTheSame(psa.key(), psaOrig.key())
-                    && psa.value() == psaOrig.value());
+                    && psa.value() == psaOrig.value()
+                    && psa.isAi() == psaOrig.isAi());
   }
 
   /**
diff --git a/java/com/google/gerrit/server/restapi/change/PostReviewers.java b/java/com/google/gerrit/server/restapi/change/PostReviewers.java
index d8e03d9..1c13bb5 100644
--- a/java/com/google/gerrit/server/restapi/change/PostReviewers.java
+++ b/java/com/google/gerrit/server/restapi/change/PostReviewers.java
@@ -37,6 +37,7 @@
 import com.google.gerrit.server.change.ReviewerResource;
 import com.google.gerrit.server.notedb.ChangeNotes;
 import com.google.gerrit.server.permissions.ChangePermission;
+import com.google.gerrit.server.permissions.GlobalPermission;
 import com.google.gerrit.server.permissions.PermissionBackend;
 import com.google.gerrit.server.permissions.PermissionBackendException;
 import com.google.gerrit.server.query.change.ChangeData;
@@ -114,6 +115,9 @@
 
   private IdentifiedUser onBehalfOf(CurrentUser caller, String onBehalfOf, ChangeNotes changeNotes)
       throws RestApiException, PermissionBackendException, IOException, ConfigInvalidException {
+    if (!caller.isInternalUser()) {
+      permissionBackend.user(caller).check(GlobalPermission.RUN_AS);
+    }
     IdentifiedUser reviewer =
         accountResolver
             .resolve(onBehalfOf)
diff --git a/java/com/google/gerrit/server/restapi/change/RevertSubmission.java b/java/com/google/gerrit/server/restapi/change/RevertSubmission.java
index 243c765..5617f84 100644
--- a/java/com/google/gerrit/server/restapi/change/RevertSubmission.java
+++ b/java/com/google/gerrit/server/restapi/change/RevertSubmission.java
@@ -187,6 +187,17 @@
 
     checkPermissionsForAllChanges(changeResource, changeDatas);
     input.topic = createTopic(input.topic, submissionId);
+    if (input.workInProgress == null) {
+      input.workInProgress =
+          firstNonNull(
+              changeResource
+                  .getUser()
+                  .asIdentifiedUser()
+                  .state()
+                  .generalPreferences()
+                  .workInProgressByDefault,
+              false);
+    }
 
     return Response.ok(revertSubmission(changeDatas, input));
   }
diff --git a/java/com/google/gerrit/server/restapi/change/Submit.java b/java/com/google/gerrit/server/restapi/change/Submit.java
index 6056d01..caa765d 100644
--- a/java/com/google/gerrit/server/restapi/change/Submit.java
+++ b/java/com/google/gerrit/server/restapi/change/Submit.java
@@ -125,7 +125,7 @@
   private final ParameterizedString titlePatternWithAncestors;
   private final String submitTopicLabel;
   private final ParameterizedString submitTopicTooltip;
-  private final boolean submitWholeTopic;
+  private final boolean enforceWholeTopicSubmit;
   private final Provider<InternalChangeQuery> queryProvider;
   private final ChangeJson.Factory json;
   private final ChangeData.Factory changeDataFactory;
@@ -170,7 +170,7 @@
             MoreObjects.firstNonNull(
                 cfg.getString("change", null, "submitTooltipAncestors"),
                 DEFAULT_TOOLTIP_ANCESTORS));
-    submitWholeTopic = MergeSuperSet.wholeTopicEnabled(cfg);
+    enforceWholeTopicSubmit = MergeSuperSet.isWholeTopicSubmitEnforced(cfg);
     this.submitTopicLabel =
         MoreObjects.firstNonNull(
             Strings.emptyToNull(cfg.getString("change", null, "submitTopicLabel")),
@@ -331,7 +331,8 @@
     if (!Strings.isNullOrEmpty(topic)) {
       topicSize = queryProvider.get().noFields().byTopicOpen(topic).size();
     }
-    boolean treatWithTopic = submitWholeTopic && !Strings.isNullOrEmpty(topic) && topicSize > 1;
+    boolean treatWithTopic =
+        enforceWholeTopicSubmit && !Strings.isNullOrEmpty(topic) && topicSize > 1;
 
     if (submitProblems != null) {
       return new UiAction.Description()
diff --git a/java/com/google/gerrit/server/restapi/config/CleanupDraftComments.java b/java/com/google/gerrit/server/restapi/config/CleanupDraftComments.java
index 901bc41..5d42cdc 100644
--- a/java/com/google/gerrit/server/restapi/config/CleanupDraftComments.java
+++ b/java/com/google/gerrit/server/restapi/config/CleanupDraftComments.java
@@ -44,7 +44,7 @@
   @Override
   public Response<?> apply(ConfigResource resource, Input input)
       throws AuthException, BadRequestException, ResourceConflictException, Exception {
-    var unused = workQueue.getDefaultQueue().submit(cleanupRunner);
+    var _ = workQueue.getDefaultQueue().submit(cleanupRunner);
     return Response.accepted("Cleanup of draft comments submitted");
   }
 }
diff --git a/java/com/google/gerrit/server/restapi/config/GetServerInfo.java b/java/com/google/gerrit/server/restapi/config/GetServerInfo.java
index f8c066d..322930f 100644
--- a/java/com/google/gerrit/server/restapi/config/GetServerInfo.java
+++ b/java/com/google/gerrit/server/restapi/config/GetServerInfo.java
@@ -52,6 +52,7 @@
 import com.google.gerrit.server.avatar.AvatarProvider;
 import com.google.gerrit.server.change.ArchiveFormatInternal;
 import com.google.gerrit.server.change.MergeabilityComputationBehavior;
+import com.google.gerrit.server.config.AccountConfig;
 import com.google.gerrit.server.config.AllProjectsName;
 import com.google.gerrit.server.config.AllUsersName;
 import com.google.gerrit.server.config.AnonymousCowardName;
@@ -81,6 +82,7 @@
 
 public class GetServerInfo implements RestReadView<ConfigResource> {
   private final Config config;
+  private final AccountConfig accountConfig;
   private final AccountVisibilityProvider accountVisibilityProvider;
   private final AccountDefaultDisplayName accountDefaultDisplayName;
   private final AuthConfig authConfig;
@@ -105,6 +107,7 @@
   @Inject
   public GetServerInfo(
       @GerritServerConfig Config config,
+      AccountConfig accountConfig,
       AccountVisibilityProvider accountVisibilityProvider,
       AccountDefaultDisplayName accountDefaultDisplayName,
       AuthConfig authConfig,
@@ -126,6 +129,7 @@
       @Nullable @GerritInstanceId String instanceId,
       PluginSetContext<ServerStateProvider> serverStateProviders) {
     this.config = config;
+    this.accountConfig = accountConfig;
     this.accountVisibilityProvider = accountVisibilityProvider;
     this.accountDefaultDisplayName = accountDefaultDisplayName;
     this.authConfig = authConfig;
@@ -175,6 +179,7 @@
     AccountsInfo info = new AccountsInfo();
     info.visibility = accountVisibilityProvider.get();
     info.defaultDisplayName = accountDefaultDisplayName;
+    info.enableDelete = accountConfig.isDeleteEnabled();
     return info;
   }
 
@@ -226,7 +231,8 @@
     info.allowBlame = toBoolean(config.getBoolean("change", "allowBlame", true));
     info.updateDelay =
         (int) ConfigUtil.getTimeUnit(config, "change", null, "updateDelay", 300, TimeUnit.SECONDS);
-    info.submitWholeTopic = toBoolean(MergeSuperSet.wholeTopicEnabled(config));
+    info.submitWholeTopic = toBoolean(MergeSuperSet.isWholeTopicSubmitEnforced(config));
+    info.enforceWholeTopicSubmit = toBoolean(MergeSuperSet.isWholeTopicSubmitEnforced(config));
     info.disablePrivateChanges =
         toBoolean(this.config.getBoolean("change", null, "disablePrivateChanges", false));
     info.mergeabilityComputationBehavior =
diff --git a/java/com/google/gerrit/server/restapi/config/GetTask.java b/java/com/google/gerrit/server/restapi/config/GetTask.java
index 513c99a..1548bc2 100644
--- a/java/com/google/gerrit/server/restapi/config/GetTask.java
+++ b/java/com/google/gerrit/server/restapi/config/GetTask.java
@@ -17,13 +17,14 @@
 import com.google.gerrit.extensions.restapi.Response;
 import com.google.gerrit.extensions.restapi.RestReadView;
 import com.google.gerrit.server.config.TaskResource;
+import com.google.gerrit.server.git.TaskInfo;
 import com.google.inject.Singleton;
 
 @Singleton
 public class GetTask implements RestReadView<TaskResource> {
 
   @Override
-  public Response<ListTasks.TaskInfo> apply(TaskResource rsrc) {
-    return Response.ok(new ListTasks.TaskInfo(rsrc.getTask()));
+  public Response<TaskInfo> apply(TaskResource rsrc) {
+    return Response.ok(new TaskInfo(rsrc.getTask()));
   }
 }
diff --git a/java/com/google/gerrit/server/restapi/config/IndexChanges.java b/java/com/google/gerrit/server/restapi/config/IndexChanges.java
index c011b56..bb1595c 100644
--- a/java/com/google/gerrit/server/restapi/config/IndexChanges.java
+++ b/java/com/google/gerrit/server/restapi/config/IndexChanges.java
@@ -99,7 +99,7 @@
           try {
             // Probe NoteDb: NoSuchChangeException means the change is in the index
             // but absent from disk, so it should be deleted.
-            ChangeNotes unused = notesFactory.create(changeInfo.project(), changeInfo.changeId());
+            ChangeNotes _ = notesFactory.create(changeInfo.project(), changeInfo.changeId());
           } catch (NoSuchChangeException e) {
             logger.atWarning().log(
                 "Change %s~%s missing in NoteDb", changeInfo.project(), changeInfo.changeId());
diff --git a/java/com/google/gerrit/server/restapi/config/ListTasks.java b/java/com/google/gerrit/server/restapi/config/ListTasks.java
index 73c762e..20a5316 100644
--- a/java/com/google/gerrit/server/restapi/config/ListTasks.java
+++ b/java/com/google/gerrit/server/restapi/config/ListTasks.java
@@ -25,10 +25,9 @@
 import com.google.gerrit.extensions.restapi.RestReadView;
 import com.google.gerrit.server.CurrentUser;
 import com.google.gerrit.server.config.ConfigResource;
+import com.google.gerrit.server.git.TaskInfo;
 import com.google.gerrit.server.git.WorkQueue;
-import com.google.gerrit.server.git.WorkQueue.ProjectTask;
 import com.google.gerrit.server.git.WorkQueue.Task;
-import com.google.gerrit.server.ioutil.HexFormat;
 import com.google.gerrit.server.permissions.GlobalPermission;
 import com.google.gerrit.server.permissions.PermissionBackend;
 import com.google.gerrit.server.permissions.PermissionBackendException;
@@ -37,14 +36,12 @@
 import com.google.gerrit.server.project.ProjectState;
 import com.google.inject.Inject;
 import com.google.inject.Provider;
-import java.sql.Timestamp;
 import java.util.ArrayList;
 import java.util.EnumSet;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Optional;
-import java.util.concurrent.TimeUnit;
 import java.util.function.Predicate;
 import org.kohsuke.args4j.CmdLineException;
 import org.kohsuke.args4j.CmdLineParser;
@@ -133,35 +130,6 @@
         .collect(toList());
   }
 
-  public static class TaskInfo {
-    public String id;
-    public Task.State state;
-    public Timestamp startTime;
-    public long delay;
-    public String command;
-    public String remoteName;
-    public String projectName;
-    public String queueName;
-
-    public TaskInfo(Task<?> task) {
-      this.id = HexFormat.fromInt(task.getTaskId());
-      this.state = task.getState();
-      this.startTime = Timestamp.from(task.getStartTime());
-      this.delay = task.getDelay(TimeUnit.MILLISECONDS);
-      this.command = task.toString();
-      this.queueName = task.getQueueName();
-
-      if (task instanceof ProjectTask) {
-        ProjectTask<?> projectTask = ((ProjectTask<?>) task);
-        Project.NameKey name = projectTask.getProjectNameKey();
-        if (name != null) {
-          this.projectName = name.get();
-        }
-        this.remoteName = projectTask.getRemoteName();
-      }
-    }
-  }
-
   public static class StateHandler extends EnumOptionHandler<Task.State> {
     private static final ImmutableMap<String, Task.State> ALIASES =
         ImmutableMap.of(
diff --git a/java/com/google/gerrit/server/restapi/config/PostCaches.java b/java/com/google/gerrit/server/restapi/config/PostCaches.java
index a0728d21..e4ebbdd 100644
--- a/java/com/google/gerrit/server/restapi/config/PostCaches.java
+++ b/java/com/google/gerrit/server/restapi/config/PostCaches.java
@@ -105,8 +105,7 @@
       if (FlushCache.WEB_SESSIONS.equals(cacheResource.getName())) {
         continue;
       }
-      @SuppressWarnings("unused")
-      var unused = flushCache.apply(cacheResource, null);
+      var _ = flushCache.apply(cacheResource, null);
     }
   }
 
@@ -132,8 +131,7 @@
     }
 
     for (CacheResource rsrc : cacheResources) {
-      @SuppressWarnings("unused")
-      var unused = flushCache.apply(rsrc, null);
+      var _ = flushCache.apply(rsrc, null);
     }
   }
 }
diff --git a/java/com/google/gerrit/server/restapi/config/ReindexIndexVersion.java b/java/com/google/gerrit/server/restapi/config/ReindexIndexVersion.java
index 21cd1c1..8399460 100644
--- a/java/com/google/gerrit/server/restapi/config/ReindexIndexVersion.java
+++ b/java/com/google/gerrit/server/restapi/config/ReindexIndexVersion.java
@@ -41,8 +41,7 @@
       throws ResourceNotFoundException {
     IndexDefinition<?, ?, ?> def = rsrc.getIndexDefinition();
     int version = rsrc.getIndex().getSchema().getVersion();
-    @SuppressWarnings("unused")
-    var unused = indexVersionReindexer.reindex(def, version, input.reuse, input.notifyListeners);
+    var _ = indexVersionReindexer.reindex(def, version, input.reuse, input.notifyListeners);
     return Response.accepted(
         String.format("Index %s version %d submitted for reindexing", def.getName(), version));
   }
diff --git a/java/com/google/gerrit/server/restapi/config/SnapshotIndex.java b/java/com/google/gerrit/server/restapi/config/SnapshotIndex.java
index c50367f..f851495 100644
--- a/java/com/google/gerrit/server/restapi/config/SnapshotIndex.java
+++ b/java/com/google/gerrit/server/restapi/config/SnapshotIndex.java
@@ -45,8 +45,7 @@
     IndexDefinition<?, ?, ?> def = rsrc.getIndexDefinition();
     for (Index<?, ?> index : def.getIndexCollection().getWriteIndexes()) {
       try {
-        @SuppressWarnings("unused")
-        var unused = index.snapshot(id);
+        var _ = index.snapshot(id);
       } catch (FileAlreadyExistsException e) {
         return Response.withStatusCode(SC_CONFLICT, "Snapshot with same ID already exists.");
       }
diff --git a/java/com/google/gerrit/server/restapi/config/SnapshotIndexVersion.java b/java/com/google/gerrit/server/restapi/config/SnapshotIndexVersion.java
index 9f66ab3..75f0570 100644
--- a/java/com/google/gerrit/server/restapi/config/SnapshotIndexVersion.java
+++ b/java/com/google/gerrit/server/restapi/config/SnapshotIndexVersion.java
@@ -42,7 +42,7 @@
       id = LocalDateTime.now(ZoneId.systemDefault()).format(formatter);
     }
     Index<?, ?> index = rsrc.getIndex();
-    var unused = index.snapshot(id);
+    var _ = index.snapshot(id);
     SnapshotInfo info = new SnapshotInfo();
     info.id = id;
     return Response.ok(info);
diff --git a/java/com/google/gerrit/server/restapi/config/SnapshotIndexes.java b/java/com/google/gerrit/server/restapi/config/SnapshotIndexes.java
index 6a2c5f8..de7538e 100644
--- a/java/com/google/gerrit/server/restapi/config/SnapshotIndexes.java
+++ b/java/com/google/gerrit/server/restapi/config/SnapshotIndexes.java
@@ -58,8 +58,7 @@
     for (IndexDefinition<?, ?, ?> def : defs) {
       for (Index<?, ?> index : def.getIndexCollection().getWriteIndexes()) {
         try {
-          @SuppressWarnings("unused")
-          var unused = index.snapshot(id);
+          var _ = index.snapshot(id);
         } catch (FileAlreadyExistsException e) {
           return Response.withStatusCode(SC_CONFLICT, "Snapshot with same ID already exists.");
         }
diff --git a/java/com/google/gerrit/server/restapi/config/TasksCollection.java b/java/com/google/gerrit/server/restapi/config/TasksCollection.java
index 0e220d1..8a83bc9 100644
--- a/java/com/google/gerrit/server/restapi/config/TasksCollection.java
+++ b/java/com/google/gerrit/server/restapi/config/TasksCollection.java
@@ -88,8 +88,8 @@
     }
 
     Task<?> task = workQueue.getTask(taskId);
-    if (task instanceof ProjectTask) {
-      Project.NameKey nameKey = ((ProjectTask<?>) task).getProjectNameKey();
+    if (task instanceof ProjectTask<?> projectTask) {
+      Project.NameKey nameKey = projectTask.getProjectNameKey();
       if (nameKey != null) {
         Optional<ProjectState> state = projectCache.get(nameKey);
         if (!state.isPresent()) {
diff --git a/java/com/google/gerrit/server/restapi/group/GroupJson.java b/java/com/google/gerrit/server/restapi/group/GroupJson.java
index 4edbc95..0019018 100644
--- a/java/com/google/gerrit/server/restapi/group/GroupJson.java
+++ b/java/com/google/gerrit/server/restapi/group/GroupJson.java
@@ -39,8 +39,8 @@
 public class GroupJson {
   public static GroupOptionsInfo createOptions(GroupDescription.Basic group) {
     GroupOptionsInfo options = new GroupOptionsInfo();
-    if (group instanceof GroupDescription.Internal
-        && ((GroupDescription.Internal) group).isVisibleToAll()) {
+    if (group instanceof GroupDescription.Internal internalGroup
+        && internalGroup.isVisibleToAll()) {
       options.visibleToAll = true;
     }
     return options;
@@ -91,8 +91,8 @@
       throws PermissionBackendException {
     GroupInfo info = createBasicGroupInfo(group);
 
-    if (group instanceof GroupDescription.Internal) {
-      addInternalDetails(info, (GroupDescription.Internal) group, groupControlSupplier);
+    if (group instanceof GroupDescription.Internal internalGroup) {
+      addInternalDetails(info, internalGroup, groupControlSupplier);
     }
 
     return info;
diff --git a/java/com/google/gerrit/server/restapi/project/CheckMergeability.java b/java/com/google/gerrit/server/restapi/project/CheckMergeability.java
index 6b46164..29b7e68 100644
--- a/java/com/google/gerrit/server/restapi/project/CheckMergeability.java
+++ b/java/com/google/gerrit/server/restapi/project/CheckMergeability.java
@@ -127,10 +127,10 @@
       }
 
       Merger m = MergeUtil.newMerger(inserter, git.getConfig(), strategy);
-      if (m instanceof ResolveMerger && useGitattributesForMerge) {
+      if (m instanceof ResolveMerger resolveMerger && useGitattributesForMerge) {
         // We need to set the attributes provider before attempting the merge in order to read and
         // honor gitattributes merge settings correctly
-        ((ResolveMerger) m).setAttributesNodeProvider(git.createAttributesNodeProvider());
+        resolveMerger.setAttributesNodeProvider(git.createAttributesNodeProvider());
       }
       if (m.merge(false, targetCommit, sourceCommit)) {
         result.mergeable = true;
@@ -138,8 +138,8 @@
         result.contentMerged = m.getResultTreeId().equals(targetCommit.getTree());
       } else {
         result.mergeable = false;
-        if (m instanceof ResolveMerger) {
-          result.conflicts = ((ResolveMerger) m).getUnmergedPaths();
+        if (m instanceof ResolveMerger resolveMerger) {
+          result.conflicts = resolveMerger.getUnmergedPaths();
         }
       }
     } catch (InvalidMergeStrategyException e) {
diff --git a/java/com/google/gerrit/server/restapi/project/CommitsCollection.java b/java/com/google/gerrit/server/restapi/project/CommitsCollection.java
index e0c699a..075d33a 100644
--- a/java/com/google/gerrit/server/restapi/project/CommitsCollection.java
+++ b/java/com/google/gerrit/server/restapi/project/CommitsCollection.java
@@ -159,7 +159,7 @@
               .changeIndexQuery(
                   "queryChangesByProjectCommit", q -> q.enforceVisibility(true).query(pred))
               .call();
-      Set<Ref> branchesForCommitParents = new HashSet<>(changes.size());
+      Set<Ref> branchesForCommitParents = HashSet.newHashSet(changes.size());
       for (ChangeData cd : changes) {
         Ref ref = repo.exactRef(cd.change().getDest().branch());
         if (ref != null) {
diff --git a/java/com/google/gerrit/server/restapi/project/ConfigInfoCreator.java b/java/com/google/gerrit/server/restapi/project/ConfigInfoCreator.java
index 192e624..82f794b 100644
--- a/java/com/google/gerrit/server/restapi/project/ConfigInfoCreator.java
+++ b/java/com/google/gerrit/server/restapi/project/ConfigInfoCreator.java
@@ -27,6 +27,7 @@
 import com.google.gerrit.extensions.api.projects.ConfigInfo.MaxObjectSizeLimitInfo;
 import com.google.gerrit.extensions.api.projects.ConfigInfo.SubmitTypeInfo;
 import com.google.gerrit.extensions.api.projects.ProjectConfigEntryType;
+import com.google.gerrit.extensions.client.RefStorage;
 import com.google.gerrit.extensions.common.ActionInfo;
 import com.google.gerrit.extensions.registration.DynamicMap;
 import com.google.gerrit.extensions.registration.Extension;
@@ -46,6 +47,8 @@
 import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.TreeMap;
+import org.eclipse.jgit.lib.ConfigConstants;
+import org.eclipse.jgit.lib.Repository;
 
 public class ConfigInfoCreator {
   /** do not instantiate this class. */
@@ -60,9 +63,11 @@
       PluginConfigFactory cfgFactory,
       AllProjectsName allProjects,
       UiActions uiActions,
-      DynamicMap<RestView<ProjectResource>> views) {
+      DynamicMap<RestView<ProjectResource>> views,
+      RefStorage refStorage) {
     ConfigInfo configInfo = new ConfigInfo();
     Project p = projectState.getProject();
+    configInfo.refStorage = refStorage;
     configInfo.description = Strings.emptyToNull(p.getDescription());
 
     ProjectState parentState = Iterables.getFirst(projectState.parents(), null);
@@ -115,6 +120,19 @@
     return configInfo;
   }
 
+  static RefStorage refStorageOf(Repository repo) {
+    // Read extensions.refStorage from the repo config, case-insensitively as JGit selects the
+    // backend. Robust even when the ref database is wrapped at runtime (e.g. shared-refdb).
+    return ConfigConstants.CONFIG_REF_STORAGE_REFTABLE.equalsIgnoreCase(
+            repo.getConfig()
+                .getString(
+                    ConfigConstants.CONFIG_EXTENSIONS_SECTION,
+                    null,
+                    ConfigConstants.CONFIG_KEY_REF_STORAGE))
+        ? RefStorage.REFTABLE
+        : RefStorage.FILES;
+  }
+
   private static MaxObjectSizeLimitInfo getMaxObjectSizeLimit(
       ProjectState projectState, Project p) {
     MaxObjectSizeLimitInfo info = new MaxObjectSizeLimitInfo();
diff --git a/java/com/google/gerrit/server/restapi/project/ConvertRefStorage.java b/java/com/google/gerrit/server/restapi/project/ConvertRefStorage.java
new file mode 100644
index 0000000..b67782c
--- /dev/null
+++ b/java/com/google/gerrit/server/restapi/project/ConvertRefStorage.java
@@ -0,0 +1,115 @@
+// Copyright (C) 2026 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.google.gerrit.server.restapi.project;
+
+import com.google.common.base.Ascii;
+import com.google.common.base.Strings;
+import com.google.gerrit.extensions.api.projects.RefStorageInput;
+import com.google.gerrit.extensions.client.RefStorage;
+import com.google.gerrit.extensions.restapi.AuthException;
+import com.google.gerrit.extensions.restapi.BadRequestException;
+import com.google.gerrit.extensions.restapi.ResourceConflictException;
+import com.google.gerrit.extensions.restapi.ResourceNotFoundException;
+import com.google.gerrit.extensions.restapi.Response;
+import com.google.gerrit.extensions.restapi.RestModifyView;
+import com.google.gerrit.server.git.GitRepositoryManager;
+import com.google.gerrit.server.git.RefStorageNotSupportedException;
+import com.google.gerrit.server.permissions.GlobalPermission;
+import com.google.gerrit.server.permissions.PermissionBackend;
+import com.google.gerrit.server.permissions.PermissionBackendException;
+import com.google.gerrit.server.project.ProjectResource;
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+import java.io.IOException;
+import java.text.MessageFormat;
+import org.eclipse.jgit.errors.RepositoryNotFoundException;
+import org.eclipse.jgit.internal.JGitText;
+import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.lib.RefStorageFormat;
+
+/**
+ * Converts a project's reference storage between the files backend and reftable.
+ *
+ * <p>Conversion is supported in both directions, for a local repository that is not already in the
+ * requested format.
+ */
+@Singleton
+public class ConvertRefStorage implements RestModifyView<ProjectResource, RefStorageInput> {
+  private final GitRepositoryManager repoManager;
+  private final PermissionBackend permissionBackend;
+
+  @Inject
+  ConvertRefStorage(GitRepositoryManager repoManager, PermissionBackend permissionBackend) {
+    this.repoManager = repoManager;
+    this.permissionBackend = permissionBackend;
+  }
+
+  @Override
+  public Response<String> apply(ProjectResource rsrc, RefStorageInput input)
+      throws AuthException,
+          BadRequestException,
+          ResourceConflictException,
+          ResourceNotFoundException,
+          IOException,
+          PermissionBackendException {
+    permissionBackend.user(rsrc.getUser()).check(GlobalPermission.ADMINISTRATE_SERVER);
+
+    if (input == null || Strings.isNullOrEmpty(input.refStorage)) {
+      throw new BadRequestException("ref_storage is required");
+    }
+    RefStorage target;
+    try {
+      target = RefStorage.valueOf(Ascii.toUpperCase(input.refStorage));
+    } catch (IllegalArgumentException e) {
+      throw new BadRequestException("invalid ref_storage: " + input.refStorage, e);
+    }
+    boolean backup = input.backup == null || input.backup;
+
+    RefStorageFormat format =
+        target == RefStorage.REFTABLE ? RefStorageFormat.REFTABLE : RefStorageFormat.FILES;
+    try {
+      if (!repoManager.convertRefStorage(
+          rsrc.getNameKey(), format, /* writeLogs= */ true, backup)) {
+        throw new ResourceConflictException(
+            "Repository is already in " + target.name() + " ref storage format");
+      }
+    } catch (RefStorageNotSupportedException e) {
+      throw new ResourceConflictException(e.getMessage(), e);
+    } catch (RepositoryNotFoundException e) {
+      throw new ResourceNotFoundException(rsrc.getName(), e);
+    } catch (IOException e) {
+      if (isLeftoverBackup(e)) {
+        throw new ResourceConflictException(
+            "A backup from a previous conversion already exists. Remove it before converting again",
+            e);
+      }
+      throw e;
+    }
+    return Response.ok(target.name());
+  }
+
+  /**
+   * Whether {@code e} signals that a backend left over from a previous conversion blocks this one.
+   *
+   * <p>JGit throws a plain {@link IOException} for this precondition (a non-empty {@code reftable/}
+   * directory, or a stray {@code packed-refs}) with no dedicated type, so match on the message.
+   */
+  private static boolean isLeftoverBackup(IOException e) {
+    String message = e.getMessage();
+    return JGitText.get().reftableDirExists.equals(message)
+        || MessageFormat.format(JGitText.get().fileAlreadyExists, Constants.PACKED_REFS)
+            .equals(message);
+  }
+}
diff --git a/java/com/google/gerrit/server/restapi/project/CreateLabel.java b/java/com/google/gerrit/server/restapi/project/CreateLabel.java
index 35102d8..f2fb2fc2 100644
--- a/java/com/google/gerrit/server/restapi/project/CreateLabel.java
+++ b/java/com/google/gerrit/server/restapi/project/CreateLabel.java
@@ -176,8 +176,7 @@
     input.copyCondition = Strings.emptyToNull(input.copyCondition);
     if (input.copyCondition != null) {
       try {
-        @SuppressWarnings("unused")
-        var unused = approvalQueryBuilder.parse(input.copyCondition);
+        var _ = approvalQueryBuilder.parse(input.copyCondition);
       } catch (QueryParseException e) {
         throw new BadRequestException(
             "unable to parse copy condition. got: " + input.copyCondition + ". " + e.getMessage(),
diff --git a/java/com/google/gerrit/server/restapi/project/CreateProject.java b/java/com/google/gerrit/server/restapi/project/CreateProject.java
index ef59fa2..6cc9bce 100644
--- a/java/com/google/gerrit/server/restapi/project/CreateProject.java
+++ b/java/com/google/gerrit/server/restapi/project/CreateProject.java
@@ -41,6 +41,7 @@
 import com.google.gerrit.server.config.AllUsersName;
 import com.google.gerrit.server.config.GerritServerConfig;
 import com.google.gerrit.server.config.ProjectOwnerGroupsProvider;
+import com.google.gerrit.server.git.RefStorageNotSupportedException;
 import com.google.gerrit.server.group.GroupResolver;
 import com.google.gerrit.server.permissions.PermissionBackendException;
 import com.google.gerrit.server.plugincontext.PluginSetContext;
@@ -136,6 +137,10 @@
     args.projectDescription = Strings.emptyToNull(input.description);
     args.submitType = input.submitType;
     args.branch = normalizeBranchNames(input.branches);
+    if (input.initOnly && input.refStorage != null) {
+      throw new BadRequestException("ref storage format cannot be set for an init-only project");
+    }
+    args.refStorage = input.refStorage;
     if (input.owners == null || input.owners.isEmpty()) {
       args.ownerIds = new ArrayList<>(projectOwnerGroups.create(args.getProject()).get());
     } else {
@@ -179,7 +184,12 @@
         throw new ResourceConflictException(e.getMessage(), e);
       }
 
-      ProjectState projectState = projectCreator.createProject(args);
+      ProjectState projectState;
+      try {
+        projectState = projectCreator.createProject(args);
+      } catch (RefStorageNotSupportedException e) {
+        throw new ResourceConflictException(e.getMessage(), e);
+      }
       requireNonNull(
           projectState,
           () -> String.format("failed to create project %s", args.getProject().get()));
@@ -189,8 +199,7 @@
         in.pluginConfigValues = input.pluginConfigValues;
         in.description = args.projectDescription;
 
-        @SuppressWarnings("unused")
-        var unused = putConfig.get().apply(projectState, in);
+        var _ = putConfig.get().apply(projectState, in);
       }
       ProjectInfo projectInfo = json.format(projectState);
       return input.initOnly ? Response.ok(projectInfo) : Response.created(projectInfo);
diff --git a/java/com/google/gerrit/server/restapi/project/DeleteRef.java b/java/com/google/gerrit/server/restapi/project/DeleteRef.java
index c2060e5..b34122e 100644
--- a/java/com/google/gerrit/server/restapi/project/DeleteRef.java
+++ b/java/com/google/gerrit/server/restapi/project/DeleteRef.java
@@ -262,25 +262,21 @@
   }
 
   private void appendAndLogErrorMessage(StringBuilder errorMessages, ReceiveCommand cmd) {
-    String msg;
-    switch (cmd.getResult()) {
-      case REJECTED_CURRENT_BRANCH:
-        msg = format("Cannot delete %s: it is the current branch", cmd.getRefName());
-        break;
-      case REJECTED_OTHER_REASON:
-        msg = format("Cannot delete %s: %s", cmd.getRefName(), cmd.getMessage());
-        break;
-      case LOCK_FAILURE:
-      case NOT_ATTEMPTED:
-      case OK:
-      case REJECTED_MISSING_OBJECT:
-      case REJECTED_NOCREATE:
-      case REJECTED_NODELETE:
-      case REJECTED_NONFASTFORWARD:
-      default:
-        msg = format("Cannot delete %s: %s", cmd.getRefName(), cmd.getResult());
-        break;
-    }
+    String msg =
+        switch (cmd.getResult()) {
+          case REJECTED_CURRENT_BRANCH ->
+              format("Cannot delete %s: it is the current branch", cmd.getRefName());
+          case REJECTED_OTHER_REASON ->
+              format("Cannot delete %s: %s", cmd.getRefName(), cmd.getMessage());
+          case NOT_ATTEMPTED,
+              REJECTED_NOCREATE,
+              REJECTED_NODELETE,
+              REJECTED_NONFASTFORWARD,
+              REJECTED_MISSING_OBJECT,
+              LOCK_FAILURE,
+              OK ->
+              format("Cannot delete %s: %s", cmd.getRefName(), cmd.getResult());
+        };
     logger.atSevere().log("%s", msg);
     errorMessages.append(msg);
     errorMessages.append("\n");
diff --git a/java/com/google/gerrit/server/restapi/project/FilesInCommitCollection.java b/java/com/google/gerrit/server/restapi/project/FilesInCommitCollection.java
index 6d054bd..4abc739 100644
--- a/java/com/google/gerrit/server/restapi/project/FilesInCommitCollection.java
+++ b/java/com/google/gerrit/server/restapi/project/FilesInCommitCollection.java
@@ -14,7 +14,6 @@
 
 package com.google.gerrit.server.restapi.project;
 
-import com.google.gerrit.entities.Patch;
 import com.google.gerrit.extensions.common.FileInfo;
 import com.google.gerrit.extensions.registration.DynamicMap;
 import com.google.gerrit.extensions.restapi.ChildCollection;
@@ -25,7 +24,6 @@
 import com.google.gerrit.extensions.restapi.RestReadView;
 import com.google.gerrit.extensions.restapi.RestView;
 import com.google.gerrit.server.change.FileInfoJson;
-import com.google.gerrit.server.git.GitRepositoryManager;
 import com.google.gerrit.server.patch.PatchListNotAvailableException;
 import com.google.gerrit.server.project.CommitResource;
 import com.google.gerrit.server.project.FileResource;
@@ -45,16 +43,11 @@
 public class FilesInCommitCollection implements ChildCollection<CommitResource, FileResource> {
   private final DynamicMap<RestView<FileResource>> views;
   private final Provider<ListFiles> list;
-  private final GitRepositoryManager repoManager;
 
   @Inject
-  FilesInCommitCollection(
-      DynamicMap<RestView<FileResource>> views,
-      Provider<ListFiles> list,
-      GitRepositoryManager repoManager) {
+  FilesInCommitCollection(DynamicMap<RestView<FileResource>> views, Provider<ListFiles> list) {
     this.views = views;
     this.list = list;
-    this.repoManager = repoManager;
   }
 
   @Override
@@ -65,10 +58,7 @@
   @Override
   public FileResource parse(CommitResource parent, IdString id)
       throws ResourceNotFoundException, IOException {
-    if (Patch.isMagic(id.get())) {
-      return new FileResource(parent.getProjectState(), parent.getCommit(), id.get());
-    }
-    return FileResource.create(repoManager, parent.getProjectState(), parent.getCommit(), id.get());
+    return new FileResource(parent.getProjectState(), parent.getCommit(), id.get());
   }
 
   @Override
diff --git a/java/com/google/gerrit/server/restapi/project/GarbageCollect.java b/java/com/google/gerrit/server/restapi/project/GarbageCollect.java
index 60eb46e..f9f73add 100644
--- a/java/com/google/gerrit/server/restapi/project/GarbageCollect.java
+++ b/java/com/google/gerrit/server/restapi/project/GarbageCollect.java
@@ -85,8 +85,7 @@
         new Runnable() {
           @Override
           public void run() {
-            @SuppressWarnings("unused")
-            var unused = runGC(project, input, null);
+            var _ = runGC(project, input, null);
           }
 
           @Override
diff --git a/java/com/google/gerrit/server/restapi/project/GetConfig.java b/java/com/google/gerrit/server/restapi/project/GetConfig.java
index 8ffd5ec..1976925 100644
--- a/java/com/google/gerrit/server/restapi/project/GetConfig.java
+++ b/java/com/google/gerrit/server/restapi/project/GetConfig.java
@@ -15,7 +15,9 @@
 package com.google.gerrit.server.restapi.project;
 
 import com.google.gerrit.extensions.api.projects.ConfigInfo;
+import com.google.gerrit.extensions.client.RefStorage;
 import com.google.gerrit.extensions.registration.DynamicMap;
+import com.google.gerrit.extensions.restapi.ResourceNotFoundException;
 import com.google.gerrit.extensions.restapi.Response;
 import com.google.gerrit.extensions.restapi.RestReadView;
 import com.google.gerrit.extensions.restapi.RestView;
@@ -24,12 +26,16 @@
 import com.google.gerrit.server.config.PluginConfigFactory;
 import com.google.gerrit.server.config.ProjectConfigEntry;
 import com.google.gerrit.server.extensions.webui.UiActions;
+import com.google.gerrit.server.git.GitRepositoryManager;
 import com.google.gerrit.server.permissions.PermissionBackend;
 import com.google.gerrit.server.permissions.PermissionBackendException;
 import com.google.gerrit.server.permissions.ProjectPermission;
 import com.google.gerrit.server.project.ProjectResource;
 import com.google.inject.Inject;
 import com.google.inject.Singleton;
+import java.io.IOException;
+import org.eclipse.jgit.errors.RepositoryNotFoundException;
+import org.eclipse.jgit.lib.Repository;
 
 @Singleton
 public class GetConfig implements RestReadView<ProjectResource> {
@@ -40,6 +46,7 @@
   private final PermissionBackend permissionBackend;
   private final UiActions uiActions;
   private final DynamicMap<RestView<ProjectResource>> views;
+  private final GitRepositoryManager repoManager;
 
   @Inject
   public GetConfig(
@@ -49,7 +56,8 @@
       AllProjectsName allProjects,
       PermissionBackend permissionBackend,
       UiActions uiActions,
-      DynamicMap<RestView<ProjectResource>> views) {
+      DynamicMap<RestView<ProjectResource>> views,
+      GitRepositoryManager repoManager) {
     this.serverEnableSignedPush = serverEnableSignedPush;
     this.pluginConfigEntries = pluginConfigEntries;
     this.allProjects = allProjects;
@@ -57,10 +65,12 @@
     this.permissionBackend = permissionBackend;
     this.uiActions = uiActions;
     this.views = views;
+    this.repoManager = repoManager;
   }
 
   @Override
-  public Response<ConfigInfo> apply(ProjectResource resource) throws PermissionBackendException {
+  public Response<ConfigInfo> apply(ProjectResource resource)
+      throws PermissionBackendException, IOException, ResourceNotFoundException {
     boolean readConfigAllowed =
         permissionBackend
             .currentUser()
@@ -75,6 +85,16 @@
             cfgFactory,
             allProjects,
             uiActions,
-            views));
+            views,
+            refStorageOf(resource)));
+  }
+
+  private RefStorage refStorageOf(ProjectResource resource)
+      throws IOException, ResourceNotFoundException {
+    try (Repository repo = repoManager.openRepository(resource.getNameKey())) {
+      return ConfigInfoCreator.refStorageOf(repo);
+    } catch (RepositoryNotFoundException e) {
+      throw new ResourceNotFoundException(resource.getName(), e);
+    }
   }
 }
diff --git a/java/com/google/gerrit/server/restapi/project/GetDiffFile.java b/java/com/google/gerrit/server/restapi/project/GetDiffFile.java
index 70f22be..4eb8b4a 100644
--- a/java/com/google/gerrit/server/restapi/project/GetDiffFile.java
+++ b/java/com/google/gerrit/server/restapi/project/GetDiffFile.java
@@ -17,6 +17,7 @@
 import com.google.common.base.MoreObjects;
 import com.google.common.collect.ImmutableList;
 import com.google.gerrit.common.data.PatchScript;
+import com.google.gerrit.entities.Patch;
 import com.google.gerrit.entities.Project;
 import com.google.gerrit.extensions.client.DiffPreferencesInfo;
 import com.google.gerrit.extensions.client.DiffPreferencesInfo.Whitespace;
@@ -24,6 +25,7 @@
 import com.google.gerrit.extensions.common.DiffWebLinkInfo;
 import com.google.gerrit.extensions.common.WebLinkInfo;
 import com.google.gerrit.extensions.restapi.BadRequestException;
+import com.google.gerrit.extensions.restapi.IdString;
 import com.google.gerrit.extensions.restapi.ResourceConflictException;
 import com.google.gerrit.extensions.restapi.ResourceNotFoundException;
 import com.google.gerrit.extensions.restapi.Response;
@@ -47,6 +49,7 @@
 import org.eclipse.jgit.lib.Repository;
 import org.eclipse.jgit.revwalk.RevCommit;
 import org.eclipse.jgit.revwalk.RevWalk;
+import org.eclipse.jgit.treewalk.TreeWalk;
 import org.kohsuke.args4j.Option;
 
 /**
@@ -114,11 +117,19 @@
       RevCommit baseCommit = diffUtils.parseCommit(rw, baseCommitId, "base");
       RevCommit newCommit = rw.parseCommit(newCommitId);
 
-      // Validate that commits are in ancestor/descendant relationship
-      diffUtils.validateAncestorRelationship(rw, baseCommit, newCommit);
+      // Validate visibility and ancestor/descendant relationship for endpoints and intermediate
+      // commits
+      diffUtils.validateAndVerifyPath(projectState, repo, rw, baseCommit, newCommit);
 
-      // Verify visibility of all commits in the path
-      diffUtils.verifyPathVisibility(projectState, repo, rw, baseCommit, newCommit);
+      if (!Patch.isMagic(filePath)) {
+        try (TreeWalk tw =
+            TreeWalk.forPath(
+                rw.getObjectReader(), filePath, baseCommit.getTree(), newCommit.getTree())) {
+          if (tw == null) {
+            throw new ResourceNotFoundException(IdString.fromDecoded(filePath));
+          }
+        }
+      }
 
       // Get the file diff
       // Don't skip files due to rebase - this is a direct commit comparison, not patchset
diff --git a/java/com/google/gerrit/server/restapi/project/ListDiffFiles.java b/java/com/google/gerrit/server/restapi/project/ListDiffFiles.java
index 0a2925a..8360444 100644
--- a/java/com/google/gerrit/server/restapi/project/ListDiffFiles.java
+++ b/java/com/google/gerrit/server/restapi/project/ListDiffFiles.java
@@ -105,11 +105,9 @@
       RevCommit baseCommit = diffUtils.parseCommit(rw, baseCommitId, "base");
       RevCommit newCommit = rw.parseCommit(newCommitId);
 
-      // Validate that commits are in ancestor/descendant relationship
-      diffUtils.validateAncestorRelationship(rw, baseCommit, newCommit);
-
-      // Walk all commits in path and verify visibility for each (critical for private changes)
-      diffUtils.verifyPathVisibility(projectState, repo, rw, baseCommit, newCommit);
+      // Validate visibility and ancestor/descendant relationship for endpoints and intermediate
+      // commits (critical for private changes)
+      diffUtils.validateAndVerifyPath(projectState, repo, rw, baseCommit, newCommit);
 
       // Compute the diff
       // Don't skip files due to rebase - this is a direct commit comparison, not patchset
diff --git a/java/com/google/gerrit/server/restapi/project/ListTags.java b/java/com/google/gerrit/server/restapi/project/ListTags.java
index 41c64ca..35595db 100644
--- a/java/com/google/gerrit/server/restapi/project/ListTags.java
+++ b/java/com/google/gerrit/server/restapi/project/ListTags.java
@@ -15,6 +15,7 @@
 package com.google.gerrit.server.restapi.project;
 
 import static com.google.gerrit.entities.RefNames.isConfigRef;
+import static java.util.Comparator.comparing;
 
 import com.google.common.collect.ImmutableList;
 import com.google.gerrit.entities.Project;
@@ -149,33 +150,52 @@
       throws IOException, ResourceNotFoundException, RestApiException, PermissionBackendException {
     resource.getProjectState().checkStatePermitsRead();
 
-    List<TagInfo> tags = new ArrayList<>();
-
     PermissionBackend.ForProject perm =
         permissionBackend.currentUser().project(resource.getNameKey());
     try (Repository repo = getRepository(resource.getNameKey());
         RevWalk rw = new RevWalk(repo)) {
-      Collection<Ref> all =
-          visibleTags(
-              resource.getNameKey(), repo, repo.getRefDatabase().getRefsByPrefix(Constants.R_TAGS));
-      for (Ref ref : all) {
+      // Filter on substring and regex before checking visibility and creating the TagInfos, since
+      // both are expensive for projects with many tags.
+      ImmutableList<Ref> matching =
+          new RefFilter<>(Constants.R_TAGS, Ref::getName, regexCompiler)
+              .subString(matchSubstring)
+              .regex(matchRegex)
+              .filter(repo.getRefDatabase().getRefsByPrefix(Constants.R_TAGS));
+      List<Ref> refs = new ArrayList<>(visibleTags(resource.getNameKey(), repo, matching));
+
+      boolean sortedAndPaginated = false;
+      if (sortBy == ListTagSortOption.REF) {
+        // Sorting by ref only needs the ref name, hence sorting and applying 'start' and 'limit'
+        // can be done before creating the TagInfos.
+        refs.sort(comparing(Ref::getName));
+        if (descendingOrder) {
+          Collections.reverse(refs);
+        }
+        refs = paginate(refs);
+        sortedAndPaginated = true;
+      }
+
+      List<TagInfo> tags = new ArrayList<>(refs.size());
+      for (Ref ref : refs) {
         tags.add(
             createTagInfo(perm.ref(ref.getName()), ref, rw, resource.getProjectState(), links));
       }
-    }
 
-    tagSorter.sort(sortBy, tags, descendingOrder);
-    if (descendingOrder) {
-      Collections.reverse(tags);
+      if (!sortedAndPaginated) {
+        tagSorter.sort(sortBy, tags, descendingOrder);
+        if (descendingOrder) {
+          Collections.reverse(tags);
+        }
+        tags = paginate(tags);
+      }
+      return Response.ok(ImmutableList.copyOf(tags));
     }
+  }
 
-    return Response.ok(
-        new RefFilter<>(Constants.R_TAGS, (TagInfo tag) -> tag.ref, regexCompiler)
-            .start(start)
-            .limit(limit)
-            .subString(matchSubstring)
-            .regex(matchRegex)
-            .filter(tags));
+  private <T> List<T> paginate(List<T> list) {
+    int from = Math.min(Math.max(start, 0), list.size());
+    int to = limit > 0 ? Math.min(from + limit, list.size()) : list.size();
+    return list.subList(from, to);
   }
 
   public TagInfo get(ProjectResource resource, IdString id)
@@ -218,9 +238,8 @@
     }
 
     ImmutableList<WebLinkInfo> webLinks = links.getTagLinks(projectState.getName(), ref.getName());
-    if (object instanceof RevTag) {
+    if (object instanceof RevTag tag) {
       // Annotated or signed tag
-      RevTag tag = (RevTag) object;
       PersonIdent tagger = tag.getTaggerIdent();
       return new TagInfo(
           ref.getName(),
diff --git a/java/com/google/gerrit/server/restapi/project/PostLabels.java b/java/com/google/gerrit/server/restapi/project/PostLabels.java
index 2182784..63a6d72 100644
--- a/java/com/google/gerrit/server/restapi/project/PostLabels.java
+++ b/java/com/google/gerrit/server/restapi/project/PostLabels.java
@@ -85,8 +85,7 @@
 
     LabelDefinitionInputValidator.validate(labelInput.name, labelInput);
 
-    @SuppressWarnings("unused")
-    var unused = createLabel.createLabelType(config, labelInput.name.trim(), labelInput);
+    var _ = createLabel.createLabelType(config, labelInput.name.trim(), labelInput);
   }
 
   @Override
diff --git a/java/com/google/gerrit/server/restapi/project/PostLabelsReview.java b/java/com/google/gerrit/server/restapi/project/PostLabelsReview.java
index 177f26d..f92a4d2 100644
--- a/java/com/google/gerrit/server/restapi/project/PostLabelsReview.java
+++ b/java/com/google/gerrit/server/restapi/project/PostLabelsReview.java
@@ -73,7 +73,7 @@
         repoMetaDataUpdater.configChangeCreator(
             rsrc.getNameKey(), input.commitMessage, "Review labels change")) {
       ProjectConfig config = creator.getConfig();
-      var unused = postLabels.updateProjectConfig(config, input);
+      var _ = postLabels.updateProjectConfig(config, input);
       return creator.createChange();
     }
   }
diff --git a/java/com/google/gerrit/server/restapi/project/PostSubmitRequirements.java b/java/com/google/gerrit/server/restapi/project/PostSubmitRequirements.java
index 2c7bfce..754ecf0 100644
--- a/java/com/google/gerrit/server/restapi/project/PostSubmitRequirements.java
+++ b/java/com/google/gerrit/server/restapi/project/PostSubmitRequirements.java
@@ -61,14 +61,14 @@
       throw new UnprocessableEntityException(
           String.format("Submit requirement %s not found", name));
     }
-    var unused = updateSubmitRequirement.updateSubmitRequirement(config, input.name, input);
+    var _ = updateSubmitRequirement.updateSubmitRequirement(config, input.name, input);
     return true;
   }
 
   @Override
   protected void createItem(ProjectConfig config, SubmitRequirementInput input)
       throws BadRequestException, ResourceConflictException {
-    var unused = createSubmitRequirement.createSubmitRequirement(config, input.name, input);
+    var _ = createSubmitRequirement.createSubmitRequirement(config, input.name, input);
   }
 
   @Override
diff --git a/java/com/google/gerrit/server/restapi/project/PostSubmitRequirementsReview.java b/java/com/google/gerrit/server/restapi/project/PostSubmitRequirementsReview.java
index c9485fc..bf73716 100644
--- a/java/com/google/gerrit/server/restapi/project/PostSubmitRequirementsReview.java
+++ b/java/com/google/gerrit/server/restapi/project/PostSubmitRequirementsReview.java
@@ -54,7 +54,7 @@
         repoMetaDataUpdater.configChangeCreator(
             rsrc.getNameKey(), input.commitMessage, "Review submit requirements change")) {
       ProjectConfig config = creator.getConfig();
-      var unused = postSubmitRequirements.updateProjectConfig(config, input);
+      var _ = postSubmitRequirements.updateProjectConfig(config, input);
       // If config isn't updated, the createChange throws BadRequestException. We don't need
       // to explicitly check the updateProjectConfig result here.
       return creator.createChange();
diff --git a/java/com/google/gerrit/server/restapi/project/ProjectDiffUtils.java b/java/com/google/gerrit/server/restapi/project/ProjectDiffUtils.java
index 36c0999..068fcac 100644
--- a/java/com/google/gerrit/server/restapi/project/ProjectDiffUtils.java
+++ b/java/com/google/gerrit/server/restapi/project/ProjectDiffUtils.java
@@ -80,49 +80,43 @@
     }
   }
 
-  public void validateAncestorRelationship(RevWalk rw, RevCommit oldCommit, RevCommit newCommit)
-      throws BadRequestException, IOException {
-    boolean oldIsAncestorOfNew = rw.isMergedInto(oldCommit, newCommit);
-    boolean newIsAncestorOfOld = rw.isMergedInto(newCommit, oldCommit);
-
-    if (!oldIsAncestorOfNew && !newIsAncestorOfOld) {
-      throw new BadRequestException(
-          String.format(
-              "Commits %s and %s are not in ancestor/descendant relationship",
-              oldCommit.name(), newCommit.name()));
-    }
-  }
-
-  public void verifyPathVisibility(
+  /**
+   * Validates that both commits are visible to the caller, are in an ancestor/descendant
+   * relationship, and that every intermediate commit on the path between them is visible.
+   */
+  public void validateAndVerifyPath(
       ProjectState projectState,
       Repository repo,
       RevWalk rw,
       RevCommit oldCommit,
       RevCommit newCommit)
-      throws ResourceNotFoundException, IOException {
-    // Check visibility of both endpoints
+      throws BadRequestException, ResourceNotFoundException, IOException {
+    // Check visibility of both endpoints first so unauthorized callers cannot probe ancestry
+    // or trigger reachability checks on invisible commits.
     if (!commitsCollection.canRead(projectState, repo, oldCommit)
         || !commitsCollection.canRead(projectState, repo, newCommit)) {
       throw new ResourceNotFoundException("Commit not visible");
     }
 
-    // Determine topological order to walk from descendant to ancestor
-    rw.reset();
-    boolean oldIsAncestorOfNew = rw.isMergedInto(oldCommit, newCommit);
-    boolean newIsAncestorOfOld = rw.isMergedInto(newCommit, oldCommit);
+    if (oldCommit.equals(newCommit)) {
+      return;
+    }
 
+    // Determine topological order using strict DAG ancestry checks, short-circuiting on the
+    // common base -> descendant case.
     RevCommit descendant;
     RevCommit ancestor;
-    if (oldIsAncestorOfNew) {
-      descendant = newCommit;
+    if (isAncestor(rw, oldCommit, newCommit)) {
       ancestor = oldCommit;
-    } else if (newIsAncestorOfOld) {
-      descendant = oldCommit;
+      descendant = newCommit;
+    } else if (isAncestor(rw, newCommit, oldCommit)) {
       ancestor = newCommit;
+      descendant = oldCommit;
     } else {
-      // Commits are not related, visibility check covers endpoints but no path exists.
-      // This is usually caught by validateAncestorRelationship.
-      return;
+      throw new BadRequestException(
+          String.format(
+              "Commits %s and %s are not in ancestor/descendant relationship",
+              oldCommit.name(), newCommit.name()));
     }
 
     // Walk all commits between descendant and ancestor and check visibility
@@ -137,6 +131,19 @@
     }
   }
 
+  private boolean isAncestor(RevWalk rw, RevCommit ancestor, RevCommit descendant)
+      throws IOException {
+    if (ancestor.equals(descendant)) {
+      return true;
+    }
+    for (RevCommit parent : descendant.getParents()) {
+      if (parent.equals(ancestor)) {
+        return true;
+      }
+    }
+    return rw.isMergedInto(ancestor, descendant);
+  }
+
   /** Maps {@link DiffNotAvailableException} to appropriate {@link RestApiException}. */
   public RestApiException mapDiffException(DiffNotAvailableException e) {
     Throwable cause = e.getCause();
diff --git a/java/com/google/gerrit/server/restapi/project/ProjectRestApiModule.java b/java/com/google/gerrit/server/restapi/project/ProjectRestApiModule.java
index e0fb642..6242803 100644
--- a/java/com/google/gerrit/server/restapi/project/ProjectRestApiModule.java
+++ b/java/com/google/gerrit/server/restapi/project/ProjectRestApiModule.java
@@ -56,6 +56,7 @@
     post(PROJECT_KIND, "access").to(SetAccess.class);
     put(PROJECT_KIND, "access:review").to(CreateAccessChange.class);
     put(PROJECT_KIND, "ban").to(BanCommit.class);
+    post(PROJECT_KIND, "convert-ref-storage").to(ConvertRefStorage.class);
 
     child(PROJECT_KIND, "branches").to(BranchesCollection.class);
     create(BRANCH_KIND).to(CreateBranch.class);
diff --git a/java/com/google/gerrit/server/restapi/project/ProjectsCollection.java b/java/com/google/gerrit/server/restapi/project/ProjectsCollection.java
index 8411f68..43b44d5 100644
--- a/java/com/google/gerrit/server/restapi/project/ProjectsCollection.java
+++ b/java/com/google/gerrit/server/restapi/project/ProjectsCollection.java
@@ -24,7 +24,6 @@
 import com.google.gerrit.extensions.restapi.BadRequestException;
 import com.google.gerrit.extensions.restapi.IdString;
 import com.google.gerrit.extensions.restapi.NeedsParams;
-import com.google.gerrit.extensions.restapi.ResourceConflictException;
 import com.google.gerrit.extensions.restapi.ResourceNotFoundException;
 import com.google.gerrit.extensions.restapi.RestApiException;
 import com.google.gerrit.extensions.restapi.RestCollection;
@@ -134,8 +133,7 @@
   }
 
   @Nullable
-  private ProjectResource _parse(String id, boolean checkAccess)
-      throws PermissionBackendException, ResourceConflictException {
+  private ProjectResource _parse(String id, boolean checkAccess) throws PermissionBackendException {
     try {
       ProjectUtil.validateProjectName(id);
     } catch (InvalidProjectNameException e) {
@@ -157,15 +155,14 @@
       // WRITE_CONFIG is checked here because it's only allowed to project owners (ACCESS may also
       // be allowed for other users). Allowing project owners to access here will help them to view
       // and update the config of hidden projects easily.
-      if (state.get().statePermitsRead()) {
-        if (!permissionBackend.currentUser().project(nameKey).test(ProjectPermission.ACCESS)) {
-          return null;
-        }
-      } else if (!permissionBackend
-          .currentUser()
-          .project(nameKey)
-          .test(ProjectPermission.WRITE_CONFIG)) {
-        state.get().checkStatePermitsRead();
+      // For everyone else a hidden project must be indistinguishable from a non-existing one, so
+      // that its existence and state are not disclosed.
+      ProjectPermission requiredPermission =
+          state.get().statePermitsRead()
+              ? ProjectPermission.ACCESS
+              : ProjectPermission.WRITE_CONFIG;
+      if (!permissionBackend.currentUser().project(nameKey).test(requiredPermission)) {
+        return null;
       }
     }
     return new ProjectResource(state.get(), user.get());
diff --git a/java/com/google/gerrit/server/restapi/project/PutConfig.java b/java/com/google/gerrit/server/restapi/project/PutConfig.java
index 449d6de..b8fd7d2 100644
--- a/java/com/google/gerrit/server/restapi/project/PutConfig.java
+++ b/java/com/google/gerrit/server/restapi/project/PutConfig.java
@@ -153,7 +153,8 @@
           cfgFactory,
           allProjects,
           uiActions,
-          views);
+          views,
+          ConfigInfoCreator.refStorageOf(updater.getRepository()));
 
     } catch (IOException e) {
       if (e.getCause() instanceof ConfigInvalidException) {
diff --git a/java/com/google/gerrit/server/restapi/project/SetLabel.java b/java/com/google/gerrit/server/restapi/project/SetLabel.java
index 33d4640..345f22c 100644
--- a/java/com/google/gerrit/server/restapi/project/SetLabel.java
+++ b/java/com/google/gerrit/server/restapi/project/SetLabel.java
@@ -167,8 +167,7 @@
     input.copyCondition = Strings.emptyToNull(input.copyCondition);
     if (input.copyCondition != null) {
       try {
-        @SuppressWarnings("unused")
-        var unused = approvalQueryBuilder.parse(input.copyCondition);
+        var _ = approvalQueryBuilder.parse(input.copyCondition);
       } catch (QueryParseException e) {
         throw new BadRequestException(
             "unable to parse copy condition. got: " + input.copyCondition + ". " + e.getMessage(),
diff --git a/java/com/google/gerrit/server/rules/prolog/PrologRuleEvaluator.java b/java/com/google/gerrit/server/rules/prolog/PrologRuleEvaluator.java
index 3033dd7..a32335d 100644
--- a/java/com/google/gerrit/server/rules/prolog/PrologRuleEvaluator.java
+++ b/java/com/google/gerrit/server/rules/prolog/PrologRuleEvaluator.java
@@ -442,8 +442,7 @@
       List<Term> r;
       if (resultsTerm instanceof ListTerm) {
         r = new ArrayList<>();
-        for (Term t = resultsTerm; t instanceof ListTerm; ) {
-          ListTerm l = (ListTerm) t;
+        for (Term t = resultsTerm; t instanceof ListTerm l; ) {
           r.add(l.car().dereference());
           t = l.cdr().dereference();
         }
diff --git a/java/com/google/gerrit/server/rules/prolog/RulesCache.java b/java/com/google/gerrit/server/rules/prolog/RulesCache.java
index 00f25ae..88fa45f 100644
--- a/java/com/google/gerrit/server/rules/prolog/RulesCache.java
+++ b/java/com/google/gerrit/server/rules/prolog/RulesCache.java
@@ -207,8 +207,8 @@
       Term m = e.getMessageTerm();
       if (m instanceof StructureTerm && "syntax_error".equals(m.name()) && m.arity() >= 1) {
         StringBuilder msg = new StringBuilder();
-        if (m.arg(0) instanceof ListTerm) {
-          msg.append(Joiner.on(' ').join(((ListTerm) m.arg(0)).toJava()));
+        if (m.arg(0) instanceof ListTerm lt) {
+          msg.append(Joiner.on(' ').join(lt.toJava()));
         } else {
           msg.append(m.arg(0).toString());
         }
@@ -231,8 +231,7 @@
   private static String prettyProlog(Term at) {
     StringBuilder b = new StringBuilder();
     for (Object o : ((ListTerm) at).toJava()) {
-      if (o instanceof Term) {
-        Term t = (Term) o;
+      if (o instanceof Term t) {
         if (!(t instanceof StructureTerm)) {
           b.append(t.toString()).append(' ');
           continue;
diff --git a/java/com/google/gerrit/server/schema/AllProjectsCreator.java b/java/com/google/gerrit/server/schema/AllProjectsCreator.java
index 0a458d7..2442743 100644
--- a/java/com/google/gerrit/server/schema/AllProjectsCreator.java
+++ b/java/com/google/gerrit/server/schema/AllProjectsCreator.java
@@ -169,7 +169,11 @@
           initDefaultAclsForDefaultReaders(
               heads, config, input.defaultReadersGroup().orElse(anonymous));
           initDefaultAclsForDefaultUsers(
-              heads, codeReviewLabel, config, input.defaultUsersGroup().orElse(registered));
+              heads,
+              codeReviewLabel,
+              config,
+              input.defaultUsersGroup().orElse(registered),
+              input.initDefaultAiReviewAcl());
         });
 
     config.upsertAccessSection(
@@ -215,9 +219,13 @@
       AccessSection.Builder heads,
       LabelType codeReviewLabel,
       ProjectConfig config,
-      GroupReference defaultUsersGroup) {
+      GroupReference defaultUsersGroup,
+      boolean initDefaultAiReviewAcl) {
     grant(config, heads, codeReviewLabel, -1, 1, defaultUsersGroup);
     grant(config, heads, Permission.FORGE_AUTHOR, defaultUsersGroup);
+    if (initDefaultAiReviewAcl) {
+      grant(config, heads, Permission.AI_REVIEW, registered);
+    }
 
     config.upsertAccessSection(
         "refs/for/*",
@@ -226,10 +234,6 @@
           grant(config, refsFor, Permission.PUSH, defaultUsersGroup);
           grant(config, refsFor, Permission.PUSH_MERGE, defaultUsersGroup);
         });
-
-    config.upsertAccessSection(
-        AccessSection.ALL,
-        all -> grant(config, all, Permission.POST_REVIEW_COMMENT, defaultUsersGroup));
   }
 
   private void initDefaultAclsForServiceUsers(
diff --git a/java/com/google/gerrit/server/schema/AllProjectsInput.java b/java/com/google/gerrit/server/schema/AllProjectsInput.java
index 3d6031f..a897ef7 100644
--- a/java/com/google/gerrit/server/schema/AllProjectsInput.java
+++ b/java/com/google/gerrit/server/schema/AllProjectsInput.java
@@ -125,6 +125,10 @@
   /** Whether initializing default access sections in All-Projects. */
   public abstract boolean initDefaultAcls();
 
+  /** Whether to initialize the default AI review ACL in All-Projects. */
+  @UsedAt(UsedAt.Project.GOOGLE)
+  public abstract boolean initDefaultAiReviewAcl();
+
   /** Whether default submit requirements should be initialized in All-Projects. */
   public abstract boolean initDefaultSubmitRequirements();
 
@@ -137,6 +141,7 @@
             .codeReviewSubmitRequirement(getDefaultCodeReviewSubmitRequirements())
             .firstChangeIdForNoteDb(Sequences.FIRST_CHANGE_ID)
             .initDefaultAcls(true)
+            .initDefaultAiReviewAcl(true)
             .initDefaultSubmitRequirements(true);
     DEFAULT_BOOLEAN_PROJECT_CONFIGS.forEach(builder::addBooleanProjectConfig);
 
@@ -144,7 +149,7 @@
   }
 
   public static Builder builderWithNoDefault() {
-    return new AutoValue_AllProjectsInput.Builder();
+    return new AutoValue_AllProjectsInput.Builder().initDefaultAiReviewAcl(true);
   }
 
   @AutoValue.Builder
@@ -190,6 +195,9 @@
     @UsedAt(UsedAt.Project.GOOGLE)
     public abstract Builder initDefaultAcls(boolean initDefaultACLs);
 
+    @UsedAt(UsedAt.Project.GOOGLE)
+    public abstract Builder initDefaultAiReviewAcl(boolean initDefaultAiReviewAcl);
+
     public abstract Builder initDefaultSubmitRequirements(boolean initDefaultSubmitRequirements);
 
     public abstract AllProjectsInput build();
diff --git a/java/com/google/gerrit/server/schema/GrantPostReviewCommentPermission.java b/java/com/google/gerrit/server/schema/GrantAiReviewPermission.java
similarity index 65%
rename from java/com/google/gerrit/server/schema/GrantPostReviewCommentPermission.java
rename to java/com/google/gerrit/server/schema/GrantAiReviewPermission.java
index e9f34fd..285e6f2 100644
--- a/java/com/google/gerrit/server/schema/GrantPostReviewCommentPermission.java
+++ b/java/com/google/gerrit/server/schema/GrantAiReviewPermission.java
@@ -1,4 +1,4 @@
-// Copyright (C) 2025 The Android Open Source Project
+// Copyright (C) 2026 The Android Open Source Project
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -29,17 +29,19 @@
 import com.google.gerrit.server.project.ProjectConfig;
 import com.google.inject.Inject;
 import java.io.IOException;
-import java.util.concurrent.atomic.AtomicBoolean;
 import org.eclipse.jgit.errors.ConfigInvalidException;
 import org.eclipse.jgit.lib.PersonIdent;
 import org.eclipse.jgit.lib.Repository;
 
 /**
- * This class adds the "postReviewComment" permission to all hosts that call this method with the
- * relevant projectName. This class should be called with AllProjects as the project, by all hosts
- * before enabling the "postReviewComment" permission.
+ * Adds an explicit {@code allow aiReview group Registered Users} rule on {@code refs/heads/*} to
+ * {@code All-Projects} so existing sites preserve their previous default-allow behavior after
+ * {@code aiReview} switches to standard default-deny semantics.
+ *
+ * <p>Skipped when an {@code aiReview} permission already exists on {@code refs/heads/*} so admin
+ * customizations are not overwritten.
  */
-public class GrantPostReviewCommentPermission {
+public class GrantAiReviewPermission {
 
   private final GitRepositoryManager repoManager;
   private final ProjectConfig.Factory projectConfigFactory;
@@ -47,7 +49,7 @@
   private final PersonIdent serverUser;
 
   @Inject
-  public GrantPostReviewCommentPermission(
+  public GrantAiReviewPermission(
       GitRepositoryManager repoManager,
       ProjectConfig.Factory projectConfigFactory,
       SystemGroupBackend systemGroupBackend,
@@ -64,32 +66,23 @@
       MetaDataUpdate md = new MetaDataUpdate(GitReferenceUpdated.DISABLED, projectName, repo);
       ProjectConfig projectConfig = projectConfigFactory.read(md);
 
-      AtomicBoolean shouldExit = new AtomicBoolean(false);
-      projectConfig.upsertAccessSection(
-          AccessSection.ALL,
-          all -> {
-            Permission permissionOnRefsStar =
-                all.build().getPermission(Permission.POST_REVIEW_COMMENT);
-            if (permissionOnRefsStar != null) {
-              if (permissionOnRefsStar.getRule(registeredUsers) == null) {
-                // If admins already changed the permission, don't do anything.
-                shouldExit.set(true);
-                return;
-              }
-              // permission already exists on refs/* for Registered Users, don't do anything.
-              return;
-            }
-            // If the permission doesn't exist on refs/* for Registered Users, grant it.
-            grant(projectConfig, all, Permission.POST_REVIEW_COMMENT, registeredUsers);
-          });
-
-      if (shouldExit.get()) {
+      boolean alreadyHasAiReview =
+          projectConfig.getAccessSection(AccessSection.HEADS) != null
+              && projectConfig
+                      .getAccessSection(AccessSection.HEADS)
+                      .getPermission(Permission.AI_REVIEW)
+                  != null;
+      if (alreadyHasAiReview) {
         return;
       }
 
+      projectConfig.upsertAccessSection(
+          AccessSection.HEADS,
+          heads -> grant(projectConfig, heads, Permission.AI_REVIEW, registeredUsers));
+
       md.getCommitBuilder().setAuthor(serverUser);
       md.getCommitBuilder().setCommitter(serverUser);
-      md.setMessage("Add Post Review Comment permission for all registered users\n");
+      md.setMessage("Add AI Review permission for all registered users\n");
 
       projectConfig.commit(md);
     }
diff --git a/java/com/google/gerrit/server/schema/H2AccountPatchReviewStore.java b/java/com/google/gerrit/server/schema/H2AccountPatchReviewStore.java
index 944fb2c..0c7656a 100644
--- a/java/com/google/gerrit/server/schema/H2AccountPatchReviewStore.java
+++ b/java/com/google/gerrit/server/schema/H2AccountPatchReviewStore.java
@@ -14,18 +14,34 @@
 
 package com.google.gerrit.server.schema;
 
+import com.google.common.base.Splitter;
+import com.google.common.collect.Iterables;
+import com.google.common.flogger.FluentLogger;
 import com.google.gerrit.exceptions.DuplicateKeyException;
 import com.google.gerrit.exceptions.StorageException;
 import com.google.gerrit.server.config.GerritServerConfig;
 import com.google.gerrit.server.config.SitePaths;
 import com.google.gerrit.server.config.ThreadSettingsConfig;
+import com.google.gerrit.server.util.H2Url;
 import com.google.inject.Inject;
 import com.google.inject.Singleton;
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.FileSystemException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.StandardCopyOption;
 import java.sql.SQLException;
+import java.util.regex.Pattern;
 import org.eclipse.jgit.lib.Config;
 
 @Singleton
 public class H2AccountPatchReviewStore extends JdbcAccountPatchReviewStore {
+  private static final FluentLogger logger = FluentLogger.forEnclosingClass();
+  private static final String LOCK_TYPE_MARKER = "locktype";
+  static final String LOCK_TYPE_H2_BUILTIN = "h2-builtin-lock";
+  private final String url;
+  private final File dbFile;
 
   @Inject
   H2AccountPatchReviewStore(
@@ -33,10 +49,98 @@
       SitePaths sitePaths,
       ThreadSettingsConfig threadSettingsConfig) {
     super(cfg, sitePaths, threadSettingsConfig);
+    url = getUrl(cfg, sitePaths);
+    dbFile = dbFileFromUrl(url);
   }
 
-  protected H2AccountPatchReviewStore() {
+  protected H2AccountPatchReviewStore(String url) {
     super();
+    this.url = url;
+    dbFile = dbFileFromUrl(url);
+  }
+
+  @Override
+  public void start() {
+    claimOrVerifyLockType(dbFile, lockType());
+    super.start();
+  }
+
+  static File dbFileFromUrl(String h2Url) {
+    String path;
+    if (h2Url.startsWith(H2Url.ASYNC_PREFIX)) {
+      path = h2Url.substring(H2Url.ASYNC_PREFIX.length());
+    } else if (h2Url.startsWith(H2Url.FILE_PREFIX)) {
+      path = h2Url.substring(H2Url.FILE_PREFIX.length());
+    } else {
+      throw new IllegalArgumentException("Not a valid H2 file URL: " + h2Url);
+    }
+
+    // Split on first unescaped ";" to drop options, then unescape "\;" in the path
+    return new File(
+        Iterables.get(Splitter.on(Pattern.compile("(?<!\\\\);")).split(path), 0)
+            .replace("\\;", ";"));
+  }
+
+  /**
+   * Records the lock type next to the DB on first use and fails if the DB was already claimed by a
+   * different lock type, since primaries using different locking would not exclude each other.
+   *
+   * <p>The marker is a directory containing a single file. A claim is made by atomically renaming a
+   * fully written temp directory over the (empty) marker directory. A rename onto an empty
+   * directory succeeds, onto a non-empty one it fails, so exactly one primary wins and the marker
+   * is never visible without its content.
+   */
+  static void claimOrVerifyLockType(File dbFile, String lockType) {
+    Path markerDir =
+        dbFile.getAbsoluteFile().toPath().resolveSibling(dbFile.getName() + "." + LOCK_TYPE_MARKER);
+    Path marker = markerDir.resolve(LOCK_TYPE_MARKER);
+    Path tmpDir = null;
+    try {
+      // the DB is already claimed, nothing to write.
+      if (Files.exists(marker)) {
+        verifyLockType(dbFile, markerDir, Files.readString(marker).trim(), lockType);
+        return;
+      }
+      // Create the parent dir to support initial site init, when db/ does not exist yet.
+      Files.createDirectories(markerDir);
+      tmpDir = Files.createTempDirectory(markerDir.getParent(), dbFile.getName() + ".locktype.tmp");
+      Files.writeString(tmpDir.resolve(LOCK_TYPE_MARKER), lockType);
+      try {
+        Files.move(tmpDir, markerDir, StandardCopyOption.ATOMIC_MOVE);
+        return;
+      } catch (FileSystemException e) {
+        // Fails if markerDir is not empty, i.e. another primary already claimed the DB. Any other
+        // failure leaves no marker and is propagated.
+        if (!Files.exists(marker)) {
+          throw e;
+        }
+      }
+      verifyLockType(dbFile, markerDir, Files.readString(marker).trim(), lockType);
+    } catch (IOException e) {
+      throw new IllegalStateException("Cannot read or write lock type marker " + markerDir, e);
+    } finally {
+      if (tmpDir != null) {
+        try {
+          Files.deleteIfExists(tmpDir.resolve(LOCK_TYPE_MARKER));
+          Files.deleteIfExists(tmpDir);
+        } catch (IOException e) {
+          logger.atWarning().withCause(e).log("Cannot delete temp dir %s", tmpDir);
+        }
+      }
+    }
+  }
+
+  private static void verifyLockType(
+      File dbFile, Path markerDir, String existing, String lockType) {
+    if (!existing.equals(lockType)) {
+      throw new IllegalStateException(
+          String.format(
+              "H2 account patch review DB %s is used with h2LockType=%s by other primaries"
+                  + " (see %s), but this server is configured with h2LockType=%s. All primaries"
+                  + " must use the same locking. To change it, stop all primaries and delete"
+                  + " the marker directory.",
+              dbFile, existing, markerDir, lockType));
+    }
   }
 
   @Override
@@ -55,4 +159,16 @@
       }
     }
   }
+
+  protected String lockType() {
+    return LOCK_TYPE_H2_BUILTIN;
+  }
+
+  protected String getUrl() {
+    return url;
+  }
+
+  protected File getDbFile() {
+    return dbFile;
+  }
 }
diff --git a/java/com/google/gerrit/server/schema/H2CustomLockAccountPatchReviewStore.java b/java/com/google/gerrit/server/schema/H2CustomLockAccountPatchReviewStore.java
index 4e44a27..debd62c 100644
--- a/java/com/google/gerrit/server/schema/H2CustomLockAccountPatchReviewStore.java
+++ b/java/com/google/gerrit/server/schema/H2CustomLockAccountPatchReviewStore.java
@@ -56,8 +56,8 @@
   private Lock lockInstance;
 
   protected H2CustomLockAccountPatchReviewStore(Config cfg, SitePaths sitePaths) {
-    super();
-    url = JdbcAccountPatchReviewStore.getUrl(cfg, sitePaths) + ";FILE_LOCK=NO;DB_CLOSE_DELAY=0";
+    super(JdbcAccountPatchReviewStore.getUrl(cfg, sitePaths));
+    url = getUrl() + ";FILE_LOCK=NO;DB_CLOSE_DELAY=0";
     lockTimeoutMs =
         ConfigUtil.getTimeUnit(
             cfg,
@@ -129,6 +129,7 @@
               wait(waitMs);
               backoffMs = Math.min(backoffMs * 2, MAX_BACKOFF_MS);
             } catch (InterruptedException | RuntimeException e) {
+              waiting.remove(thread);
               unlock(thread);
               throw e;
             }
@@ -142,7 +143,11 @@
       }
 
       private void unlock(Thread thread) {
-        acquired.remove(thread);
+        if (!acquired.remove(thread)) {
+          // Not a holder (a waiter that gave up)
+          notifyAll();
+          return;
+        }
         try {
           if (acquired.isEmpty()) {
             raw.unlock();
diff --git a/java/com/google/gerrit/server/schema/H2JGitLockAccountPatchReviewStore.java b/java/com/google/gerrit/server/schema/H2JGitLockAccountPatchReviewStore.java
index c66b3b4..6ca70e3 100644
--- a/java/com/google/gerrit/server/schema/H2JGitLockAccountPatchReviewStore.java
+++ b/java/com/google/gerrit/server/schema/H2JGitLockAccountPatchReviewStore.java
@@ -14,20 +14,15 @@
 
 package com.google.gerrit.server.schema;
 
-import com.google.common.annotations.VisibleForTesting;
-import com.google.common.base.Splitter;
-import com.google.common.collect.Iterables;
 import com.google.common.flogger.FluentLogger;
 import com.google.gerrit.server.config.GerritServerConfig;
 import com.google.gerrit.server.config.SitePaths;
 import com.google.inject.Inject;
 import com.google.inject.Singleton;
-import java.io.File;
 import java.io.IOException;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.locks.Condition;
 import java.util.concurrent.locks.Lock;
-import java.util.regex.Pattern;
 import org.eclipse.jgit.internal.storage.file.LockFile;
 import org.eclipse.jgit.lib.Config;
 
@@ -41,28 +36,15 @@
 @Singleton
 public class H2JGitLockAccountPatchReviewStore extends H2CustomLockAccountPatchReviewStore {
   private static final FluentLogger logger = FluentLogger.forEnclosingClass();
-  private static final String H2_DB_URL_PREFIX = "jdbc:h2:file:";
-  private final File lockTarget;
 
   @Inject
   H2JGitLockAccountPatchReviewStore(@GerritServerConfig Config cfg, SitePaths sitePaths) {
     super(cfg, sitePaths);
-    this.lockTarget = lockTargetFromUrl(JdbcAccountPatchReviewStore.getUrl(cfg, sitePaths));
   }
 
-  @VisibleForTesting
-  static File lockTargetFromUrl(String h2Url) {
-    if (!h2Url.startsWith(H2_DB_URL_PREFIX)) {
-      throw new IllegalArgumentException("Not a valid H2 file URL: " + h2Url);
-    }
-
-    // URL format: "jdbc:h2:file:/path/to/db" - where ";" in the path is escaped as "\;"
-    String path = h2Url.substring(H2_DB_URL_PREFIX.length());
-
-    // Split on first unescaped ";" to drop options, then unescape "\;" in the path
-    return new File(
-        Iterables.get(Splitter.on(Pattern.compile("(?<!\\\\);")).split(path), 0)
-            .replace("\\;", ";"));
+  @Override
+  protected String lockType() {
+    return JdbcAccountPatchReviewStore.H2_LOCK_TYPE_JGIT;
   }
 
   @Override
@@ -71,7 +53,7 @@
     logger.atInfo().log(
         "AccountPatchReviewStore using H2 with jgit-style locking (h2LockType=jgit)."
             + " lockFile=%s lockTimeout=%d ms",
-        lockTarget, getLockTimeoutMs());
+        getDbFile(), getLockTimeoutMs());
   }
 
   /**
@@ -89,7 +71,7 @@
           return false;
         }
         try {
-          LockFile currLock = new LockFile(lockTarget);
+          LockFile currLock = new LockFile(getDbFile());
           if (currLock.lock()) {
             lockFile = currLock;
             return true;
diff --git a/java/com/google/gerrit/server/schema/JdbcAccountPatchReviewStore.java b/java/com/google/gerrit/server/schema/JdbcAccountPatchReviewStore.java
index fa53fe7..4cbde30 100644
--- a/java/com/google/gerrit/server/schema/JdbcAccountPatchReviewStore.java
+++ b/java/com/google/gerrit/server/schema/JdbcAccountPatchReviewStore.java
@@ -14,6 +14,7 @@
 
 package com.google.gerrit.server.schema;
 
+import static com.google.common.base.Strings.isNullOrEmpty;
 import static java.util.concurrent.TimeUnit.MILLISECONDS;
 import static java.util.concurrent.TimeUnit.SECONDS;
 
@@ -37,6 +38,7 @@
 import com.google.gerrit.server.logging.Metadata;
 import com.google.gerrit.server.logging.TraceContext;
 import com.google.gerrit.server.logging.TraceContext.TraceTimer;
+import com.google.gerrit.server.util.H2Url;
 import java.nio.file.Path;
 import java.sql.Connection;
 import java.sql.PreparedStatement;
@@ -45,7 +47,6 @@
 import java.sql.Statement;
 import java.util.Collection;
 import java.util.Optional;
-import javax.sql.DataSource;
 import org.apache.commons.dbcp.BasicDataSource;
 import org.eclipse.jgit.lib.Config;
 
@@ -83,16 +84,13 @@
       String url = cfg.getString(ACCOUNT_PATCH_REVIEW_DB, null, URL);
       if (url == null || url.contains(H2_DB)) {
         String lockType = cfg.getString(ACCOUNT_PATCH_REVIEW_DB, null, H2_LOCK_TYPE);
-        switch (lockType != null ? lockType : "") {
-          case "":
-            impl = H2AccountPatchReviewStore.class;
-            break;
-          case H2_LOCK_TYPE_JGIT:
-            impl = H2JGitLockAccountPatchReviewStore.class;
-            break;
-          default:
-            throw new IllegalArgumentException(
-                "Invalid accountPatchReviewDb.h2LockType value: " + lockType);
+        if (isNullOrEmpty(lockType)) {
+          impl = H2AccountPatchReviewStore.class;
+        } else if (lockType.equals(H2_LOCK_TYPE_JGIT)) {
+          impl = H2JGitLockAccountPatchReviewStore.class;
+        } else {
+          throw new IllegalArgumentException(
+              "Invalid accountPatchReviewDb.h2LockType value: " + lockType);
         }
       } else if (url.contains(POSTGRESQL)) {
         impl = PostgresqlAccountPatchReviewStore.class;
@@ -111,22 +109,20 @@
     }
   }
 
-  private DataSource ds;
+  private final BasicDataSource ds;
 
   public static JdbcAccountPatchReviewStore createAccountPatchReviewStore(
       Config cfg, SitePaths sitePaths, ThreadSettingsConfig threadSettingsConfig) {
     String url = cfg.getString(ACCOUNT_PATCH_REVIEW_DB, null, URL);
     if (url == null || url.contains(H2_DB)) {
       String lockType = cfg.getString(ACCOUNT_PATCH_REVIEW_DB, null, H2_LOCK_TYPE);
-      switch (lockType != null ? lockType : "") {
-        case "":
-          return new H2AccountPatchReviewStore(cfg, sitePaths, threadSettingsConfig);
-        case H2_LOCK_TYPE_JGIT:
-          return new H2JGitLockAccountPatchReviewStore(cfg, sitePaths);
-        default:
-          throw new IllegalArgumentException(
-              "Invalid accountPatchReviewDb.h2LockType value: " + lockType);
-      }
+      return switch (lockType != null ? lockType : "") {
+        case "" -> new H2AccountPatchReviewStore(cfg, sitePaths, threadSettingsConfig);
+        case H2_LOCK_TYPE_JGIT -> new H2JGitLockAccountPatchReviewStore(cfg, sitePaths);
+        default ->
+            throw new IllegalArgumentException(
+                "Invalid accountPatchReviewDb.h2LockType value: " + lockType);
+      };
     }
     if (url.contains(POSTGRESQL)) {
       return new PostgresqlAccountPatchReviewStore(cfg, sitePaths, threadSettingsConfig);
@@ -154,15 +150,24 @@
     this.ds = null;
   }
 
+  @VisibleForTesting
   static String getUrl(@GerritServerConfig Config cfg, SitePaths sitePaths) {
     String url = cfg.getString(ACCOUNT_PATCH_REVIEW_DB, null, URL);
     if (url == null) {
       return createH2Url(sitePaths.db_dir.resolve("account_patch_reviews"));
     }
+    return normalizeH2Url(url);
+  }
+
+  @VisibleForTesting
+  static String normalizeH2Url(String url) {
+    if (url.startsWith(H2Url.FILE_PREFIX)) {
+      return H2Url.ASYNC_PREFIX + url.substring(H2Url.FILE_PREFIX.length());
+    }
     return url;
   }
 
-  private static DataSource createDataSource(
+  private static BasicDataSource createDataSource(
       Config cfg, SitePaths sitePaths, ThreadSettingsConfig threadSettingsConfig) {
     BasicDataSource datasource = new BasicDataSource();
     String url = getUrl(cfg, sitePaths);
@@ -248,11 +253,23 @@
   }
 
   @Override
-  public void stop() {}
+  public void stop() {
+    if (ds == null) {
+      return;
+    }
+    // Close the pooled connections so that the database is shut down cleanly. Leaving them open
+    // makes H2's own shutdown hook wait on the unclosed sessions, delaying JVM exit by several
+    // seconds.
+    try {
+      ds.close();
+    } catch (SQLException e) {
+      logger.atWarning().withCause(e).log("Failed to close account patch review data source");
+    }
+  }
 
   @Override
   public boolean markReviewed(PatchSet.Id psId, Account.Id accountId, String path) {
-    try (TraceTimer ignored =
+    try (TraceTimer _ =
             TraceContext.newTimer(
                 "Mark file as reviewed",
                 Metadata.builder()
@@ -287,7 +304,7 @@
       return;
     }
 
-    try (TraceTimer ignored =
+    try (TraceTimer _ =
             TraceContext.newTimer(
                 "Mark files as reviewed",
                 Metadata.builder()
@@ -320,7 +337,7 @@
 
   @Override
   public void clearReviewed(PatchSet.Id psId, Account.Id accountId, String path) {
-    try (TraceTimer ignored =
+    try (TraceTimer _ =
             TraceContext.newTimer(
                 "Clear reviewed flag",
                 Metadata.builder()
@@ -346,7 +363,7 @@
 
   @Override
   public void clearReviewed(PatchSet.Id psId) {
-    try (TraceTimer ignored =
+    try (TraceTimer _ =
             TraceContext.newTimer(
                 "Clear all reviewed flags of patch set",
                 Metadata.builder().patchSetId(psId.get()).build());
@@ -365,7 +382,7 @@
 
   @Override
   public void clearReviewed(Change.Id changeId) {
-    try (TraceTimer ignored =
+    try (TraceTimer _ =
             TraceContext.newTimer(
                 "Clear all reviewed flags of change",
                 Metadata.builder().changeId(changeId.get()).build());
@@ -381,7 +398,7 @@
 
   @Override
   public void clearReviewedBy(Account.Id accountId) {
-    try (TraceTimer ignored =
+    try (TraceTimer _ =
             TraceContext.newTimer(
                 "Clear all reviewed flags by user",
                 Metadata.builder().accountId(accountId.get()).build());
@@ -397,7 +414,7 @@
 
   @Override
   public Optional<PatchSetWithReviewedFiles> findReviewed(PatchSet.Id psId, Account.Id accountId) {
-    try (TraceTimer ignored =
+    try (TraceTimer _ =
             TraceContext.newTimer(
                 "Find reviewed flags",
                 Metadata.builder().patchSetId(psId.get()).accountId(accountId.get()).build());
@@ -461,7 +478,7 @@
   @VisibleForTesting
   static String createH2Url(Path path) {
     return new StringBuilder()
-        .append("jdbc:h2:file:")
+        .append(H2Url.ASYNC_PREFIX)
         .append(path.toAbsolutePath().toString())
         .toString()
         .replace(";", "\\;");
diff --git a/java/com/google/gerrit/server/schema/NoteDbSchemaVersions.java b/java/com/google/gerrit/server/schema/NoteDbSchemaVersions.java
index 69e6fb3..05814e6 100644
--- a/java/com/google/gerrit/server/schema/NoteDbSchemaVersions.java
+++ b/java/com/google/gerrit/server/schema/NoteDbSchemaVersions.java
@@ -35,7 +35,8 @@
               Schema_183.class,
               Schema_184.class,
               Schema_185.class,
-              Schema_186.class)
+              Schema_186.class,
+              Schema_187.class)
           .collect(toImmutableSortedMap(naturalOrder(), v -> guessVersion(v).get(), v -> v));
 
   public static final int FIRST = ALL.firstKey();
diff --git a/java/com/google/gerrit/server/schema/SchemaModule.java b/java/com/google/gerrit/server/schema/SchemaModule.java
index 1106108..60e86e0 100644
--- a/java/com/google/gerrit/server/schema/SchemaModule.java
+++ b/java/com/google/gerrit/server/schema/SchemaModule.java
@@ -32,6 +32,7 @@
 import com.google.gerrit.server.config.GerritImportedServerIdsProvider;
 import com.google.gerrit.server.config.GerritServerId;
 import com.google.gerrit.server.config.GerritServerIdProvider;
+import com.google.gerrit.server.git.AllUsersRepositoryProvider;
 import com.google.gerrit.server.index.group.GroupIndexCollection;
 import com.google.gerrit.server.notedb.RepoSequence.DisabledGitRefUpdatedRepoGroupsSequenceProvider;
 import com.google.gerrit.server.query.change.ChangeNumberBitmapMaskAlgorithm;
@@ -58,6 +59,7 @@
     bind(AllProjectsName.class).toProvider(AllProjectsNameProvider.class).in(SINGLETON);
 
     bind(AllUsersName.class).toProvider(AllUsersNameProvider.class).in(SINGLETON);
+    install(new AllUsersRepositoryProvider.Module());
 
     bind(String.class)
         .annotatedWith(AnonymousCowardName.class)
diff --git a/java/com/google/gerrit/server/schema/Schema_186.java b/java/com/google/gerrit/server/schema/Schema_186.java
index de1e315..7b68fb0 100644
--- a/java/com/google/gerrit/server/schema/Schema_186.java
+++ b/java/com/google/gerrit/server/schema/Schema_186.java
@@ -14,11 +14,8 @@
 
 package com.google.gerrit.server.schema;
 
+/** Retains schema version 186 after reverting the Post Review Comment migration. */
 public class Schema_186 implements NoteDbSchemaVersion {
   @Override
-  public void upgrade(NoteDbSchemaVersion.Arguments args, UpdateUI ui) throws Exception {
-    new GrantPostReviewCommentPermission(
-            args.repoManager, args.projectConfigFactory, args.systemGroupBackend, args.serverUser)
-        .execute(args.allProjects);
-  }
+  public void upgrade(NoteDbSchemaVersion.Arguments args, UpdateUI ui) throws Exception {}
 }
diff --git a/java/com/google/gerrit/server/schema/Schema_187.java b/java/com/google/gerrit/server/schema/Schema_187.java
new file mode 100644
index 0000000..6b2eb7b
--- /dev/null
+++ b/java/com/google/gerrit/server/schema/Schema_187.java
@@ -0,0 +1,24 @@
+// Copyright (C) 2026 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.google.gerrit.server.schema;
+
+public class Schema_187 implements NoteDbSchemaVersion {
+  @Override
+  public void upgrade(NoteDbSchemaVersion.Arguments args, UpdateUI ui) throws Exception {
+    new GrantAiReviewPermission(
+            args.repoManager, args.projectConfigFactory, args.systemGroupBackend, args.serverUser)
+        .execute(args.allProjects);
+  }
+}
diff --git a/java/com/google/gerrit/server/schema/testing/AllProjectsCreatorTestUtil.java b/java/com/google/gerrit/server/schema/testing/AllProjectsCreatorTestUtil.java
index 188649f..52c1267 100644
--- a/java/com/google/gerrit/server/schema/testing/AllProjectsCreatorTestUtil.java
+++ b/java/com/google/gerrit/server/schema/testing/AllProjectsCreatorTestUtil.java
@@ -56,7 +56,6 @@
     return ImmutableList.of(
         "[access \"refs/*\"]",
         "  read = group Administrators",
-        "  postReviewComment = group " + usersGroupName,
         "  read = block group Blocked Users",
         "[access \"refs/for/*\"]",
         "  addPatchSet = group " + usersGroupName,
@@ -70,6 +69,7 @@
         "  create = group Project Owners",
         "  editTopicName = +force group Administrators",
         "  editTopicName = +force group Project Owners",
+        "  aiReview = group Registered Users",
         "  forgeAuthor = group " + usersGroupName,
         "  forgeCommitter = group Administrators",
         "  forgeCommitter = group Project Owners",
diff --git a/java/com/google/gerrit/server/ssh/SshAddressesModule.java b/java/com/google/gerrit/server/ssh/SshAddressesModule.java
index c38df6b..aeacc2e 100644
--- a/java/com/google/gerrit/server/ssh/SshAddressesModule.java
+++ b/java/com/google/gerrit/server/ssh/SshAddressesModule.java
@@ -82,8 +82,7 @@
     List<InetSocketAddress> local = new ArrayList<>();
 
     for (SocketAddress addr : listen) {
-      if (addr instanceof InetSocketAddress) {
-        InetSocketAddress inetAddr = (InetSocketAddress) addr;
+      if (addr instanceof InetSocketAddress inetAddr) {
         if (inetAddr.getAddress().isLoopbackAddress()) {
           local.add(inetAddr);
         } else {
diff --git a/java/com/google/gerrit/server/submit/EmailMerge.java b/java/com/google/gerrit/server/submit/EmailMerge.java
index 25c7566..7b55ad6 100644
--- a/java/com/google/gerrit/server/submit/EmailMerge.java
+++ b/java/com/google/gerrit/server/submit/EmailMerge.java
@@ -127,8 +127,7 @@
     } catch (Exception e) {
       logger.atSevere().withCause(e).log("Cannot email merged notification for %s", change.getId());
     } finally {
-      @SuppressWarnings("unused")
-      var unused = requestContext.setContext(old);
+      var _ = requestContext.setContext(old);
     }
   }
 
diff --git a/java/com/google/gerrit/server/submit/LocalMergeSuperSetComputation.java b/java/com/google/gerrit/server/submit/LocalMergeSuperSetComputation.java
index 368fac5..74b172e 100644
--- a/java/com/google/gerrit/server/submit/LocalMergeSuperSetComputation.java
+++ b/java/com/google/gerrit/server/submit/LocalMergeSuperSetComputation.java
@@ -196,7 +196,7 @@
             // Backfill only changes that are still open
             if (cd.change().isNew()) {
               // Make sure that the ChangeData to backfill has evaluated submit requirements
-              Map<SubmitRequirement, SubmitRequirementResult> unused = cd.submitRequirements();
+              Map<SubmitRequirement, SubmitRequirementResult> _ = cd.submitRequirements();
               changesData.add(cd);
             }
           }
diff --git a/java/com/google/gerrit/server/submit/MergeMetrics.java b/java/com/google/gerrit/server/submit/MergeMetrics.java
index ea9e678..201ce5d 100644
--- a/java/com/google/gerrit/server/submit/MergeMetrics.java
+++ b/java/com/google/gerrit/server/submit/MergeMetrics.java
@@ -153,16 +153,14 @@
       // the uploader are ignored, we must check if there is any MagicLabelPredicate for the
       // Code-Review label that ignores approvals of the uploader (aka has user set to non_uploader
       // or non_contributor).
-      if (predicate instanceof MagicLabelPredicates.PostFilterMagicLabelPredicate) {
-        MagicLabelPredicates.PostFilterMagicLabelPredicate magicLabelPredicate =
-            (MagicLabelPredicates.PostFilterMagicLabelPredicate) predicate;
+      if (predicate
+          instanceof MagicLabelPredicates.PostFilterMagicLabelPredicate magicLabelPredicate) {
         if (magicLabelPredicate.getLabel().equalsIgnoreCase("Code-Review")
             && magicLabelPredicate.ignoresUploaderApprovals()) {
           return true;
         }
-      } else if (predicate instanceof MagicLabelPredicates.IndexMagicLabelPredicate) {
-        MagicLabelPredicates.IndexMagicLabelPredicate magicLabelPredicate =
-            (MagicLabelPredicates.IndexMagicLabelPredicate) predicate;
+      } else if (predicate
+          instanceof MagicLabelPredicates.IndexMagicLabelPredicate magicLabelPredicate) {
         if (magicLabelPredicate.getLabel().equalsIgnoreCase("Code-Review")
             && magicLabelPredicate.ignoresUploaderApprovals()) {
           return true;
diff --git a/java/com/google/gerrit/server/submit/MergeOp.java b/java/com/google/gerrit/server/submit/MergeOp.java
index 3c0cd00..f172ae8 100644
--- a/java/com/google/gerrit/server/submit/MergeOp.java
+++ b/java/com/google/gerrit/server/submit/MergeOp.java
@@ -809,7 +809,8 @@
       logger.atFine().log("Beginning integration of %s", change);
       try {
 
-        ChangeSet indexBackedChangeSet = completeMergeChangeSetWithRetry(change);
+        ChangeSet indexBackedChangeSet =
+            completeMergeChangeSetWithRetry(change, submitInput.submitWholeTopic);
 
         if (preMergeChecker.check(indexBackedChangeSet).isPresent()) {
           return null;
@@ -852,8 +853,7 @@
         SubmissionExecutor submissionExecutor =
             new SubmissionExecutor(batchUpdates, dryrun, superprojectUpdateSubmissionListeners);
         RetryTracker retryTracker = new RetryTracker();
-        @SuppressWarnings("unused")
-        var unused =
+        var _ =
             retryHelper
                 .changeUpdate(
                     "integrateIntoHistory",
@@ -904,7 +904,7 @@
     }
   }
 
-  private ChangeSet completeMergeChangeSetWithRetry(Change change)
+  private ChangeSet completeMergeChangeSetWithRetry(Change change, boolean includingTopicClosure)
       throws IOException, ResourceConflictException {
     try {
       mergeSuperSet.setMergeOpRepoManager(orm);
@@ -920,10 +920,7 @@
                     Change reloadChange = change;
                     ChangeSet indexBackedMergeChangeSet =
                         mergeSuperSet.completeChangeSet(
-                            reloadChange,
-                            caller.getRealUser(),
-                            /* includingTopicClosure= */ false,
-                            backfill);
+                            reloadChange, caller.getRealUser(), includingTopicClosure, backfill);
                     if (!indexBackedMergeChangeSet.ids().contains(reloadChange.getId())) {
                       // indexBackedChangeSet contains only open changes, if the change is missing
                       // in this set it might be that the change was concurrently submitted in the
@@ -1086,8 +1083,8 @@
         //
         // If you happen across one of these, the correct fix is to convert the
         // inner IntegrationConflictException to a ResourceConflictException.
-        if (e.getCause() instanceof IntegrationConflictException) {
-          throw (IntegrationConflictException) e.getCause();
+        if (e.getCause() instanceof IntegrationConflictException ice) {
+          throw ice;
         }
         throw new MergeUpdateException(genericMergeError(cs), e);
       }
diff --git a/java/com/google/gerrit/server/submit/MergeSuperSet.java b/java/com/google/gerrit/server/submit/MergeSuperSet.java
index fc05e31..3bb2f21 100644
--- a/java/com/google/gerrit/server/submit/MergeSuperSet.java
+++ b/java/com/google/gerrit/server/submit/MergeSuperSet.java
@@ -83,8 +83,10 @@
     this.projectCache = projectCache;
   }
 
-  public static boolean wholeTopicEnabled(Config config) {
-    return config.getBoolean("change", null, "submitWholeTopic", false);
+  /** Returns whether the submission of the whole topic is being enforced. */
+  public static boolean isWholeTopicSubmitEnforced(Config config) {
+    return config.getBoolean("change", "submitWholeTopic", false) // deprecated
+        || config.getBoolean("change", "enforceWholeTopicSubmit", false);
   }
 
   @CanIgnoreReturnValue
@@ -144,7 +146,7 @@
               && permissionBackend.user(user).change(cd).test(ChangePermission.READ);
 
       ChangeSet changeSet = new ChangeSet(cd, visible);
-      if (wholeTopicEnabled(cfg) || includingTopicClosure) {
+      if (isWholeTopicSubmitEnforced(cfg) || includingTopicClosure) {
         return completeChangeSetIncludingTopics(changeSet, user, backfill);
       }
       try (TraceContext traceContext = PluginContext.newTrace(mergeSuperSetComputation);
diff --git a/java/com/google/gerrit/server/submit/RebaseSubmitStrategy.java b/java/com/google/gerrit/server/submit/RebaseSubmitStrategy.java
index 8dbf7ed..ca1a751 100644
--- a/java/com/google/gerrit/server/submit/RebaseSubmitStrategy.java
+++ b/java/com/google/gerrit/server/submit/RebaseSubmitStrategy.java
@@ -189,8 +189,7 @@
 
       PatchSet newPs;
       if (rebaseOp != null) {
-        @SuppressWarnings("unused")
-        var unused = rebaseOp.updateChange(ctx);
+        var _ = rebaseOp.updateChange(ctx);
 
         newPs = rebaseOp.getPatchSet();
       } else {
diff --git a/java/com/google/gerrit/server/submit/SubmitDryRun.java b/java/com/google/gerrit/server/submit/SubmitDryRun.java
index a3bb58b..3b3710a 100644
--- a/java/com/google/gerrit/server/submit/SubmitDryRun.java
+++ b/java/com/google/gerrit/server/submit/SubmitDryRun.java
@@ -15,10 +15,8 @@
 package com.google.gerrit.server.submit;
 
 import static com.google.gerrit.server.project.ProjectCache.noSuchProject;
-import static java.util.stream.Collectors.toSet;
 
 import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Streams;
 import com.google.common.flogger.FluentLogger;
 import com.google.gerrit.common.Nullable;
 import com.google.gerrit.entities.BranchNameKey;
@@ -36,18 +34,13 @@
 import com.google.inject.Inject;
 import com.google.inject.Provider;
 import java.io.IOException;
-import java.util.Collection;
+import java.util.Arrays;
 import java.util.HashSet;
-import java.util.Objects;
 import java.util.Set;
-import org.eclipse.jgit.lib.Constants;
 import org.eclipse.jgit.lib.ObjectId;
-import org.eclipse.jgit.lib.Ref;
 import org.eclipse.jgit.lib.Repository;
 import org.eclipse.jgit.revwalk.RevCommit;
 import org.eclipse.jgit.revwalk.RevFlag;
-import org.eclipse.jgit.revwalk.RevObject;
-import org.eclipse.jgit.revwalk.RevTag;
 import org.eclipse.jgit.revwalk.RevWalk;
 
 /** Dry run of a submit strategy. */
@@ -68,32 +61,8 @@
     }
   }
 
-  public static Set<ObjectId> getAlreadyAccepted(Repository repo) throws IOException {
-    return Streams.concat(
-            repo.getRefDatabase().getRefsByPrefix(Constants.R_HEADS).stream(),
-            repo.getRefDatabase().getRefsByPrefix(Constants.R_TAGS).stream())
-        .map(Ref::getObjectId)
-        .filter(Objects::nonNull)
-        .collect(toSet());
-  }
-
-  public static Set<RevCommit> getAlreadyAccepted(Repository repo, RevWalk rw) throws IOException {
-    Set<RevCommit> accepted = new HashSet<>();
-    addCommits(getAlreadyAccepted(repo), rw, accepted);
-    return accepted;
-  }
-
-  public static void addCommits(Iterable<ObjectId> ids, RevWalk rw, Collection<RevCommit> out)
-      throws IOException {
-    for (ObjectId id : ids) {
-      RevObject obj = rw.parseAny(id);
-      if (obj instanceof RevTag) {
-        obj = rw.peel(obj);
-      }
-      if (obj instanceof RevCommit) {
-        out.add((RevCommit) obj);
-      }
-    }
+  public static Set<RevCommit> getParents(RevWalk rw, ObjectId commit) throws IOException {
+    return new HashSet<>(Arrays.asList(rw.parseCommit(commit).getParents()));
   }
 
   private final ProjectCache projectCache;
diff --git a/java/com/google/gerrit/server/submit/SubmitStrategyListener.java b/java/com/google/gerrit/server/submit/SubmitStrategyListener.java
index f133c74..75935cf 100644
--- a/java/com/google/gerrit/server/submit/SubmitStrategyListener.java
+++ b/java/com/google/gerrit/server/submit/SubmitStrategyListener.java
@@ -44,8 +44,8 @@
       SubmitInput input, Collection<SubmitStrategy> strategies, CommitStatus commitStatus) {
     this.strategies = strategies;
     this.commitStatus = commitStatus;
-    if (input instanceof TestSubmitInput) {
-      failAfterRefUpdates = ((TestSubmitInput) input).failAfterRefUpdates;
+    if (input instanceof TestSubmitInput testSubmitInput) {
+      failAfterRefUpdates = testSubmitInput.failAfterRefUpdates;
     } else {
       failAfterRefUpdates = false;
     }
diff --git a/java/com/google/gerrit/server/update/BatchUpdate.java b/java/com/google/gerrit/server/update/BatchUpdate.java
index d5303e7..35653f8 100644
--- a/java/com/google/gerrit/server/update/BatchUpdate.java
+++ b/java/com/google/gerrit/server/update/BatchUpdate.java
@@ -533,7 +533,7 @@
       for (Map.Entry<Change.Id, OpData<BatchUpdateOp>> e : ops.entries()) {
         BatchUpdateOp op = e.getValue().op();
         RepoContextImpl ctx = new RepoContextImpl(e.getValue().user());
-        try (TraceContext.TraceTimer ignored =
+        try (TraceContext.TraceTimer _ =
             TraceContext.newTimer(
                 op.getClass().getSimpleName() + "#updateRepo",
                 Metadata.builder().projectName(project.get()).changeId(e.getKey().get()).build())) {
@@ -731,7 +731,7 @@
           ctx = newChangeContext(opData.user(), id);
         }
         Class<? extends BatchUpdateOp> opClass = opData.op().getClass();
-        try (TraceContext.TraceTimer ignored =
+        try (TraceContext.TraceTimer _ =
             TraceContext.newTimer(
                 (opClass.isAnonymousClass() ? opClass.getName() : opClass.getSimpleName())
                     + "#updateChange",
@@ -822,7 +822,7 @@
   void executePostOps(Map<Change.Id, ChangeData> changeDatas) throws Exception {
     for (OpData<BatchUpdateOp> opData : ops.values()) {
       PostUpdateContextImpl ctx = new PostUpdateContextImpl(opData.user(), changeDatas);
-      try (TraceContext.TraceTimer ignored =
+      try (TraceContext.TraceTimer _ =
           TraceContext.newTimer(
               opData.op().getClass().getSimpleName() + "#postUpdate", Metadata.empty())) {
         opData.op().postUpdate(ctx);
@@ -831,13 +831,13 @@
 
     for (OpData<RepoOnlyOp> opData : repoOnlyOps) {
       PostUpdateContextImpl ctx = new PostUpdateContextImpl(opData.user(), changeDatas);
-      try (TraceContext.TraceTimer ignored =
+      try (TraceContext.TraceTimer _ =
           TraceContext.newTimer(
               opData.op().getClass().getSimpleName() + "#postUpdate", Metadata.empty())) {
         opData.op().postUpdate(ctx);
       }
     }
-    try (TraceContext.TraceTimer ignored =
+    try (TraceContext.TraceTimer _ =
         TraceContext.newTimer("fireAttentionSetUpdates#postUpdate", Metadata.empty())) {
       fireAttentionSetUpdateEvents(changeDatas);
     }
diff --git a/java/com/google/gerrit/server/update/BatchUpdates.java b/java/com/google/gerrit/server/update/BatchUpdates.java
index a4060bc..1c56aa2 100644
--- a/java/com/google/gerrit/server/update/BatchUpdates.java
+++ b/java/com/google/gerrit/server/update/BatchUpdates.java
@@ -24,6 +24,7 @@
 import com.google.common.collect.Multiset;
 import com.google.common.util.concurrent.Futures;
 import com.google.common.util.concurrent.ListenableFuture;
+import com.google.common.util.concurrent.Uninterruptibles;
 import com.google.errorprone.annotations.CanIgnoreReturnValue;
 import com.google.gerrit.entities.Change;
 import com.google.gerrit.entities.Project;
@@ -31,6 +32,8 @@
 import com.google.gerrit.extensions.restapi.ResourceConflictException;
 import com.google.gerrit.extensions.restapi.ResourceNotFoundException;
 import com.google.gerrit.extensions.restapi.RestApiException;
+import com.google.gerrit.server.cancellation.RequestStateContext;
+import com.google.gerrit.server.cancellation.RequestStateContext.NonCancellableOperationContext;
 import com.google.gerrit.server.index.change.PendingIndexUpdate;
 import com.google.gerrit.server.notedb.LimitExceededException;
 import com.google.gerrit.server.project.InvalidChangeOperationException;
@@ -120,50 +123,66 @@
             h.writeIndexIntents(pendingIndexUpdate, threadId);
           }
         }
-        for (ChangesHandle h : changesHandles) {
-          h.execute();
-          if (h.requiresReindex()) {
-            indexFutures.addAll(h.startIndexFutures());
-          }
-        }
-        notifyAfterUpdateRefs(listeners);
-        notifyAfterUpdateChanges(listeners);
-      } finally {
-        for (ChangesHandle h : changesHandles) {
-          h.close();
-        }
+      } catch (Throwable t) {
+        closeChangesHandles(changesHandles);
+        throw t;
       }
 
-      Map<Change.Id, ChangeData> changeDatas =
-          Futures.allAsList(indexFutures).get().stream()
-              // filter out null values that were returned for change deletions
-              .filter(Objects::nonNull)
-              .collect(toMap(cd -> cd.change().getId(), Function.identity()));
-
-      // Fire ref update events only after all mutations are finished, since callers may assume a
-      // patch set ref being created means the change was created, or a branch advancing meaning
-      // some changes were closed.
-      updates.forEach(BatchUpdate::fireRefChangeEvents);
-
-      if (!dryrun) {
-        if (pendingIndexUpdate.isEnabled()) {
+      // Once the updates are committed, reindexing, events and post-update ops must run even if
+      // the request gets cancelled meanwhile, as otherwise the index is stale and listeners miss
+      // the update. A cancellation that is detected during this time aborts the request when the
+      // non-cancellable operation is closed, i.e. after the batch update is complete.
+      try (NonCancellableOperationContext _ = RequestStateContext.startNonCancellableOperation()) {
+        try {
           for (ChangesHandle h : changesHandles) {
-            h.deleteIndexIntents(pendingIndexUpdate, threadId);
+            h.execute();
+            if (h.requiresReindex()) {
+              indexFutures.addAll(h.startIndexFutures());
+            }
+          }
+          notifyAfterUpdateRefs(listeners);
+          notifyAfterUpdateChanges(listeners);
+        } finally {
+          closeChangesHandles(changesHandles);
+        }
+
+        Map<Change.Id, ChangeData> changeDatas =
+            Uninterruptibles.getUninterruptibly(Futures.allAsList(indexFutures)).stream()
+                // filter out null values that were returned for change deletions
+                .filter(Objects::nonNull)
+                .collect(toMap(cd -> cd.change().getId(), Function.identity()));
+
+        // Fire ref update events only after all mutations are finished, since callers may assume
+        // a patch set ref being created means the change was created, or a branch advancing
+        // meaning some changes were closed.
+        updates.forEach(BatchUpdate::fireRefChangeEvents);
+
+        if (!dryrun) {
+          if (pendingIndexUpdate.isEnabled()) {
+            for (ChangesHandle h : changesHandles) {
+              h.deleteIndexIntents(pendingIndexUpdate, threadId);
+            }
+          }
+
+          for (BatchUpdate u : updates) {
+            u.executePostOps(changeDatas);
           }
         }
 
-        for (BatchUpdate u : updates) {
-          u.executePostOps(changeDatas);
-        }
+        return new Result(changeDatas);
       }
-
-      return new Result(changeDatas);
     } catch (Exception e) {
       wrapAndThrowException(e);
       return new Result();
     }
   }
 
+  private static void closeChangesHandles(List<ChangesHandle> changesHandles) {
+    for (ChangesHandle h : changesHandles) {
+      h.close();
+    }
+  }
+
   private static void notifyAfterUpdateRepo(ImmutableList<BatchUpdateListener> listeners)
       throws Exception {
     for (BatchUpdateListener listener : listeners) {
diff --git a/java/com/google/gerrit/server/util/AttentionSetEmail.java b/java/com/google/gerrit/server/util/AttentionSetEmail.java
index e6a5f3d..968fb25 100644
--- a/java/com/google/gerrit/server/util/AttentionSetEmail.java
+++ b/java/com/google/gerrit/server/util/AttentionSetEmail.java
@@ -191,8 +191,7 @@
       } catch (Exception e) {
         logger.atSevere().withCause(e).log("Cannot email update for change %s", changeId);
       } finally {
-        @SuppressWarnings("unused")
-        var unused = requestContext.setContext(old);
+        var _ = requestContext.setContext(old);
       }
     }
 
diff --git a/java/com/google/gerrit/server/util/H2Url.java b/java/com/google/gerrit/server/util/H2Url.java
new file mode 100644
index 0000000..575ca9c
--- /dev/null
+++ b/java/com/google/gerrit/server/util/H2Url.java
@@ -0,0 +1,22 @@
+// Copyright (C) 2026 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.google.gerrit.server.util;
+
+public final class H2Url {
+  public static final String ASYNC_PREFIX = "jdbc:h2:async:";
+  public static final String FILE_PREFIX = "jdbc:h2:file:";
+
+  private H2Url() {}
+}
diff --git a/java/com/google/gerrit/server/util/ManualRequestContext.java b/java/com/google/gerrit/server/util/ManualRequestContext.java
index 2873c57..71ed571 100644
--- a/java/com/google/gerrit/server/util/ManualRequestContext.java
+++ b/java/com/google/gerrit/server/util/ManualRequestContext.java
@@ -42,7 +42,6 @@
 
   @Override
   public void close() {
-    @SuppressWarnings("unused")
-    var unused = requestContext.setContext(old);
+    var _ = requestContext.setContext(old);
   }
 }
diff --git a/java/com/google/gerrit/server/util/RequestScopePropagator.java b/java/com/google/gerrit/server/util/RequestScopePropagator.java
index 2f73622..ab62be5 100644
--- a/java/com/google/gerrit/server/util/RequestScopePropagator.java
+++ b/java/com/google/gerrit/server/util/RequestScopePropagator.java
@@ -109,7 +109,7 @@
   public final Runnable wrap(Runnable runnable) {
     final Callable<Object> wrapped = wrap(Executors.callable(runnable));
 
-    if (runnable instanceof ProjectRunnable) {
+    if (runnable instanceof ProjectRunnable projectRunnable) {
       return new ProjectRunnable() {
         @Override
         public void run() {
@@ -123,17 +123,17 @@
 
         @Override
         public Project.NameKey getProjectNameKey() {
-          return ((ProjectRunnable) runnable).getProjectNameKey();
+          return projectRunnable.getProjectNameKey();
         }
 
         @Override
         public String getRemoteName() {
-          return ((ProjectRunnable) runnable).getRemoteName();
+          return projectRunnable.getRemoteName();
         }
 
         @Override
         public boolean hasCustomizedPrint() {
-          return ((ProjectRunnable) runnable).hasCustomizedPrint();
+          return projectRunnable.hasCustomizedPrint();
         }
 
         @Override
@@ -174,8 +174,7 @@
       try {
         return callable.call();
       } finally {
-        @SuppressWarnings("unused")
-        var unused = local.setContext(old);
+        var _ = local.setContext(old);
       }
     };
   }
diff --git a/java/com/google/gerrit/server/util/SocketUtil.java b/java/com/google/gerrit/server/util/SocketUtil.java
index e617650..006d9ac 100644
--- a/java/com/google/gerrit/server/util/SocketUtil.java
+++ b/java/com/google/gerrit/server/util/SocketUtil.java
@@ -39,8 +39,8 @@
 
   /** Format an address string into {@code host:port} or {@code *:port} syntax. */
   public static String format(SocketAddress s, int defaultPort) {
-    if (s instanceof InetSocketAddress) {
-      final InetSocketAddress addr = (InetSocketAddress) s;
+    if (s instanceof InetSocketAddress inetSocketAddress) {
+      final InetSocketAddress addr = inetSocketAddress;
       if (addr.getPort() == defaultPort) {
         return safeHostname(hostname(addr));
       }
diff --git a/java/com/google/gerrit/sshd/AliasCommand.java b/java/com/google/gerrit/sshd/AliasCommand.java
index 17ea463..d29211fc 100644
--- a/java/com/google/gerrit/sshd/AliasCommand.java
+++ b/java/com/google/gerrit/sshd/AliasCommand.java
@@ -84,8 +84,7 @@
 
     Command cmd = p.getProvider().get();
     checkRequiresCapability(cmd);
-    if (cmd instanceof BaseCommand) {
-      BaseCommand bc = (BaseCommand) cmd;
+    if (cmd instanceof BaseCommand bc) {
       bc.setName(getName());
       bc.setArguments(getArguments());
     }
diff --git a/java/com/google/gerrit/sshd/BUILD b/java/com/google/gerrit/sshd/BUILD
index 4693d54..b5edff4 100644
--- a/java/com/google/gerrit/sshd/BUILD
+++ b/java/com/google/gerrit/sshd/BUILD
@@ -40,6 +40,7 @@
         "//lib/guice:guice-assistedinject",
         "//lib/guice:guice-servlet",  # SSH should not depend on servlet
         "//lib/log:log4j",
+        "//lib/mina:contrib",
         "//lib/mina:core",
         "//lib/mina:sshd",
     ],
diff --git a/java/com/google/gerrit/sshd/BaseCommand.java b/java/com/google/gerrit/sshd/BaseCommand.java
index d0204b1..37a8a34 100644
--- a/java/com/google/gerrit/sshd/BaseCommand.java
+++ b/java/com/google/gerrit/sshd/BaseCommand.java
@@ -385,8 +385,8 @@
       logCauseIfRelevant(e, m);
     }
 
-    if (e instanceof Failure) {
-      final Failure f = (Failure) e;
+    if (e instanceof Failure failure) {
+      final Failure f = failure;
       try {
         err.write((f.getMessage() + "\n").getBytes(ENC));
         err.flush();
@@ -522,10 +522,10 @@
           thisThread.setName("SSH " + taskName);
 
           try {
-            if (thunk instanceof ProjectCommandRunnable) {
+            if (thunk instanceof ProjectCommandRunnable projectCommandRunnable) {
               try (DynamicOptions pluginOptions = new DynamicOptions(injector, dynamicBeans)) {
-                ((ProjectCommandRunnable) thunk).executeParseCommand(pluginOptions);
-                projectName = ((ProjectCommandRunnable) thunk).getProjectName();
+                projectCommandRunnable.executeParseCommand(pluginOptions);
+                projectName = projectCommandRunnable.getProjectName();
                 thunk.run();
               }
             } else {
diff --git a/java/com/google/gerrit/sshd/Commands.java b/java/com/google/gerrit/sshd/Commands.java
index c1edcd8..8f69c04 100644
--- a/java/com/google/gerrit/sshd/Commands.java
+++ b/java/com/google/gerrit/sshd/Commands.java
@@ -64,16 +64,16 @@
 
   /** Return the name of this command, possibly including any parents. */
   public static String nameOf(CommandName name) {
-    if (name instanceof NestedCommandNameImpl) {
-      return nameOf(((NestedCommandNameImpl) name).parent) + " " + name.value();
+    if (name instanceof NestedCommandNameImpl nestedCommandNameImpl) {
+      return nameOf(nestedCommandNameImpl.parent) + " " + name.value();
     }
     return name.value();
   }
 
   /** Is the second command a direct child of the first command? */
   public static boolean isChild(CommandName parent, CommandName name) {
-    if (name instanceof NestedCommandNameImpl) {
-      return parent.equals(((NestedCommandNameImpl) name).parent);
+    if (name instanceof NestedCommandNameImpl nestedCommandNameImpl) {
+      return parent.equals(nestedCommandNameImpl.parent);
     }
     if (identity().equivalent(parent, CMD_ROOT)) {
       return true;
@@ -83,8 +83,8 @@
 
   @Nullable
   static CommandName parentOf(CommandName name) {
-    if (name instanceof NestedCommandNameImpl) {
-      return ((NestedCommandNameImpl) name).parent;
+    if (name instanceof NestedCommandNameImpl nestedCommandNameImpl) {
+      return nestedCommandNameImpl.parent;
     }
     return null;
   }
@@ -127,9 +127,9 @@
 
     @Override
     public boolean equals(Object obj) {
-      return obj instanceof NestedCommandNameImpl
-          && parent.equals(((NestedCommandNameImpl) obj).parent)
-          && value().equals(((NestedCommandNameImpl) obj).value());
+      return obj instanceof NestedCommandNameImpl n
+          && parent.equals(n.parent)
+          && value().equals(n.value());
     }
 
     @Override
diff --git a/java/com/google/gerrit/sshd/DatabasePubKeyAuth.java b/java/com/google/gerrit/sshd/DatabasePubKeyAuth.java
index b6c1acd..ca2a729 100644
--- a/java/com/google/gerrit/sshd/DatabasePubKeyAuth.java
+++ b/java/com/google/gerrit/sshd/DatabasePubKeyAuth.java
@@ -140,6 +140,11 @@
       return false;
     }
 
+    if (key.isExpired()) {
+      sd.authenticationError(username, "key-expired");
+      return false;
+    }
+
     // Double check that all of the keys are for the same user account.
     // This should have been true when the cache factory method loaded
     // the list into memory, but we want to be extra paranoid about our
diff --git a/java/com/google/gerrit/sshd/DispatchCommand.java b/java/com/google/gerrit/sshd/DispatchCommand.java
index 54171a3..8e31b01 100644
--- a/java/com/google/gerrit/sshd/DispatchCommand.java
+++ b/java/com/google/gerrit/sshd/DispatchCommand.java
@@ -93,8 +93,8 @@
       final Command cmd = p.getProvider().get();
       checkRequiresCapability(cmd);
       String actualCommandName = commandName;
-      if (cmd instanceof BaseCommand) {
-        final BaseCommand bc = (BaseCommand) cmd;
+      if (cmd instanceof BaseCommand baseCommand) {
+        final BaseCommand bc = baseCommand;
         if (!getName().isEmpty()) {
           actualCommandName = getName() + " " + commandName;
         }
@@ -132,8 +132,8 @@
 
   private void checkRequiresCapability(Command cmd) throws UnloggedFailure {
     String pluginName = null;
-    if (cmd instanceof BaseCommand) {
-      pluginName = ((BaseCommand) cmd).getPluginName();
+    if (cmd instanceof BaseCommand baseCommand) {
+      pluginName = baseCommand.getPluginName();
     }
     try {
       permissionBackend
diff --git a/java/com/google/gerrit/sshd/DispatchCommandProvider.java b/java/com/google/gerrit/sshd/DispatchCommandProvider.java
index acf2df9..c530854 100644
--- a/java/com/google/gerrit/sshd/DispatchCommandProvider.java
+++ b/java/com/google/gerrit/sshd/DispatchCommandProvider.java
@@ -76,12 +76,11 @@
     ConcurrentMap<String, CommandProvider> m = Maps.newConcurrentMap();
     for (Binding<?> b : allCommands()) {
       final Annotation annotation = b.getKey().getAnnotation();
-      if (annotation instanceof CommandName) {
-        final CommandName n = (CommandName) annotation;
+      if (annotation instanceof CommandName commandName) {
+        final CommandName n = commandName;
         if (!Commands.CMD_ROOT.equals(n) && Commands.isChild(parent, n)) {
           String descr = null;
-          if (annotation instanceof Commands.NestedCommandNameImpl) {
-            Commands.NestedCommandNameImpl impl = ((Commands.NestedCommandNameImpl) annotation);
+          if (annotation instanceof Commands.NestedCommandNameImpl impl) {
             descr = impl.descr();
           }
           m.put(n.value(), new CommandProvider((Provider<Command>) b.getProvider(), descr));
diff --git a/java/com/google/gerrit/sshd/SshCommand.java b/java/com/google/gerrit/sshd/SshCommand.java
index c07c095..a6632cd 100644
--- a/java/com/google/gerrit/sshd/SshCommand.java
+++ b/java/com/google/gerrit/sshd/SshCommand.java
@@ -15,6 +15,7 @@
 package com.google.gerrit.sshd;
 
 import com.google.common.base.Throwables;
+import com.google.common.flogger.FluentLogger;
 import com.google.gerrit.extensions.registration.DynamicSet;
 import com.google.gerrit.server.AccessPath;
 import com.google.gerrit.server.CancellationMetrics;
@@ -26,6 +27,7 @@
 import com.google.gerrit.server.cache.PerThreadCache;
 import com.google.gerrit.server.cancellation.RequestCancelledException;
 import com.google.gerrit.server.cancellation.RequestStateContext;
+import com.google.gerrit.server.cancellation.RequestStateProvider;
 import com.google.gerrit.server.config.GerritServerConfig;
 import com.google.gerrit.server.ioutil.HexFormat;
 import com.google.gerrit.server.logging.PerformanceLogContext;
@@ -42,6 +44,8 @@
 import org.kohsuke.args4j.Option;
 
 public abstract class SshCommand extends BaseCommand {
+  private static final FluentLogger logger = FluentLogger.forEnclosingClass();
+
   @Inject private DynamicSet<PerformanceLogger> performanceLoggers;
   @Inject private PluginSetContext<RequestListener> requestListeners;
   @Inject @GerritServerConfig private Config config;
@@ -61,12 +65,14 @@
   protected PrintWriter stdout;
   protected PrintWriter stderr;
 
+  private volatile boolean destroyed;
+
   @Override
   public void start(ChannelSession channel, Environment env) throws IOException {
     String sessionId = HexFormat.fromInt(getSession().getSessionId());
     startThread(
         () -> {
-          try (PerThreadCache ignored = PerThreadCache.create();
+          try (PerThreadCache _ = PerThreadCache.create();
               DynamicOptions pluginOptions = new DynamicOptions(injector, dynamicBeans)) {
             parseCommandLine(pluginOptions);
             stdout = toPrintWriter(out);
@@ -82,8 +88,8 @@
               try (RequestStateContext requestStateContext =
                   RequestStateContext.open()
                       .setPerformanceSummaryProvider(performanceLogContext)
-                      .addRequestStateProvider(
-                          deadlineCheckerFactory.create(requestInfo, deadline))) {
+                      .addRequestStateProvider(deadlineCheckerFactory.create(requestInfo, deadline))
+                      .addRequestStateProvider(this::checkIfDestroyed)) {
                 requestListeners.runEach(l -> l.onRequest(requestInfo));
                 SshCommand.this.run();
               } catch (InvalidDeadlineException e) {
@@ -118,8 +124,47 @@
         AccessPath.SSH_COMMAND);
   }
 
+  @Override
+  public void destroy(ChannelSession channel) {
+    destroyed = true;
+    super.destroy(channel);
+  }
+
+  /**
+   * Cancels the request once the SSH channel was destroyed (e.g. because the client disconnected).
+   *
+   * <p>{@link #destroy(ChannelSession)} also interrupts the command thread, but code that runs on
+   * that thread may clear the interrupt flag (e.g. H2 does so while waiting for a lock). Unlike the
+   * interrupt flag this state cannot be lost, so {@link RequestStateContext#abortIfCancelled()}
+   * reliably aborts the command.
+   */
+  private void checkIfDestroyed(RequestStateProvider.OnCancelled onCancelled) {
+    if (destroyed) {
+      onCancelled.onCancel(RequestStateProvider.Reason.CLIENT_CLOSED_REQUEST, /* message= */ null);
+    }
+  }
+
   protected abstract void run() throws UnloggedFailure, Failure, Exception;
 
+  /**
+   * Rethrows the given exception if it was caused by the cancellation of the request, so that the
+   * request is reported as cancelled instead of failed. For commands that catch exceptions to
+   * report them as errors.
+   */
+  protected static void rethrowIfCancelled(Exception e) {
+    Optional<RequestCancelledException> requestCancelledException =
+        RequestCancelledException.getFromCausalChain(e);
+    if (requestCancelledException.isPresent()) {
+      if (Throwables.getCausalChain(e).stream()
+          .noneMatch(RequestCancelledException.class::isInstance)) {
+        // The request was cancelled, but it failed for another reason, which would be lost.
+        logger.atWarning().withCause(e).log("Cancelled request failed");
+      }
+      Throwables.throwIfUnchecked(e);
+      throw requestCancelledException.get();
+    }
+  }
+
   private TraceContext enableTracing() throws UnloggedFailure {
     if (!trace && traceId != null) {
       throw die("A trace ID can only be set if --trace was specified.");
diff --git a/java/com/google/gerrit/sshd/SshDaemon.java b/java/com/google/gerrit/sshd/SshDaemon.java
index 20d7874..a52480d 100644
--- a/java/com/google/gerrit/sshd/SshDaemon.java
+++ b/java/com/google/gerrit/sshd/SshDaemon.java
@@ -22,6 +22,7 @@
 import static org.apache.sshd.core.CoreModuleProperties.MAX_AUTH_REQUESTS;
 import static org.apache.sshd.core.CoreModuleProperties.MAX_CONCURRENT_SESSIONS;
 import static org.apache.sshd.core.CoreModuleProperties.NIO2_READ_TIMEOUT;
+import static org.apache.sshd.core.CoreModuleProperties.NIO_WORKERS;
 import static org.apache.sshd.core.CoreModuleProperties.REKEY_BYTES_LIMIT;
 import static org.apache.sshd.core.CoreModuleProperties.REKEY_TIME_LIMIT;
 import static org.apache.sshd.core.CoreModuleProperties.SERVER_IDENTIFICATION;
@@ -37,6 +38,7 @@
 import com.google.gerrit.metrics.MetricMaker;
 import com.google.gerrit.server.config.ConfigUtil;
 import com.google.gerrit.server.config.GerritServerConfig;
+import com.google.gerrit.server.config.ThreadSettingsConfig;
 import com.google.gerrit.server.ssh.HostKey;
 import com.google.gerrit.server.ssh.SshAdvertisedAddresses;
 import com.google.gerrit.server.ssh.SshInfo;
@@ -62,6 +64,7 @@
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
+import java.util.OptionalInt;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.TimeUnit;
@@ -92,12 +95,14 @@
 import org.apache.sshd.common.random.Random;
 import org.apache.sshd.common.random.SingletonRandomFactory;
 import org.apache.sshd.common.session.Session;
+import org.apache.sshd.common.session.SessionListener;
 import org.apache.sshd.common.session.helpers.AbstractSession;
 import org.apache.sshd.common.session.helpers.DefaultUnknownChannelReferenceHandler;
 import org.apache.sshd.common.util.buffer.Buffer;
 import org.apache.sshd.common.util.buffer.ByteArrayBuffer;
 import org.apache.sshd.common.util.net.SshdSocketAddress;
 import org.apache.sshd.common.util.security.SecurityUtils;
+import org.apache.sshd.contrib.server.session.proxyprotocolv2.ProxyProtocolV2Acceptor;
 import org.apache.sshd.mina.MinaServiceFactoryFactory;
 import org.apache.sshd.mina.MinaSession;
 import org.apache.sshd.server.ServerBuilder;
@@ -138,6 +143,8 @@
 @Singleton
 public class SshDaemon extends SshServer implements SshInfo, LifecycleListener {
   private static final FluentLogger logger = FluentLogger.forEnclosingClass();
+  private static final String NIO_WORKERS_SYSPROP =
+      "org.apache.sshd.config." + NIO_WORKERS.getName();
 
   public enum SshSessionBackend {
     MINA,
@@ -165,7 +172,8 @@
       @SshListenAddresses List<SocketAddress> listen,
       @SshAdvertisedAddresses List<String> advertised,
       MetricMaker metricMaker,
-      LogMaxConnectionsPerUserExceeded logMaxConnectionsPerUserExceeded) {
+      LogMaxConnectionsPerUserExceeded logMaxConnectionsPerUserExceeded,
+      ThreadSettingsConfig threadSettingsConfig) {
     setPort(IANA_SSH_PORT /* never used */);
 
     this.cfg = cfg;
@@ -205,10 +213,17 @@
       MAX_CONCURRENT_SESSIONS.set(this, maxConnectionsPerUser);
     }
 
+    int cores = Runtime.getRuntime().availableProcessors();
+    OptionalInt nioWorkers = resolveNioWorkers(cfg, cores, threadSettingsConfig.getSshdThreads());
+    if (nioWorkers.isPresent()) {
+      NIO_WORKERS.set(this, nioWorkers.getAsInt());
+    }
+
     final String kerberosKeytab = cfg.getString("sshd", null, "kerberosKeytab");
     final String kerberosPrincipal = cfg.getString("sshd", null, "kerberosPrincipal");
 
     final boolean enableCompression = cfg.getBoolean("sshd", "enableCompression", false);
+    final boolean enableProxyProtocol = cfg.getBoolean("sshd", "enableProxyProtocol", false);
 
     SshSessionBackend backend = cfg.getEnum("sshd", null, "backend", SshSessionBackend.NIO2);
     boolean channelIdTracking = cfg.getBoolean("sshd", "enableChannelIdTracking", true);
@@ -237,6 +252,9 @@
     setCommandFactory(commandFactory);
     setShellFactory(noShell);
     setSessionDisconnectHandler(logMaxConnectionsPerUserExceeded);
+    if (enableProxyProtocol) {
+      setServerProxyAcceptor(new ProxyProtocolV2Acceptor());
+    }
 
     final AtomicInteger connected = new AtomicInteger();
     metricMaker.newCallbackMetric(
@@ -261,25 +279,33 @@
           protected ServerSessionImpl createSession(IoSession io) throws Exception {
             connected.incrementAndGet();
             sessionsCreated.increment();
-            if (io instanceof MinaSession) {
-              if (((MinaSession) io).getSession().getConfig() instanceof SocketSessionConfig) {
-                ((SocketSessionConfig) ((MinaSession) io).getSession().getConfig())
-                    .setKeepAlive(keepAlive);
+            if (io instanceof MinaSession minaSession) {
+              if (minaSession.getSession().getConfig() instanceof SocketSessionConfig sc) {
+                sc.setKeepAlive(keepAlive);
               }
             }
 
             ServerSessionImpl s = super.createSession(io);
             int id = idGenerator.next();
-            SocketAddress peer = io.getRemoteAddress();
-            final SshSession sd = new SshSession(id, peer);
-            s.setAttribute(SshSession.KEY, sd);
+            SshSession sshSession = new SshSession(id, io.getRemoteAddress());
+            s.setAttribute(SshSession.KEY, sshSession);
+
+            s.addSessionListener(
+                new SessionListener() {
+                  @Override
+                  public void sessionPeerIdentificationReceived(
+                      Session session, String version, List<String> extraLines) {
+                    sshSession.updateRemoteAddress(s.getClientAddress());
+                  }
+                });
 
             // Log a session close without authentication as a failure.
             //
             s.addCloseFutureListener(
                 future -> {
                   connected.decrementAndGet();
-                  if (sd.isAuthenticationError()) {
+                  SshSession sd = s.getAttribute(SshSession.KEY);
+                  if (sd != null && sd.isAuthenticationError()) {
                     authFailures.increment();
                     sshLog.onAuthFail(sd);
                   }
@@ -337,6 +363,21 @@
     }
   }
 
+  static OptionalInt resolveNioWorkers(Config cfg, int cores, int sshdThreads) {
+    if (cfg.getString("sshd", null, "nioWorkers") != null) {
+      int configuredNioWorkers = cfg.getInt("sshd", "nioWorkers", 0);
+      if (configuredNioWorkers > 0) {
+        return OptionalInt.of(configuredNioWorkers);
+      }
+    }
+    if (System.getProperty(NIO_WORKERS_SYSPROP) != null) {
+      return OptionalInt.empty();
+    }
+
+    int defaultNioWorkers = Math.min(cores + 1, Math.max(4, sshdThreads / 4));
+    return OptionalInt.of(defaultNioWorkers);
+  }
+
   private static String format(InetSocketAddress s) {
     return String.format("%s:%d", s.getAddress().getHostAddress(), s.getPort());
   }
@@ -402,8 +443,8 @@
     }
 
     IoServiceFactory serviceFactory = getIoServiceFactory();
-    if (serviceFactory instanceof AbstractIoServiceFactory) {
-      shutdownServiceFactoryExecutor((AbstractIoServiceFactory) serviceFactory);
+    if (serviceFactory instanceof AbstractIoServiceFactory abstractIoServiceFactory) {
+      shutdownServiceFactoryExecutor(abstractIoServiceFactory);
     }
   }
 
diff --git a/java/com/google/gerrit/sshd/SshKeyCacheEntry.java b/java/com/google/gerrit/sshd/SshKeyCacheEntry.java
index 78fd7da..7347700 100644
--- a/java/com/google/gerrit/sshd/SshKeyCacheEntry.java
+++ b/java/com/google/gerrit/sshd/SshKeyCacheEntry.java
@@ -15,19 +15,24 @@
 package com.google.gerrit.sshd;
 
 import com.google.gerrit.entities.Account;
+import com.google.gerrit.server.account.AccountSshKey;
 import java.security.PublicKey;
 
 class SshKeyCacheEntry {
-  private final Account.Id accountId;
   private final PublicKey publicKey;
+  private final AccountSshKey sshKey;
 
-  SshKeyCacheEntry(Account.Id accountId, PublicKey publicKey) {
-    this.accountId = accountId;
+  SshKeyCacheEntry(PublicKey publicKey, AccountSshKey sshKey) {
     this.publicKey = publicKey;
+    this.sshKey = sshKey;
   }
 
   Account.Id getAccount() {
-    return accountId;
+    return sshKey.accountId();
+  }
+
+  boolean isExpired() {
+    return sshKey.isExpired();
   }
 
   boolean match(PublicKey inkey) {
diff --git a/java/com/google/gerrit/sshd/SshKeyCacheImpl.java b/java/com/google/gerrit/sshd/SshKeyCacheImpl.java
index ff452a6..929d281 100644
--- a/java/com/google/gerrit/sshd/SshKeyCacheImpl.java
+++ b/java/com/google/gerrit/sshd/SshKeyCacheImpl.java
@@ -125,7 +125,7 @@
 
         List<SshKeyCacheEntry> kl = new ArrayList<>(4);
         for (AccountSshKey k : authorizedKeys.getKeys(user.get().accountId())) {
-          if (k.valid()) {
+          if (k.valid() && !k.isExpired()) {
             add(kl, k);
           }
         }
@@ -139,7 +139,7 @@
 
     private void add(List<SshKeyCacheEntry> kl, AccountSshKey k) {
       try {
-        kl.add(new SshKeyCacheEntry(k.accountId(), SshUtil.parse(k)));
+        kl.add(new SshKeyCacheEntry(SshUtil.parse(k), k));
       } catch (OutOfMemoryError e) {
         // This is the only case where we assume the problem has nothing
         // to do with the key object, and instead we must abort this load.
@@ -150,7 +150,7 @@
             "SSH key %d of account %s has an invalid algorithm %s: fixing the algorithm to %s",
             k.seq(), k.accountId(), e.getInvalidKeyAlgo(), e.getExpectedKeyAlgo());
         if (fixKeyAlgorithm(k, e.getExpectedKeyAlgo())) {
-          kl.add(new SshKeyCacheEntry(k.accountId(), e.getPublicKey()));
+          kl.add(new SshKeyCacheEntry(e.getPublicKey(), k));
         } else {
           markInvalid(k);
         }
diff --git a/java/com/google/gerrit/sshd/SshKeyCreatorImpl.java b/java/com/google/gerrit/sshd/SshKeyCreatorImpl.java
index 02a9e48..4142c62 100644
--- a/java/com/google/gerrit/sshd/SshKeyCreatorImpl.java
+++ b/java/com/google/gerrit/sshd/SshKeyCreatorImpl.java
@@ -30,7 +30,7 @@
   public AccountSshKey create(Account.Id accountId, int seq, String encoded)
       throws InvalidSshKeyException {
     try {
-      AccountSshKey key = AccountSshKey.create(accountId, seq, SshUtil.toOpenSshPublicKey(encoded));
+      AccountSshKey key = new AccountSshKey(accountId, seq, SshUtil.toOpenSshPublicKey(encoded));
       SshUtil.parse(key);
       return key;
     } catch (NoSuchAlgorithmException | InvalidKeySpecException e) {
diff --git a/java/com/google/gerrit/sshd/SshLog.java b/java/com/google/gerrit/sshd/SshLog.java
index 83db146..b43a5b5 100644
--- a/java/com/google/gerrit/sshd/SshLog.java
+++ b/java/com/google/gerrit/sshd/SshLog.java
@@ -188,24 +188,13 @@
     event.setProperty(P_USER_CPU, ctx.getUserCpu() + "ms");
     event.setProperty(P_MEMORY, String.valueOf(ctx.getAllocatedMemory()));
 
-    final String status;
-    switch (exitValue) {
-      case BaseCommand.STATUS_CANCEL:
-        status = "killed";
-        break;
-
-      case BaseCommand.STATUS_NOT_FOUND:
-        status = "not-found";
-        break;
-
-      case BaseCommand.STATUS_NOT_ADMIN:
-        status = "not-admin";
-        break;
-
-      default:
-        status = String.valueOf(exitValue);
-        break;
-    }
+    final String status =
+        switch (exitValue) {
+          case BaseCommand.STATUS_CANCEL -> "killed";
+          case BaseCommand.STATUS_NOT_FOUND -> "not-found";
+          case BaseCommand.STATUS_NOT_ADMIN -> "not-admin";
+          default -> String.valueOf(exitValue);
+        };
     event.setProperty(P_STATUS, status);
     String peerAgent = sshSession.getPeerAgent();
     if (peerAgent != null) {
diff --git a/java/com/google/gerrit/sshd/SshScope.java b/java/com/google/gerrit/sshd/SshScope.java
index b82320b..01a2d15 100644
--- a/java/com/google/gerrit/sshd/SshScope.java
+++ b/java/com/google/gerrit/sshd/SshScope.java
@@ -233,8 +233,7 @@
     Context old = current.get();
     current.set(ctx);
 
-    @SuppressWarnings("unused")
-    var unused = local.setContext(ctx);
+    var _ = local.setContext(ctx);
 
     return old;
   }
diff --git a/java/com/google/gerrit/sshd/SshSession.java b/java/com/google/gerrit/sshd/SshSession.java
index 90d11c7..da0edd2 100644
--- a/java/com/google/gerrit/sshd/SshSession.java
+++ b/java/com/google/gerrit/sshd/SshSession.java
@@ -29,8 +29,8 @@
   public static final AttributeKey<SshSession> KEY = new AttributeKey<>();
 
   private final int sessionId;
-  private final SocketAddress remoteAddress;
-  private final String remoteAsString;
+  private volatile SocketAddress remoteAddress;
+  private volatile String remoteAsString;
 
   private volatile CurrentUser identity;
   private volatile String username;
@@ -79,6 +79,13 @@
     return remoteAddress;
   }
 
+  void updateRemoteAddress(SocketAddress remoteAddress) {
+    if (remoteAddress != null) {
+      this.remoteAddress = remoteAddress;
+      this.remoteAsString = format(remoteAddress);
+    }
+  }
+
   public String getRemoteAddressAsString() {
     return remoteAsString;
   }
@@ -122,8 +129,8 @@
   }
 
   private static String format(SocketAddress remote) {
-    if (remote instanceof InetSocketAddress) {
-      final InetSocketAddress sa = (InetSocketAddress) remote;
+    if (remote instanceof InetSocketAddress inetSocketAddress) {
+      final InetSocketAddress sa = inetSocketAddress;
 
       final InetAddress in = sa.getAddress();
       if (in != null) {
diff --git a/java/com/google/gerrit/sshd/commands/ConvertRefStorage.java b/java/com/google/gerrit/sshd/commands/ConvertRefStorage.java
index 98626de..c789deb 100644
--- a/java/com/google/gerrit/sshd/commands/ConvertRefStorage.java
+++ b/java/com/google/gerrit/sshd/commands/ConvertRefStorage.java
@@ -14,13 +14,11 @@
 
 package com.google.gerrit.sshd.commands;
 
-import static com.google.common.base.Preconditions.checkState;
 import static com.google.gerrit.sshd.CommandMetaData.Mode.MASTER_OR_SLAVE;
 
 import com.google.gerrit.common.data.GlobalCapability;
 import com.google.gerrit.entities.Project;
 import com.google.gerrit.extensions.annotations.RequiresCapability;
-import com.google.gerrit.server.git.DelegateRepository;
 import com.google.gerrit.server.git.GitRepositoryManager;
 import com.google.gerrit.server.project.ProjectState;
 import com.google.gerrit.sshd.CommandMetaData;
@@ -28,22 +26,27 @@
 import com.google.inject.Inject;
 import java.io.IOException;
 import org.eclipse.jgit.errors.RepositoryNotFoundException;
-import org.eclipse.jgit.internal.storage.file.FileRepository;
-import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.lib.RefStorageFormat;
 import org.kohsuke.args4j.Option;
 import org.kohsuke.args4j.spi.ExplicitBooleanOptionHandler;
 
 @RequiresCapability(GlobalCapability.ADMINISTRATE_SERVER)
 @CommandMetaData(
     name = "convert-ref-storage",
-    description = "Convert ref storage to reftable (experimental)",
+    description = "Convert ref storage to reftable",
     runsAt = MASTER_OR_SLAVE)
 public class ConvertRefStorage extends SshCommand {
   @Inject private GitRepositoryManager repoManager;
 
   private enum StorageFormatOption {
-    reftable,
-    refdir,
+    reftable(RefStorageFormat.REFTABLE),
+    refdir(RefStorageFormat.FILES);
+
+    final RefStorageFormat format;
+
+    StorageFormatOption(RefStorageFormat format) {
+      this.format = format;
+    }
   }
 
   @Option(name = "--format", usage = "storage format to convert to (reftable or refdir)")
@@ -75,13 +78,11 @@
   public void run() throws Exception {
     enableGracefulStop();
     Project.NameKey projectName = projectState.getNameKey();
-    try (Repository repo = repoManager.openRepository(projectName)) {
-      if (repo instanceof DelegateRepository) {
-        ((DelegateRepository) repo).convertRefStorage(storageFormat.name(), writeLogs, backup);
-      } else {
-        checkState(
-            repo instanceof FileRepository, "Repository is not an instance of FileRepository!");
-        ((FileRepository) repo).convertRefStorage(storageFormat.name(), writeLogs, backup);
+    RefStorageFormat format = storageFormat.format;
+    try {
+      if (!repoManager.convertRefStorage(projectName, format, writeLogs, backup)) {
+        stdout.println(
+            "Repository is already in " + format.toConfigValue() + " ref storage format");
       }
     } catch (RepositoryNotFoundException e) {
       throw die("'" + projectName + "': not a git archive", e);
diff --git a/java/com/google/gerrit/sshd/commands/CreateAccountCommand.java b/java/com/google/gerrit/sshd/commands/CreateAccountCommand.java
index 6d2c0d1..d636bc3 100644
--- a/java/com/google/gerrit/sshd/commands/CreateAccountCommand.java
+++ b/java/com/google/gerrit/sshd/commands/CreateAccountCommand.java
@@ -108,9 +108,7 @@
 
     input.groups = Lists.transform(groups, AccountGroup.Id::toString);
     try {
-      @SuppressWarnings("unused")
-      var unused =
-          createAccount.apply(TopLevelResource.INSTANCE, IdString.fromDecoded(username), input);
+      var _ = createAccount.apply(TopLevelResource.INSTANCE, IdString.fromDecoded(username), input);
     } catch (RestApiException | InvalidAuthTokenException e) {
       throw die(e.getMessage());
     }
diff --git a/java/com/google/gerrit/sshd/commands/CreateGroupCommand.java b/java/com/google/gerrit/sshd/commands/CreateGroupCommand.java
index 1f65c56..ae2119a 100644
--- a/java/com/google/gerrit/sshd/commands/CreateGroupCommand.java
+++ b/java/com/google/gerrit/sshd/commands/CreateGroupCommand.java
@@ -143,8 +143,7 @@
         AddMembers.Input.fromMembers(
             initialMembers.stream().map(Object::toString).collect(toList()));
 
-    @SuppressWarnings("unused")
-    var unused = addMembers.apply(rsrc, input);
+    var _ = addMembers.apply(rsrc, input);
   }
 
   private void addSubgroups(GroupResource rsrc)
@@ -153,7 +152,6 @@
         AddSubgroups.Input.fromGroups(
             initialGroups.stream().map(AccountGroup.UUID::get).collect(toList()));
 
-    @SuppressWarnings("unused")
-    var unused = addSubgroups.apply(rsrc, input);
+    var _ = addSubgroups.apply(rsrc, input);
   }
 }
diff --git a/java/com/google/gerrit/sshd/commands/CreateProjectCommand.java b/java/com/google/gerrit/sshd/commands/CreateProjectCommand.java
index e2d554d..f646d2a 100644
--- a/java/com/google/gerrit/sshd/commands/CreateProjectCommand.java
+++ b/java/com/google/gerrit/sshd/commands/CreateProjectCommand.java
@@ -25,6 +25,7 @@
 import com.google.gerrit.extensions.api.projects.ConfigValue;
 import com.google.gerrit.extensions.api.projects.ProjectInput;
 import com.google.gerrit.extensions.client.InheritableBoolean;
+import com.google.gerrit.extensions.client.RefStorage;
 import com.google.gerrit.extensions.client.SubmitType;
 import com.google.gerrit.extensions.restapi.RestApiException;
 import com.google.gerrit.server.permissions.PermissionBackendException;
@@ -82,6 +83,9 @@
       usage = "project submit type")
   private SubmitType submitType;
 
+  @Option(name = "--ref-storage", usage = "ref storage format for the project repository")
+  private RefStorage refStorage;
+
   @Option(name = "--contributor-agreements", usage = "if contributor agreement is required")
   private InheritableBoolean contributorAgreements = InheritableBoolean.INHERIT;
 
@@ -184,6 +188,7 @@
         input.permissionsOnly = permissionsOnly;
         input.description = projectDescription;
         input.submitType = submitType;
+        input.refStorage = refStorage;
         input.useContributorAgreements = contributorAgreements;
         input.useSignedOffBy = signedOffBy;
         input.useContentMerge = contentMerge;
diff --git a/java/com/google/gerrit/sshd/commands/FlushCaches.java b/java/com/google/gerrit/sshd/commands/FlushCaches.java
index bfd64f6..1bc0386 100644
--- a/java/com/google/gerrit/sshd/commands/FlushCaches.java
+++ b/java/com/google/gerrit/sshd/commands/FlushCaches.java
@@ -75,11 +75,9 @@
       }
 
       if (all) {
-        @SuppressWarnings("unused")
-        var unused = postCaches.apply(new ConfigResource(), new PostCaches.Input(FLUSH_ALL));
+        var _ = postCaches.apply(new ConfigResource(), new PostCaches.Input(FLUSH_ALL));
       } else {
-        @SuppressWarnings("unused")
-        var unused = postCaches.apply(new ConfigResource(), new PostCaches.Input(FLUSH, caches));
+        var _ = postCaches.apply(new ConfigResource(), new PostCaches.Input(FLUSH, caches));
       }
     } catch (RestApiException e) {
       throw die(e.getMessage());
diff --git a/java/com/google/gerrit/sshd/commands/GarbageCollectionCommand.java b/java/com/google/gerrit/sshd/commands/GarbageCollectionCommand.java
index 63a01d00..f48ddce 100644
--- a/java/com/google/gerrit/sshd/commands/GarbageCollectionCommand.java
+++ b/java/com/google/gerrit/sshd/commands/GarbageCollectionCommand.java
@@ -91,27 +91,17 @@
             .run(projectNames, aggressive, showProgress ? stdout : null);
     if (result.hasErrors()) {
       for (GcError e : result.getErrors()) {
-        String msg;
-        switch (e.getType()) {
-          case REPOSITORY_NOT_FOUND:
-            msg = "error: project \"" + e.getProjectName() + "\" not found";
-            break;
-          case GC_ALREADY_SCHEDULED:
-            msg =
-                "error: garbage collection for project \""
-                    + e.getProjectName()
-                    + "\" was already scheduled";
-            break;
-          case GC_FAILED:
-            msg = "error: garbage collection for project \"" + e.getProjectName() + "\" failed";
-            break;
-          default:
-            msg =
-                "error: garbage collection for project \""
-                    + e.getProjectName()
-                    + "\" failed: "
-                    + e.getType();
-        }
+        String msg =
+            switch (e.getType()) {
+              case REPOSITORY_NOT_FOUND ->
+                  "error: project \"" + e.getProjectName() + "\" not found";
+              case GC_ALREADY_SCHEDULED ->
+                  "error: garbage collection for project \""
+                      + e.getProjectName()
+                      + "\" was already scheduled";
+              case GC_FAILED ->
+                  "error: garbage collection for project \"" + e.getProjectName() + "\" failed";
+            };
         stdout.print(msg + "\n");
       }
     }
diff --git a/java/com/google/gerrit/sshd/commands/IndexChangesCommand.java b/java/com/google/gerrit/sshd/commands/IndexChangesCommand.java
index 40d8af3..2417eef 100644
--- a/java/com/google/gerrit/sshd/commands/IndexChangesCommand.java
+++ b/java/com/google/gerrit/sshd/commands/IndexChangesCommand.java
@@ -56,8 +56,7 @@
     boolean ok = true;
     for (ChangeResource rsrc : changes.values()) {
       try {
-        @SuppressWarnings("unused")
-        var unused = index.apply(rsrc, new Input());
+        var _ = index.apply(rsrc, new Input());
       } catch (Exception e) {
         ok = false;
         writeError(
diff --git a/java/com/google/gerrit/sshd/commands/IndexChangesInProjectCommand.java b/java/com/google/gerrit/sshd/commands/IndexChangesInProjectCommand.java
index 4c027b2..5c1dc89 100644
--- a/java/com/google/gerrit/sshd/commands/IndexChangesInProjectCommand.java
+++ b/java/com/google/gerrit/sshd/commands/IndexChangesInProjectCommand.java
@@ -52,8 +52,7 @@
 
   private void index(ProjectState projectState) {
     try {
-      @SuppressWarnings("unused")
-      var unused = index.apply(new ProjectResource(projectState, user), null);
+      var _ = index.apply(new ProjectResource(projectState, user), null);
     } catch (RuntimeException e) {
       writeError(
           "error", String.format("Unable to index %s: %s", projectState.getName(), e.getMessage()));
diff --git a/java/com/google/gerrit/sshd/commands/KillCommand.java b/java/com/google/gerrit/sshd/commands/KillCommand.java
index ec63d9d..80980b0a 100644
--- a/java/com/google/gerrit/sshd/commands/KillCommand.java
+++ b/java/com/google/gerrit/sshd/commands/KillCommand.java
@@ -53,8 +53,7 @@
       try {
         TaskResource taskRsrc = tasksCollection.parse(cfgRsrc, IdString.fromDecoded(id));
 
-        @SuppressWarnings("unused")
-        var unused = deleteTask.apply(taskRsrc, null);
+        var _ = deleteTask.apply(taskRsrc, null);
       } catch (AuthException
           | ResourceNotFoundException
           | ResourceConflictException
diff --git a/java/com/google/gerrit/sshd/commands/RenameGroupCommand.java b/java/com/google/gerrit/sshd/commands/RenameGroupCommand.java
index 23bec1d..d0a3ca3 100644
--- a/java/com/google/gerrit/sshd/commands/RenameGroupCommand.java
+++ b/java/com/google/gerrit/sshd/commands/RenameGroupCommand.java
@@ -52,8 +52,7 @@
       NameInput input = new NameInput();
       input.name = newGroupName;
 
-      @SuppressWarnings("unused")
-      var unused = putName.apply(rsrc, input);
+      var _ = putName.apply(rsrc, input);
     } catch (RestApiException | IOException | ConfigInvalidException e) {
       throw die(e);
     }
diff --git a/java/com/google/gerrit/sshd/commands/ReviewCommand.java b/java/com/google/gerrit/sshd/commands/ReviewCommand.java
index 911fe4f..c3f5a52 100644
--- a/java/com/google/gerrit/sshd/commands/ReviewCommand.java
+++ b/java/com/google/gerrit/sshd/commands/ReviewCommand.java
@@ -241,6 +241,7 @@
         ok = false;
         writeError("error", "no such change " + patchSet.id().changeId().get());
       } catch (Exception e) {
+        rethrowIfCancelled(e);
         ok = false;
         writeError("fatal", "internal server error while reviewing " + patchSet.id() + "\n");
         logger.atSevere().withCause(e).log("internal error while reviewing %s", patchSet.id());
@@ -273,8 +274,7 @@
     } else {
       projectName = projectState.getProject().getName();
     }
-    @SuppressWarnings("unused")
-    var unused =
+    var _ =
         retryHelper
             .action(
                 ActionType.CHANGE_UPDATE,
diff --git a/java/com/google/gerrit/sshd/commands/SequenceShowCommand.java b/java/com/google/gerrit/sshd/commands/SequenceShowCommand.java
index e9058b4..e33ba47 100644
--- a/java/com/google/gerrit/sshd/commands/SequenceShowCommand.java
+++ b/java/com/google/gerrit/sshd/commands/SequenceShowCommand.java
@@ -33,20 +33,13 @@
 
   @Override
   public void run() throws Exception {
-    int current;
-    switch (name) {
-      case "changes":
-        current = sequences.currentChangeId();
-        break;
-      case "accounts":
-        current = sequences.currentAccountId();
-        break;
-      case "groups":
-        current = sequences.currentGroupId();
-        break;
-      default:
-        throw die("Unknown sequence name: " + name);
-    }
+    int current =
+        switch (name) {
+          case "changes" -> sequences.currentChangeId();
+          case "accounts" -> sequences.currentAccountId();
+          case "groups" -> sequences.currentGroupId();
+          default -> throw die("Unknown sequence name: " + name);
+        };
     stdout.print(current);
     stdout.print('\n');
     stdout.flush();
diff --git a/java/com/google/gerrit/sshd/commands/SetAccountCommand.java b/java/com/google/gerrit/sshd/commands/SetAccountCommand.java
index 897bb20..9b100ef 100644
--- a/java/com/google/gerrit/sshd/commands/SetAccountCommand.java
+++ b/java/com/google/gerrit/sshd/commands/SetAccountCommand.java
@@ -113,6 +113,12 @@
   private List<String> addSshKeys = new ArrayList<>();
 
   @Option(
+      name = "--ssh-key-lifetime",
+      metaVar = "LIFETIME",
+      usage = "how long the keys added with --add-ssh-key can be used, for example 30d")
+  private String sshKeyLifetime;
+
+  @Option(
       name = "--delete-ssh-key",
       metaVar = "-|KEY",
       usage = "public keys to delete from the account")
@@ -236,6 +242,9 @@
         throw die("--http-password and --clear-http-password options are mutually exclusive.");
       }
     }
+    if (sshKeyLifetime != null && addSshKeys.isEmpty()) {
+      throw die("--ssh-key-lifetime requires --add-ssh-key");
+    }
     if (addSshKeys.contains("-") && deleteSshKeys.contains("-")) {
       throw die("Only one option may use the stdin");
     }
@@ -273,8 +282,7 @@
       if (fullName != null) {
         NameInput in = new NameInput();
         in.name = fullName;
-        @SuppressWarnings("unused")
-        var unused = putName.apply(rsrc, in);
+        var _ = putName.apply(rsrc, in);
       }
 
       if (httpPassword != null || clearHttpPassword || generateHttpPassword) {
@@ -309,12 +317,10 @@
       }
 
       if (active) {
-        @SuppressWarnings("unused")
-        var unused = putActive.apply(rsrc, null);
+        var _ = putActive.apply(rsrc, null);
       } else if (inactive) {
         try {
-          @SuppressWarnings("unused")
-          var unused = deleteActive.apply(rsrc, null);
+          var _ = deleteActive.apply(rsrc, null);
         } catch (ResourceNotFoundException e) {
           // user is already inactive
         }
@@ -345,9 +351,9 @@
     for (String sshKey : sshKeys) {
       SshKeyInput in = new SshKeyInput();
       in.raw = RawInputUtil.create(sshKey.getBytes(UTF_8), "text/plain");
+      in.lifetime = sshKeyLifetime;
 
-      @SuppressWarnings("unused")
-      var unused = addSshKey.apply(rsrc, in);
+      var _ = addSshKey.apply(rsrc, in);
     }
   }
 
@@ -374,11 +380,9 @@
           IOException,
           ConfigInvalidException,
           PermissionBackendException {
-    AccountSshKey sshKey = AccountSshKey.create(user.getAccountId(), i.seq, i.sshPublicKey);
+    AccountSshKey sshKey = new AccountSshKey(user.getAccountId(), i.seq, i.sshPublicKey);
 
-    @SuppressWarnings("unused")
-    var unused =
-        deleteSshKey.apply(new AccountResource.SshKey(user.asIdentifiedUser(), sshKey), null);
+    var _ = deleteSshKey.apply(new AccountResource.SshKey(user.asIdentifiedUser(), sshKey), null);
   }
 
   private void addEmail(String email)
@@ -391,8 +395,7 @@
     in.email = email;
     in.noConfirmation = true;
     try {
-      @SuppressWarnings("unused")
-      var unused = createEmail.apply(rsrc, IdString.fromDecoded(email), in);
+      var _ = createEmail.apply(rsrc, IdString.fromDecoded(email), in);
     } catch (EmailException e) {
       throw die(e.getMessage());
     }
@@ -402,14 +405,12 @@
     if (email.equals("ALL")) {
       List<EmailInfo> emails = getEmails.apply(rsrc).value();
       for (EmailInfo e : emails) {
-        @SuppressWarnings("unused")
-        var unused =
+        var _ =
             deleteEmail.apply(
                 new AccountResource.Email(user.asIdentifiedUser(), e.email), new Input());
       }
     } else {
-      @SuppressWarnings("unused")
-      var unused =
+      var _ =
           deleteEmail.apply(new AccountResource.Email(user.asIdentifiedUser(), email), new Input());
     }
   }
@@ -417,9 +418,7 @@
   private void putPreferred(String email) throws Exception {
     for (EmailInfo e : getEmails.apply(rsrc).value()) {
       if (e.email.equals(email)) {
-        @SuppressWarnings("unused")
-        var unused =
-            putPreferred.apply(new AccountResource.Email(user.asIdentifiedUser(), email), null);
+        var _ = putPreferred.apply(new AccountResource.Email(user.asIdentifiedUser(), email), null);
         return;
       }
     }
@@ -458,7 +457,6 @@
       ids = Collections.singletonList(externalId);
     }
 
-    @SuppressWarnings("unused")
-    var unused = deleteExternalIds.apply(rsrc, ids);
+    var _ = deleteExternalIds.apply(rsrc, ids);
   }
 }
diff --git a/java/com/google/gerrit/sshd/commands/SetHeadCommand.java b/java/com/google/gerrit/sshd/commands/SetHeadCommand.java
index 5624252..112f4c9 100644
--- a/java/com/google/gerrit/sshd/commands/SetHeadCommand.java
+++ b/java/com/google/gerrit/sshd/commands/SetHeadCommand.java
@@ -47,8 +47,7 @@
     HeadInput input = new HeadInput();
     input.ref = newHead;
     try {
-      @SuppressWarnings("unused")
-      var unused = setHead.apply(new ProjectResource(project, user), input);
+      var _ = setHead.apply(new ProjectResource(project, user), input);
     } catch (UnprocessableEntityException e) {
       throw die(e);
     }
diff --git a/java/com/google/gerrit/sshd/commands/SetMembersCommand.java b/java/com/google/gerrit/sshd/commands/SetMembersCommand.java
index a8894eb..2d0a1ed 100644
--- a/java/com/google/gerrit/sshd/commands/SetMembersCommand.java
+++ b/java/com/google/gerrit/sshd/commands/SetMembersCommand.java
@@ -108,26 +108,22 @@
         GroupResource resource =
             groupsCollection.parse(TopLevelResource.INSTANCE, IdString.fromUrl(groupUuid.get()));
         if (!accountsToRemove.isEmpty()) {
-          @SuppressWarnings("unused")
-          var unused = deleteMembers.apply(resource, fromMembers(accountsToRemove));
+          var _ = deleteMembers.apply(resource, fromMembers(accountsToRemove));
 
           reportMembersAction("removed from", resource, accountsToRemove);
         }
         if (!groupsToRemove.isEmpty()) {
-          @SuppressWarnings("unused")
-          var unused = deleteSubgroups.apply(resource, fromGroups(groupsToRemove));
+          var _ = deleteSubgroups.apply(resource, fromGroups(groupsToRemove));
 
           reportGroupsAction("excluded from", resource, groupsToRemove);
         }
         if (!accountsToAdd.isEmpty()) {
-          @SuppressWarnings("unused")
-          var unused = addMembers.apply(resource, fromMembers(accountsToAdd));
+          var _ = addMembers.apply(resource, fromMembers(accountsToAdd));
 
           reportMembersAction("added to", resource, accountsToAdd);
         }
         if (!groupsToInclude.isEmpty()) {
-          @SuppressWarnings("unused")
-          var unused = addSubgroups.apply(resource, fromGroups(groupsToInclude));
+          var _ = addSubgroups.apply(resource, fromGroups(groupsToInclude));
 
           reportGroupsAction("included to", resource, groupsToInclude);
         }
diff --git a/java/com/google/gerrit/sshd/commands/SetParentCommand.java b/java/com/google/gerrit/sshd/commands/SetParentCommand.java
index 8bdf6fa..6ab0dce 100644
--- a/java/com/google/gerrit/sshd/commands/SetParentCommand.java
+++ b/java/com/google/gerrit/sshd/commands/SetParentCommand.java
@@ -123,8 +123,7 @@
       final String name = nameKey.get();
       ProjectState project = projectCache.get(nameKey).orElseThrow(illegalState(nameKey));
       try {
-        @SuppressWarnings("unused")
-        var unused =
+        var _ =
             setParent.apply(new ProjectResource(project, user), parentInput(newParentKey.get()));
       } catch (AuthException e) {
         err.append("error: insuffient access rights to change parent of '")
diff --git a/java/com/google/gerrit/sshd/commands/SetProjectCommand.java b/java/com/google/gerrit/sshd/commands/SetProjectCommand.java
index 188d2cd..75fb013 100644
--- a/java/com/google/gerrit/sshd/commands/SetProjectCommand.java
+++ b/java/com/google/gerrit/sshd/commands/SetProjectCommand.java
@@ -150,8 +150,7 @@
     }
 
     try {
-      @SuppressWarnings("unused")
-      var unused = putConfig.apply(new ProjectResource(projectState, user), configInput);
+      var _ = putConfig.apply(new ProjectResource(projectState, user), configInput);
     } catch (RestApiException | PermissionBackendException e) {
       throw die(e);
     }
diff --git a/java/com/google/gerrit/sshd/commands/SetReviewersCommand.java b/java/com/google/gerrit/sshd/commands/SetReviewersCommand.java
index b1745b4..c08757b 100644
--- a/java/com/google/gerrit/sshd/commands/SetReviewersCommand.java
+++ b/java/com/google/gerrit/sshd/commands/SetReviewersCommand.java
@@ -105,6 +105,7 @@
       try {
         ok &= modifyOne(rsrc);
       } catch (Exception err) {
+        rethrowIfCancelled(err);
         ok = false;
         logger.atSevere().withCause(err).log("Error updating reviewers on change %s", rsrc.getId());
         writeError("fatal", "internal error while updating " + rsrc.getId());
@@ -125,21 +126,20 @@
       ReviewerResource rsrc = reviewerFactory.create(changeRsrc, reviewer);
       String error = null;
       try {
-        @SuppressWarnings("unused")
-        var unused =
+        var _ =
             retryHelper
                 .action(
                     RetryableAction.ActionType.CHANGE_UPDATE,
                     "removeReviewers",
                     () -> {
-                      @SuppressWarnings("unused")
-                      var unused2 = deleteReviewer.apply(rsrc, new DeleteReviewerInput());
+                      var _ = deleteReviewer.apply(rsrc, new DeleteReviewerInput());
                       return null;
                     })
                 .call();
       } catch (ResourceNotFoundException e) {
         error = String.format("could not remove %s: not found", reviewer);
       } catch (Exception e) {
+        rethrowIfCancelled(e);
         error = String.format("could not remove %s: %s", reviewer, e.getMessage());
       }
       if (error != null) {
@@ -159,8 +159,7 @@
             String value;
           };
       try {
-        @SuppressWarnings("unused")
-        var unused =
+        var _ =
             retryHelper
                 .action(
                     RetryableAction.ActionType.CHANGE_UPDATE,
@@ -171,6 +170,7 @@
                     })
                 .call();
       } catch (Exception e) {
+        rethrowIfCancelled(e);
         error.value = String.format("could not add %s: %s", reviewer, e.getMessage());
       }
       if (error.value != null) {
diff --git a/java/com/google/gerrit/sshd/commands/SetTopicCommand.java b/java/com/google/gerrit/sshd/commands/SetTopicCommand.java
index 6ff5686..5bcf769 100644
--- a/java/com/google/gerrit/sshd/commands/SetTopicCommand.java
+++ b/java/com/google/gerrit/sshd/commands/SetTopicCommand.java
@@ -82,8 +82,7 @@
       TopicInput input = new TopicInput();
       input.topic = topic;
       try {
-        @SuppressWarnings("unused")
-        var unused = putTopic.apply(r, input);
+        var _ = putTopic.apply(r, input);
       } catch (ResourceNotFoundException e) {
         ok = false;
         writeError(
diff --git a/java/com/google/gerrit/sshd/commands/ShowCaches.java b/java/com/google/gerrit/sshd/commands/ShowCaches.java
index bf7c154..dd12416 100644
--- a/java/com/google/gerrit/sshd/commands/ShowCaches.java
+++ b/java/com/google/gerrit/sshd/commands/ShowCaches.java
@@ -244,8 +244,7 @@
     long oldest = now;
 
     for (IoSession s : list) {
-      if (s instanceof MinaSession) {
-        MinaSession minaSession = (MinaSession) s;
+      if (s instanceof MinaSession minaSession) {
         oldest = Math.min(oldest, minaSession.getSession().getCreationTime());
       }
     }
diff --git a/java/com/google/gerrit/sshd/commands/ShowConnections.java b/java/com/google/gerrit/sshd/commands/ShowConnections.java
index 5efeb42..f3e580e 100644
--- a/java/com/google/gerrit/sshd/commands/ShowConnections.java
+++ b/java/com/google/gerrit/sshd/commands/ShowConnections.java
@@ -97,8 +97,7 @@
         acceptor.getManagedSessions().values().stream()
             .sorted(
                 (arg0, arg1) -> {
-                  if (arg0 instanceof MinaSession) {
-                    MinaSession mArg0 = (MinaSession) arg0;
+                  if (arg0 instanceof MinaSession mArg0) {
                     MinaSession mArg1 = (MinaSession) arg1;
                     if (mArg0.getSession().getCreationTime()
                         < mArg1.getSession().getCreationTime()) {
@@ -135,7 +134,7 @@
                 time(now, start),
                 age(idle),
                 username(sd),
-                hostname(io.getRemoteAddress())));
+                hostname(sd != null ? sd.getRemoteAddress() : io.getRemoteAddress())));
       }
     } else {
       stdout.print(String.format("%-8s   %-15s %s\n", "Session", "User", "Remote Host"));
@@ -146,7 +145,10 @@
 
         stdout.print(
             String.format(
-                "%8s   %-15.15s %s\n", id(sd), username(sd), hostname(io.getRemoteAddress())));
+                "%8s   %-15.15s %s\n",
+                id(sd),
+                username(sd),
+                hostname(sd != null ? sd.getRemoteAddress() : io.getRemoteAddress())));
       }
     }
 
@@ -220,8 +222,8 @@
       return "?";
     }
     String host = null;
-    if (remoteAddress instanceof InetSocketAddress) {
-      final InetSocketAddress sa = (InetSocketAddress) remoteAddress;
+    if (remoteAddress instanceof InetSocketAddress inetSocketAddress) {
+      final InetSocketAddress sa = inetSocketAddress;
       final InetAddress in = sa.getAddress();
       if (numeric) {
         return in.getHostAddress();
diff --git a/java/com/google/gerrit/sshd/commands/ShowQueue.java b/java/com/google/gerrit/sshd/commands/ShowQueue.java
index 7f8e719..931613d 100644
--- a/java/com/google/gerrit/sshd/commands/ShowQueue.java
+++ b/java/com/google/gerrit/sshd/commands/ShowQueue.java
@@ -22,13 +22,13 @@
 import com.google.gerrit.extensions.restapi.AuthException;
 import com.google.gerrit.server.IdentifiedUser;
 import com.google.gerrit.server.config.ConfigResource;
+import com.google.gerrit.server.git.TaskInfo;
 import com.google.gerrit.server.git.WorkQueue;
 import com.google.gerrit.server.git.WorkQueue.Task;
 import com.google.gerrit.server.permissions.GlobalPermission;
 import com.google.gerrit.server.permissions.PermissionBackend;
 import com.google.gerrit.server.permissions.PermissionBackendException;
 import com.google.gerrit.server.restapi.config.ListTasks;
-import com.google.gerrit.server.restapi.config.ListTasks.TaskInfo;
 import com.google.gerrit.server.util.time.TimeUtil;
 import com.google.gerrit.sshd.AdminHighPriorityCommand;
 import com.google.gerrit.sshd.CommandMetaData;
@@ -143,23 +143,11 @@
 
   private void print(List<TaskInfo> tasks, long now, boolean viewAll, int threadPoolSize) {
     for (TaskInfo task : tasks) {
-      String start;
-      switch (task.state) {
-        case DONE:
-        case CANCELLED:
-        case PARKED:
-        case STARTING:
-        case RUNNING:
-        case STOPPING:
-        case READY:
-          start = format(task.state);
-          break;
-        case OTHER:
-        case SLEEPING:
-        default:
-          start = time(now, task.delay);
-          break;
-      }
+      String start =
+          switch (task.state) {
+            case DONE, CANCELLED, PARKED, STARTING, RUNNING, STOPPING, READY -> format(task.state);
+            case SLEEPING, OTHER -> time(now, task.delay);
+          };
 
       // Shows information about tasks depending on the user rights
       if (viewAll || task.projectName == null) {
diff --git a/java/com/google/gerrit/testing/FakeEmailSender.java b/java/com/google/gerrit/testing/FakeEmailSender.java
index 42ffec2..32a1143 100644
--- a/java/com/google/gerrit/testing/FakeEmailSender.java
+++ b/java/com/google/gerrit/testing/FakeEmailSender.java
@@ -186,8 +186,7 @@
     for (WorkQueue.Task<?> task : workQueue.getTasks()) {
       if (task.toString().contains("send-email")) {
         try {
-          @SuppressWarnings("unused")
-          var unused = task.get();
+          var _ = task.get();
         } catch (ExecutionException | InterruptedException e) {
           logger.atWarning().withCause(e).log("error finishing email task");
         }
diff --git a/java/com/google/gerrit/testing/GitRepositoryReferenceCountingManager.java b/java/com/google/gerrit/testing/GitRepositoryReferenceCountingManager.java
index 035ead6..2c2b58c 100644
--- a/java/com/google/gerrit/testing/GitRepositoryReferenceCountingManager.java
+++ b/java/com/google/gerrit/testing/GitRepositoryReferenceCountingManager.java
@@ -25,6 +25,7 @@
 import com.google.common.collect.Sets;
 import com.google.gerrit.common.Nullable;
 import com.google.gerrit.entities.Project;
+import com.google.gerrit.extensions.client.RefStorage;
 import com.google.gerrit.server.config.AllProjectsName;
 import com.google.gerrit.server.config.AllUsersName;
 import com.google.gerrit.server.git.DelegateRepository;
@@ -43,6 +44,7 @@
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
 import org.eclipse.jgit.errors.RepositoryNotFoundException;
+import org.eclipse.jgit.lib.RefStorageFormat;
 import org.eclipse.jgit.lib.Repository;
 import org.junit.runner.Description;
 
@@ -132,7 +134,7 @@
         return;
       }
       decrementCallersStacks.add(getCallers());
-      int unused = referenceCounter.decrementAndGet();
+      int _ = referenceCounter.decrementAndGet();
     }
 
     synchronized void incrementReferenceCounting() {
@@ -140,7 +142,7 @@
         return;
       }
       incrementCallersStacks.add(getCallers());
-      int unused = referenceCounter.incrementAndGet();
+      int _ = referenceCounter.incrementAndGet();
     }
 
     synchronized void clear() {
@@ -196,6 +198,19 @@
   }
 
   @Override
+  public Repository createRepository(Project.NameKey name, RefStorage refStorage)
+      throws RepositoryNotFoundException, RepositoryExistsException, IOException {
+    return trackRepository(name, delegate.createRepository(name, refStorage));
+  }
+
+  @Override
+  public boolean convertRefStorage(
+      Project.NameKey name, RefStorageFormat format, boolean writeLogs, boolean backup)
+      throws IOException {
+    return delegate.convertRefStorage(name, format, writeLogs, backup);
+  }
+
+  @Override
   public NavigableSet<Project.NameKey> list() {
     return delegate.list();
   }
diff --git a/java/com/google/gerrit/testing/InMemoryModule.java b/java/com/google/gerrit/testing/InMemoryModule.java
index 344afcb..1759f7b 100644
--- a/java/com/google/gerrit/testing/InMemoryModule.java
+++ b/java/com/google/gerrit/testing/InMemoryModule.java
@@ -92,6 +92,7 @@
 import com.google.gerrit.server.config.TrackingFooters;
 import com.google.gerrit.server.config.TrackingFootersProvider;
 import com.google.gerrit.server.experiments.ConfigExperimentFeatures.ConfigExperimentFeaturesModule;
+import com.google.gerrit.server.git.AllUsersRepositoryProvider;
 import com.google.gerrit.server.git.ChangesByProjectCache;
 import com.google.gerrit.server.git.GarbageCollection;
 import com.google.gerrit.server.git.GitRepositoryManager;
@@ -215,6 +216,8 @@
     bind(GerritRuntime.class).toInstance(GerritRuntime.DAEMON);
     bind(MetricMaker.class).to(DisabledMetricMaker.class);
 
+    // Database resources must outlive the work queue during shutdown.
+    install(new InMemorySchemaModule());
     install(cfgInjector.getInstance(AccountCacheImpl.AccountCacheModule.class));
     install(cfgInjector.getInstance(AccountCacheImpl.AccountCacheBindingModule.class));
 
@@ -273,7 +276,6 @@
     bind(TrackingFooters.class).toProvider(TrackingFootersProvider.class).in(SINGLETON);
     bind(SecureStore.class).to(DefaultSecureStore.class);
 
-    install(new InMemorySchemaModule());
     install(NoSshKeyCache.module());
     install(new GerritInstanceNameModule());
     install(new GerritInstanceIdModule());
@@ -351,6 +353,7 @@
       bind(AllProjectsName.class).toProvider(AllProjectsNameProvider.class).in(SINGLETON);
 
       bind(AllUsersName.class).toProvider(AllUsersNameProvider.class).in(SINGLETON);
+      install(new AllUsersRepositoryProvider.Module());
 
       bind(String.class)
           .annotatedWith(AnonymousCowardName.class)
diff --git a/java/com/google/gerrit/testing/InMemoryRepositoryManager.java b/java/com/google/gerrit/testing/InMemoryRepositoryManager.java
index d637692..ffb3f97 100644
--- a/java/com/google/gerrit/testing/InMemoryRepositoryManager.java
+++ b/java/com/google/gerrit/testing/InMemoryRepositoryManager.java
@@ -256,8 +256,7 @@
   @Override
   public synchronized Status getRepositoryStatus(NameKey name) {
     try {
-      @SuppressWarnings("unused")
-      var unused = get(name);
+      var _ = get(name);
       return Status.ACTIVE;
     } catch (RepositoryNotFoundException e) {
       return Status.NON_EXISTENT;
diff --git a/java/com/google/gerrit/testing/InMemoryTestEnvironment.java b/java/com/google/gerrit/testing/InMemoryTestEnvironment.java
index ef65b61..d2106b0 100644
--- a/java/com/google/gerrit/testing/InMemoryTestEnvironment.java
+++ b/java/com/google/gerrit/testing/InMemoryTestEnvironment.java
@@ -85,8 +85,7 @@
   public void setApiUser(Account.Id id) {
     IdentifiedUser user = userFactory.create(id);
 
-    @SuppressWarnings("unused")
-    var unused = requestContext.setContext(() -> user);
+    var _ = requestContext.setContext(() -> user);
   }
 
   private void setUp(Object target) throws Exception {
@@ -115,8 +114,7 @@
       lifecycle.stop();
     }
     if (requestContext != null) {
-      @SuppressWarnings("unused")
-      var unused = requestContext.setContext(null);
+      var _ = requestContext.setContext(null);
     }
   }
 }
diff --git a/java/com/google/gerrit/util/cli/CmdLineParser.java b/java/com/google/gerrit/util/cli/CmdLineParser.java
index 2ba06ba..60a7fcc 100644
--- a/java/com/google/gerrit/util/cli/CmdLineParser.java
+++ b/java/com/google/gerrit/util/cli/CmdLineParser.java
@@ -226,8 +226,7 @@
     char next = '?';
     List<NamedOptionDef> booleans = new ArrayList<>();
     for (@SuppressWarnings("rawtypes") OptionHandler handler : parser.optionsList) {
-      if (handler.option instanceof NamedOptionDef) {
-        NamedOptionDef n = (NamedOptionDef) handler.option;
+      if (handler.option instanceof NamedOptionDef n) {
 
         if (handler instanceof BooleanOptionHandler) {
           booleans.add(n);
@@ -375,8 +374,7 @@
   private static Map<String, OptionHandler> index(List<OptionHandler> in) {
     Map<String, OptionHandler> m = new HashMap<>();
     for (OptionHandler handler : in) {
-      if (handler.option instanceof NamedOptionDef) {
-        NamedOptionDef def = (NamedOptionDef) handler.option;
+      if (handler.option instanceof NamedOptionDef def) {
         if (!def.isArgument()) {
           m.put(def.name(), handler);
           for (String alias : def.aliases()) {
@@ -573,8 +571,7 @@
     @Nullable
     public OptionHandler findOptionByName(String name) {
       for (OptionHandler h : optionsList) {
-        if (h.option instanceof NamedOptionDef) {
-          NamedOptionDef option = (NamedOptionDef) h.option;
+        if (h.option instanceof NamedOptionDef option) {
           if (name.equals(option.name())) {
             return h;
           }
diff --git a/java/com/google/gerrit/util/crypto/AesGcmCipher.java b/java/com/google/gerrit/util/crypto/AesGcmCipher.java
index 1db2d43..f5559cf 100644
--- a/java/com/google/gerrit/util/crypto/AesGcmCipher.java
+++ b/java/com/google/gerrit/util/crypto/AesGcmCipher.java
@@ -16,25 +16,23 @@
 
 import static java.nio.charset.StandardCharsets.UTF_8;
 
+import java.nio.ByteBuffer;
 import java.security.GeneralSecurityException;
-import java.security.SecureRandom;
 import java.util.Arrays;
 import java.util.Base64;
 import javax.crypto.Cipher;
+import javax.crypto.KDF;
 import javax.crypto.SecretKey;
 import javax.crypto.spec.GCMParameterSpec;
-import javax.crypto.spec.SecretKeySpec;
-import org.bouncycastle.crypto.digests.SHA256Digest;
-import org.bouncycastle.crypto.generators.HKDFBytesGenerator;
-import org.bouncycastle.crypto.params.HKDFParameters;
+import javax.crypto.spec.HKDFParameterSpec;
 
 /**
  * Authenticated encryption of short strings with AES-256-GCM.
  *
  * <p>The supplied key material is expanded into a dedicated 256-bit AES key with HKDF-SHA256 (RFC
- * 5869) using BouncyCastle, domain-separated by a caller-provided {@code info} label; the input key
- * bytes are zeroed after derivation. Each value is sealed as {@code "gcm:v1:" + Base64(iv ||
- * ciphertext || tag)} with a fresh 96-bit IV, and the caller supplies opaque additional
+ * 5869) using JDK 25 {@link KDF}, domain-separated by a caller-provided {@code info} label; the
+ * input key bytes are zeroed after derivation. Each value is sealed as {@code "gcm:v1:" + Base64(iv
+ * || ciphertext || tag)} with a fresh 96-bit IV, and the caller supplies opaque additional
  * authenticated data (AAD) that is bound into the tag.
  */
 public final class AesGcmCipher {
@@ -44,8 +42,6 @@
   private static final int IV_BYTES = 12;
   private static final int TAG_BITS = 128;
   private static final int DERIVED_KEY_BYTES = 32;
-  private static final ThreadLocal<Cipher> CIPHERS =
-      ThreadLocal.withInitial(AesGcmCipher::newCipher);
 
   private final SecretKey derivedKey;
 
@@ -60,12 +56,15 @@
       throw new IllegalArgumentException("Master key material must be at least 128 bits.");
     }
     try {
-      byte[] keyBytes = hkdfSha256(masterKeyBytes, info, DERIVED_KEY_BYTES);
-      try {
-        this.derivedKey = new SecretKeySpec(keyBytes, "AES");
-      } finally {
-        Arrays.fill(keyBytes, (byte) 0);
-      }
+      this.derivedKey =
+          KDF.getInstance("HKDF-SHA256")
+              .deriveKey(
+                  "AES",
+                  HKDFParameterSpec.ofExtract()
+                      .addIKM(masterKeyBytes)
+                      .thenExpand(info, DERIVED_KEY_BYTES));
+    } catch (GeneralSecurityException e) {
+      throw new IllegalStateException("Failed to derive encryption key via HKDF", e);
     } finally {
       Arrays.fill(masterKeyBytes, (byte) 0);
     }
@@ -83,10 +82,9 @@
    */
   public String seal(byte[] aad, String plaintext) {
     try {
-      byte[] iv = new byte[IV_BYTES];
-      Holder.RANDOM.nextBytes(iv);
+      byte[] iv = SecureRandomUtil.newBytes(IV_BYTES);
 
-      Cipher cipher = CIPHERS.get();
+      Cipher cipher = Cipher.getInstance(TRANSFORMATION);
       cipher.init(Cipher.ENCRYPT_MODE, derivedKey, new GCMParameterSpec(TAG_BITS, iv));
       cipher.updateAAD(aad);
 
@@ -98,10 +96,8 @@
         Arrays.fill(pt, (byte) 0);
       }
 
-      byte[] out = new byte[IV_BYTES + ct.length];
-      System.arraycopy(iv, 0, out, 0, IV_BYTES);
-      System.arraycopy(ct, 0, out, IV_BYTES, ct.length);
-      return PREFIX + Base64.getEncoder().encodeToString(out);
+      byte[] payload = ByteBuffer.allocate(IV_BYTES + ct.length).put(iv).put(ct).array();
+      return PREFIX + Base64.getEncoder().encodeToString(payload);
     } catch (GeneralSecurityException e) {
       throw new IllegalStateException("AES-GCM encryption failed", e);
     }
@@ -122,7 +118,8 @@
       if (all.length < IV_BYTES + (TAG_BITS / 8)) {
         throw new IllegalArgumentException("Truncated or corrupted ciphertext payload.");
       }
-      Cipher cipher = CIPHERS.get();
+
+      Cipher cipher = Cipher.getInstance(TRANSFORMATION);
       cipher.init(
           Cipher.DECRYPT_MODE, derivedKey, new GCMParameterSpec(TAG_BITS, all, 0, IV_BYTES));
       cipher.updateAAD(aad);
@@ -139,25 +136,4 @@
       throw new IllegalStateException("AES-GCM decryption failed (wrong key or tampered)", e);
     }
   }
-
-  /** HKDF-SHA256 using BouncyCastle HKDFBytesGenerator. */
-  private static byte[] hkdfSha256(byte[] ikm, byte[] info, int length) {
-    HKDFBytesGenerator hkdf = new HKDFBytesGenerator(new SHA256Digest());
-    hkdf.init(new HKDFParameters(ikm, null, info));
-    byte[] okm = new byte[length];
-    hkdf.generateBytes(okm, 0, length);
-    return okm;
-  }
-
-  private static Cipher newCipher() {
-    try {
-      return Cipher.getInstance(TRANSFORMATION);
-    } catch (GeneralSecurityException e) {
-      throw new IllegalStateException("Failed to initialize AES-GCM cipher", e);
-    }
-  }
-
-  private static class Holder {
-    private static final SecureRandom RANDOM = new SecureRandom();
-  }
 }
diff --git a/java/com/google/gerrit/util/crypto/BUILD b/java/com/google/gerrit/util/crypto/BUILD
index 9f28cb6..abf732e 100644
--- a/java/com/google/gerrit/util/crypto/BUILD
+++ b/java/com/google/gerrit/util/crypto/BUILD
@@ -6,6 +6,5 @@
     visibility = ["//visibility:public"],
     deps = [
         "//lib:guava",
-        "//lib/bouncycastle:bcprov-neverlink",
     ],
 )
diff --git a/javatests/com/google/gerrit/acceptance/api/accounts/AbstractAccountIT.java b/javatests/com/google/gerrit/acceptance/api/accounts/AbstractAccountIT.java
index 806baeb..43809f0 100644
--- a/javatests/com/google/gerrit/acceptance/api/accounts/AbstractAccountIT.java
+++ b/javatests/com/google/gerrit/acceptance/api/accounts/AbstractAccountIT.java
@@ -1843,6 +1843,17 @@
 
   @Test
   @UseSsh
+  public void addExistingSshKeyWithDifferentCommentDoesNotAddKeyAgain() throws Exception {
+    String initial = TestSshKeys.publicKey(sshKeys.getKeyPair(admin), admin.email());
+    gApi.accounts().self().addSshKey(TestSshKeys.publicKey(sshKeys.getKeyPair(admin), "other"));
+
+    List<SshKeyInfo> info = gApi.accounts().self().listSshKeys();
+    assertThat(info).hasSize(1);
+    assertThat(info.get(0).sshPublicKey).isEqualTo(initial);
+  }
+
+  @Test
+  @UseSsh
   public void adminCanAddOrRemoveSshKeyOnOtherAccount() throws Exception {
     AccountIndexedCounter accountIndexedCounter = getAccountIndexedCounter();
     try (Registration registration =
diff --git a/javatests/com/google/gerrit/acceptance/api/change/AiReviewPermissionIT.java b/javatests/com/google/gerrit/acceptance/api/change/AiReviewPermissionIT.java
deleted file mode 100644
index b8411b6..0000000
--- a/javatests/com/google/gerrit/acceptance/api/change/AiReviewPermissionIT.java
+++ /dev/null
@@ -1,210 +0,0 @@
-// Copyright (C) 2026 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.google.gerrit.acceptance.api.change;
-
-import static com.google.common.truth.Truth.assertThat;
-import static com.google.gerrit.acceptance.testsuite.project.TestProjectUpdate.allow;
-import static com.google.gerrit.acceptance.testsuite.project.TestProjectUpdate.block;
-import static com.google.gerrit.acceptance.testsuite.project.TestProjectUpdate.deny;
-import static com.google.gerrit.server.group.SystemGroupBackend.REGISTERED_USERS;
-
-import com.google.gerrit.acceptance.AbstractDaemonTest;
-import com.google.gerrit.acceptance.testsuite.project.ProjectOperations;
-import com.google.gerrit.acceptance.testsuite.request.RequestScopeOperations;
-import com.google.gerrit.entities.Permission;
-import com.google.gerrit.extensions.common.ActionInfo;
-import com.google.inject.Inject;
-import java.util.Map;
-import org.junit.Test;
-
-public class AiReviewPermissionIT extends AbstractDaemonTest {
-
-  private static final String AI_REVIEW = "aiReview";
-
-  @Inject private RequestScopeOperations requestScopeOperations;
-  @Inject private ProjectOperations projectOperations;
-
-  @Test
-  public void aiReviewActionAbsentByDefault() throws Exception {
-    String changeId = createChange().getChangeId();
-
-    Map<String, ActionInfo> actions = gApi.changes().id(changeId).current().actions();
-
-    assertThat(actions).doesNotContainKey(AI_REVIEW);
-  }
-
-  @Test
-  public void aiReviewActionDisabledWhenUserNotInGrantedGroup() throws Exception {
-    String changeId = createChange().getChangeId();
-
-    projectOperations
-        .project(project)
-        .forUpdate()
-        .add(allow(Permission.AI_REVIEW).ref("refs/heads/*").group(adminGroupUuid()))
-        .update();
-
-    requestScopeOperations.setApiUser(user.id());
-    Map<String, ActionInfo> actions = gApi.changes().id(changeId).current().actions();
-
-    assertThat(actions.get(AI_REVIEW).enabled).isFalse();
-  }
-
-  @Test
-  public void aiReviewActionDisabledWhenUserInDeniedGroup() throws Exception {
-    String changeId = createChange().getChangeId();
-
-    projectOperations
-        .project(project)
-        .forUpdate()
-        .add(deny(Permission.AI_REVIEW).ref("refs/heads/*").group(REGISTERED_USERS))
-        .update();
-
-    requestScopeOperations.setApiUser(user.id());
-    Map<String, ActionInfo> actions = gApi.changes().id(changeId).current().actions();
-
-    assertThat(actions.get(AI_REVIEW).enabled).isFalse();
-  }
-
-  @Test
-  public void aiReviewActionAbsentWhenUserNotInDeniedGroup() throws Exception {
-    String changeId = createChange().getChangeId();
-
-    projectOperations
-        .project(project)
-        .forUpdate()
-        .add(deny(Permission.AI_REVIEW).ref("refs/heads/*").group(adminGroupUuid()))
-        .update();
-
-    requestScopeOperations.setApiUser(user.id());
-    Map<String, ActionInfo> actions = gApi.changes().id(changeId).current().actions();
-
-    assertThat(actions).doesNotContainKey(AI_REVIEW);
-  }
-
-  @Test
-  public void aiReviewActionDisabledWhenUserInBlockedGroup() throws Exception {
-    String changeId = createChange().getChangeId();
-
-    projectOperations
-        .project(project)
-        .forUpdate()
-        .add(block(Permission.AI_REVIEW).ref("refs/heads/*").group(REGISTERED_USERS))
-        .update();
-
-    requestScopeOperations.setApiUser(user.id());
-    Map<String, ActionInfo> actions = gApi.changes().id(changeId).current().actions();
-
-    assertThat(actions.get(AI_REVIEW).enabled).isFalse();
-  }
-
-  @Test
-  public void aiReviewActionAbsentWhenUserNotInBlockedGroup() throws Exception {
-    String changeId = createChange().getChangeId();
-
-    projectOperations
-        .project(project)
-        .forUpdate()
-        .add(block(Permission.AI_REVIEW).ref("refs/heads/*").group(adminGroupUuid()))
-        .update();
-
-    requestScopeOperations.setApiUser(user.id());
-    Map<String, ActionInfo> actions = gApi.changes().id(changeId).current().actions();
-
-    assertThat(actions).doesNotContainKey(AI_REVIEW);
-  }
-
-  @Test
-  public void aiReviewActionDisabledWhenDenySuppressesAllow() throws Exception {
-    String changeId = createChange().getChangeId();
-
-    projectOperations
-        .project(project)
-        .forUpdate()
-        .add(allow(Permission.AI_REVIEW).ref("refs/heads/*").group(REGISTERED_USERS))
-        .add(deny(Permission.AI_REVIEW).ref("refs/heads/*").group(REGISTERED_USERS))
-        .update();
-
-    requestScopeOperations.setApiUser(user.id());
-    Map<String, ActionInfo> actions = gApi.changes().id(changeId).current().actions();
-
-    assertThat(actions.get(AI_REVIEW).enabled).isFalse();
-  }
-
-  @Test
-  public void aiReviewActionDisabledWhenAllowForOtherGroupAndDenyForUserGroup() throws Exception {
-    String changeId = createChange().getChangeId();
-
-    projectOperations
-        .project(project)
-        .forUpdate()
-        .add(allow(Permission.AI_REVIEW).ref("refs/heads/*").group(adminGroupUuid()))
-        .add(deny(Permission.AI_REVIEW).ref("refs/heads/*").group(REGISTERED_USERS))
-        .update();
-
-    requestScopeOperations.setApiUser(user.id());
-    Map<String, ActionInfo> actions = gApi.changes().id(changeId).current().actions();
-
-    assertThat(actions.get(AI_REVIEW).enabled).isFalse();
-  }
-
-  @Test
-  public void aiReviewActionAbsentWhenAllowForUserGroupAndDenyForOtherGroup() throws Exception {
-    String changeId = createChange().getChangeId();
-
-    projectOperations
-        .project(project)
-        .forUpdate()
-        .add(allow(Permission.AI_REVIEW).ref("refs/heads/*").group(REGISTERED_USERS))
-        .add(deny(Permission.AI_REVIEW).ref("refs/heads/*").group(adminGroupUuid()))
-        .update();
-
-    requestScopeOperations.setApiUser(user.id());
-    Map<String, ActionInfo> actions = gApi.changes().id(changeId).current().actions();
-
-    assertThat(actions).doesNotContainKey(AI_REVIEW);
-  }
-
-  @Test
-  public void aiReviewActionDisabledForAdminWhenAdminGroupDenied() throws Exception {
-    String changeId = createChange().getChangeId();
-
-    projectOperations
-        .project(project)
-        .forUpdate()
-        .add(deny(Permission.AI_REVIEW).ref("refs/heads/*").group(adminGroupUuid()))
-        .update();
-
-    requestScopeOperations.setApiUser(admin.id());
-    Map<String, ActionInfo> actions = gApi.changes().id(changeId).current().actions();
-
-    assertThat(actions.get(AI_REVIEW).enabled).isFalse();
-  }
-
-  @Test
-  public void aiReviewActionDisabledWhenDenyInheritedFromAllProjects() throws Exception {
-    String changeId = createChange().getChangeId();
-
-    projectOperations
-        .project(allProjects)
-        .forUpdate()
-        .add(deny(Permission.AI_REVIEW).ref("refs/heads/*").group(REGISTERED_USERS))
-        .update();
-
-    requestScopeOperations.setApiUser(user.id());
-    Map<String, ActionInfo> actions = gApi.changes().id(changeId).current().actions();
-
-    assertThat(actions.get(AI_REVIEW).enabled).isFalse();
-  }
-}
diff --git a/javatests/com/google/gerrit/acceptance/api/change/ChangeIT.java b/javatests/com/google/gerrit/acceptance/api/change/ChangeIT.java
index 35e2199..4d6d1a2 100644
--- a/javatests/com/google/gerrit/acceptance/api/change/ChangeIT.java
+++ b/javatests/com/google/gerrit/acceptance/api/change/ChangeIT.java
@@ -1572,6 +1572,8 @@
 
     // Ensure lastUpdatedOn is updated.
     assertThat(changeOperations.change(change.id()).get().lastUpdatedOn()).isNotEqualTo(oldTs);
+
+    eventRecorder.assertReviewerAddedEvents(change.changeId(), user.email());
   }
 
   @Test
@@ -2680,7 +2682,7 @@
   }
 
   @Test
-  public void deleteVoteFromMergedChangeNotPossibleForAdmin() throws Exception {
+  public void deleteVoteFromMergedChangePossibleForAdmin() throws Exception {
     projectOperations
         .project(project)
         .forUpdate()
@@ -2700,15 +2702,13 @@
     requestScopeOperations.setApiUser(admin.id());
     gApi.changes().id(changeId).current().submit();
 
-    ResourceConflictException thrown =
-        assertThrows(
-            ResourceConflictException.class,
-            () ->
-                gApi.changes()
-                    .id(r.getChangeId())
-                    .reviewer(user.id().toString())
-                    .deleteVote(LabelId.CODE_REVIEW));
-    assertThat(thrown).hasMessageThat().contains("cannot remove votes from merged change");
+    gApi.changes()
+        .id(r.getChangeId())
+        .reviewer(user.id().toString())
+        .deleteVote(LabelId.CODE_REVIEW);
+
+    assertThat(gApi.changes().id(r.getChangeId()).reviewer(user.id().toString()).votes())
+        .containsEntry(LabelId.CODE_REVIEW, (short) 0);
   }
 
   @Test
diff --git a/javatests/com/google/gerrit/acceptance/api/change/GetChangePermissionsIT.java b/javatests/com/google/gerrit/acceptance/api/change/GetChangePermissionsIT.java
new file mode 100644
index 0000000..aa895fc
--- /dev/null
+++ b/javatests/com/google/gerrit/acceptance/api/change/GetChangePermissionsIT.java
@@ -0,0 +1,399 @@
+// Copyright (C) 2026 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.google.gerrit.acceptance.api.change;
+
+import static com.google.common.truth.Truth.assertThat;
+import static com.google.gerrit.acceptance.testsuite.project.TestProjectUpdate.allow;
+import static com.google.gerrit.acceptance.testsuite.project.TestProjectUpdate.allowCapability;
+import static com.google.gerrit.acceptance.testsuite.project.TestProjectUpdate.block;
+import static com.google.gerrit.acceptance.testsuite.project.TestProjectUpdate.deny;
+import static com.google.gerrit.acceptance.testsuite.project.TestProjectUpdate.permissionKey;
+import static com.google.gerrit.entities.Permission.ABANDON;
+import static com.google.gerrit.entities.Permission.AI_REVIEW;
+import static com.google.gerrit.server.group.SystemGroupBackend.REGISTERED_USERS;
+import static com.google.gerrit.testing.GerritJUnit.assertThrows;
+
+import com.google.gerrit.acceptance.AbstractDaemonTest;
+import com.google.gerrit.acceptance.PushOneCommit;
+import com.google.gerrit.acceptance.config.GerritConfig;
+import com.google.gerrit.acceptance.testsuite.project.ProjectOperations;
+import com.google.gerrit.acceptance.testsuite.request.RequestScopeOperations;
+import com.google.gerrit.common.data.GlobalCapability;
+import com.google.gerrit.entities.BranchNameKey;
+import com.google.gerrit.entities.Project;
+import com.google.gerrit.extensions.api.changes.ChangePermissionsInfo;
+import com.google.gerrit.extensions.restapi.AuthException;
+import com.google.gerrit.server.experiments.ExperimentFeaturesConstants;
+import com.google.inject.Inject;
+import org.eclipse.jgit.internal.storage.dfs.InMemoryRepository;
+import org.eclipse.jgit.junit.TestRepository;
+import org.junit.Test;
+
+public class GetChangePermissionsIT extends AbstractDaemonTest {
+
+  @Inject private ProjectOperations projectOperations;
+  @Inject private RequestScopeOperations requestScopeOperations;
+
+  @Test
+  public void aiReviewTrueByDefaultForRegisteredUser() throws Exception {
+    String changeId = createChange().getChangeId();
+    requestScopeOperations.setApiUser(user.id());
+
+    ChangePermissionsInfo info = gApi.changes().id(changeId).permissions();
+
+    assertThat(info.permissions).contains(AI_REVIEW);
+  }
+
+  @Test
+  public void aiReviewTrueForAdmin() throws Exception {
+    String changeId = createChange().getChangeId();
+
+    ChangePermissionsInfo info = gApi.changes().id(changeId).permissions();
+
+    assertThat(info.permissions).contains(AI_REVIEW);
+  }
+
+  @Test
+  public void aiReviewAbsentWhenDenied() throws Exception {
+    String changeId = createChange().getChangeId();
+
+    projectOperations
+        .project(project)
+        .forUpdate()
+        .add(deny(AI_REVIEW).ref("refs/heads/*").group(REGISTERED_USERS))
+        .update();
+
+    requestScopeOperations.setApiUser(user.id());
+
+    ChangePermissionsInfo info = gApi.changes().id(changeId).permissions();
+
+    assertThat(info.permissions).doesNotContain(AI_REVIEW);
+  }
+
+  @Test
+  public void aiReviewAbsentWhenBlocked() throws Exception {
+    String changeId = createChange().getChangeId();
+
+    projectOperations
+        .project(project)
+        .forUpdate()
+        .add(block(AI_REVIEW).ref("refs/heads/*").group(REGISTERED_USERS))
+        .update();
+
+    requestScopeOperations.setApiUser(user.id());
+
+    ChangePermissionsInfo info = gApi.changes().id(changeId).permissions();
+
+    assertThat(info.permissions).doesNotContain(AI_REVIEW);
+  }
+
+  @Test
+  public void aiReviewRespectsBlockOnRefPattern() throws Exception {
+    projectOperations
+        .project(project)
+        .forUpdate()
+        .add(block(AI_REVIEW).ref("refs/heads/sensitive").group(REGISTERED_USERS))
+        .update();
+    createBranch(BranchNameKey.create(project, "sensitive"));
+
+    PushOneCommit.Result onMaster = createChange("refs/for/master");
+    PushOneCommit.Result onSensitive = createChange("refs/for/sensitive");
+
+    requestScopeOperations.setApiUser(user.id());
+
+    assertThat(gApi.changes().id(onMaster.getChangeId()).permissions().permissions)
+        .contains(AI_REVIEW);
+    assertThat(gApi.changes().id(onSensitive.getChangeId()).permissions().permissions)
+        .doesNotContain(AI_REVIEW);
+  }
+
+  @Test
+  public void aiReviewAbsentWhenAllProjectsGrantRemoved() throws Exception {
+    String changeId = createChange().getChangeId();
+
+    projectOperations
+        .allProjectsForUpdate()
+        .remove(permissionKey(AI_REVIEW).ref("refs/heads/*"))
+        .update();
+
+    requestScopeOperations.setApiUser(user.id());
+
+    ChangePermissionsInfo info = gApi.changes().id(changeId).permissions();
+
+    assertThat(info.permissions).doesNotContain(AI_REVIEW);
+  }
+
+  @Test
+  @GerritConfig(
+      name = "experiments.enabled",
+      value = ExperimentFeaturesConstants.ALLOW_AI_REVIEW_FOR_REGISTERED_USERS)
+  public void aiReviewTrueForRegisteredUserWhenExperimentEnabledAndNoGrant() throws Exception {
+    String changeId = createChange().getChangeId();
+
+    // Remove the seeded grant so no aiReview rule remains in project.config.
+    projectOperations
+        .allProjectsForUpdate()
+        .remove(permissionKey(AI_REVIEW).ref("refs/heads/*"))
+        .update();
+
+    requestScopeOperations.setApiUser(user.id());
+
+    ChangePermissionsInfo info = gApi.changes().id(changeId).permissions();
+
+    assertThat(info.permissions).contains(AI_REVIEW);
+  }
+
+  @Test
+  @GerritConfig(
+      name = "experiments.enabled",
+      value = ExperimentFeaturesConstants.ALLOW_AI_REVIEW_FOR_REGISTERED_USERS)
+  public void aiReviewBlockIgnoredWhenExperimentEnabled() throws Exception {
+    String changeId = createChange().getChangeId();
+
+    // The experiment is an unconditional override for identified users, so a
+    // BLOCK rule has no effect and aiReview is still reported.
+    projectOperations
+        .project(project)
+        .forUpdate()
+        .add(block(AI_REVIEW).ref("refs/heads/*").group(REGISTERED_USERS))
+        .update();
+
+    requestScopeOperations.setApiUser(user.id());
+
+    ChangePermissionsInfo info = gApi.changes().id(changeId).permissions();
+
+    assertThat(info.permissions).contains(AI_REVIEW);
+  }
+
+  @Test
+  public void aiReviewAbsentForAdminWhenAdminGroupBlocked() throws Exception {
+    String changeId = createChange().getChangeId();
+
+    // Admins are not exempt: a BLOCK on the admin group overrides the seeded
+    // grant (a bare DENY would only cancel an ALLOW for the same group).
+    projectOperations
+        .project(project)
+        .forUpdate()
+        .add(block(AI_REVIEW).ref("refs/heads/*").group(adminGroupUuid()))
+        .update();
+
+    ChangePermissionsInfo info = gApi.changes().id(changeId).permissions();
+
+    assertThat(info.permissions).doesNotContain(AI_REVIEW);
+  }
+
+  @Test
+  public void aiReviewAbsentWhenDenySuppressesAllow() throws Exception {
+    String changeId = createChange().getChangeId();
+
+    projectOperations
+        .project(project)
+        .forUpdate()
+        .add(allow(AI_REVIEW).ref("refs/heads/*").group(REGISTERED_USERS))
+        .add(deny(AI_REVIEW).ref("refs/heads/*").group(REGISTERED_USERS))
+        .update();
+
+    requestScopeOperations.setApiUser(user.id());
+
+    ChangePermissionsInfo info = gApi.changes().id(changeId).permissions();
+
+    assertThat(info.permissions).doesNotContain(AI_REVIEW);
+  }
+
+  @Test
+  public void aiReviewAbsentWhenAllowForOtherGroupAndDenyForUserGroup() throws Exception {
+    String changeId = createChange().getChangeId();
+
+    projectOperations
+        .project(project)
+        .forUpdate()
+        .add(allow(AI_REVIEW).ref("refs/heads/*").group(adminGroupUuid()))
+        .add(deny(AI_REVIEW).ref("refs/heads/*").group(REGISTERED_USERS))
+        .update();
+
+    requestScopeOperations.setApiUser(user.id());
+
+    ChangePermissionsInfo info = gApi.changes().id(changeId).permissions();
+
+    assertThat(info.permissions).doesNotContain(AI_REVIEW);
+  }
+
+  @Test
+  public void aiReviewPresentWhenAllowForUserGroupAndDenyForOtherGroup() throws Exception {
+    String changeId = createChange().getChangeId();
+
+    projectOperations
+        .project(project)
+        .forUpdate()
+        .add(allow(AI_REVIEW).ref("refs/heads/*").group(REGISTERED_USERS))
+        .add(deny(AI_REVIEW).ref("refs/heads/*").group(adminGroupUuid()))
+        .update();
+
+    requestScopeOperations.setApiUser(user.id());
+
+    ChangePermissionsInfo info = gApi.changes().id(changeId).permissions();
+
+    assertThat(info.permissions).contains(AI_REVIEW);
+  }
+
+  @Test
+  public void aiReviewPresentWhenDenyTargetsOtherGroup() throws Exception {
+    String changeId = createChange().getChangeId();
+
+    // A DENY on a group the caller is not in does not cancel the seeded grant.
+    projectOperations
+        .project(project)
+        .forUpdate()
+        .add(deny(AI_REVIEW).ref("refs/heads/*").group(adminGroupUuid()))
+        .update();
+
+    requestScopeOperations.setApiUser(user.id());
+
+    ChangePermissionsInfo info = gApi.changes().id(changeId).permissions();
+
+    assertThat(info.permissions).contains(AI_REVIEW);
+  }
+
+  @Test
+  public void aiReviewAbsentWhenDenyInheritedFromAllProjects() throws Exception {
+    String changeId = createChange().getChangeId();
+
+    projectOperations
+        .allProjectsForUpdate()
+        .add(deny(AI_REVIEW).ref("refs/heads/*").group(REGISTERED_USERS))
+        .update();
+
+    requestScopeOperations.setApiUser(user.id());
+
+    ChangePermissionsInfo info = gApi.changes().id(changeId).permissions();
+
+    assertThat(info.permissions).doesNotContain(AI_REVIEW);
+  }
+
+  @Test
+  public void aiReviewAbsentWhenGrantedToOtherGroupOnly() throws Exception {
+    String changeId = createChange().getChangeId();
+
+    // Drop the seeded grant, then grant only the admin group: a non-admin
+    // registered user is covered by no ALLOW rule and is denied.
+    projectOperations
+        .allProjectsForUpdate()
+        .remove(permissionKey(AI_REVIEW).ref("refs/heads/*"))
+        .update();
+    projectOperations
+        .project(project)
+        .forUpdate()
+        .add(allow(AI_REVIEW).ref("refs/heads/*").group(adminGroupUuid()))
+        .update();
+
+    requestScopeOperations.setApiUser(user.id());
+
+    ChangePermissionsInfo info = gApi.changes().id(changeId).permissions();
+
+    assertThat(info.permissions).doesNotContain(AI_REVIEW);
+  }
+
+  @Test
+  @GerritConfig(
+      name = "experiments.enabled",
+      value = ExperimentFeaturesConstants.ALLOW_AI_REVIEW_FOR_REGISTERED_USERS)
+  public void aiReviewAbsentForAnonymousWhenExperimentEnabled() throws Exception {
+    String changeId = createChange().getChangeId();
+
+    // The experiment override only applies to identified users; an anonymous
+    // caller is not granted even with the flag on.
+    requestScopeOperations.setApiUserAnonymous();
+
+    ChangePermissionsInfo info = gApi.changes().id(changeId).permissions();
+
+    assertThat(info.permissions).doesNotContain(AI_REVIEW);
+  }
+
+  @Test
+  public void aiReviewInheritedByOtherProjectsFromAllProjects() throws Exception {
+    Project.NameKey otherProject = projectOperations.newProject().create();
+    TestRepository<InMemoryRepository> otherRepo = cloneProject(otherProject);
+    String otherChangeId =
+        pushFactory.create(admin.newIdent(), otherRepo).to("refs/for/master").getChangeId();
+
+    requestScopeOperations.setApiUser(user.id());
+
+    ChangePermissionsInfo info = gApi.changes().id(otherChangeId).permissions();
+
+    assertThat(info.permissions).contains(AI_REVIEW);
+  }
+
+  @Test
+  public void allOptionReturnsEveryGrantedChangePermission() throws Exception {
+    String changeId = createChange().getChangeId();
+
+    // The default response is scoped: abandon rides the actions map, so it is absent.
+    assertThat(gApi.changes().id(changeId).permissions().permissions).doesNotContain(ABANDON);
+
+    // withAllPermissions widens to every granted change permission, including abandon.
+    assertThat(
+            gApi.changes().id(changeId).permissionsRequest().withAllPermissions().get().permissions)
+        .containsAtLeast(ABANDON, AI_REVIEW);
+  }
+
+  @Test
+  public void accountOptionReportsAnotherUsersPermissionsWithRunAs() throws Exception {
+    String changeId = createChange().getChangeId();
+    projectOperations
+        .allProjectsForUpdate()
+        .add(allowCapability(GlobalCapability.RUN_AS).group(REGISTERED_USERS))
+        .update();
+    requestScopeOperations.setApiUser(user.id());
+
+    ChangePermissionsInfo info =
+        gApi.changes()
+            .id(changeId)
+            .permissionsRequest()
+            .forAccount(String.valueOf(admin.id().get()))
+            .get();
+
+    assertThat(info.permissions).contains(AI_REVIEW);
+  }
+
+  @Test
+  public void accountOptionRequiresRunAsEvenForAdmin() throws Exception {
+    String changeId = createChange().getChangeId();
+
+    assertThrows(
+        AuthException.class,
+        () ->
+            gApi.changes()
+                .id(changeId)
+                .permissionsRequest()
+                .forAccount(String.valueOf(user.id().get()))
+                .get());
+  }
+
+  @Test
+  public void accountOptionRequiresRunAs() throws Exception {
+    String changeId = createChange().getChangeId();
+    requestScopeOperations.setApiUser(user.id());
+
+    // A caller without Run As cannot inspect another account's permissions.
+    assertThrows(
+        AuthException.class,
+        () ->
+            gApi.changes()
+                .id(changeId)
+                .permissionsRequest()
+                .forAccount(String.valueOf(admin.id().get()))
+                .get());
+  }
+}
diff --git a/javatests/com/google/gerrit/acceptance/api/change/PostReviewIT.java b/javatests/com/google/gerrit/acceptance/api/change/PostReviewIT.java
index 181de63..7a639c0 100644
--- a/javatests/com/google/gerrit/acceptance/api/change/PostReviewIT.java
+++ b/javatests/com/google/gerrit/acceptance/api/change/PostReviewIT.java
@@ -31,6 +31,7 @@
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Iterables;
+import com.google.common.collect.ListMultimap;
 import com.google.common.truth.Correspondence;
 import com.google.gerrit.acceptance.AbstractDaemonTest;
 import com.google.gerrit.acceptance.ExtensionRegistry;
@@ -62,6 +63,7 @@
 import com.google.gerrit.extensions.client.ReviewerState;
 import com.google.gerrit.extensions.client.Side;
 import com.google.gerrit.extensions.common.AccountInfo;
+import com.google.gerrit.extensions.common.ApprovalInfo;
 import com.google.gerrit.extensions.common.ChangeInfo;
 import com.google.gerrit.extensions.common.ChangeMessageInfo;
 import com.google.gerrit.extensions.common.CommentInfo;
@@ -1415,6 +1417,77 @@
     assertThat(commentInfo.isAi).isTrue();
   }
 
+  @Test
+  public void postVoteWithIsAi() throws Exception {
+    try (ProjectConfigUpdate u = updateProject(project)) {
+      LabelType.Builder codeReview =
+          labelBuilder(
+                  LabelId.CODE_REVIEW,
+                  value(2, "Looks good to me, approved"),
+                  value(1, "Looks good to me, but someone else must approve"),
+                  value(0, "No score"),
+                  value(-1, "I would prefer this is not submitted as is"),
+                  value(-2, "This shall not be submitted"))
+              .setCopyCondition("is:ANY");
+      u.getConfig().upsertLabelType(codeReview.build());
+      u.save();
+    }
+
+    PushOneCommit.Result r = createChange();
+
+    ReviewInput input = ReviewInput.recommend();
+    input.isAi = true;
+    gApi.changes().id(r.getChangeId()).current().review(input);
+
+    ChangeInfo change = gApi.changes().id(r.getChangeId()).get(ListChangesOption.DETAILED_LABELS);
+    List<ApprovalInfo> approvals = change.labels.get(LabelId.CODE_REVIEW).all;
+    assertThat(approvals).hasSize(1);
+    assertThat(approvals.get(0).value).isEqualTo(1);
+    assertThat(approvals.get(0).isAi).isTrue();
+
+    ListMultimap<String, ApprovalInfo> votes = gApi.changes().id(r.getChangeId()).current().votes();
+    assertThat(votes.get(LabelId.CODE_REVIEW)).hasSize(1);
+    assertThat(votes.get(LabelId.CODE_REVIEW).get(0).isAi).isTrue();
+
+    // Re-voting with the same numeric value and isAi = false clears isAi.
+    ReviewInput updateInput = ReviewInput.recommend();
+    updateInput.isAi = false;
+    gApi.changes().id(r.getChangeId()).current().review(updateInput);
+
+    change = gApi.changes().id(r.getChangeId()).get(ListChangesOption.DETAILED_LABELS);
+    approvals = change.labels.get(LabelId.CODE_REVIEW).all;
+    assertThat(approvals).hasSize(1);
+    assertThat(approvals.get(0).value).isEqualTo(1);
+    assertThat(approvals.get(0).isAi).isNull();
+
+    // Vote +2 with isAi = true on PS1, amend to PS2, and verify copied vote preserves isAi.
+    ReviewInput approveInput = ReviewInput.approve();
+    approveInput.isAi = true;
+    gApi.changes().id(r.getChangeId()).current().review(approveInput);
+
+    amendChange(r.getChangeId());
+
+    change = gApi.changes().id(r.getChangeId()).get(ListChangesOption.DETAILED_LABELS);
+    approvals = change.labels.get(LabelId.CODE_REVIEW).all;
+    assertThat(approvals).hasSize(1);
+    assertThat(approvals.get(0).value).isEqualTo(2);
+    assertThat(approvals.get(0).isAi).isTrue();
+
+    votes = gApi.changes().id(r.getChangeId()).current().votes();
+    assertThat(votes.get(LabelId.CODE_REVIEW)).hasSize(1);
+    assertThat(votes.get(LabelId.CODE_REVIEW).get(0).isAi).isTrue();
+
+    // Submit the change and verify isAi is preserved on the submitted change.
+    gApi.changes().id(r.getChangeId()).current().submit();
+
+    change = gApi.changes().id(r.getChangeId()).get(ListChangesOption.DETAILED_LABELS);
+    assertThat(change.status).isEqualTo(ChangeStatus.MERGED);
+    approvals = change.labels.get(LabelId.CODE_REVIEW).all;
+    assertThat(approvals).hasSize(1);
+    assertThat(approvals.get(0).value).isEqualTo(2);
+    assertThat(approvals.get(0).isAi).isTrue();
+  }
+
   private static void assertAttentionSet(
       ImmutableSet<AttentionSetUpdate> attentionSet, Account.Id... accounts) {
     assertThat(attentionSet.stream().map(AttentionSetUpdate::account).collect(Collectors.toList()))
diff --git a/javatests/com/google/gerrit/acceptance/api/change/PrivateChangeIT.java b/javatests/com/google/gerrit/acceptance/api/change/PrivateChangeIT.java
index baec17e..44207c9 100644
--- a/javatests/com/google/gerrit/acceptance/api/change/PrivateChangeIT.java
+++ b/javatests/com/google/gerrit/acceptance/api/change/PrivateChangeIT.java
@@ -22,6 +22,7 @@
 
 import com.google.common.collect.Iterables;
 import com.google.gerrit.acceptance.AbstractDaemonTest;
+import com.google.gerrit.acceptance.EventRecorder;
 import com.google.gerrit.acceptance.PushOneCommit;
 import com.google.gerrit.acceptance.TestAccount;
 import com.google.gerrit.acceptance.testsuite.project.ProjectOperations;
@@ -279,4 +280,52 @@
     }
     assertThat(gApi.changes().id(changeId.get()).get().isPrivate).isTrue();
   }
+
+  @Test
+  public void reviewerAddedEventFilteredByVisibility() throws Exception {
+    TestAccount reviewer = accountCreator.user2();
+    TestAccount unauthorizedUser = accountCreator.create("unauthorizedUser");
+
+    TestRepository<InMemoryRepository> userRepo = cloneProject(project, user);
+    PushOneCommit.Result result =
+        pushFactory.create(user.newIdent(), userRepo).to("refs/for/master");
+    String changeId = result.getChangeId();
+
+    requestScopeOperations.setApiUser(user.id());
+    gApi.changes().id(changeId).setPrivate(true, null);
+
+    try (EventRecorder reviewerRecorder = eventRecorderFactory.create(reviewer);
+        EventRecorder unauthorizedRecorder = eventRecorderFactory.create(unauthorizedUser)) {
+      gApi.changes().id(changeId).addReviewer(reviewer.id().toString());
+
+      reviewerRecorder.assertReviewerAddedEvents(changeId, reviewer.email());
+      unauthorizedRecorder.assertNoReviewerAddedEvents();
+    }
+  }
+
+  @Test
+  public void reviewerAddedEventVisibleWithViewPrivateChangesPermission() throws Exception {
+    TestAccount reviewer = accountCreator.user2();
+    TestAccount otherUser = accountCreator.create("otherUser");
+
+    TestRepository<InMemoryRepository> userRepo = cloneProject(project, user);
+    PushOneCommit.Result result =
+        pushFactory.create(user.newIdent(), userRepo).to("refs/for/master");
+    String changeId = result.getChangeId();
+
+    requestScopeOperations.setApiUser(user.id());
+    gApi.changes().id(changeId).setPrivate(true, null);
+
+    projectOperations
+        .project(project)
+        .forUpdate()
+        .add(allow(Permission.VIEW_PRIVATE_CHANGES).ref("refs/*").group(REGISTERED_USERS))
+        .update();
+
+    try (EventRecorder otherUserRecorder = eventRecorderFactory.create(otherUser)) {
+      gApi.changes().id(changeId).addReviewer(reviewer.id().toString());
+
+      otherUserRecorder.assertReviewerAddedEvents(changeId, reviewer.email());
+    }
+  }
 }
diff --git a/javatests/com/google/gerrit/acceptance/api/change/RevertIT.java b/javatests/com/google/gerrit/acceptance/api/change/RevertIT.java
index 87a58db..29265be 100644
--- a/javatests/com/google/gerrit/acceptance/api/change/RevertIT.java
+++ b/javatests/com/google/gerrit/acceptance/api/change/RevertIT.java
@@ -1060,6 +1060,51 @@
   }
 
   @Test
+  public void revertSubmissionWithWipByUserPreference() throws Exception {
+    GeneralPreferencesInfo generalPreferencesInfo = new GeneralPreferencesInfo();
+    generalPreferencesInfo.workInProgressByDefault = true;
+    gApi.accounts().id(admin.id().get()).setPreferences(generalPreferencesInfo);
+    requestScopeOperations.resetCurrentApiUser();
+
+    String changeId1 = createChange("first change", "a.txt", "message").getChangeId();
+    approve(changeId1);
+    String changeId2 = createChange("second change", "b.txt", "other").getChangeId();
+    approve(changeId2);
+    gApi.changes().id(changeId2).current().submit();
+
+    RevertSubmissionInfo revertSubmissionInfo = gApi.changes().id(changeId2).revertSubmission();
+
+    assertThat(revertSubmissionInfo.revertChanges).hasSize(2);
+    for (ChangeInfo revertChange : revertSubmissionInfo.revertChanges) {
+      assertThat(revertChange.workInProgress).isTrue();
+    }
+  }
+
+  @Test
+  public void revertSubmissionOverrideWipByUserPreference() throws Exception {
+    GeneralPreferencesInfo generalPreferencesInfo = new GeneralPreferencesInfo();
+    generalPreferencesInfo.workInProgressByDefault = true;
+    gApi.accounts().id(admin.id().get()).setPreferences(generalPreferencesInfo);
+    requestScopeOperations.resetCurrentApiUser();
+
+    String changeId1 = createChange("first change", "a.txt", "message").getChangeId();
+    approve(changeId1);
+    String changeId2 = createChange("second change", "b.txt", "other").getChangeId();
+    approve(changeId2);
+    gApi.changes().id(changeId2).current().submit();
+
+    RevertInput revertInput = new RevertInput();
+    revertInput.workInProgress = false;
+    RevertSubmissionInfo revertSubmissionInfo =
+        gApi.changes().id(changeId2).revertSubmission(revertInput);
+
+    assertThat(revertSubmissionInfo.revertChanges).hasSize(2);
+    for (ChangeInfo revertChange : revertSubmissionInfo.revertChanges) {
+      assertThat(revertChange.workInProgress).isNull();
+    }
+  }
+
+  @Test
   public void revertSubmissionIdenticalTreeIsAllowed() throws Exception {
     String unrelatedChange = createChange("change1", "a.txt", "message").getChangeId();
     approve(unrelatedChange);
diff --git a/javatests/com/google/gerrit/acceptance/api/config/GetExperimentIT.java b/javatests/com/google/gerrit/acceptance/api/config/GetExperimentIT.java
index 0609b5c..d172838 100644
--- a/javatests/com/google/gerrit/acceptance/api/config/GetExperimentIT.java
+++ b/javatests/com/google/gerrit/acceptance/api/config/GetExperimentIT.java
@@ -57,13 +57,12 @@
   @Test
   @GerritConfig(
       name = "experiments.enabled",
-      values = {"GerritBackendFeature__attach_nonce_to_documentation"})
+      values = {"GerritBackendFeature__allow_fix_suggestions_in_comments"})
   public void getEnabled() throws Exception {
     ExperimentInfo experimentInfo =
         gApi.config()
             .server()
-            .experiment(
-                ExperimentFeaturesConstants.GERRIT_BACKEND_FEATURE_ATTACH_NONCE_TO_DOCUMENTATION)
+            .experiment(ExperimentFeaturesConstants.ALLOW_FIX_SUGGESTIONS_IN_COMMENTS)
             .get();
     assertThat(experimentInfo.enabled).isTrue();
   }
@@ -73,8 +72,7 @@
     ExperimentInfo experimentInfo =
         gApi.config()
             .server()
-            .experiment(
-                ExperimentFeaturesConstants.GERRIT_BACKEND_FEATURE_ATTACH_NONCE_TO_DOCUMENTATION)
+            .experiment(ExperimentFeaturesConstants.ALLOW_FIX_SUGGESTIONS_IN_COMMENTS)
             .get();
     assertThat(experimentInfo.enabled).isFalse();
   }
diff --git a/javatests/com/google/gerrit/acceptance/api/config/ListExperimentsIT.java b/javatests/com/google/gerrit/acceptance/api/config/ListExperimentsIT.java
index a32e0c0..2e067ab 100644
--- a/javatests/com/google/gerrit/acceptance/api/config/ListExperimentsIT.java
+++ b/javatests/com/google/gerrit/acceptance/api/config/ListExperimentsIT.java
@@ -48,7 +48,6 @@
     assertThat(experiments.keySet())
         .containsAtLeast(
             ExperimentFeaturesConstants.ALLOW_FIX_SUGGESTIONS_IN_COMMENTS,
-            ExperimentFeaturesConstants.GERRIT_BACKEND_FEATURE_ATTACH_NONCE_TO_DOCUMENTATION,
             ExperimentFeaturesConstants.SKIP_SUBMIT_RECORDS_WITHOUT_SUBMIT_REQUIREMENTS)
         .inOrder();
 
@@ -57,8 +56,7 @@
         .isFalse();
     assertThat(
             experiments.get(
-                    ExperimentFeaturesConstants
-                        .GERRIT_BACKEND_FEATURE_ATTACH_NONCE_TO_DOCUMENTATION)
+                    ExperimentFeaturesConstants.SKIP_SUBMIT_RECORDS_WITHOUT_SUBMIT_REQUIREMENTS)
                 .enabled)
         .isFalse();
   }
@@ -66,13 +64,12 @@
   @Test
   @GerritConfig(
       name = "experiments.enabled",
-      values = {"GerritBackendFeature__attach_nonce_to_documentation"})
+      values = {"GerritBackendFeature__allow_fix_suggestions_in_comments"})
   public void listEnabled_noneEnabled() throws Exception {
     ImmutableMap<String, ExperimentInfo> experiments =
         gApi.config().server().listExperiments().enabledOnly().get();
     assertThat(experiments.keySet())
-        .containsExactly(
-            ExperimentFeaturesConstants.GERRIT_BACKEND_FEATURE_ATTACH_NONCE_TO_DOCUMENTATION);
+        .containsExactly(ExperimentFeaturesConstants.ALLOW_FIX_SUGGESTIONS_IN_COMMENTS);
     for (ExperimentInfo experimentInfo : experiments.values()) {
       assertThat(experimentInfo.enabled).isTrue();
     }
diff --git a/javatests/com/google/gerrit/acceptance/api/project/AccessIT.java b/javatests/com/google/gerrit/acceptance/api/project/AccessIT.java
index eeeef99..5f29062 100644
--- a/javatests/com/google/gerrit/acceptance/api/project/AccessIT.java
+++ b/javatests/com/google/gerrit/acceptance/api/project/AccessIT.java
@@ -71,7 +71,6 @@
 import com.google.gerrit.server.group.testing.TestGroupBackend;
 import com.google.gerrit.server.permissions.RegexPermissionPolicy;
 import com.google.gerrit.server.project.ProjectConfig;
-import com.google.gerrit.server.schema.GrantPostReviewCommentPermission;
 import com.google.gerrit.server.schema.GrantRevertPermission;
 import com.google.inject.Inject;
 import java.util.Arrays;
@@ -103,7 +102,6 @@
   @Inject private RequestScopeOperations requestScopeOperations;
   @Inject private ExtensionRegistry extensionRegistry;
   @Inject private GrantRevertPermission grantRevertPermission;
-  @Inject private GrantPostReviewCommentPermission grantPostReviewCommentPermission;
 
   private Project.NameKey newProjectName;
 
@@ -215,67 +213,6 @@
   }
 
   @Test
-  public void grantPostReviewCommentPermission() throws Exception {
-    String ref = "refs/*";
-    String groupId = "global:Registered-Users";
-
-    grantPostReviewCommentPermission.execute(newProjectName);
-
-    ProjectAccessInfo info = pApi().access();
-    assertThat(info.local.containsKey(ref)).isTrue();
-    AccessSectionInfo accessSectionInfo = info.local.get(ref);
-    assertThat(accessSectionInfo.permissions.containsKey(Permission.POST_REVIEW_COMMENT)).isTrue();
-    PermissionInfo permissionInfo =
-        accessSectionInfo.permissions.get(Permission.POST_REVIEW_COMMENT);
-    assertThat(permissionInfo.rules.containsKey(groupId)).isTrue();
-    PermissionRuleInfo permissionRuleInfo = permissionInfo.rules.get(groupId);
-    assertThat(permissionRuleInfo.action).isEqualTo(PermissionRuleInfo.Action.ALLOW);
-  }
-
-  @Test
-  public void grantPostReviewCommentPermissionOnlyWorksOnce() throws Exception {
-    grantPostReviewCommentPermission.execute(newProjectName);
-    grantPostReviewCommentPermission.execute(newProjectName);
-
-    try (Repository repo = repoManager.openRepository(newProjectName)) {
-      MetaDataUpdate md = new MetaDataUpdate(GitReferenceUpdated.DISABLED, newProjectName, repo);
-      ProjectConfig projectConfig = projectConfigFactory.read(md);
-      AccessSection all = projectConfig.getAccessSection(AccessSection.ALL);
-
-      Permission permission = all.getPermission(Permission.POST_REVIEW_COMMENT);
-      assertThat(permission.getRules()).hasSize(1);
-    }
-  }
-
-  @Test
-  public void grantPostReviewCommentPermissionDoesntOverrideAdminsPreferences() throws Exception {
-    GroupReference otherGroup = systemGroupBackend.getGroup(ANONYMOUS_USERS);
-
-    try (Repository repo = repoManager.openRepository(newProjectName)) {
-      MetaDataUpdate md = new MetaDataUpdate(GitReferenceUpdated.DISABLED, newProjectName, repo);
-      ProjectConfig projectConfig = projectConfigFactory.read(md);
-      projectConfig.upsertAccessSection(
-          AccessSection.ALL,
-          all -> {
-            grant(projectConfig, all, Permission.POST_REVIEW_COMMENT, otherGroup);
-          });
-      md.getCommitBuilder().setAuthor(admin.newIdent());
-      md.getCommitBuilder().setCommitter(admin.newIdent());
-      md.setMessage("Add Post Review Comment permission for anonymous users\n");
-
-      projectConfig.commit(md);
-    }
-    projectCache.evict(newProjectName);
-    ProjectAccessInfo expected = pApi().access();
-
-    grantPostReviewCommentPermission.execute(newProjectName);
-    projectCache.evict(newProjectName);
-    ProjectAccessInfo actual = pApi().access();
-    // Permissions don't change.
-    assertThat(actual.local).isEqualTo(expected.local);
-  }
-
-  @Test
   public void getDefaultInheritance() throws Exception {
     String inheritedName = pApi().access().inheritsFrom.name;
     assertThat(inheritedName).isEqualTo(AllProjectsNameProvider.DEFAULT);
diff --git a/javatests/com/google/gerrit/acceptance/api/project/ProjectIT.java b/javatests/com/google/gerrit/acceptance/api/project/ProjectIT.java
index 58f6605..6180157 100644
--- a/javatests/com/google/gerrit/acceptance/api/project/ProjectIT.java
+++ b/javatests/com/google/gerrit/acceptance/api/project/ProjectIT.java
@@ -75,6 +75,7 @@
 import com.google.gerrit.extensions.restapi.BadRequestException;
 import com.google.gerrit.extensions.restapi.MethodNotAllowedException;
 import com.google.gerrit.extensions.restapi.ResourceConflictException;
+import com.google.gerrit.extensions.restapi.ResourceNotFoundException;
 import com.google.gerrit.extensions.restapi.UnprocessableEntityException;
 import com.google.gerrit.server.config.ProjectConfigEntry;
 import com.google.gerrit.server.git.meta.MetaDataUpdate;
@@ -502,6 +503,19 @@
   }
 
   @Test
+  public void hiddenProjectIsNotFoundForNonOwner() throws Exception {
+    ConfigInput ci = new ConfigInput();
+    ci.state = ProjectState.HIDDEN;
+    gApi.projects().name(project.get()).config(ci);
+
+    requestScopeOperations.setApiUser(user.id());
+    ResourceNotFoundException thrown =
+        assertThrows(
+            ResourceNotFoundException.class, () -> gApi.projects().name(project.get()).get());
+    assertThat(thrown).hasMessageThat().doesNotContain("HIDDEN");
+  }
+
+  @Test
   public void nonActiveProjectCanBeMadeActiveByHostAdmin() throws Exception {
     // ACTIVE => HIDDEN
     ConfigInput ci1 = new ConfigInput();
diff --git a/javatests/com/google/gerrit/acceptance/api/project/ReftableProjectIT.java b/javatests/com/google/gerrit/acceptance/api/project/ReftableProjectIT.java
new file mode 100644
index 0000000..5343c1c
--- /dev/null
+++ b/javatests/com/google/gerrit/acceptance/api/project/ReftableProjectIT.java
@@ -0,0 +1,345 @@
+// Copyright (C) 2026 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.google.gerrit.acceptance.api.project;
+
+import static com.google.common.truth.Truth.assertThat;
+import static org.junit.Assert.assertThrows;
+
+import com.google.gerrit.acceptance.AbstractDaemonTest;
+import com.google.gerrit.acceptance.UseLocalDisk;
+import com.google.gerrit.acceptance.config.GerritConfig;
+import com.google.gerrit.acceptance.testsuite.request.RequestScopeOperations;
+import com.google.gerrit.entities.Project;
+import com.google.gerrit.entities.RefNames;
+import com.google.gerrit.extensions.api.projects.ProjectInput;
+import com.google.gerrit.extensions.api.projects.RefStorageInput;
+import com.google.gerrit.extensions.client.RefStorage;
+import com.google.gerrit.extensions.restapi.AuthException;
+import com.google.gerrit.extensions.restapi.BadRequestException;
+import com.google.gerrit.extensions.restapi.ResourceConflictException;
+import com.google.gerrit.extensions.restapi.ResourceNotFoundException;
+import com.google.inject.Inject;
+import java.io.File;
+import org.eclipse.jgit.lib.ConfigConstants;
+import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.lib.Repository;
+import org.junit.Test;
+
+/**
+ * Exercises the reftable ref storage backend through the real project REST flows on disk. Reftable
+ * requires a local {@link org.eclipse.jgit.internal.storage.file.FileRepository}, so these tests
+ * use {@link UseLocalDisk}.
+ */
+@UseLocalDisk
+public class ReftableProjectIT extends AbstractDaemonTest {
+  @Inject private RequestScopeOperations requestScopeOperations;
+
+  @Test
+  public void createReftableProjectWithInitialCommit() throws Exception {
+    Project.NameKey name = Project.nameKey(name("reftable-with-commit"));
+    ProjectInput in = new ProjectInput();
+    in.name = name.get();
+    in.refStorage = RefStorage.REFTABLE;
+    in.createEmptyCommit = true;
+    gApi.projects().create(in);
+
+    try (Repository repo = repoManager.openRepository(name)) {
+      assertReftable(repo);
+      assertThat(repo.exactRef(Constants.R_HEADS + Constants.MASTER)).isNotNull();
+      assertThat(repo.exactRef(RefNames.REFS_CONFIG)).isNotNull();
+    }
+  }
+
+  @Test
+  public void createReftableProjectWithoutInitialCommit() throws Exception {
+    Project.NameKey name = Project.nameKey(name("reftable-empty"));
+    ProjectInput in = new ProjectInput();
+    in.name = name.get();
+    in.refStorage = RefStorage.REFTABLE;
+    gApi.projects().create(in);
+
+    try (Repository repo = repoManager.openRepository(name)) {
+      assertReftable(repo);
+      assertThat(repo.exactRef(RefNames.REFS_CONFIG)).isNotNull();
+      assertThat(repo.exactRef(Constants.R_HEADS + Constants.MASTER)).isNull();
+    }
+  }
+
+  @Test
+  @GerritConfig(name = "core.usePerRequestRefCache", value = "true")
+  public void createReftableProjectWithPerRequestRefCacheEnabled() throws Exception {
+    Project.NameKey name = Project.nameKey(name("reftable-with-cache"));
+    ProjectInput in = new ProjectInput();
+    in.name = name.get();
+    in.refStorage = RefStorage.REFTABLE;
+    in.createEmptyCommit = true;
+    gApi.projects().create(in);
+
+    try (Repository repo = repoManager.openRepository(name)) {
+      assertReftable(repo);
+      assertThat(repo.exactRef(Constants.R_HEADS + Constants.MASTER)).isNotNull();
+    }
+  }
+
+  @Test
+  public void refStorageRejectedForInitOnlyProject() throws Exception {
+    ProjectInput in = new ProjectInput();
+    in.name = name("reftable-init-only");
+    in.initOnly = true;
+    in.refStorage = RefStorage.REFTABLE;
+    BadRequestException thrown =
+        assertThrows(BadRequestException.class, () -> gApi.projects().create(in));
+    assertThat(thrown).hasMessageThat().contains("init-only");
+  }
+
+  @Test
+  public void configReportsFilesFormat() throws Exception {
+    Project.NameKey files = Project.nameKey(name("config-files"));
+    gApi.projects().create(files.get());
+    assertThat(gApi.projects().name(files.get()).config().refStorage).isEqualTo(RefStorage.FILES);
+  }
+
+  @Test
+  public void configReportsReftableFormat() throws Exception {
+    Project.NameKey reftable = Project.nameKey(name("config-reftable"));
+    ProjectInput in = new ProjectInput();
+    in.name = reftable.get();
+    in.refStorage = RefStorage.REFTABLE;
+    gApi.projects().create(in);
+    assertThat(gApi.projects().name(reftable.get()).config().refStorage)
+        .isEqualTo(RefStorage.REFTABLE);
+  }
+
+  @Test
+  public void convertFilesProjectToReftable() throws Exception {
+    Project.NameKey name = Project.nameKey(name("to-convert"));
+    gApi.projects().create(name.get());
+
+    try (Repository repo = repoManager.openRepository(name)) {
+      assertThat(
+              repo.getConfig()
+                  .getInt(
+                      ConfigConstants.CONFIG_CORE_SECTION,
+                      null,
+                      ConfigConstants.CONFIG_KEY_REPO_FORMAT_VERSION,
+                      0))
+          .isEqualTo(0);
+    }
+
+    RefStorageInput in = new RefStorageInput();
+    in.refStorage = "REFTABLE";
+    assertThat(gApi.projects().name(name.get()).convertRefStorage(in))
+        .isEqualTo(RefStorage.REFTABLE);
+
+    try (Repository repo = repoManager.openRepository(name)) {
+      assertReftable(repo);
+      assertThat(repo.exactRef(RefNames.REFS_CONFIG)).isNotNull();
+      assertThat(new File(repo.getDirectory(), "refs.old").exists()).isTrue();
+    }
+  }
+
+  @Test
+  public void convertReftableProjectBackToFiles() throws Exception {
+    Project.NameKey name = Project.nameKey(name("to-revert"));
+    ProjectInput create = new ProjectInput();
+    create.name = name.get();
+    create.refStorage = RefStorage.REFTABLE;
+    create.createEmptyCommit = true;
+    gApi.projects().create(create);
+
+    RefStorageInput in = new RefStorageInput();
+    in.refStorage = "FILES";
+    assertThat(gApi.projects().name(name.get()).convertRefStorage(in)).isEqualTo(RefStorage.FILES);
+
+    try (Repository repo = repoManager.openRepository(name)) {
+      assertFiles(repo);
+      assertThat(repo.exactRef(Constants.R_HEADS + Constants.MASTER)).isNotNull();
+      assertThat(repo.exactRef(RefNames.REFS_CONFIG)).isNotNull();
+    }
+    assertThat(gApi.projects().name(name.get()).config().refStorage).isEqualTo(RefStorage.FILES);
+  }
+
+  @Test
+  public void convertRefusedWhenAlreadyInTargetFormat() throws Exception {
+    Project.NameKey name = Project.nameKey(name("already-files"));
+    gApi.projects().create(name.get());
+
+    RefStorageInput in = new RefStorageInput();
+    in.refStorage = "FILES";
+    assertThrows(
+        ResourceConflictException.class,
+        () -> gApi.projects().name(name.get()).convertRefStorage(in));
+  }
+
+  @Test
+  public void conversionRequiresServerAdministrator() throws Exception {
+    Project.NameKey name = Project.nameKey(name("conversion-permission"));
+    gApi.projects().create(name.get());
+    RefStorageInput input = new RefStorageInput();
+    input.refStorage = "REFTABLE";
+
+    requestScopeOperations.setApiUser(user.id());
+    try {
+      assertThrows(
+          AuthException.class, () -> gApi.projects().name(name.get()).convertRefStorage(input));
+    } finally {
+      requestScopeOperations.setApiUser(admin.id());
+    }
+    assertThat(gApi.projects().name(name.get()).config().refStorage).isEqualTo(RefStorage.FILES);
+  }
+
+  @Test
+  public void conversionCanDiscardBackup() throws Exception {
+    Project.NameKey name = Project.nameKey(name("conversion-no-backup"));
+    gApi.projects().create(name.get());
+    RefStorageInput input = new RefStorageInput();
+    input.refStorage = "REFTABLE";
+    input.backup = false;
+
+    assertThat(gApi.projects().name(name.get()).convertRefStorage(input))
+        .isEqualTo(RefStorage.REFTABLE);
+    try (Repository repo = repoManager.openRepository(name)) {
+      assertReftable(repo);
+      assertThat(repo.exactRef(RefNames.REFS_CONFIG)).isNotNull();
+      assertThat(new File(repo.getDirectory(), "refs.old").exists()).isFalse();
+    }
+  }
+
+  @Test
+  public void conversionBlockedByLeftoverBackupIsConflict() throws Exception {
+    Project.NameKey name = Project.nameKey(name("leftover-backup"));
+    ProjectInput create = new ProjectInput();
+    create.name = name.get();
+    create.refStorage = RefStorage.REFTABLE;
+    create.createEmptyCommit = true;
+    gApi.projects().create(create);
+
+    // Converting back to files while keeping a backup leaves the reftable/ dir
+    // on disk.
+    RefStorageInput toFiles = new RefStorageInput();
+    toFiles.refStorage = "FILES";
+    toFiles.backup = true;
+    assertThat(gApi.projects().name(name.get()).convertRefStorage(toFiles))
+        .isEqualTo(RefStorage.FILES);
+
+    // The next files -> reftable is blocked by that leftover and must surface
+    // as the leftover-backup conflict (not a bare 500, and not the
+    // already-in-format conflict), so assert the actionable message too.
+    RefStorageInput toReftable = new RefStorageInput();
+    toReftable.refStorage = "REFTABLE";
+    ResourceConflictException thrown =
+        assertThrows(
+            ResourceConflictException.class,
+            () -> gApi.projects().name(name.get()).convertRefStorage(toReftable));
+    assertThat(thrown).hasMessageThat().contains("Remove it before converting");
+  }
+
+  @Test
+  public void conversionAcceptsBareStringBody() throws Exception {
+    Project.NameKey name = Project.nameKey(name("convert-bare-string"));
+    gApi.projects().create(name.get());
+
+    // Stays on REST: exercises the raw @DefaultInput string body, which the
+    // extension API (RefStorageInput only) cannot express.
+    adminRestSession
+        .post("/projects/" + name.get() + "/convert-ref-storage", "REFTABLE")
+        .assertOK();
+    try (Repository repo = repoManager.openRepository(name)) {
+      assertReftable(repo);
+    }
+  }
+
+  @Test
+  public void conversionAcceptsMixedCaseFormat() throws Exception {
+    Project.NameKey name = Project.nameKey(name("convert-mixed-case"));
+    gApi.projects().create(name.get());
+
+    RefStorageInput in = new RefStorageInput();
+    in.refStorage = "Reftable";
+    assertThat(gApi.projects().name(name.get()).convertRefStorage(in))
+        .isEqualTo(RefStorage.REFTABLE);
+    try (Repository repo = repoManager.openRepository(name)) {
+      assertReftable(repo);
+    }
+  }
+
+  @Test
+  public void conversionRejectsInvalidFormat() throws Exception {
+    Project.NameKey name = Project.nameKey(name("convert-invalid-format"));
+    gApi.projects().create(name.get());
+
+    // Stays on REST: exercises the raw @DefaultInput string body.
+    adminRestSession
+        .post("/projects/" + name.get() + "/convert-ref-storage", "bogus")
+        .assertBadRequest();
+  }
+
+  @Test
+  public void conversionRejectsInvalidFormatViaApi() throws Exception {
+    Project.NameKey name = Project.nameKey(name("convert-invalid-api"));
+    gApi.projects().create(name.get());
+
+    RefStorageInput in = new RefStorageInput();
+    in.refStorage = "bogus";
+    assertThrows(
+        BadRequestException.class, () -> gApi.projects().name(name.get()).convertRefStorage(in));
+  }
+
+  @Test
+  public void conversionFailsForNonExistentProject() throws Exception {
+    RefStorageInput in = new RefStorageInput();
+    in.refStorage = "REFTABLE";
+    assertThrows(
+        ResourceNotFoundException.class,
+        () -> gApi.projects().name(name("does-not-exist")).convertRefStorage(in));
+  }
+
+  private static void assertReftable(Repository repo) {
+    assertThat(
+            repo.getConfig()
+                .getInt(
+                    ConfigConstants.CONFIG_CORE_SECTION,
+                    null,
+                    ConfigConstants.CONFIG_KEY_REPO_FORMAT_VERSION,
+                    0))
+        .isEqualTo(1);
+    assertThat(
+            repo.getConfig()
+                .getString(
+                    ConfigConstants.CONFIG_EXTENSIONS_SECTION,
+                    null,
+                    ConfigConstants.CONFIG_KEY_REF_STORAGE))
+        .isEqualTo(ConfigConstants.CONFIG_REF_STORAGE_REFTABLE);
+    assertThat(new File(repo.getDirectory(), "logs/" + RefNames.REFS_CONFIG).exists()).isFalse();
+  }
+
+  private static void assertFiles(Repository repo) {
+    assertThat(
+            repo.getConfig()
+                .getInt(
+                    ConfigConstants.CONFIG_CORE_SECTION,
+                    null,
+                    ConfigConstants.CONFIG_KEY_REPO_FORMAT_VERSION,
+                    0))
+        .isEqualTo(0);
+    assertThat(
+            repo.getConfig()
+                .getString(
+                    ConfigConstants.CONFIG_EXTENSIONS_SECTION,
+                    null,
+                    ConfigConstants.CONFIG_KEY_REF_STORAGE))
+        .isNull();
+  }
+}
diff --git a/javatests/com/google/gerrit/acceptance/api/revision/GetBlameIT.java b/javatests/com/google/gerrit/acceptance/api/revision/GetBlameIT.java
index 62140ed..1348023 100644
--- a/javatests/com/google/gerrit/acceptance/api/revision/GetBlameIT.java
+++ b/javatests/com/google/gerrit/acceptance/api/revision/GetBlameIT.java
@@ -17,6 +17,8 @@
 import static com.google.common.truth.Truth.assertThat;
 import static com.google.gerrit.entities.Patch.PATCHSET_LEVEL;
 
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
 import com.google.gerrit.acceptance.AbstractDaemonTest;
 import com.google.gerrit.acceptance.PushOneCommit;
 import com.google.gerrit.extensions.common.BlameInfo;
@@ -152,4 +154,213 @@
     // File doesn't exist in base commit.
     assertThat(blameInfos).isEmpty();
   }
+
+  @Test
+  public void withIgnoreRevsFile() throws Exception {
+    PushOneCommit.Result r1 = createChange("Change 1", "foo.txt", "line1\nline2\n");
+    PushOneCommit.Result r2 = createChange("Change 2", "foo.txt", "line1\nline2 formatted\n");
+    PushOneCommit.Result r3 =
+        pushFactory
+            .create(
+                admin.newIdent(),
+                testRepo,
+                "Change 3",
+                ImmutableMap.of(
+                    "foo.txt",
+                    "line1\nline2 formatted\nline3\n",
+                    ".git-blame-ignore-revs",
+                    "# Formatting commit\n" + r2.getCommit().name() + "\n"))
+            .to("refs/for/master");
+
+    List<BlameInfo> blameInfos =
+        gApi.changes().id(r3.getChangeId()).current().file("foo.txt").blameRequest().get();
+
+    assertThat(blameInfos).hasSize(2);
+    BlameInfo first = getBlameInfoForCommit(blameInfos, r1.getCommit().name());
+    assertThat(first.ranges).hasSize(1);
+    assertThat(first.ranges.get(0).start).isEqualTo(1);
+    assertThat(first.ranges.get(0).end).isEqualTo(2);
+
+    BlameInfo second = getBlameInfoForCommit(blameInfos, r3.getCommit().name());
+    assertThat(second.ranges).hasSize(1);
+    assertThat(second.ranges.get(0).start).isEqualTo(3);
+    assertThat(second.ranges.get(0).end).isEqualTo(3);
+  }
+
+  @Test
+  public void withIgnoreRevsFileFromBase() throws Exception {
+    PushOneCommit.Result r1 = createChange("Change 1", "foo.txt", "line1\nline2\n");
+    PushOneCommit.Result r2 = createChange("Change 2", "foo.txt", "line1\nline2 formatted\n");
+    PushOneCommit.Result r3 =
+        createChange("Change 3", ".git-blame-ignore-revs", r2.getCommit().name() + "\n");
+    PushOneCommit.Result r4 =
+        createChange("Change 4", "foo.txt", "line1\nline2 formatted\nline3\n");
+
+    // Base of r4 is r3, which has .git-blame-ignore-revs ignoring r2.
+    List<BlameInfo> blameAtR3 =
+        gApi.changes()
+            .id(r4.getChangeId())
+            .current()
+            .file("foo.txt")
+            .blameRequest()
+            .forBase(true)
+            .get();
+    assertThat(blameAtR3).hasSize(1);
+    assertThat(blameAtR3.get(0).id).isEqualTo(r1.getCommit().name());
+    assertThat(blameAtR3.get(0).ranges).hasSize(1);
+    assertThat(blameAtR3.get(0).ranges.get(0).start).isEqualTo(1);
+    assertThat(blameAtR3.get(0).ranges.get(0).end).isEqualTo(2);
+
+    // Base of r3 is r2, which does not have .git-blame-ignore-revs yet.
+    List<BlameInfo> blameAtR2 =
+        gApi.changes()
+            .id(r3.getChangeId())
+            .current()
+            .file("foo.txt")
+            .blameRequest()
+            .forBase(true)
+            .get();
+    assertThat(blameAtR2).hasSize(2);
+    BlameInfo r1Blame = getBlameInfoForCommit(blameAtR2, r1.getCommit().name());
+    assertThat(r1Blame.ranges).hasSize(1);
+    assertThat(r1Blame.ranges.get(0).start).isEqualTo(1);
+    assertThat(r1Blame.ranges.get(0).end).isEqualTo(1);
+    BlameInfo r2Blame = getBlameInfoForCommit(blameAtR2, r2.getCommit().name());
+    assertThat(r2Blame.ranges).hasSize(1);
+    assertThat(r2Blame.ranges.get(0).start).isEqualTo(2);
+    assertThat(r2Blame.ranges.get(0).end).isEqualTo(2);
+  }
+
+  @Test
+  public void withIgnoreRevsFileAddedInSubsequentPatchSet() throws Exception {
+    PushOneCommit.Result r1 = createChange("Change 1", "foo.txt", "line1\nline2\n");
+    PushOneCommit.Result r2 = createChange("Change 2", "foo.txt", "line1\nline2 formatted\n");
+    PushOneCommit.Result ps1 =
+        createChange("Change 3", "foo.txt", "line1\nline2 formatted\nline3\n");
+
+    // Patch set 1 does not have .git-blame-ignore-revs, so line 2 is blamed on r2.
+    List<BlameInfo> ps1Blame =
+        gApi.changes().id(ps1.getChangeId()).revision(1).file("foo.txt").blameRequest().get();
+    assertThat(ps1Blame).hasSize(3);
+    assertThat(getBlameInfoForCommit(ps1Blame, r2.getCommit().name()).ranges.get(0).start)
+        .isEqualTo(2);
+
+    // Patch set 2 introduces .git-blame-ignore-revs ignoring r2.
+    PushOneCommit.Result ps2 =
+        pushFactory
+            .create(
+                admin.newIdent(),
+                testRepo,
+                "Change 3",
+                ImmutableMap.of(
+                    "foo.txt",
+                    "line1\nline2 formatted\nline3\n",
+                    ".git-blame-ignore-revs",
+                    r2.getCommit().name() + "\n"),
+                ps1.getChangeId())
+            .to("refs/for/master");
+    ps2.assertOkStatus();
+
+    List<BlameInfo> ps2Blame =
+        gApi.changes().id(ps2.getChangeId()).current().file("foo.txt").blameRequest().get();
+    assertThat(ps2Blame).hasSize(2);
+    BlameInfo first = getBlameInfoForCommit(ps2Blame, r1.getCommit().name());
+    assertThat(first.ranges).hasSize(1);
+    assertThat(first.ranges.get(0).start).isEqualTo(1);
+    assertThat(first.ranges.get(0).end).isEqualTo(2);
+
+    BlameInfo second = getBlameInfoForCommit(ps2Blame, ps2.getCommit().name());
+    assertThat(second.ranges).hasSize(1);
+    assertThat(second.ranges.get(0).start).isEqualTo(3);
+    assertThat(second.ranges.get(0).end).isEqualTo(3);
+  }
+
+  @Test
+  public void withIgnoreRevsFileInMergeCommit() throws Exception {
+    PushOneCommit.Result r1 = createChange("Change 1", "foo.txt", "line1\nline2\n");
+    PushOneCommit.Result r2 = createChange("Change 2", "foo.txt", "line1\nline2 formatted\n");
+
+    PushOneCommit.Result p1 =
+        createChange("Parent 1", ".git-blame-ignore-revs", r2.getCommit().name() + "\n");
+
+    testRepo.reset(r2.getCommit());
+    PushOneCommit.Result p2 = createChange("Parent 2", "other.txt", "other\n");
+
+    PushOneCommit merge =
+        pushFactory.create(
+            admin.newIdent(),
+            testRepo,
+            "Merge Change",
+            ImmutableMap.of(
+                "foo.txt",
+                "line1\nline2 formatted\nline3\n",
+                ".git-blame-ignore-revs",
+                r2.getCommit().name() + "\n",
+                "other.txt",
+                "other\n"));
+    merge.setParents(ImmutableList.of(p1.getCommit(), p2.getCommit()));
+    PushOneCommit.Result mergeResult = merge.to("refs/for/master");
+    mergeResult.assertOkStatus();
+
+    // Blame on the merge commit itself.
+    List<BlameInfo> mergeBlame =
+        gApi.changes().id(mergeResult.getChangeId()).current().file("foo.txt").blameRequest().get();
+    assertThat(mergeBlame).hasSize(2);
+    BlameInfo r1Blame = getBlameInfoForCommit(mergeBlame, r1.getCommit().name());
+    assertThat(r1Blame.ranges).hasSize(1);
+    assertThat(r1Blame.ranges.get(0).start).isEqualTo(1);
+    assertThat(r1Blame.ranges.get(0).end).isEqualTo(2);
+
+    // Blame on the automerge base of the 2-parent merge commit.
+    List<BlameInfo> baseBlame =
+        gApi.changes()
+            .id(mergeResult.getChangeId())
+            .current()
+            .file("foo.txt")
+            .blameRequest()
+            .forBase(true)
+            .get();
+    assertThat(baseBlame).hasSize(1);
+    assertThat(baseBlame.get(0).id).isEqualTo(r1.getCommit().name());
+    assertThat(baseBlame.get(0).ranges).hasSize(1);
+    assertThat(baseBlame.get(0).ranges.get(0).start).isEqualTo(1);
+    assertThat(baseBlame.get(0).ranges.get(0).end).isEqualTo(2);
+  }
+
+  @Test
+  public void withIgnoreRevsFileInlineCommentsAndInvalidLines() throws Exception {
+    PushOneCommit.Result r1 = createChange("Change 1", "foo.txt", "line1\nline2\n");
+    PushOneCommit.Result r2 = createChange("Change 2", "foo.txt", "line1\nline2 formatted\n");
+
+    // Create a sibling commit that is not an ancestor of r3.
+    PushOneCommit.Result nonAncestor = createChange("Unrelated", "other.txt", "other\n");
+    testRepo.reset(r2.getCommit());
+
+    PushOneCommit.Result r3 =
+        createChange(
+            "Change 3",
+            ".git-blame-ignore-revs",
+            "# Header comment\n\nnot-a-valid-sha\n"
+                + nonAncestor.getCommit().name()
+                + "\n"
+                + "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef\n"
+                + r2.getCommit().name()
+                + "\t# tab-separated inline comment\n");
+
+    List<BlameInfo> blameInfos =
+        gApi.changes().id(r3.getChangeId()).current().file("foo.txt").blameRequest().get();
+
+    assertThat(blameInfos).hasSize(1);
+    assertThat(blameInfos.get(0).id).isEqualTo(r1.getCommit().name());
+    assertThat(blameInfos.get(0).ranges).hasSize(1);
+    assertThat(blameInfos.get(0).ranges.get(0).start).isEqualTo(1);
+    assertThat(blameInfos.get(0).ranges.get(0).end).isEqualTo(2);
+  }
+
+  private static BlameInfo getBlameInfoForCommit(List<BlameInfo> blameInfos, String commitId) {
+    return blameInfos.stream()
+        .filter(b -> commitId.equals(b.id))
+        .findFirst()
+        .orElseThrow(() -> new AssertionError("No BlameInfo found for commit " + commitId));
+  }
 }
diff --git a/javatests/com/google/gerrit/acceptance/api/revision/RevisionIT.java b/javatests/com/google/gerrit/acceptance/api/revision/RevisionIT.java
index a649241..be5ab13 100644
--- a/javatests/com/google/gerrit/acceptance/api/revision/RevisionIT.java
+++ b/javatests/com/google/gerrit/acceptance/api/revision/RevisionIT.java
@@ -1906,6 +1906,64 @@
   }
 
   @Test
+  public void mergeableForChangeStackedOnOpenChange() throws Exception {
+    PushOneCommit.Result r1 = createChange("Change 1", "a.txt", "a");
+    PushOneCommit.Result r2 = createChange("Change 2", "b.txt", "b");
+
+    // An open dependency does not make a change unmergeable.
+    assertThat(isMergeable(r1)).isTrue();
+    assertThat(isMergeable(r2)).isTrue();
+
+    // Neither does a dependency that is based on an outdated branch tip, as long as its content
+    // can be merged into the current one.
+    addCommitToMasterBehindGerritsBack("c.txt", "c");
+    assertThat(isMergeable(r1)).isTrue();
+    assertThat(isMergeable(r2)).isTrue();
+  }
+
+  @Test
+  public void notMergeableForChangeStackedOnOpenChangeThatConflicts() throws Exception {
+    PushOneCommit.Result r1 = createChange("Change 1", "a.txt", "a");
+    PushOneCommit.Result r2 = createChange("Change 2", "b.txt", "b");
+
+    // r2 does not touch a.txt itself, but the content that r1 brings in counts.
+    addCommitToMasterBehindGerritsBack("a.txt", "conflicting");
+    assertThat(isMergeable(r1)).isFalse();
+    assertThat(isMergeable(r2)).isFalse();
+  }
+
+  @Test
+  public void mergeableForChangeStackedOnOpenChangeWithFastForwardOnly() throws Exception {
+    updateSubmitType(project, SubmitType.FAST_FORWARD_ONLY);
+    PushOneCommit.Result r1 = createChange("Change 1", "a.txt", "a");
+    PushOneCommit.Result r2 = createChange("Change 2", "b.txt", "b");
+
+    assertThat(isMergeable(r1)).isTrue();
+    assertThat(isMergeable(r2)).isTrue();
+
+    // Once the branch tip moves on, neither change can be fast-forwarded.
+    addCommitToMasterBehindGerritsBack("c.txt", "c");
+    assertThat(isMergeable(r1)).isFalse();
+    assertThat(isMergeable(r2)).isFalse();
+  }
+
+  private boolean isMergeable(PushOneCommit.Result r) throws Exception {
+    return gApi.changes().id(r.getChangeId()).current().mergeable().mergeable;
+  }
+
+  private void addCommitToMasterBehindGerritsBack(String fileName, String content)
+      throws Exception {
+    try (Repository repo = repoManager.openRepository(project);
+        TestRepository<Repository> tr = new TestRepository<>(repo)) {
+      tr.branch("refs/heads/master")
+          .commit()
+          .message("Side update")
+          .add(fileName, content)
+          .create();
+    }
+  }
+
+  @Test
   public void files() throws Exception {
     PushOneCommit.Result r = createChange();
     Map<String, FileInfo> files =
@@ -2778,6 +2836,105 @@
         /* isParentCommitMergedInTargetBranch= */ false);
   }
 
+  @Test
+  public void parentData_sharedParentAcrossRevisions_allPopulated() throws Exception {
+    PushOneCommit.Result r = createChange();
+    for (int i = 2; i <= 4; i++) {
+      amendChange(r.getChangeId());
+    }
+
+    ChangeInfo info =
+        gApi.changes()
+            .id(r.getChangeId())
+            .get(
+                ListChangesOption.ALL_REVISIONS,
+                ListChangesOption.ALL_COMMITS,
+                ListChangesOption.PARENTS);
+    assertThat(info.revisions).hasSize(4);
+    for (RevisionInfo rev : info.revisions.values()) {
+      assertThat(rev.parentsData).hasSize(1);
+      ParentInfo p = rev.parentsData.get(0);
+      assertThat(p.branchName).isEqualTo("refs/heads/master");
+      assertThat(p.isMergedInTargetBranch).isTrue();
+    }
+  }
+
+  @Test
+  public void parentData_distinctParentsAcrossRevisions_batchedAndCached() throws Exception {
+    RevCommit initialCommit = getHead(repo(), "HEAD");
+
+    testRepo.reset(initialCommit);
+    PushOneCommit.Result b1 = createChange("Base 1", "b1.txt", "content 1");
+
+    testRepo.reset(initialCommit);
+    PushOneCommit.Result b2 = createChange("Base 2", "b2.txt", "content 2");
+
+    testRepo.reset(b1.getCommit());
+    PushOneCommit push =
+        pushFactory.create(
+            admin.newIdent(), testRepo, "Dependent Change", "dep.txt", "content ps1");
+    push.setParents(ImmutableList.of(b1.getCommit()));
+    PushOneCommit.Result r = push.to("refs/for/master");
+    String changeId = r.getChangeId();
+
+    testRepo.reset(b2.getCommit());
+    PushOneCommit pushPs2 =
+        pushFactory.create(
+            admin.newIdent(), testRepo, "Dependent Change", "dep.txt", "content ps2", changeId);
+    pushPs2.setParents(ImmutableList.of(b2.getCommit()));
+    pushPs2.to("refs/for/master");
+
+    ChangeInfo info =
+        gApi.changes()
+            .id(changeId)
+            .get(
+                ListChangesOption.ALL_REVISIONS,
+                ListChangesOption.ALL_COMMITS,
+                ListChangesOption.PARENTS);
+    assertThat(info.revisions).hasSize(2);
+
+    RevisionInfo ps1 =
+        info.revisions.values().stream().filter(rev -> rev._number == 1).findFirst().get();
+    assertThat(ps1.parentsData).hasSize(1);
+    assertParentIsChange(
+        ps1.parentsData.get(0),
+        b1.getCommit().getId(),
+        b1.getChangeId(),
+        b1.getChange().change().getChangeId(),
+        /* patchSetNumber= */ 1,
+        /* parentChangeStatus= */ ChangeStatus.NEW,
+        /* isParentCommitMergedInTargetBranch= */ false);
+
+    RevisionInfo ps2 =
+        info.revisions.values().stream().filter(rev -> rev._number == 2).findFirst().get();
+    assertThat(ps2.parentsData).hasSize(1);
+    assertParentIsChange(
+        ps2.parentsData.get(0),
+        b2.getCommit().getId(),
+        b2.getChangeId(),
+        b2.getChange().change().getChangeId(),
+        /* patchSetNumber= */ 1,
+        /* parentChangeStatus= */ ChangeStatus.NEW,
+        /* isParentCommitMergedInTargetBranch= */ false);
+  }
+
+  @Test
+  public void parentData_mergeCommit_multipleParentsPopulated() throws Exception {
+    PushOneCommit.Result mergeResult = createCherryPickableMerge("p1.txt", "p2.txt");
+
+    ChangeInfo info =
+        gApi.changes()
+            .id(mergeResult.getChangeId())
+            .get(
+                ListChangesOption.ALL_REVISIONS,
+                ListChangesOption.ALL_COMMITS,
+                ListChangesOption.PARENTS);
+    RevisionInfo rev = info.revisions.values().iterator().next();
+    assertThat(rev.parentsData).hasSize(2);
+    assertThat(rev.parentsData.get(0).changeNumber).isNotNull();
+    assertThat(rev.parentsData.get(1).changeNumber).isNotNull();
+  }
+
   private RevisionInfo getRevisionWithParents(String changeId, int patchSetNumber)
       throws Exception {
     return getRevision(
diff --git a/javatests/com/google/gerrit/acceptance/git/AbstractPushForReview.java b/javatests/com/google/gerrit/acceptance/git/AbstractPushForReview.java
index 79c6617..bc69dc8 100644
--- a/javatests/com/google/gerrit/acceptance/git/AbstractPushForReview.java
+++ b/javatests/com/google/gerrit/acceptance/git/AbstractPushForReview.java
@@ -531,6 +531,56 @@
   }
 
   @Test
+  public void autocloseByChangeId_patchSetLocked() throws Exception {
+    // Create a change and lock its current patch set
+    PushOneCommit.Result r = pushTo("refs/for/master");
+    r.assertOkStatus();
+    revision(r).review(new ReviewInput().label("Patch-Set-Lock", 1));
+
+    // Amend the commit locally
+    RevCommit c = testRepo.amend(r.getCommit()).create();
+    assertThat(c).isNotEqualTo(r.getCommit());
+    testRepo.reset(c);
+
+    // Direct push it, closing it despite the lock
+    String master = "refs/heads/master";
+    assertPushOk(pushHead(testRepo, master, false), master);
+
+    // Check that new commit was added as patch set and the change was closed
+    ChangeInfo change = change(r).get();
+    assertThat(change.status).isEqualTo(ChangeStatus.MERGED);
+    assertThat(change.revisions).hasSize(2);
+    assertThat(change.currentRevision).isEqualTo(c.name());
+  }
+
+  @Test
+  public void autocloseByChangeId_cannotAddPatchSet() throws Exception {
+    PushOneCommit.Result r = pushTo("refs/for/master");
+    r.assertOkStatus();
+
+    projectOperations
+        .project(project)
+        .forUpdate()
+        .add(allow(Permission.PUSH).ref("refs/heads/master").group(REGISTERED_USERS))
+        .add(block(Permission.ADD_PATCH_SET).ref("refs/for/*").group(REGISTERED_USERS))
+        .update();
+
+    TestRepository<InMemoryRepository> userRepo = cloneProject(project, user);
+    GitUtil.fetch(userRepo, r.getPatchSet().refName() + ":ps");
+    RevCommit c = userRepo.amend(r.getCommit()).committer(user.newIdent()).create();
+    userRepo.reset(c);
+
+    // Direct push it, closing it even though user cannot add patch sets
+    String master = "refs/heads/master";
+    assertPushOk(pushHead(userRepo, master, false), master);
+
+    ChangeInfo change = change(r).get();
+    assertThat(change.status).isEqualTo(ChangeStatus.MERGED);
+    assertThat(change.revisions).hasSize(2);
+    assertThat(change.currentRevision).isEqualTo(c.name());
+  }
+
+  @Test
   public void autocloseByChangeIdViaMerge() throws Exception {
     RevCommit initialHead =
         testRepo.getRevWalk().parseCommit(testRepo.getRepository().resolve("HEAD"));
@@ -1344,6 +1394,17 @@
     String changeId = GitUtil.getChangeId(testRepo, c).get();
     assertThat(getOwnerEmail(changeId)).isEqualTo(admin.email());
     assertThat(getReviewerEmails(changeId, ReviewerState.CC)).isEmpty();
+
+    // Create a replacement commit (patch set 2) with forged author and committer.
+    commitBuilder()
+        .author(user.newIdent())
+        .committer(user2.newIdent())
+        .add(PushOneCommit.FILE_NAME, "new content")
+        .message(PushOneCommit.SUBJECT + "\n\nChange-Id: " + changeId)
+        .create();
+    pushHead(testRepo, "refs/for/master");
+
+    assertThat(getReviewerEmails(changeId, ReviewerState.CC)).isEmpty();
   }
 
   @Test
diff --git a/javatests/com/google/gerrit/acceptance/git/BUILD b/javatests/com/google/gerrit/acceptance/git/BUILD
index 8f8fc18..a1b0caf 100644
--- a/javatests/com/google/gerrit/acceptance/git/BUILD
+++ b/javatests/com/google/gerrit/acceptance/git/BUILD
@@ -5,7 +5,10 @@
     srcs = [f],
     group = f[:f.index(".")],
     labels = ["git"],
-    shard_count = 4 if f == "SshPushForReviewIT.java" else 0,
+    shard_count = 4 if f in [
+        "GitOverHttpServletWithSshdEnabledIT.java",
+        "SshPushForReviewIT.java",
+    ] else 0,
     vm_args = ["-Xmx512m"],
     deps = [
         ":push_for_review",
diff --git a/javatests/com/google/gerrit/acceptance/pgm/AbstractReindexTests.java b/javatests/com/google/gerrit/acceptance/pgm/AbstractReindexTests.java
index 9a69013..8f011f8 100644
--- a/javatests/com/google/gerrit/acceptance/pgm/AbstractReindexTests.java
+++ b/javatests/com/google/gerrit/acceptance/pgm/AbstractReindexTests.java
@@ -45,7 +45,6 @@
 import com.google.inject.Provider;
 import com.google.inject.TypeLiteral;
 import java.nio.file.Files;
-import java.nio.file.Path;
 import java.util.Collection;
 import java.util.function.Consumer;
 import org.eclipse.jgit.lib.Config;
@@ -65,8 +64,8 @@
   public void reindexFromScratch() throws Exception {
     setUpChange();
 
-    MoreFiles.deleteRecursively(sitePaths.resolve("index"), RecursiveDeleteOption.ALLOW_INSECURE);
-    Files.createDirectory(sitePaths.resolve("index"));
+    MoreFiles.deleteRecursively(sitePaths.index_dir, RecursiveDeleteOption.ALLOW_INSECURE);
+    Files.createDirectory(sitePaths.index_dir);
     assertServerStartupFails();
 
     runGerrit("reindex", "-d", sitePaths.site_path.toString(), "--show-stack-trace", "--verbose");
@@ -112,8 +111,8 @@
     updateConfig(config -> config.setBoolean("index", null, "reuseExistingDocuments", true));
     setUpChange();
 
-    MoreFiles.deleteRecursively(sitePaths.resolve("index"), RecursiveDeleteOption.ALLOW_INSECURE);
-    Files.createDirectory(sitePaths.resolve("index"));
+    MoreFiles.deleteRecursively(sitePaths.index_dir, RecursiveDeleteOption.ALLOW_INSECURE);
+    Files.createDirectory(sitePaths.index_dir);
     assertServerStartupFails();
 
     runGerrit("reindex", "-d", sitePaths.site_path.toString(), "--show-stack-trace", "--verbose");
@@ -122,7 +121,7 @@
     runGerrit("reindex", "-d", sitePaths.site_path.toString(), "--show-stack-trace", "--verbose");
     assertIndexQueries();
 
-    Files.copy(sitePaths.resolve("index"), sitePaths.resolve("index-backup"));
+    Files.copy(sitePaths.index_dir, sitePaths.resolve("index-backup"));
     try (ServerContext ctx = startServer()) {
       GerritApi gApi = ctx.getInjector().getInstance(GerritApi.class);
       gApi.changes().id(changeId).revision(1).review(ReviewInput.approve());
@@ -130,8 +129,8 @@
       assertThat(gApi.changes().query("label:Code-Review+2").get().stream().map(c -> c.changeId))
           .containsExactly(changeId);
     }
-    MoreFiles.deleteRecursively(sitePaths.resolve("index"), RecursiveDeleteOption.ALLOW_INSECURE);
-    Files.copy(sitePaths.resolve("index-backup"), sitePaths.resolve("index"));
+    MoreFiles.deleteRecursively(sitePaths.index_dir, RecursiveDeleteOption.ALLOW_INSECURE);
+    Files.copy(sitePaths.resolve("index-backup"), sitePaths.index_dir);
     runGerrit("reindex", "-d", sitePaths.site_path.toString(), "--show-stack-trace", "--verbose");
     try (ServerContext ctx = startServer()) {
       GerritApi gApi = ctx.getInjector().getInstance(GerritApi.class);
@@ -140,30 +139,6 @@
     }
   }
 
-  @Test
-  public void reindexWithCustomIndexDirectory() throws Exception {
-    // Create a change against default index location, then update index.directory
-    setUpChange();
-    updateConfig(config -> config.setString("index", null, "directory", "custom-index"));
-
-    // Gerrit will refuse to start until that directory is (re)indexed.
-    assertServerStartupFails();
-
-    runGerrit("reindex", "-d", sitePaths.site_path.toString(), "--show-stack-trace", "--verbose");
-    Path customIndexDir = sitePaths.resolve("custom-index");
-    assertWithMessage("custom index.directory directory")
-        .that(Files.exists(customIndexDir))
-        .isTrue();
-    assertWithMessage("gerrit_index.config under custom index.directory")
-        .that(Files.exists(customIndexDir.resolve("gerrit_index.config")))
-        .isTrue();
-
-    GerritIndexStatus status = new GerritIndexStatus(customIndexDir);
-    assertThat(status.getReady(CHANGES, ChangeSchemaDefinitions.INSTANCE.getLatest().getVersion()))
-        .isTrue();
-    assertIndexQueries();
-  }
-
   private void assertIndexQueries() throws Exception {
     try (ServerContext ctx = startServer()) {
       GerritApi gApi = ctx.getInjector().getInstance(GerritApi.class);
@@ -278,7 +253,7 @@
     int currVersion = ChangeSchemaDefinitions.INSTANCE.getLatest().getVersion();
 
     // Before storing any changes, switch back to the previous version.
-    GerritIndexStatus status = new GerritIndexStatus(sitePaths.resolve("index"));
+    GerritIndexStatus status = new GerritIndexStatus(sitePaths);
     status.setReady(CHANGES, currVersion, false);
     status.setReady(CHANGES, prevVersion, true);
     status.save();
@@ -386,7 +361,7 @@
   private void assertReady(int expectedReady) throws Exception {
     ImmutableSortedSet<Integer> allVersions =
         ChangeSchemaDefinitions.INSTANCE.getSchemas().keySet();
-    GerritIndexStatus status = new GerritIndexStatus(sitePaths.resolve("index"));
+    GerritIndexStatus status = new GerritIndexStatus(sitePaths);
     assertWithMessage("ready state for index versions")
         .that(
             allVersions.stream().collect(toImmutableMap(v -> v, v -> status.getReady(CHANGES, v))))
diff --git a/javatests/com/google/gerrit/acceptance/pgm/InitIT.java b/javatests/com/google/gerrit/acceptance/pgm/InitIT.java
index 5a648ca..5149184 100644
--- a/javatests/com/google/gerrit/acceptance/pgm/InitIT.java
+++ b/javatests/com/google/gerrit/acceptance/pgm/InitIT.java
@@ -14,13 +14,16 @@
 
 package com.google.gerrit.acceptance.pgm;
 
+import static com.google.common.collect.ImmutableList.toImmutableList;
 import static com.google.common.truth.Truth.assertThat;
 import static com.google.common.truth.TruthJUnit.assume;
 
+import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableSet;
 import com.google.errorprone.annotations.MustBeClosed;
 import com.google.gerrit.acceptance.NoHttpd;
 import com.google.gerrit.acceptance.StandaloneSiteTest;
+import com.google.gerrit.acceptance.config.GerritConfig;
 import com.google.gerrit.entities.Account;
 import com.google.gerrit.entities.Project;
 import com.google.gerrit.index.IndexConfig;
@@ -72,13 +75,13 @@
 
     // Simulate a projects indexes files modified in the past by 3 seconds
     Optional<Instant> projectsLastModified =
-        getProjectsIndexLastModified(sitePaths.resolve("index")).map(t -> t.minusSeconds(3));
+        getProjectsIndexLastModified(sitePaths.index_dir).map(t -> t.minusSeconds(3));
     assertThat(projectsLastModified).isPresent();
-    setProjectsIndexLastModifiedInThePast(sitePaths.resolve("index"), projectsLastModified.get());
+    setProjectsIndexLastModifiedInThePast(sitePaths.index_dir, projectsLastModified.get());
 
     initSite();
     Optional<Instant> projectsLastModifiedAfterInit =
-        getProjectsIndexLastModified(sitePaths.resolve("index"));
+        getProjectsIndexLastModified(sitePaths.index_dir);
 
     // Verify that projects index files haven't been updated
     assertThat(projectsLastModified).isEqualTo(projectsLastModifiedAfterInit);
@@ -94,6 +97,45 @@
     }
   }
 
+  @Test
+  public void initGeneratesMissingSshHostKeys() throws Exception {
+    assertThat(existingSshHostKeys()).containsExactlyElementsIn(allSshHostKeys());
+
+    Files.delete(sitePaths.ssh_rsa);
+    Files.delete(sitePaths.ssh_ecdsa_256);
+    initSite();
+
+    assertThat(existingSshHostKeys()).containsExactlyElementsIn(allSshHostKeys());
+  }
+
+  @Test
+  @GerritConfig(name = "sshd.generateHostKeys", value = "false")
+  public void initDoesNotGenerateSshHostKeysIfDisabled() throws Exception {
+    assertThat(existingSshHostKeys()).isEmpty();
+  }
+
+  @Test
+  @GerritConfig(name = "sshd.generateHostKeys", value = "false")
+  public void initDoesNotGenerateMissingSshHostKeysIfDisabled() throws Exception {
+    Files.writeString(sitePaths.ssh_ed25519, "provisioned host key");
+    initSite();
+
+    assertThat(existingSshHostKeys()).containsExactly(sitePaths.ssh_ed25519);
+  }
+
+  private ImmutableList<Path> allSshHostKeys() {
+    return ImmutableList.of(
+        sitePaths.ssh_rsa,
+        sitePaths.ssh_ed25519,
+        sitePaths.ssh_ecdsa_256,
+        sitePaths.ssh_ecdsa_384,
+        sitePaths.ssh_ecdsa_521);
+  }
+
+  private ImmutableList<Path> existingSshHostKeys() {
+    return allSshHostKeys().stream().filter(Files::exists).collect(toImmutableList());
+  }
+
   private void initSite(String... additionalOptions) throws Exception {
     if (additionalOptions.length > 0) {
       runGerrit(
diff --git a/javatests/com/google/gerrit/acceptance/pgm/Schema_187IT.java b/javatests/com/google/gerrit/acceptance/pgm/Schema_187IT.java
new file mode 100644
index 0000000..107e258
--- /dev/null
+++ b/javatests/com/google/gerrit/acceptance/pgm/Schema_187IT.java
@@ -0,0 +1,84 @@
+// Copyright (C) 2026 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.google.gerrit.acceptance.pgm;
+
+import static com.google.common.truth.Truth.assertThat;
+import static com.google.gerrit.acceptance.testsuite.project.TestProjectUpdate.permissionKey;
+import static com.google.gerrit.entities.Permission.AI_REVIEW;
+
+import com.google.gerrit.acceptance.AbstractDaemonTest;
+import com.google.gerrit.acceptance.Sandboxed;
+import com.google.gerrit.acceptance.testsuite.project.ProjectOperations;
+import com.google.gerrit.entities.RefNames;
+import com.google.gerrit.server.schema.NoteDbSchemaVersion;
+import com.google.gerrit.server.schema.Schema_187;
+import com.google.gerrit.testing.TestUpdateUI;
+import com.google.inject.Inject;
+import java.util.Arrays;
+import java.util.List;
+import org.eclipse.jgit.lib.Config;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.junit.Test;
+
+@Sandboxed
+public class Schema_187IT extends AbstractDaemonTest {
+  @Inject private ProjectOperations projectOperations;
+  @Inject private NoteDbSchemaVersion.Arguments args;
+
+  private final TestUpdateUI testUpdateUI = new TestUpdateUI();
+
+  @Test
+  public void grantsAiReviewOnRefsHeadsWhenMissing() throws Exception {
+    // AbstractDaemonTest bootstraps All-Projects with the seed already present;
+    // remove it so the migration has work to do (mirrors an upgrade from before
+    // the permission existed).
+    projectOperations
+        .allProjectsForUpdate()
+        .remove(permissionKey(AI_REVIEW).ref("refs/heads/*"))
+        .update();
+    assertThat(aiReviewRule()).isEmpty();
+
+    RevCommit oldHead = configHead();
+    runMigration();
+
+    assertThat(configHead()).isNotEqualTo(oldHead);
+    assertThat(aiReviewRule()).containsExactly("group Registered Users");
+  }
+
+  @Test
+  public void skipsWhenAiReviewRuleAlreadyExists() throws Exception {
+    // The bootstrap seed is present by default; the migration must not overwrite
+    // an existing rule (idempotent, admin customizations preserved).
+    assertThat(aiReviewRule()).isNotEmpty();
+
+    RevCommit oldHead = configHead();
+    runMigration();
+
+    assertThat(configHead()).isEqualTo(oldHead);
+  }
+
+  private void runMigration() throws Exception {
+    new Schema_187().upgrade(args, testUpdateUI);
+  }
+
+  private RevCommit configHead() {
+    return projectOperations.project(allProjects).getHead(RefNames.REFS_CONFIG);
+  }
+
+  private List<String> aiReviewRule() {
+    Config cfg = projectOperations.project(allProjects).getConfig();
+    return Arrays.asList(cfg.getStringList("access", "refs/heads/*", AI_REVIEW));
+  }
+}
diff --git a/javatests/com/google/gerrit/acceptance/rest/TraceIT.java b/javatests/com/google/gerrit/acceptance/rest/TraceIT.java
index b8f805c..8b272e1 100644
--- a/javatests/com/google/gerrit/acceptance/rest/TraceIT.java
+++ b/javatests/com/google/gerrit/acceptance/rest/TraceIT.java
@@ -66,10 +66,14 @@
 import com.google.gerrit.server.validators.ProjectCreationValidationListener;
 import com.google.gerrit.server.validators.ValidationException;
 import com.google.inject.Inject;
+import java.time.Instant;
 import java.util.List;
 import java.util.Map;
 import java.util.Optional;
 import java.util.Set;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
 import org.apache.http.message.BasicHeader;
 import org.eclipse.jgit.junit.TestRepository;
 import org.junit.Rule;
@@ -91,6 +95,15 @@
  * </ul>
  */
 public class TraceIT extends AbstractDaemonTest {
+  /**
+   * Enough changes that the parallel stream in ChangeJson reliably hands some of them to
+   * ForkJoinPool workers rather than running them all on the request thread.
+   */
+  private static final int PARALLEL_CHANGE_COUNT = 20;
+
+  private static final String TO_CHANGE_INFO_LATENCY =
+      "http/server/rest_api/change_json/to_change_info_latency";
+
   @Rule public final Expect expect = Expect.create();
 
   @Inject private ExtensionRegistry extensionRegistry;
@@ -427,6 +440,48 @@
   }
 
   @Test
+  @GerritConfig(name = "tracing.performanceLogging", value = "true")
+  public void performanceLoggingForParallelChangeQuery() throws Exception {
+    for (int i = 0; i < PARALLEL_CHANGE_COUNT; i++) {
+      createChange();
+    }
+
+    TestPerformanceLogger testPerformanceLogger = new TestPerformanceLogger();
+    try (Registration registration =
+        extensionRegistry.newRegistration().add(testPerformanceLogger)) {
+      // MESSAGES requires lazy loading, so ensureLoaded also runs its parallel stage.
+      RestResponse response =
+          adminRestSession.get(
+              "/changes/?q=project:" + project.get() + "&o=DETAILED_LABELS&o=MESSAGES");
+      assertThat(response.getStatusCode()).isEqualTo(SC_OK);
+      assertThat(testPerformanceLogger.countAfterDone(TO_CHANGE_INFO_LATENCY))
+          .isEqualTo(PARALLEL_CHANGE_COUNT);
+    }
+  }
+
+  @Test
+  @GerritConfig(name = "tracing.performanceLogging", value = "true")
+  @GerritConfig(name = "change.submitWholeTopic", value = "true")
+  public void performanceLoggingForParallelChangeCollectionFormatting() throws Exception {
+    String topic = "parallel-format";
+    PushOneCommit.Result last = null;
+    for (int i = 0; i < PARALLEL_CHANGE_COUNT; i++) {
+      last = createChange("refs/for/master%topic=" + topic);
+    }
+
+    TestPerformanceLogger testPerformanceLogger = new TestPerformanceLogger();
+    try (Registration registration =
+        extensionRegistry.newRegistration().add(testPerformanceLogger)) {
+      // SubmittedTogether formats its changes via ChangeJson#format(Collection).
+      RestResponse response =
+          adminRestSession.get("/changes/" + last.getChangeId() + "/submitted_together");
+      assertThat(response.getStatusCode()).isEqualTo(SC_OK);
+      assertThat(testPerformanceLogger.countAfterDone(TO_CHANGE_INFO_LATENCY))
+          .isEqualTo(PARALLEL_CHANGE_COUNT);
+    }
+  }
+
+  @Test
   @GerritConfig(name = "tracing.issue123.projectPattern", value = "new12")
   public void traceProject() throws Exception {
     TraceValidatingProjectCreationValidationListener projectCreationListener =
@@ -1222,6 +1277,29 @@
     }
   }
 
+  private static class TestPerformanceLogger implements PerformanceLogger {
+    private final List<PerformanceLogEntry> logEntries = new CopyOnWriteArrayList<>();
+    private final CountDownLatch doneLatch = new CountDownLatch(1);
+
+    @Override
+    public void logNanos(String operation, long durationNanos, Instant endTime, Metadata metadata) {
+      logEntries.add(PerformanceLogEntry.create(operation, metadata));
+    }
+
+    @Override
+    public void done() {
+      doneLatch.countDown();
+    }
+
+    /** Waits until the request's performance log records were flushed and counts the matches. */
+    long countAfterDone(String operation) throws InterruptedException {
+      assertWithMessage("performance log records flushed")
+          .that(doneLatch.await(5, TimeUnit.SECONDS))
+          .isTrue();
+      return logEntries.stream().filter(e -> operation.equals(e.operation())).count();
+    }
+  }
+
   @AutoValue
   abstract static class PerformanceLogEntry {
     static PerformanceLogEntry create(String operation, Metadata metadata) {
diff --git a/javatests/com/google/gerrit/acceptance/rest/account/AddSshKeyIT.java b/javatests/com/google/gerrit/acceptance/rest/account/AddSshKeyIT.java
new file mode 100644
index 0000000..6fb3786
--- /dev/null
+++ b/javatests/com/google/gerrit/acceptance/rest/account/AddSshKeyIT.java
@@ -0,0 +1,93 @@
+// Copyright (C) 2026 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.google.gerrit.acceptance.rest.account;
+
+import static com.google.common.truth.Truth.assertThat;
+import static com.google.gerrit.testing.GerritJUnit.assertThrows;
+
+import com.google.gerrit.acceptance.AbstractDaemonTest;
+import com.google.gerrit.acceptance.RestResponse;
+import com.google.gerrit.acceptance.UseSsh;
+import com.google.gerrit.acceptance.testsuite.account.TestSshKeys;
+import com.google.gerrit.acceptance.testsuite.request.SshSessionFactory;
+import com.google.gerrit.common.RawInputUtil;
+import com.google.gerrit.extensions.common.SshKeyInfo;
+import com.google.gerrit.extensions.restapi.BadRequestException;
+import com.google.gerrit.server.util.time.TimeUtil;
+import java.sql.Timestamp;
+import java.time.Duration;
+import java.time.Instant;
+import java.util.List;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+@UseSsh
+public class AddSshKeyIT extends AbstractDaemonTest {
+  private Instant now;
+  private String key;
+
+  @Before
+  public void setup() throws Exception {
+    now = TimeUtil.truncateToSecond(TimeUtil.now());
+    TimeUtil.setCurrentMillisSupplier(now::toEpochMilli);
+    key = TestSshKeys.publicKey(SshSessionFactory.genSshKey(), admin.email());
+  }
+
+  @After
+  public void resetClock() {
+    TimeUtil.resetCurrentMillisSupplier();
+  }
+
+  @Test
+  public void noLifetimeAddsKeyWithoutExpiry() throws Exception {
+    gApi.accounts().self().addSshKey(key);
+    assertThat(lastKey().sshPublicKey).isEqualTo(key);
+    assertThat(lastKey().expiration).isNull();
+  }
+
+  @Test
+  public void lifetimeSetsExpiryTime() throws Exception {
+    SshKeyInfo added = gApi.accounts().self().addSshKey(key, "30d");
+    assertThat(added.expiration).isEqualTo(Timestamp.from(now.plus(Duration.ofDays(30))));
+    assertThat(lastKey().sshPublicKey).isEqualTo(key);
+    assertThat(lastKey().expiration).isEqualTo(added.expiration);
+  }
+
+  @Test
+  public void lifetimeAsQueryParameter() throws Exception {
+    RestResponse r =
+        adminRestSession.postRaw("/accounts/self/sshkeys?lifetime=2h", RawInputUtil.create(key));
+    r.assertCreated();
+    assertThat(lastKey().sshPublicKey).isEqualTo(key);
+    assertThat(lastKey().expiration).isEqualTo(Timestamp.from(now.plus(Duration.ofHours(2))));
+  }
+
+  @Test
+  public void invalidLifetime() throws Exception {
+    for (String lifetime : new String[] {"foo", "0", "0d", "-1d"}) {
+      BadRequestException thrown =
+          assertThrows(
+              BadRequestException.class, () -> gApi.accounts().self().addSshKey(key, lifetime));
+      assertThat(thrown).hasMessageThat().contains("lifetime");
+    }
+    assertThat(gApi.accounts().self().listSshKeys()).hasSize(1);
+  }
+
+  private SshKeyInfo lastKey() throws Exception {
+    List<SshKeyInfo> keys = gApi.accounts().self().listSshKeys();
+    return keys.get(keys.size() - 1);
+  }
+}
diff --git a/javatests/com/google/gerrit/acceptance/rest/account/DeleteSshKeyIT.java b/javatests/com/google/gerrit/acceptance/rest/account/DeleteSshKeyIT.java
index 4e9b2af..3a30028 100644
--- a/javatests/com/google/gerrit/acceptance/rest/account/DeleteSshKeyIT.java
+++ b/javatests/com/google/gerrit/acceptance/rest/account/DeleteSshKeyIT.java
@@ -53,7 +53,7 @@
   @UseSsh
   public void assertUsersHaveSshKeysPreconditions() throws Exception {
     List<AccountSshKey> userSshKeys = authorizedKeys.getKeys(user.id());
-    assertThat(userSshKeys).containsExactly(userSshKey, AccountSshKey.create(user.id(), 2, KEY1));
+    assertThat(userSshKeys).containsExactly(userSshKey, new AccountSshKey(user.id(), 2, KEY1));
     List<AccountSshKey> adminSshKeys = authorizedKeys.getKeys(admin.id());
     assertThat(adminSshKeys).containsExactly(adminSshKey);
   }
@@ -63,7 +63,7 @@
   public void deleteSshKeyRestApi() throws Exception {
     gApi.accounts().id(user.id().get()).deleteSshKey(userSshKey.seq());
     List<AccountSshKey> sshKeysAfterDel = authorizedKeys.getKeys(user.id());
-    assertThat(sshKeysAfterDel).containsExactly(AccountSshKey.create(user.id(), 2, KEY1));
+    assertThat(sshKeysAfterDel).containsExactly(new AccountSshKey(user.id(), 2, KEY1));
   }
 
   @Test
@@ -73,7 +73,7 @@
         .delete(String.format("/accounts/%s/sshkeys/%d", user.id(), userSshKey.seq()))
         .assertNoContent();
     List<AccountSshKey> sshKeysAfterDel = authorizedKeys.getKeys(user.id());
-    assertThat(sshKeysAfterDel).containsExactly(AccountSshKey.create(user.id(), 2, KEY1));
+    assertThat(sshKeysAfterDel).containsExactly(new AccountSshKey(user.id(), 2, KEY1));
   }
 
   @Test
@@ -82,7 +82,7 @@
     assertThat(deleteSshKey.apply(identifiedUserFactory.create(user.id()), userSshKey))
         .isEqualTo(Response.none());
     List<AccountSshKey> sshKeysAfterDel = authorizedKeys.getKeys(user.id());
-    assertThat(sshKeysAfterDel).containsExactly(AccountSshKey.create(user.id(), 2, KEY1));
+    assertThat(sshKeysAfterDel).containsExactly(new AccountSshKey(user.id(), 2, KEY1));
   }
 
   @Test
@@ -92,7 +92,7 @@
         .delete(String.format("/accounts/self/sshkeys/%d", userSshKey.seq()))
         .assertNoContent();
     List<AccountSshKey> sshKeysAfterDel = authorizedKeys.getKeys(user.id());
-    assertThat(sshKeysAfterDel).containsExactly(AccountSshKey.create(user.id(), 2, KEY1));
+    assertThat(sshKeysAfterDel).containsExactly(new AccountSshKey(user.id(), 2, KEY1));
   }
 
   @Test
diff --git a/javatests/com/google/gerrit/acceptance/rest/account/ImpersonationIT.java b/javatests/com/google/gerrit/acceptance/rest/account/ImpersonationIT.java
index 7cbc2a2..e10d4f6 100644
--- a/javatests/com/google/gerrit/acceptance/rest/account/ImpersonationIT.java
+++ b/javatests/com/google/gerrit/acceptance/rest/account/ImpersonationIT.java
@@ -22,7 +22,9 @@
 import static com.google.gerrit.acceptance.testsuite.project.TestProjectUpdate.capabilityKey;
 import static com.google.gerrit.entities.RefNames.changeMetaRef;
 import static com.google.gerrit.entities.RefNames.patchSetRef;
+import static com.google.gerrit.extensions.client.ListChangesOption.DETAILED_LABELS;
 import static com.google.gerrit.extensions.client.ListChangesOption.MESSAGES;
+import static com.google.gerrit.extensions.common.testing.ChangeInfoSubject.assertThat;
 import static com.google.gerrit.server.group.SystemGroupBackend.ANONYMOUS_USERS;
 import static com.google.gerrit.server.group.SystemGroupBackend.REGISTERED_USERS;
 import static com.google.gerrit.testing.GerritJUnit.assertThrows;
@@ -61,6 +63,7 @@
 import com.google.gerrit.extensions.api.changes.RevisionApi;
 import com.google.gerrit.extensions.api.changes.SubmitInput;
 import com.google.gerrit.extensions.api.groups.GroupInput;
+import com.google.gerrit.extensions.client.ReviewerState;
 import com.google.gerrit.extensions.client.Side;
 import com.google.gerrit.extensions.client.SubmitType;
 import com.google.gerrit.extensions.common.AccountInfo;
@@ -1262,6 +1265,68 @@
     assertThat(reviewerUpdate.realUpdatedBy._accountId).isEqualTo(realUser.id().get());
   }
 
+  @Test
+  public void cannotRemoveReviewerOnBehalfOfWithoutRunAs() throws Exception {
+    PushOneCommit.Result r = createChange();
+    requestScopeOperations.setApiUser(admin2.id());
+    recommend(r.getChangeId());
+    assertThat(gApi.changes().id(r.getChangeId()).reviewer(admin2.id().toString()).votes())
+        .containsExactly(LabelId.CODE_REVIEW, (short) 1);
+
+    requestScopeOperations.setApiUser(user.id());
+    ReviewerInput in = new ReviewerInput();
+    in.reviewer = admin2.id().toString();
+    in.state = ReviewerState.REMOVED;
+    in.onBehalfOf = admin.id().toString();
+
+    AuthException thrown =
+        assertThrows(AuthException.class, () -> gApi.changes().id(r.getChangeId()).addReviewer(in));
+    assertThat(thrown).hasMessageThat().isEqualTo("run as not permitted");
+    assertThat(gApi.changes().id(r.getChangeId()).reviewer(admin2.id().toString()).votes())
+        .containsExactly(LabelId.CODE_REVIEW, (short) 1);
+  }
+
+  @Test
+  public void removeReviewerOnBehalfOfWithRunAs() throws Exception {
+    allowRunAs();
+    PushOneCommit.Result r = createChange();
+    requestScopeOperations.setApiUser(admin2.id());
+    recommend(r.getChangeId());
+    assertThat(gApi.changes().id(r.getChangeId()).reviewer(admin2.id().toString()).votes())
+        .containsExactly(LabelId.CODE_REVIEW, (short) 1);
+
+    requestScopeOperations.setApiUser(user.id());
+    ReviewerInput in = new ReviewerInput();
+    in.reviewer = admin2.id().toString();
+    in.state = ReviewerState.REMOVED;
+    in.onBehalfOf = admin.id().toString();
+
+    ReviewerResult result = gApi.changes().id(r.getChangeId()).addReviewer(in);
+    assertThat(result.removed._accountId).isEqualTo(admin2.id().get());
+    assertThat(gApi.changes().id(r.getChangeId()).get().reviewers.get(ReviewerState.REVIEWER))
+        .isNull();
+    assertThat(gApi.changes().id(r.getChangeId()).get(DETAILED_LABELS)).hasNoVotes();
+  }
+
+  @Test
+  public void internalUserCanRemoveReviewerOnBehalfOfWithoutRunAs() throws Exception {
+    PushOneCommit.Result r = createChange();
+    requestScopeOperations.setApiUser(admin2.id());
+    recommend(r.getChangeId());
+
+    requestScopeOperations.setApiUserInternal();
+    ReviewerInput in = new ReviewerInput();
+    in.reviewer = admin2.id().toString();
+    in.state = ReviewerState.REMOVED;
+    in.onBehalfOf = admin.id().toString();
+
+    ReviewerResult result = gApi.changes().id(r.getChangeId()).addReviewer(in);
+    assertThat(result.removed._accountId).isEqualTo(admin2.id().get());
+    assertThat(gApi.changes().id(r.getChangeId()).get().reviewers.get(ReviewerState.REVIEWER))
+        .isNull();
+    assertThat(gApi.changes().id(r.getChangeId()).get(DETAILED_LABELS)).hasNoVotes();
+  }
+
   private void assertLastChangeMessage(
       ChangeData changeData,
       String expectedMessage,
diff --git a/javatests/com/google/gerrit/acceptance/rest/account/WatchedProjectsIT.java b/javatests/com/google/gerrit/acceptance/rest/account/WatchedProjectsIT.java
index 7d5280f..2655dea 100644
--- a/javatests/com/google/gerrit/acceptance/rest/account/WatchedProjectsIT.java
+++ b/javatests/com/google/gerrit/acceptance/rest/account/WatchedProjectsIT.java
@@ -22,6 +22,8 @@
 import com.google.gerrit.acceptance.config.GerritConfig;
 import com.google.gerrit.acceptance.testsuite.project.ProjectOperations;
 import com.google.gerrit.acceptance.testsuite.request.RequestScopeOperations;
+import com.google.gerrit.extensions.api.projects.ConfigInput;
+import com.google.gerrit.extensions.client.ProjectState;
 import com.google.gerrit.extensions.client.ProjectWatchInfo;
 import com.google.gerrit.extensions.restapi.AuthException;
 import com.google.gerrit.extensions.restapi.BadRequestException;
@@ -240,6 +242,50 @@
   }
 
   @Test
+  public void addWatchWhenExistingWatchedProjectIsHidden_reportsProjectAsNotFound()
+      throws Exception {
+    String hiddenProject = projectOperations.newProject().create().get();
+    String otherProject = projectOperations.newProject().create().get();
+
+    requestScopeOperations.setApiUser(user.id());
+    List<ProjectWatchInfo> projectsToWatch = new ArrayList<>();
+    ProjectWatchInfo hiddenPwi = new ProjectWatchInfo();
+    hiddenPwi.project = hiddenProject;
+    projectsToWatch.add(hiddenPwi);
+    gApi.accounts().self().setWatchedProjects(projectsToWatch);
+
+    hideProject(hiddenProject);
+
+    requestScopeOperations.setApiUser(user.id());
+    ProjectWatchInfo otherPwi = new ProjectWatchInfo();
+    otherPwi.project = otherProject;
+    projectsToWatch.add(otherPwi);
+    UnprocessableEntityException thrown =
+        assertThrows(
+            UnprocessableEntityException.class,
+            () -> gApi.accounts().self().setWatchedProjects(projectsToWatch));
+    assertThat(thrown).hasMessageThat().isEqualTo("Project Not Found: " + hiddenProject);
+  }
+
+  @Test
+  public void getWatchedProjectsReportsHiddenProjectAsNotFound() throws Exception {
+    String hiddenProject = projectOperations.newProject().create().get();
+
+    requestScopeOperations.setApiUser(user.id());
+    ProjectWatchInfo pwi = new ProjectWatchInfo();
+    pwi.project = hiddenProject;
+    gApi.accounts().self().setWatchedProjects(Lists.newArrayList(pwi));
+
+    hideProject(hiddenProject);
+
+    requestScopeOperations.setApiUser(user.id());
+    List<ProjectWatchInfo> watchedProjects = gApi.accounts().self().getWatchedProjects();
+    assertThat(watchedProjects).hasSize(1);
+    assertThat(watchedProjects.getFirst().project).isEqualTo(hiddenProject);
+    assertThat(watchedProjects.getFirst().problem).isEqualTo("Project Not Found: " + hiddenProject);
+  }
+
+  @Test
   public void deleteNonExistingProjectWatch() throws Exception {
     String projectName = project.get();
 
@@ -360,4 +406,11 @@
             () -> gApi.accounts().self().setWatchedProjects(projectsToWatch));
     assertThat(t.getMessage()).isEqualTo("project name must be specified");
   }
+
+  private void hideProject(String projectName) throws Exception {
+    requestScopeOperations.setApiUser(admin.id());
+    ConfigInput configInput = new ConfigInput();
+    configInput.state = ProjectState.HIDDEN;
+    gApi.projects().name(projectName).config(configInput);
+  }
 }
diff --git a/javatests/com/google/gerrit/acceptance/rest/binding/ChangesRestApiBindingsIT.java b/javatests/com/google/gerrit/acceptance/rest/binding/ChangesRestApiBindingsIT.java
index 219e4b4..4286b4d 100644
--- a/javatests/com/google/gerrit/acceptance/rest/binding/ChangesRestApiBindingsIT.java
+++ b/javatests/com/google/gerrit/acceptance/rest/binding/ChangesRestApiBindingsIT.java
@@ -72,6 +72,7 @@
           RestCall.put("/changes/%s/message"),
           RestCall.post("/changes/%s/move"),
           RestCall.post("/changes/%s/patch:apply"),
+          RestCall.get("/changes/%s/permissions"),
           RestCall.post("/changes/%s/private"),
           RestCall.post("/changes/%s/private.delete"),
           RestCall.delete("/changes/%s/private"),
diff --git a/javatests/com/google/gerrit/acceptance/rest/binding/ConfigRestApiBindingsIT.java b/javatests/com/google/gerrit/acceptance/rest/binding/ConfigRestApiBindingsIT.java
index 0083feb..645575f 100644
--- a/javatests/com/google/gerrit/acceptance/rest/binding/ConfigRestApiBindingsIT.java
+++ b/javatests/com/google/gerrit/acceptance/rest/binding/ConfigRestApiBindingsIT.java
@@ -28,9 +28,9 @@
 import com.google.gerrit.acceptance.testsuite.project.ProjectOperations;
 import com.google.gerrit.common.data.GlobalCapability;
 import com.google.gerrit.server.experiments.ExperimentFeaturesConstants;
+import com.google.gerrit.server.git.TaskInfo;
 import com.google.gerrit.server.project.ProjectCacheImpl;
 import com.google.gerrit.server.restapi.config.CleanupChanges;
-import com.google.gerrit.server.restapi.config.ListTasks.TaskInfo;
 import com.google.gson.reflect.TypeToken;
 import com.google.inject.ConfigurationException;
 import com.google.inject.Inject;
diff --git a/javatests/com/google/gerrit/acceptance/rest/binding/ProjectsRestApiBindingsIT.java b/javatests/com/google/gerrit/acceptance/rest/binding/ProjectsRestApiBindingsIT.java
index 6d72a64..44cbff54 100644
--- a/javatests/com/google/gerrit/acceptance/rest/binding/ProjectsRestApiBindingsIT.java
+++ b/javatests/com/google/gerrit/acceptance/rest/binding/ProjectsRestApiBindingsIT.java
@@ -86,6 +86,7 @@
           RestCall.put("/projects/%s/labels/new-label"),
           RestCall.get("/projects/%s/parent"),
           RestCall.put("/projects/%s/parent"),
+          RestCall.post("/projects/%s/convert-ref-storage"),
           RestCall.get("/projects/%s/statistics.git"),
           RestCall.get("/projects/%s/submit_requirements"),
           RestCall.put("/projects/%s/submit_requirements/new-sr"),
diff --git a/javatests/com/google/gerrit/acceptance/rest/change/BUILD b/javatests/com/google/gerrit/acceptance/rest/change/BUILD
index 959b016..64d8c3d 100644
--- a/javatests/com/google/gerrit/acceptance/rest/change/BUILD
+++ b/javatests/com/google/gerrit/acceptance/rest/change/BUILD
@@ -14,6 +14,7 @@
     srcs = OTHER_TESTS,
     group = "rest_change_other",
     labels = ["rest"],
+    shard_count = 4,
     deps = [
         ":submit_util",
         "//java/com/google/gerrit/entities/converter:converters",
diff --git a/javatests/com/google/gerrit/acceptance/rest/change/ChangeMessagesIT.java b/javatests/com/google/gerrit/acceptance/rest/change/ChangeMessagesIT.java
index 32b9010..2ff7af9 100644
--- a/javatests/com/google/gerrit/acceptance/rest/change/ChangeMessagesIT.java
+++ b/javatests/com/google/gerrit/acceptance/rest/change/ChangeMessagesIT.java
@@ -17,7 +17,9 @@
 import static com.google.common.truth.Truth.assertThat;
 import static com.google.common.truth.Truth.assertWithMessage;
 import static com.google.gerrit.acceptance.PushOneCommit.FILE_NAME;
+import static com.google.gerrit.acceptance.testsuite.project.TestProjectUpdate.allow;
 import static com.google.gerrit.acceptance.testsuite.project.TestProjectUpdate.allowCapability;
+import static com.google.gerrit.acceptance.testsuite.project.TestProjectUpdate.block;
 import static com.google.gerrit.extensions.client.ListChangesOption.DETAILED_ACCOUNTS;
 import static com.google.gerrit.extensions.client.ListChangesOption.MESSAGES;
 import static com.google.gerrit.server.group.SystemGroupBackend.REGISTERED_USERS;
@@ -38,8 +40,11 @@
 import com.google.gerrit.acceptance.testsuite.project.ProjectOperations;
 import com.google.gerrit.acceptance.testsuite.request.RequestScopeOperations;
 import com.google.gerrit.common.data.GlobalCapability;
+import com.google.gerrit.entities.BranchNameKey;
 import com.google.gerrit.entities.Change;
 import com.google.gerrit.entities.LabelId;
+import com.google.gerrit.entities.Permission;
+import com.google.gerrit.entities.Project;
 import com.google.gerrit.extensions.api.changes.DeleteChangeMessageInput;
 import com.google.gerrit.extensions.api.changes.ReviewInput;
 import com.google.gerrit.extensions.common.ChangeInfo;
@@ -55,6 +60,8 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Optional;
+import org.eclipse.jgit.internal.storage.dfs.InMemoryRepository;
+import org.eclipse.jgit.junit.TestRepository;
 import org.eclipse.jgit.revwalk.RevCommit;
 import org.eclipse.jgit.util.RawParseUtils;
 import org.junit.Test;
@@ -193,13 +200,13 @@
   }
 
   @Test
-  public void deleteCannotBeAppliedWithoutAdministrateServerCapability() throws Exception {
+  public void deleteCannotBeAppliedByNonAdminUser() throws Exception {
     int changeNum = createOneChangeWithMultipleChangeMessagesInHistory();
     requestScopeOperations.setApiUser(user.id());
 
     AuthException thrown =
         assertThrows(AuthException.class, () -> deleteOneChangeMessage(changeNum, 0, user, "spam"));
-    assertThat(thrown).hasMessageThat().isEqualTo("administrate server not permitted");
+    assertThat(thrown).hasMessageThat().isEqualTo("delete comment not permitted");
   }
 
   @Test
@@ -214,6 +221,104 @@
   }
 
   @Test
+  public void deleteCanBeAppliedByUserWithDeleteCommentPermission() throws Exception {
+    projectOperations
+        .project(project)
+        .forUpdate()
+        .add(allow(Permission.DELETE_COMMENT).ref("refs/heads/*").group(REGISTERED_USERS))
+        .update();
+    int changeNum = createOneChangeWithMultipleChangeMessagesInHistory();
+    requestScopeOperations.setApiUser(user.id());
+    deleteOneChangeMessage(changeNum, 0, user, "spam");
+  }
+
+  @Test
+  public void deleteCommentPermissionIsScopedToProject() throws Exception {
+    projectOperations
+        .project(project)
+        .forUpdate()
+        .add(allow(Permission.DELETE_COMMENT).ref("refs/heads/*").group(REGISTERED_USERS))
+        .update();
+
+    Project.NameKey otherProject = projectOperations.newProject().create();
+    TestRepository<InMemoryRepository> otherRepo = cloneProject(otherProject);
+    PushOneCommit.Result otherResult =
+        pushFactory.create(admin.newIdent(), otherRepo).to("refs/for/master");
+    String otherChangeId = otherResult.getChangeId();
+    String otherMessageId = gApi.changes().id(otherChangeId).messages().get(0).id;
+
+    requestScopeOperations.setApiUser(user.id());
+
+    AuthException thrown =
+        assertThrows(
+            AuthException.class,
+            () ->
+                gApi.changes()
+                    .id(otherChangeId)
+                    .message(otherMessageId)
+                    .delete(new DeleteChangeMessageInput("should not work")));
+    assertThat(thrown).hasMessageThat().isEqualTo("delete comment not permitted");
+  }
+
+  @Test
+  public void deleteCommentPermissionRespectsRefPattern() throws Exception {
+    projectOperations
+        .project(project)
+        .forUpdate()
+        .add(allow(Permission.DELETE_COMMENT).ref("refs/heads/master").group(REGISTERED_USERS))
+        .update();
+    createBranch(BranchNameKey.create(project, "stable"));
+
+    PushOneCommit.Result onMaster = createChange("refs/for/master");
+    PushOneCommit.Result onStable = createChange("refs/for/stable");
+    String masterMsgId = gApi.changes().id(onMaster.getChangeId()).messages().get(0).id;
+    String stableMsgId = gApi.changes().id(onStable.getChangeId()).messages().get(0).id;
+
+    requestScopeOperations.setApiUser(user.id());
+    DeleteChangeMessageInput input = new DeleteChangeMessageInput("spam");
+
+    ChangeMessageInfo updated =
+        gApi.changes().id(onMaster.getChangeId()).message(masterMsgId).delete(input);
+    assertThat(updated.message).contains("Change message removed by");
+
+    AuthException thrown =
+        assertThrows(
+            AuthException.class,
+            () -> gApi.changes().id(onStable.getChangeId()).message(stableMsgId).delete(input));
+    assertThat(thrown).hasMessageThat().isEqualTo("delete comment not permitted");
+  }
+
+  @Test
+  public void deleteCommentPermissionRespectsBlockRule() throws Exception {
+    projectOperations
+        .project(project)
+        .forUpdate()
+        .add(allow(Permission.DELETE_COMMENT).ref("refs/heads/*").group(REGISTERED_USERS))
+        .add(block(Permission.DELETE_COMMENT).ref("refs/heads/sensitive").group(REGISTERED_USERS))
+        .update();
+    createBranch(BranchNameKey.create(project, "sensitive"));
+
+    PushOneCommit.Result onMaster = createChange("refs/for/master");
+    PushOneCommit.Result onSensitive = createChange("refs/for/sensitive");
+    String masterMsgId = gApi.changes().id(onMaster.getChangeId()).messages().get(0).id;
+    String sensitiveMsgId = gApi.changes().id(onSensitive.getChangeId()).messages().get(0).id;
+
+    requestScopeOperations.setApiUser(user.id());
+    DeleteChangeMessageInput input = new DeleteChangeMessageInput("spam");
+
+    ChangeMessageInfo updated =
+        gApi.changes().id(onMaster.getChangeId()).message(masterMsgId).delete(input);
+    assertThat(updated.message).contains("Change message removed by");
+
+    AuthException thrown =
+        assertThrows(
+            AuthException.class,
+            () ->
+                gApi.changes().id(onSensitive.getChangeId()).message(sensitiveMsgId).delete(input));
+    assertThat(thrown).hasMessageThat().isEqualTo("delete comment not permitted");
+  }
+
+  @Test
   public void deleteCannotBeAppliedWithEmptyChangeMessageUuid() throws Exception {
     String changeId = createChange().getChangeId();
 
diff --git a/javatests/com/google/gerrit/acceptance/rest/change/ChangeReviewersIT.java b/javatests/com/google/gerrit/acceptance/rest/change/ChangeReviewersIT.java
index 2f4900d..43110b2 100644
--- a/javatests/com/google/gerrit/acceptance/rest/change/ChangeReviewersIT.java
+++ b/javatests/com/google/gerrit/acceptance/rest/change/ChangeReviewersIT.java
@@ -842,7 +842,7 @@
   }
 
   @Test
-  public void removeReviewerWithVoteOnMergedChangeForChangeOwnerFails() throws Exception {
+  public void removeReviewerWithVoteOnMergedChangeForAdministrateServerSucceeds() throws Exception {
     PushOneCommit.Result r = createChange();
 
     requestScopeOperations.setApiUser(user.id());
@@ -858,12 +858,10 @@
         .review(new ReviewInput().label(LabelId.CODE_REVIEW, 2));
     gApi.changes().id(r.getChangeId()).current().submit();
 
-    assertThat(gApi.changes().id(r.getChangeId()).get().removableReviewers).isEmpty();
-    ResourceConflictException thrown =
-        assertThrows(
-            ResourceConflictException.class,
-            () -> gApi.changes().id(r.getChangeId()).reviewer(user.email()).remove());
-    assertThat(thrown).hasMessageThat().contains("cannot remove votes from merged change");
+    gApi.changes().id(r.getChangeId()).reviewer(user.email()).remove();
+
+    ChangeInfo changeInfo = gApi.changes().id(r.getChangeId()).get(DETAILED_LABELS);
+    assertThat(changeInfo).hasExactlyVotes(vote(LabelId.CODE_REVIEW, admin.id(), 2));
   }
 
   @Test
diff --git a/javatests/com/google/gerrit/acceptance/rest/change/SuggestReviewersIT.java b/javatests/com/google/gerrit/acceptance/rest/change/SuggestReviewersIT.java
index fd3d7bd..2f1a918 100644
--- a/javatests/com/google/gerrit/acceptance/rest/change/SuggestReviewersIT.java
+++ b/javatests/com/google/gerrit/acceptance/rest/change/SuggestReviewersIT.java
@@ -29,15 +29,20 @@
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Iterables;
 import com.google.gerrit.acceptance.AbstractDaemonTest;
+import com.google.gerrit.acceptance.ExtensionRegistry;
+import com.google.gerrit.acceptance.ExtensionRegistry.Registration;
 import com.google.gerrit.acceptance.TestAccount;
 import com.google.gerrit.acceptance.config.GerritConfig;
 import com.google.gerrit.acceptance.testsuite.account.AccountOperations;
 import com.google.gerrit.acceptance.testsuite.group.GroupOperations;
 import com.google.gerrit.acceptance.testsuite.project.ProjectOperations;
 import com.google.gerrit.acceptance.testsuite.request.RequestScopeOperations;
+import com.google.gerrit.common.Nullable;
 import com.google.gerrit.common.data.GlobalCapability;
 import com.google.gerrit.entities.Account;
 import com.google.gerrit.entities.AccountGroup;
+import com.google.gerrit.entities.GroupDescription;
+import com.google.gerrit.entities.GroupReference;
 import com.google.gerrit.entities.Permission;
 import com.google.gerrit.entities.Project;
 import com.google.gerrit.entities.RefNames;
@@ -48,10 +53,17 @@
 import com.google.gerrit.extensions.common.SuggestedReviewerInfo;
 import com.google.gerrit.extensions.restapi.BadRequestException;
 import com.google.gerrit.extensions.restapi.RestApiException;
+import com.google.gerrit.server.CurrentUser;
+import com.google.gerrit.server.account.GroupBackend;
+import com.google.gerrit.server.account.GroupMembership;
+import com.google.gerrit.server.account.ListGroupMembership;
+import com.google.gerrit.server.project.ProjectState;
 import com.google.gerrit.testing.ConfigSuite;
 import com.google.inject.Inject;
 import java.util.List;
 import java.util.Locale;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicInteger;
 import java.util.stream.IntStream;
 import org.eclipse.jgit.lib.Config;
 import org.junit.Before;
@@ -71,6 +83,7 @@
   }
 
   @Inject private AccountOperations accountOperations;
+  @Inject private ExtensionRegistry extensionRegistry;
   @Inject private GroupOperations groupOperations;
   @Inject private ProjectOperations projectOperations;
   @Inject private RequestScopeOperations requestScopeOperations;
@@ -262,6 +275,95 @@
   }
 
   @Test
+  @GerritConfig(name = "accounts.visibility", value = "VISIBLE_GROUP")
+  public void suggestReviewersVisibleGroupVisibility() throws Exception {
+    String changeId = createChange().getChangeId();
+    List<SuggestedReviewerInfo> reviewers;
+
+    // user1 is in group1 and group3 (neither contains user2, and groups are not visibleToAll).
+    requestScopeOperations.setApiUser(user1.id());
+    reviewers = suggestReviewers(changeId, user2.fullName(), 2);
+    assertThat(reviewers).isEmpty();
+
+    // user3 is in group2, so group2 is visible to user3 (even on FanOutExecutor worker threads)
+    // and user3 can see user2 via VISIBLE_GROUP.
+    requestScopeOperations.setApiUser(user3.id());
+    reviewers = suggestReviewers(changeId, user2.username(), 2);
+    assertThat(reviewers).hasSize(1);
+    assertThat(Iterables.getOnlyElement(reviewers).account.name).isEqualTo(user2.fullName());
+  }
+
+  @Test
+  @GerritConfig(name = "accounts.visibility", value = "VISIBLE_GROUP")
+  public void suggestReviewersVisibleGroupShortCircuitsExternalGroupBackends() throws Exception {
+    String changeId = createChange().getChangeId();
+    AccountGroup.UUID externalSubgroup = AccountGroup.uuid("counting-ext:sub");
+    groupOperations.group(group3).forUpdate().addSubgroup(externalSubgroup).update();
+
+    AtomicInteger externalGetKnownGroupsCalls = new AtomicInteger();
+    AtomicInteger externalIntersectionCalls = new AtomicInteger();
+
+    GroupBackend countingExternalBackend =
+        new GroupBackend() {
+          @Override
+          public boolean handles(AccountGroup.UUID uuid) {
+            return uuid.get().startsWith("counting-ext:");
+          }
+
+          @Nullable
+          @Override
+          public GroupDescription.Basic get(AccountGroup.UUID uuid) {
+            return null;
+          }
+
+          @Override
+          public ImmutableList<GroupReference> suggest(
+              String name, @Nullable ProjectState project) {
+            return ImmutableList.of();
+          }
+
+          @Override
+          public GroupMembership membershipsOf(CurrentUser user) {
+            return new ListGroupMembership(ImmutableSet.of()) {
+              @Override
+              public Set<AccountGroup.UUID> getKnownGroups() {
+                externalGetKnownGroupsCalls.incrementAndGet();
+                return super.getKnownGroups();
+              }
+
+              @Override
+              public Set<AccountGroup.UUID> intersection(Iterable<AccountGroup.UUID> groupIds) {
+                externalIntersectionCalls.incrementAndGet();
+                return super.intersection(groupIds);
+              }
+            };
+          }
+
+          @Override
+          public boolean isVisibleToAll(AccountGroup.UUID uuid) {
+            return false;
+          }
+        };
+
+    try (Registration ignored = extensionRegistry.newRegistration().add(countingExternalBackend)) {
+      // user3 shares visible internal groups (group1, group2) with user1, user2, and user3.
+      // Visibility checks should short-circuit on direct internal groups without querying the
+      // external group backend's getKnownGroups() or intersection().
+      requestScopeOperations.setApiUser(user3.id());
+      List<SuggestedReviewerInfo> reviewers =
+          gApi.changes()
+              .id(changeId)
+              .suggestReviewers(name("user"))
+              .excludeGroups(true)
+              .withLimit(6)
+              .get();
+      assertReviewers(reviewers, ImmutableList.of(user1, user2, user3), ImmutableList.of());
+      assertThat(externalGetKnownGroupsCalls.get()).isEqualTo(0);
+      assertThat(externalIntersectionCalls.get()).isEqualTo(0);
+    }
+  }
+
+  @Test
   public void suggestReviewersPrivateProjectVisibility() throws Exception {
     String changeId = createChange().getChangeId();
     List<SuggestedReviewerInfo> reviewers;
diff --git a/javatests/com/google/gerrit/acceptance/rest/config/GetTaskIT.java b/javatests/com/google/gerrit/acceptance/rest/config/GetTaskIT.java
index 9ed6d15..a900802 100644
--- a/javatests/com/google/gerrit/acceptance/rest/config/GetTaskIT.java
+++ b/javatests/com/google/gerrit/acceptance/rest/config/GetTaskIT.java
@@ -19,7 +19,7 @@
 import com.google.gerrit.acceptance.AbstractDaemonTest;
 import com.google.gerrit.acceptance.RestResponse;
 import com.google.gerrit.common.Nullable;
-import com.google.gerrit.server.restapi.config.ListTasks.TaskInfo;
+import com.google.gerrit.server.git.TaskInfo;
 import com.google.gson.reflect.TypeToken;
 import java.util.List;
 import org.junit.Test;
diff --git a/javatests/com/google/gerrit/acceptance/rest/config/IndexSnapshotsIT.java b/javatests/com/google/gerrit/acceptance/rest/config/IndexSnapshotsIT.java
index 59a941d..95de918 100644
--- a/javatests/com/google/gerrit/acceptance/rest/config/IndexSnapshotsIT.java
+++ b/javatests/com/google/gerrit/acceptance/rest/config/IndexSnapshotsIT.java
@@ -131,7 +131,7 @@
   private File verifySnapshot(Response<?> rsp) {
     assertThat(rsp.value()).isInstanceOf(SnapshotInfo.class);
     SnapshotInfo snapshotInfo = (SnapshotInfo) rsp.value();
-    Path snapshotDir = sitePaths.resolve("index").resolve("snapshots").resolve(snapshotInfo.id);
+    Path snapshotDir = sitePaths.index_dir.resolve("snapshots").resolve(snapshotInfo.id);
     File snapshot = snapshotDir.toFile();
     assertThat(snapshot.exists()).isTrue();
     assertThat(snapshot.isDirectory()).isTrue();
diff --git a/javatests/com/google/gerrit/acceptance/rest/config/KillTaskIT.java b/javatests/com/google/gerrit/acceptance/rest/config/KillTaskIT.java
index ab3689b..e23e8d0 100644
--- a/javatests/com/google/gerrit/acceptance/rest/config/KillTaskIT.java
+++ b/javatests/com/google/gerrit/acceptance/rest/config/KillTaskIT.java
@@ -19,7 +19,7 @@
 
 import com.google.gerrit.acceptance.AbstractDaemonTest;
 import com.google.gerrit.acceptance.RestResponse;
-import com.google.gerrit.server.restapi.config.ListTasks.TaskInfo;
+import com.google.gerrit.server.git.TaskInfo;
 import com.google.gson.reflect.TypeToken;
 import java.util.List;
 import java.util.Optional;
diff --git a/javatests/com/google/gerrit/acceptance/rest/config/ListTasksIT.java b/javatests/com/google/gerrit/acceptance/rest/config/ListTasksIT.java
index cad0875..709d2b9 100644
--- a/javatests/com/google/gerrit/acceptance/rest/config/ListTasksIT.java
+++ b/javatests/com/google/gerrit/acceptance/rest/config/ListTasksIT.java
@@ -18,7 +18,7 @@
 
 import com.google.gerrit.acceptance.AbstractDaemonTest;
 import com.google.gerrit.acceptance.RestResponse;
-import com.google.gerrit.server.restapi.config.ListTasks.TaskInfo;
+import com.google.gerrit.server.git.TaskInfo;
 import com.google.gson.reflect.TypeToken;
 import java.util.List;
 import org.junit.Test;
diff --git a/javatests/com/google/gerrit/acceptance/rest/config/ServerInfoIT.java b/javatests/com/google/gerrit/acceptance/rest/config/ServerInfoIT.java
index d3f7123..fa78e7d 100644
--- a/javatests/com/google/gerrit/acceptance/rest/config/ServerInfoIT.java
+++ b/javatests/com/google/gerrit/acceptance/rest/config/ServerInfoIT.java
@@ -55,6 +55,7 @@
   // accounts
   @GerritConfig(name = "accounts.visibility", value = "VISIBLE_GROUP")
   @GerritConfig(name = "accounts.defaultDisplayName", value = "FIRST_NAME")
+  @GerritConfig(name = "accounts.enableDelete", value = "false")
 
   // auth
   @GerritConfig(name = "auth.type", value = "HTTP")
@@ -95,6 +96,7 @@
     // accounts
     assertThat(i.accounts.visibility).isEqualTo(AccountVisibility.VISIBLE_GROUP);
     assertThat(i.accounts.defaultDisplayName).isEqualTo(AccountDefaultDisplayName.FIRST_NAME);
+    assertThat(i.accounts.enableDelete).isFalse();
 
     // auth
     assertThat(i.auth.authType).isEqualTo(AuthType.HTTP);
@@ -158,6 +160,9 @@
   public void serverConfigWithDefaults() throws Exception {
     ServerInfo i = gApi.config().server().getInfo();
 
+    // accounts
+    assertThat(i.accounts.enableDelete).isTrue();
+
     // auth
     assertThat(i.auth.authType).isEqualTo(AuthType.OPENID);
     assertThat(i.auth.editableAccountFields)
diff --git a/javatests/com/google/gerrit/acceptance/rest/project/DiffCommitsIT.java b/javatests/com/google/gerrit/acceptance/rest/project/DiffCommitsIT.java
index 3461682..5ae7228 100644
--- a/javatests/com/google/gerrit/acceptance/rest/project/DiffCommitsIT.java
+++ b/javatests/com/google/gerrit/acceptance/rest/project/DiffCommitsIT.java
@@ -15,6 +15,7 @@
 package com.google.gerrit.acceptance.rest.project;
 
 import static com.google.common.truth.Truth.assertThat;
+import static com.google.gerrit.acceptance.GitUtil.pushHead;
 import static com.google.gerrit.acceptance.testsuite.project.TestProjectUpdate.block;
 import static com.google.gerrit.server.group.SystemGroupBackend.REGISTERED_USERS;
 import static com.google.gerrit.testing.GerritJUnit.assertThrows;
@@ -22,6 +23,7 @@
 import com.google.common.collect.ImmutableMap;
 import com.google.gerrit.acceptance.AbstractDaemonTest;
 import com.google.gerrit.acceptance.PushOneCommit;
+import com.google.gerrit.acceptance.RestResponse;
 import com.google.gerrit.acceptance.testsuite.project.ProjectOperations;
 import com.google.gerrit.acceptance.testsuite.request.RequestScopeOperations;
 import com.google.gerrit.entities.BranchNameKey;
@@ -31,11 +33,13 @@
 import com.google.gerrit.extensions.common.FileInfo;
 import com.google.gerrit.extensions.restapi.BadRequestException;
 import com.google.gerrit.extensions.restapi.ResourceNotFoundException;
+import com.google.gerrit.extensions.restapi.Url;
 import com.google.gerrit.server.restapi.project.GetDiffFile;
 import com.google.gerrit.server.restapi.project.ListDiffFiles;
 import com.google.inject.Inject;
 import java.util.Map;
 import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.revwalk.RevCommit;
 import org.junit.Before;
 import org.junit.Test;
 
@@ -281,6 +285,34 @@
   }
 
   @Test
+  public void getDiffFile_nonExistentFileReturnsNotFound() throws Exception {
+    PushOneCommit.Result result = createChange();
+
+    assertThrows(
+        ResourceNotFoundException.class,
+        () ->
+            gApi.projects()
+                .name(project.get())
+                .diffFile(
+                    initialCommit.name(), result.getCommit().name(), "a_non-existent_file.txt"));
+  }
+
+  @Test
+  public void getDiffFile_nonExistentFileReturnsNotFoundViaRest() throws Exception {
+    PushOneCommit.Result result = createChange();
+
+    userRestSession
+        .get(
+            String.format(
+                "/projects/%s/commits/%s/files/%s/diff?base=%s",
+                Url.encode(project.get()),
+                result.getCommit().name(),
+                Url.encode("a_non-existent_file.txt"),
+                initialCommit.name()))
+        .assertNotFound();
+  }
+
+  @Test
   public void getDiffFile_missingOldParam() throws Exception {
     PushOneCommit.Result result =
         pushFactory
@@ -593,4 +625,108 @@
     // Verify the content is present (not filtered out)
     assertThat(diffInfo.content).isNotEmpty();
   }
+
+  @Test
+  public void getDiffFile_deletedFile() throws Exception {
+    // 1. Add a file in commit1
+    PushOneCommit.Result result1 =
+        pushFactory
+            .create(
+                admin.newIdent(),
+                testRepo,
+                "Add file",
+                "dir/file-to-delete.txt",
+                "line 1\nline 2\n")
+            .to("refs/heads/master");
+    result1.assertOkStatus();
+    ObjectId commitWithFile = result1.getCommit();
+
+    // 2. Delete the file in commit2, and add commit3 on top (simulating a stack where an
+    // earlier change deleted a file that does not exist in the target commit's tree)
+    RevCommit commitDeletingFile =
+        commitBuilder().rm("dir/file-to-delete.txt").message("Delete file").create();
+    RevCommit childCommit =
+        commitBuilder().add("other.txt", "other content").message("Child commit").create();
+    pushHead(testRepo, "refs/heads/master", false);
+
+    // Verify via Java API against both the deleting commit and the descendant commit
+    DiffInfo diffAtDelete =
+        gApi.projects()
+            .name(project.get())
+            .diffFile(commitWithFile.name(), commitDeletingFile.name(), "dir/file-to-delete.txt");
+    assertThat(diffAtDelete.changeType).isEqualTo(ChangeType.DELETED);
+    assertThat(diffAtDelete.metaA).isNotNull();
+    assertThat(diffAtDelete.metaA.name).isEqualTo("dir/file-to-delete.txt");
+    assertThat(diffAtDelete.metaB).isNull();
+
+    DiffInfo diffAtChild =
+        gApi.projects()
+            .name(project.get())
+            .diffFile(commitWithFile.name(), childCommit.name(), "dir/file-to-delete.txt");
+    assertThat(diffAtChild.changeType).isEqualTo(ChangeType.DELETED);
+    assertThat(diffAtChild.metaA).isNotNull();
+    assertThat(diffAtChild.metaA.name).isEqualTo("dir/file-to-delete.txt");
+    assertThat(diffAtChild.metaB).isNull();
+
+    // Verify via HTTP REST endpoint (exercises FilesInCommitCollection.parse)
+    RestResponse response =
+        userRestSession.get(
+            String.format(
+                "/projects/%s/commits/%s/files/%s/diff?base=%s",
+                Url.encode(project.get()),
+                childCommit.name(),
+                Url.encode("dir/file-to-delete.txt"),
+                commitWithFile.name()));
+    response.assertOK();
+    DiffInfo restDiff = newGson().fromJson(response.getReader(), DiffInfo.class);
+    assertThat(restDiff.changeType).isEqualTo(ChangeType.DELETED);
+    assertThat(restDiff.metaA.name).isEqualTo("dir/file-to-delete.txt");
+
+    // Requesting content at a commit where the file was deleted still returns 404
+    userRestSession
+        .get(
+            String.format(
+                "/projects/%s/commits/%s/files/%s/content",
+                Url.encode(project.get()),
+                childCommit.name(),
+                Url.encode("dir/file-to-delete.txt")))
+        .assertNotFound();
+  }
+
+  @Test
+  public void listDiffFiles_unrelatedHiddenCommitReturnsNotFound() throws Exception {
+    createBranch(BranchNameKey.create(project, "secret"));
+    projectOperations
+        .project(project)
+        .forUpdate()
+        .add(block(Permission.READ).ref("refs/heads/secret").group(REGISTERED_USERS))
+        .update();
+
+    testRepo.reset(initialCommit);
+    PushOneCommit.Result secretCommit =
+        pushFactory
+            .create(admin.newIdent(), testRepo, "Secret commit", "secret.txt", "secret")
+            .to("refs/heads/secret");
+    secretCommit.assertOkStatus();
+
+    testRepo.reset(initialCommit);
+    PushOneCommit.Result publicCommit =
+        pushFactory
+            .create(admin.newIdent(), testRepo, "Public commit", "public.txt", "public")
+            .to("refs/heads/master");
+    publicCommit.assertOkStatus();
+
+    // Unrelated hidden commit should return 404 (not 400) so callers cannot probe ancestry
+    requestScopeOperations.setApiUser(user.id());
+
+    ResourceNotFoundException thrown =
+        assertThrows(
+            ResourceNotFoundException.class,
+            () ->
+                gApi.projects()
+                    .name(project.get())
+                    .diffFiles(
+                        secretCommit.getCommit().name(), publicCommit.getCommit().name(), true));
+    assertThat(thrown).hasMessageThat().contains("not visible");
+  }
 }
diff --git a/javatests/com/google/gerrit/acceptance/rest/project/TagsIT.java b/javatests/com/google/gerrit/acceptance/rest/project/TagsIT.java
index ecdb44f..1ce35af 100644
--- a/javatests/com/google/gerrit/acceptance/rest/project/TagsIT.java
+++ b/javatests/com/google/gerrit/acceptance/rest/project/TagsIT.java
@@ -228,6 +228,43 @@
             .withSortBy(ListTagSortOption.CREATION_TIME)
             .get();
     assertTagList(FluentIterable.from(ImmutableList.of("tag-A", "tag-B")), result);
+
+    // With filter, start and limit
+    result = getTags().withRegex("^tag-[B-F]$").withStart(1).withLimit(2).get();
+    assertTagList(FluentIterable.from(ImmutableList.of("tag-C", "tag-D")), result);
+
+    // With descending order and start
+    result = getTags().withDescendingOrder(true).withStart(1).withLimit(2).get();
+    assertTagList(FluentIterable.from(ImmutableList.of("tag-G", "tag-F")), result);
+
+    // With filter, descending order, start and limit
+    result =
+        getTags()
+            .withRegex("^tag-[B-F]$")
+            .withDescendingOrder(true)
+            .withStart(1)
+            .withLimit(2)
+            .get();
+    assertTagList(FluentIterable.from(ImmutableList.of("tag-E", "tag-D")), result);
+
+    // With sortBy creation time, filter, start and limit
+    result =
+        getTags()
+            .withSortBy(ListTagSortOption.CREATION_TIME)
+            .withSubstring("ag-")
+            .withStart(1)
+            .withLimit(2)
+            .get();
+    assertTagList(FluentIterable.from(ImmutableList.of("tag-G", "tag-F")), result);
+    result =
+        getTags()
+            .withSortBy(ListTagSortOption.CREATION_TIME)
+            .withRegex("^tag-[B-F]$")
+            .withDescendingOrder(true)
+            .withStart(1)
+            .withLimit(2)
+            .get();
+    assertTagList(FluentIterable.from(ImmutableList.of("tag-C", "tag-D")), result);
   }
 
   @Test
@@ -282,6 +319,21 @@
     assertThat(tags).hasSize(1);
     assertThat(tags.get(0).ref).isEqualTo(R_TAGS + tag1.ref);
     assertThat(tags.get(0).revision).isEqualTo(tag1.revision);
+
+    // 'start' and 'limit' must be applied after the non-visible tags have been filtered out.
+    requestScopeOperations.setApiUser(admin.id());
+    TagInput tag3 = new TagInput();
+    tag3.ref = "v3.0";
+    tag3.revision = r1.getCommit().getName();
+    tag(tag3.ref).create(tag3);
+    requestScopeOperations.setApiUser(user.id());
+
+    tags = getTags().withStart(1).withLimit(1).get();
+    assertThat(tags).hasSize(1);
+    assertThat(tags.get(0).ref).isEqualTo(R_TAGS + tag3.ref);
+    tags = getTags().withDescendingOrder(true).withStart(1).withLimit(1).get();
+    assertThat(tags).hasSize(1);
+    assertThat(tags.get(0).ref).isEqualTo(R_TAGS + tag1.ref);
   }
 
   @Test
diff --git a/javatests/com/google/gerrit/acceptance/server/change/CommentsIT.java b/javatests/com/google/gerrit/acceptance/server/change/CommentsIT.java
index 1394c41..be65cb0 100644
--- a/javatests/com/google/gerrit/acceptance/server/change/CommentsIT.java
+++ b/javatests/com/google/gerrit/acceptance/server/change/CommentsIT.java
@@ -19,8 +19,10 @@
 import static com.google.common.truth.Truth.assertThat;
 import static com.google.gerrit.acceptance.PushOneCommit.FILE_NAME;
 import static com.google.gerrit.acceptance.PushOneCommit.SUBJECT;
+import static com.google.gerrit.acceptance.testsuite.project.TestProjectUpdate.allow;
 import static com.google.gerrit.entities.Patch.COMMIT_MSG;
 import static com.google.gerrit.entities.Patch.PATCHSET_LEVEL;
+import static com.google.gerrit.server.group.SystemGroupBackend.REGISTERED_USERS;
 import static com.google.gerrit.testing.GerritJUnit.assertThrows;
 import static com.google.gerrit.truth.MapSubject.assertThatMap;
 import static java.util.stream.Collectors.toList;
@@ -45,6 +47,8 @@
 import com.google.gerrit.entities.HumanComment;
 import com.google.gerrit.entities.Patch;
 import com.google.gerrit.entities.PatchSet;
+import com.google.gerrit.entities.Permission;
+import com.google.gerrit.entities.Project;
 import com.google.gerrit.entities.RefNames;
 import com.google.gerrit.extensions.api.changes.DeleteCommentInput;
 import com.google.gerrit.extensions.api.changes.DraftInput;
@@ -83,6 +87,8 @@
 import java.util.function.Function;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+import org.eclipse.jgit.internal.storage.dfs.InMemoryRepository;
+import org.eclipse.jgit.junit.TestRepository;
 import org.eclipse.jgit.lib.ObjectReader;
 import org.eclipse.jgit.lib.Ref;
 import org.eclipse.jgit.lib.Repository;
@@ -2237,6 +2243,58 @@
   }
 
   @Test
+  public void deleteCommentCanBeAppliedByUserWithDeleteComment() throws Exception {
+    PushOneCommit.Result result = createChange();
+    CommentInput targetComment = CommentsUtil.addComment(gApi, result.getChangeId());
+    Map<String, List<CommentInfo>> commentsMap =
+        getPublishedComments(result.getChangeId(), result.getCommit().name());
+    String uuid = commentsMap.get(targetComment.path).get(0).id;
+
+    projectOperations
+        .project(project)
+        .forUpdate()
+        .add(allow(Permission.DELETE_COMMENT).ref("refs/heads/*").group(REGISTERED_USERS))
+        .update();
+
+    requestScopeOperations.setApiUser(user.id());
+
+    DeleteCommentInput input = new DeleteCommentInput("contains confidential information");
+    CommentInfo updated =
+        gApi.changes().id(result.getChangeId()).current().comment(uuid).delete(input);
+    assertThat(updated.message).contains("Comment removed by:");
+    assertThat(updated.message).contains("Reason: " + input.reason);
+  }
+
+  @Test
+  public void deleteCommentPermissionOnProjectADoesNotApplyToProjectB() throws Exception {
+    projectOperations
+        .project(project)
+        .forUpdate()
+        .add(allow(Permission.DELETE_COMMENT).ref("refs/heads/*").group(REGISTERED_USERS))
+        .update();
+
+    Project.NameKey otherProject = projectOperations.newProject().create();
+    TestRepository<InMemoryRepository> otherRepo = cloneProject(otherProject);
+    PushOneCommit.Result otherResult =
+        pushFactory.create(admin.newIdent(), otherRepo).to("refs/for/master");
+    CommentInput targetComment = CommentsUtil.addComment(gApi, otherResult.getChangeId());
+
+    Map<String, List<CommentInfo>> commentsMap =
+        getPublishedComments(otherResult.getChangeId(), otherResult.getCommit().name());
+    String uuid = commentsMap.get(targetComment.path).get(0).id;
+
+    requestScopeOperations.setApiUser(user.id());
+
+    DeleteCommentInput input = new DeleteCommentInput("should not work");
+    AuthException thrown =
+        assertThrows(
+            AuthException.class,
+            () ->
+                gApi.changes().id(otherResult.getChangeId()).current().comment(uuid).delete(input));
+    assertThat(thrown).hasMessageThat().isEqualTo("delete comment not permitted");
+  }
+
+  @Test
   public void deleteCommentByRewritingCommitHistory() throws Exception {
     // Creates the following commit history on the meta branch of the test change. Then tries to
     // delete the comments one by one, which will rewrite most of the commits on the 'meta' branch.
diff --git a/javatests/com/google/gerrit/acceptance/server/httpd/BUILD b/javatests/com/google/gerrit/acceptance/server/httpd/BUILD
index d1a64c0..f05651d 100644
--- a/javatests/com/google/gerrit/acceptance/server/httpd/BUILD
+++ b/javatests/com/google/gerrit/acceptance/server/httpd/BUILD
@@ -1,7 +1,17 @@
+load("@rules_java//java:defs.bzl", "java_library")
 load("//javatests/com/google/gerrit/acceptance:tests.bzl", "acceptance_tests")
 
+java_library(
+    name = "http_test_util",
+    srcs = ["HttpTestUtil.java"],
+    deps = [
+        "//lib:servlet-api",
+    ],
+)
+
 acceptance_tests(
     srcs = glob(["*IT.java"]),
     group = "server_httpd",
     labels = ["server"],
+    deps = [":http_test_util"],
 )
diff --git a/javatests/com/google/gerrit/acceptance/server/httpd/HttpLogoutServletIT.java b/javatests/com/google/gerrit/acceptance/server/httpd/HttpLogoutServletIT.java
index 1dea800..62dac8f 100644
--- a/javatests/com/google/gerrit/acceptance/server/httpd/HttpLogoutServletIT.java
+++ b/javatests/com/google/gerrit/acceptance/server/httpd/HttpLogoutServletIT.java
@@ -22,7 +22,6 @@
 import com.google.inject.Inject;
 import java.io.IOException;
 import java.net.InetAddress;
-import java.net.ServerSocket;
 import java.net.URISyntaxException;
 import java.util.Arrays;
 import java.util.List;
@@ -47,7 +46,11 @@
     Config cfg = new Config();
     cfg.setString("auth", null, "logouturl", "/test-logout");
     cfg.setString("gerrit", null, "canonicalWebUrl", "https://" + LOCALHOST + ":8443/");
-    cfg.setString("httpd", null, "listenUrl", "proxy-https://" + LOCALHOST + ":" + getFreePort());
+    cfg.setString(
+        "httpd",
+        null,
+        "listenUrl",
+        "proxy-https://" + LOCALHOST + ":" + HttpTestUtil.getFreePort());
     return cfg;
   }
 
@@ -103,10 +106,4 @@
       return Optional.empty();
     }
   }
-
-  private static int getFreePort() throws IOException {
-    try (ServerSocket s = new ServerSocket(0)) {
-      return s.getLocalPort();
-    }
-  }
 }
diff --git a/javatests/com/google/gerrit/acceptance/server/httpd/HttpTestUtil.java b/javatests/com/google/gerrit/acceptance/server/httpd/HttpTestUtil.java
new file mode 100644
index 0000000..9200c37
--- /dev/null
+++ b/javatests/com/google/gerrit/acceptance/server/httpd/HttpTestUtil.java
@@ -0,0 +1,47 @@
+// Copyright (C) 2026 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.google.gerrit.acceptance.server.httpd;
+
+import java.io.IOException;
+import java.net.ServerSocket;
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+public final class HttpTestUtil {
+  static final String REMOTE_ADDRESS_HEADER = "X-Test-Remote-Address";
+
+  private HttpTestUtil() {}
+
+  static int getFreePort() throws IOException {
+    try (ServerSocket s = new ServerSocket(0)) {
+      return s.getLocalPort();
+    }
+  }
+
+  public static final class RemoteAddressFilter implements Filter {
+    @Override
+    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
+        throws IOException, ServletException {
+      HttpServletResponse httpResponse = (HttpServletResponse) response;
+      httpResponse.setHeader(REMOTE_ADDRESS_HEADER, ((HttpServletRequest) request).getRemoteAddr());
+      chain.doFilter(request, response);
+    }
+  }
+}
diff --git a/javatests/com/google/gerrit/acceptance/server/httpd/JettyProxyProtocolIT.java b/javatests/com/google/gerrit/acceptance/server/httpd/JettyProxyProtocolIT.java
new file mode 100644
index 0000000..93aaba0
--- /dev/null
+++ b/javatests/com/google/gerrit/acceptance/server/httpd/JettyProxyProtocolIT.java
@@ -0,0 +1,302 @@
+// Copyright (C) 2026 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.google.gerrit.acceptance.server.httpd;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import com.google.gerrit.acceptance.GerritServer.TestHttpServerAddress;
+import com.google.gerrit.acceptance.StandaloneSiteTest;
+import com.google.gerrit.testing.ConfigSuite;
+import com.google.inject.Inject;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.net.Socket;
+import java.nio.ByteBuffer;
+import java.nio.charset.StandardCharsets;
+import java.util.List;
+import org.eclipse.jgit.errors.ConfigInvalidException;
+import org.eclipse.jgit.lib.Config;
+import org.eclipse.jgit.storage.file.FileBasedConfig;
+import org.eclipse.jgit.util.FS;
+import org.junit.Assume;
+import org.junit.Test;
+
+public class JettyProxyProtocolIT extends StandaloneSiteTest {
+  private static final String SERVER_ADDRESS = "127.0.0.1";
+
+  // Carried in the PROXY header, never bound as a socket address. Kept distinct from the
+  // connecting peer (127.0.0.1) so the trusted tests prove trust is based on the real peer, not
+  // this header value.
+  private static final String PROXY_SOURCE_ADDRESS = "198.51.100.1";
+  private static final String FORWARDED_CLIENT_ADDRESS = "192.0.2.1";
+
+  // Trust is config-driven, not bound to source addresses. macOS assigns only 127.0.0.1 to lo0 by
+  // default, so binding any other 127.x fails with EADDRNOTAVAIL even though the range routes to
+  // lo0 (see bind(2)). Linux lets a socket bind to any 127.0.0.0/8 address.
+  private static final String TRUSTED_PROXY_NETWORK = SERVER_ADDRESS + "/32";
+  // A different network that excludes the connecting peer (SERVER_ADDRESS).
+  private static final String ANOTHER_PROXY_NETWORK = "127.0.0.2/32";
+  private static final int PROXY_SOURCE_PORT = 12345; // In the PROXY header, not asserted.
+  private static final byte[] PROXY_PROTOCOL_V2_SIGNATURE = {
+    0x0d, 0x0a, 0x0d, 0x0a, 0x00, 0x0d, 0x0a, 0x51, 0x55, 0x49, 0x54, 0x0a
+  };
+  private static final String PROXY_PROTOCOL_HEADER_PREFIX =
+      "PROXY TCP4 " + PROXY_SOURCE_ADDRESS + " " + SERVER_ADDRESS + " " + PROXY_SOURCE_PORT + " ";
+
+  @ConfigSuite.Default
+  public static Config config() throws IOException {
+    return config(true);
+  }
+
+  @ConfigSuite.Config
+  public static Config proxyProtocolDisabledConfig() throws IOException {
+    return config(false);
+  }
+
+  private static Config config(boolean enableProxyProtocol) throws IOException {
+    Config cfg = new Config();
+    cfg.setString("auth", null, "type", "HTTP");
+    cfg.setString("auth", null, "httpHeader", "X-Remote-User");
+    // Must stay non-empty, or every peer is trusted. The untrusted tests replace it via
+    // untrustConnectingPeer() with a network that excludes the connecting peer.
+    cfg.setStringList("auth", null, "httpTrustedProxyNetworks", List.of(TRUSTED_PROXY_NETWORK));
+    cfg.setBoolean("auth", null, "trustContainerAuth", true);
+    int serverPort = HttpTestUtil.getFreePort();
+    cfg.setString("httpd", null, "listenUrl", "proxy-http://" + SERVER_ADDRESS + ":" + serverPort);
+    cfg.setBoolean("httpd", null, "enableProxyProtocol", enableProxyProtocol);
+    cfg.setStringList(
+        "httpd", null, "filterClass", List.of(HttpTestUtil.RemoteAddressFilter.class.getName()));
+    return cfg;
+  }
+
+  @Inject @TestHttpServerAddress private InetSocketAddress httpAddress;
+
+  private enum ProxyProtocolFormat {
+    V1_PROXY,
+    V2_PROXY,
+    V2_LOCAL
+  }
+
+  private static final List<ProxyProtocolFormat> PROXY_FORMATS =
+      List.of(ProxyProtocolFormat.V1_PROXY, ProxyProtocolFormat.V2_PROXY);
+
+  @Test
+  public void trustedProxyAllowsHttpHeaderAuthenticationWithProxyProtocol() throws Exception {
+    Assume.assumeTrue(proxyProtocolEnabled());
+
+    try (ServerContext ctx = startServer()) {
+      ctx.getInjector().injectMembers(this);
+      int serverPort = httpAddress.getPort();
+      String request = getRequest();
+      for (ProxyProtocolFormat format : PROXY_FORMATS) {
+        byte[] proxyRequest = createProxyRequest(format, serverPort, request);
+
+        HttpResponse proxyResponse = sendRequest(serverPort, proxyRequest);
+        assertThat(proxyResponse.statusCode()).isEqualTo(200);
+        assertThat(proxyResponse.body()).contains(admin.username());
+        assertThat(proxyResponse.headers())
+            .contains(HttpTestUtil.REMOTE_ADDRESS_HEADER + ": " + PROXY_SOURCE_ADDRESS);
+      }
+    }
+  }
+
+  @Test
+  public void directHttpFromUntrustedPeerCannotUseHttpHeaderAuthentication() throws Exception {
+    Assume.assumeTrue(proxyProtocolEnabled());
+
+    untrustConnectingPeer();
+    try (ServerContext ctx = startServer()) {
+      ctx.getInjector().injectMembers(this);
+      int serverPort = httpAddress.getPort();
+      String request = getRequest();
+
+      HttpResponse response = sendRequest(serverPort, request);
+      assertThat(response.statusCode()).isEqualTo(403);
+    }
+  }
+
+  @Test
+  public void untrustedProxyCannotUseProxyProtocolForHttpHeaderAuthentication() throws Exception {
+    Assume.assumeTrue(proxyProtocolEnabled());
+
+    untrustConnectingPeer();
+    try (ServerContext ctx = startServer()) {
+      ctx.getInjector().injectMembers(this);
+      int serverPort = httpAddress.getPort();
+      String request = getRequest();
+      for (ProxyProtocolFormat format : PROXY_FORMATS) {
+        byte[] proxyRequest = createProxyRequest(format, serverPort, request);
+
+        HttpResponse response = sendRequest(serverPort, proxyRequest);
+        assertThat(response.statusCode()).isEqualTo(403);
+      }
+    }
+  }
+
+  @Test
+  public void xForwardedForTakesPrecedenceOverProxyProtocolAddress() throws Exception {
+    Assume.assumeTrue(proxyProtocolEnabled());
+
+    try (ServerContext ctx = startServer()) {
+      ctx.getInjector().injectMembers(this);
+      int serverPort = httpAddress.getPort();
+      String request = getRequest("X-Forwarded-For: " + FORWARDED_CLIENT_ADDRESS);
+      for (ProxyProtocolFormat format : PROXY_FORMATS) {
+        byte[] proxyRequest = createProxyRequest(format, serverPort, request);
+
+        HttpResponse response = sendRequest(serverPort, proxyRequest);
+        assertThat(response.statusCode()).isEqualTo(200);
+        assertThat(response.body()).contains(admin.username());
+        assertThat(response.headers())
+            .contains(HttpTestUtil.REMOTE_ADDRESS_HEADER + ": " + FORWARDED_CLIENT_ADDRESS);
+      }
+    }
+  }
+
+  // A v2 LOCAL command describes a connection made by the proxy itself, not a relayed client.
+  // The receiver must ignore the address block and keep the actual socket peer address.
+  @Test
+  public void localCommandUsesActualPeerAddress() throws Exception {
+    Assume.assumeTrue(proxyProtocolEnabled());
+
+    try (ServerContext ctx = startServer()) {
+      ctx.getInjector().injectMembers(this);
+      int serverPort = httpAddress.getPort();
+      String request = getRequest();
+      byte[] localRequest = createProxyRequest(ProxyProtocolFormat.V2_LOCAL, serverPort, request);
+
+      HttpResponse response = sendRequest(serverPort, localRequest);
+      assertThat(response.statusCode()).isEqualTo(200);
+      assertThat(response.body()).contains(admin.username());
+      assertThat(response.headers())
+          .contains(HttpTestUtil.REMOTE_ADDRESS_HEADER + ": " + SERVER_ADDRESS);
+      assertThat(response.headers()).doesNotContain(PROXY_SOURCE_ADDRESS);
+    }
+  }
+
+  @Test
+  public void proxyProtocolHeaderIsRejectedWhenDisabled() throws Exception {
+    Assume.assumeFalse(proxyProtocolEnabled());
+
+    try (ServerContext ctx = startServer()) {
+      ctx.getInjector().injectMembers(this);
+      int serverPort = httpAddress.getPort();
+      String request = getRequest();
+      for (ProxyProtocolFormat format : PROXY_FORMATS) {
+        byte[] proxyRequest = createProxyRequest(format, serverPort, request);
+
+        HttpResponse response = sendRequest(serverPort, proxyRequest);
+        assertThat(response.statusCode()).isEqualTo(400);
+      }
+    }
+  }
+
+  // Trust a different network so the connecting peer (SERVER_ADDRESS) is untrusted.
+  private void untrustConnectingPeer() throws IOException, ConfigInvalidException {
+    FileBasedConfig cfg = new FileBasedConfig(sitePaths.gerrit_config.toFile(), FS.DETECTED);
+    cfg.load();
+    cfg.setStringList("auth", null, "httpTrustedProxyNetworks", List.of(ANOTHER_PROXY_NETWORK));
+    cfg.save();
+  }
+
+  private boolean proxyProtocolEnabled() {
+    return baseConfig.getBoolean("httpd", null, "enableProxyProtocol", false);
+  }
+
+  private String getRequest(String... extraHeaders) {
+    StringBuilder request =
+        new StringBuilder("GET /a/accounts/self HTTP/1.1\r\n")
+            .append("Host: localhost\r\n")
+            .append("X-Remote-User: ")
+            .append(admin.username())
+            .append("\r\n");
+    for (String header : extraHeaders) {
+      request.append(header).append("\r\n");
+    }
+    return request.append("Connection: close\r\n\r\n").toString();
+  }
+
+  private static HttpResponse sendRequest(int port, String request) throws IOException {
+    return sendRequest(port, request.getBytes(StandardCharsets.US_ASCII));
+  }
+
+  private static HttpResponse sendRequest(int port, byte[] request) throws IOException {
+    try (Socket socket = new Socket(SERVER_ADDRESS, port)) {
+      socket.getOutputStream().write(request);
+      socket.getOutputStream().flush();
+      return parseResponse(
+          new String(socket.getInputStream().readAllBytes(), StandardCharsets.UTF_8));
+    }
+  }
+
+  private static byte[] createProxyRequest(
+      ProxyProtocolFormat format, int targetPort, String request) throws IOException {
+    return switch (format) {
+      case V1_PROXY ->
+          (PROXY_PROTOCOL_HEADER_PREFIX + targetPort + "\r\n" + request)
+              .getBytes(StandardCharsets.US_ASCII);
+      case V2_PROXY -> concat(createProxyProtocolV2Header((byte) 0x21, targetPort), request);
+      case V2_LOCAL -> concat(createProxyProtocolV2Header((byte) 0x20, targetPort), request);
+    };
+  }
+
+  private static byte[] createProxyProtocolV2Header(byte command, int targetPort)
+      throws IOException {
+    ByteBuffer header = ByteBuffer.allocate(28);
+    header.put(PROXY_PROTOCOL_V2_SIGNATURE);
+    header.put(command); // Version 2, PROXY or LOCAL command.
+    header.put((byte) 0x11); // IPv4, stream transport.
+    header.putShort((short) 12); // IPv4 addresses and ports: 4 + 4 + 2 + 2 bytes.
+    header.put(InetAddress.getByName(PROXY_SOURCE_ADDRESS).getAddress());
+    header.put(InetAddress.getByName(SERVER_ADDRESS).getAddress());
+    header.putShort((short) PROXY_SOURCE_PORT);
+    header.putShort((short) targetPort);
+    return header.array();
+  }
+
+  private static byte[] concat(byte[] header, String request) {
+    byte[] requestBytes = request.getBytes(StandardCharsets.US_ASCII);
+    byte[] result = new byte[header.length + requestBytes.length];
+    System.arraycopy(header, 0, result, 0, header.length);
+    System.arraycopy(requestBytes, 0, result, header.length, requestBytes.length);
+    return result;
+  }
+
+  private static HttpResponse parseResponse(String response) throws IOException {
+    int headerEnd = response.indexOf("\r\n\r\n");
+    if (headerEnd < 0) {
+      throw new IOException("HTTP response did not contain a header terminator");
+    }
+    int statusLineEnd = response.indexOf("\r\n");
+    if (statusLineEnd < 0 || statusLineEnd > headerEnd) {
+      throw new IOException("HTTP response did not contain a status line");
+    }
+    String[] statusLineParts = response.substring(0, statusLineEnd).split("\\s+", 3);
+    if (statusLineParts.length < 2 || !statusLineParts[0].startsWith("HTTP/")) {
+      throw new IOException("Invalid HTTP status line: " + response.substring(0, statusLineEnd));
+    }
+    try {
+      return new HttpResponse(
+          Integer.parseInt(statusLineParts[1]),
+          response.substring(statusLineEnd + 2, headerEnd),
+          response.substring(headerEnd + 4));
+    } catch (NumberFormatException e) {
+      throw new IOException("Invalid HTTP status code: " + statusLineParts[1], e);
+    }
+  }
+
+  private record HttpResponse(int statusCode, String headers, String body) {}
+}
diff --git a/javatests/com/google/gerrit/acceptance/server/mail/MailMetadataIT.java b/javatests/com/google/gerrit/acceptance/server/mail/MailMetadataIT.java
index d7f19aa..2e65ddd 100644
--- a/javatests/com/google/gerrit/acceptance/server/mail/MailMetadataIT.java
+++ b/javatests/com/google/gerrit/acceptance/server/mail/MailMetadataIT.java
@@ -112,12 +112,10 @@
   private static void assertHeaders(Map<String, EmailHeader> have, Map<String, Object> want)
       throws Exception {
     for (Map.Entry<String, Object> entry : want.entrySet()) {
-      if (entry.getValue() instanceof String) {
-        assertThat(have)
-            .containsEntry("X-" + entry.getKey(), new StringEmailHeader((String) entry.getValue()));
-      } else if (entry.getValue() instanceof Instant) {
-        assertThat(have)
-            .containsEntry("X-" + entry.getKey(), new EmailHeader.Date((Instant) entry.getValue()));
+      if (entry.getValue() instanceof String s) {
+        assertThat(have).containsEntry("X-" + entry.getKey(), new StringEmailHeader(s));
+      } else if (entry.getValue() instanceof Instant instant) {
+        assertThat(have).containsEntry("X-" + entry.getKey(), new EmailHeader.Date(instant));
       } else {
         throw new Exception(
             "Object has unsupported type: "
@@ -132,13 +130,13 @@
     for (Map.Entry<String, Object> entry : want.entrySet()) {
       if (entry.getValue() instanceof String) {
         assertThat(body).contains(entry.getKey() + ": " + entry.getValue());
-      } else if (entry.getValue() instanceof Instant) {
+      } else if (entry.getValue() instanceof Instant instant) {
         assertThat(body)
             .contains(
                 entry.getKey()
                     + ": "
                     + MailProcessingUtil.rfcDateformatter.format(
-                        ZonedDateTime.ofInstant((Instant) entry.getValue(), ZoneId.of("UTC"))));
+                        ZonedDateTime.ofInstant(instant, ZoneId.of("UTC"))));
       } else {
         throw new Exception(
             "Object has unsupported type: "
diff --git a/javatests/com/google/gerrit/acceptance/server/notedb/NoteDbOnlyIT.java b/javatests/com/google/gerrit/acceptance/server/notedb/NoteDbOnlyIT.java
index 3cc88f9..239c2e71 100644
--- a/javatests/com/google/gerrit/acceptance/server/notedb/NoteDbOnlyIT.java
+++ b/javatests/com/google/gerrit/acceptance/server/notedb/NoteDbOnlyIT.java
@@ -307,8 +307,8 @@
   }
 
   private void ensureAtomicTransactions(Repository repo) throws Exception {
-    if (repo instanceof InMemoryRepository) {
-      ((InMemoryRepository) repo).setPerformsAtomicTransactions(true);
+    if (repo instanceof InMemoryRepository inMemoryRepository) {
+      inMemoryRepository.setPerformsAtomicTransactions(true);
     } else {
       assertWithMessage("performsAtomicTransactions on %s", repo)
           .that(repo.getRefDatabase().performsAtomicTransactions())
diff --git a/javatests/com/google/gerrit/acceptance/server/permissions/PermissionBackendIT.java b/javatests/com/google/gerrit/acceptance/server/permissions/PermissionBackendIT.java
index 2aab159..9e2c4ff 100644
--- a/javatests/com/google/gerrit/acceptance/server/permissions/PermissionBackendIT.java
+++ b/javatests/com/google/gerrit/acceptance/server/permissions/PermissionBackendIT.java
@@ -18,12 +18,14 @@
 
 import com.google.common.collect.Iterables;
 import com.google.gerrit.acceptance.AbstractDaemonTest;
+import com.google.gerrit.entities.BranchNameKey;
 import com.google.gerrit.entities.Change;
 import com.google.gerrit.server.notedb.ChangeNotes;
 import com.google.gerrit.server.permissions.ChangePermission;
 import com.google.gerrit.server.permissions.PermissionBackend;
 import com.google.gerrit.server.query.change.ChangeData;
 import com.google.inject.Inject;
+import org.eclipse.jgit.lib.ObjectId;
 import org.junit.Test;
 
 /** Asserts behavior on {@link PermissionBackend} using a fully-started Gerrit. */
@@ -58,6 +60,22 @@
   }
 
   @Test
+  public void nonPrivateChangeDataWithoutChange_canCheckReadWithoutLoadingChange()
+      throws Exception {
+
+    Change.Id nonExistentChangeId = Change.id(Integer.MAX_VALUE);
+    ChangeData changeData =
+        changeDataFactory.createNonPrivate(
+            BranchNameKey.create(project, "refs/heads/master"),
+            nonExistentChangeId,
+            ObjectId.zeroId());
+
+    boolean canSee =
+        pb.absentUser(user.id()).project(project).change(changeData).test(ChangePermission.READ);
+    assertThat(canSee).isTrue();
+  }
+
+  @Test
   public void changeNotes_canCheckReviewerState() throws Exception {
     Change.Id changeId = createChange().getChange().getId();
     gApi.changes().id(changeId.get()).setPrivate(true);
diff --git a/javatests/com/google/gerrit/acceptance/server/project/ProjectCacheIT.java b/javatests/com/google/gerrit/acceptance/server/project/ProjectCacheIT.java
index 2418172..2a73e61 100644
--- a/javatests/com/google/gerrit/acceptance/server/project/ProjectCacheIT.java
+++ b/javatests/com/google/gerrit/acceptance/server/project/ProjectCacheIT.java
@@ -29,6 +29,7 @@
 import com.google.inject.Inject;
 import com.google.inject.name.Named;
 import java.util.Optional;
+import java.util.Set;
 import org.eclipse.jgit.storage.file.FileBasedConfig;
 import org.eclipse.jgit.util.FS;
 import org.junit.Test;
@@ -157,4 +158,27 @@
     assertThat(inMemoryProjectCache.stats().missCount())
         .isEqualTo(projectCreatedNumMisses); // misses no longer increased
   }
+
+  @Test
+  public void guessRelevantGroupUUIDs_cachedAndInvalidatedOnProjectUpdate() throws Exception {
+    Set<AccountGroup.UUID> initialGroups = projectCache.guessRelevantGroupUUIDs();
+    Set<AccountGroup.UUID> secondLookup = projectCache.guessRelevantGroupUUIDs();
+    assertThat(secondLookup).isSameInstanceAs(initialGroups);
+
+    AccountGroup.UUID newExternalGroup = AccountGroup.uuid("external:new-relevant-group");
+    assertThat(initialGroups).doesNotContain(newExternalGroup);
+
+    GroupReference groupRef = GroupReference.create(newExternalGroup, "new-relevant-group");
+    try (AbstractDaemonTest.ProjectConfigUpdate u = updateProject(project)) {
+      u.getConfig()
+          .updatePluginConfig(
+              "test-plugin", cfg -> cfg.setGroupReference("relevant-group", groupRef));
+      u.save();
+    }
+    // Load updated project into inMemoryProjectCache and verify guessRelevantGroupUUIDs updates.
+    assertThat(projectCache.get(project)).isPresent();
+    Set<AccountGroup.UUID> updatedGroups = projectCache.guessRelevantGroupUUIDs();
+    assertThat(updatedGroups).contains(newExternalGroup);
+    assertThat(projectCache.guessRelevantGroupUUIDs()).isSameInstanceAs(updatedGroups);
+  }
 }
diff --git a/javatests/com/google/gerrit/acceptance/server/util/WorkQueueIT.java b/javatests/com/google/gerrit/acceptance/server/util/WorkQueueIT.java
index 92aca78..a560496 100644
--- a/javatests/com/google/gerrit/acceptance/server/util/WorkQueueIT.java
+++ b/javatests/com/google/gerrit/acceptance/server/util/WorkQueueIT.java
@@ -30,6 +30,7 @@
 import java.util.concurrent.Future;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.ScheduledFuture;
+import java.util.concurrent.ScheduledThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
 import org.junit.Test;
 
@@ -117,6 +118,29 @@
     testExecutor.shutdownNow();
   }
 
+  @Test
+  public void testCanceledOneShotTaskIsNotRescheduled() throws Exception {
+    ScheduledThreadPoolExecutor testExecutor =
+        workQueue.createQueue(POOL_CORE_SIZE, QUEUE_NAME, false);
+    WorkQueue.CancelableRunnable cancelable =
+        new WorkQueue.CancelableRunnable() {
+          @Override
+          public void run() {}
+
+          @Override
+          public void cancel() {}
+        };
+    Runnable task = (Runnable) testExecutor.schedule(cancelable, 1, TimeUnit.HOURS);
+    assertThat(((Future<?>) task).cancel(false)).isTrue();
+
+    // Simulate a pool thread that dequeued the task just before it got canceled.
+    task.run();
+
+    TimeUnit.MILLISECONDS.sleep(FIXED_RATE_SCHEDULE_INTERVAL_MILLI_SEC);
+    assertThat(testExecutor.getCompletedTaskCount()).isEqualTo(0);
+    testExecutor.shutdownNow();
+  }
+
   public void assertTasksInStateEventually(String queue, State expectedState, int expectedCount)
       throws Exception {
     assertEventually(
diff --git a/javatests/com/google/gerrit/acceptance/ssh/ConvertRefStorageIT.java b/javatests/com/google/gerrit/acceptance/ssh/ConvertRefStorageIT.java
new file mode 100644
index 0000000..1638586
--- /dev/null
+++ b/javatests/com/google/gerrit/acceptance/ssh/ConvertRefStorageIT.java
@@ -0,0 +1,48 @@
+// Copyright (C) 2026 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.google.gerrit.acceptance.ssh;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import com.google.gerrit.acceptance.AbstractDaemonTest;
+import com.google.gerrit.acceptance.NoHttpd;
+import com.google.gerrit.acceptance.UseLocalDisk;
+import com.google.gerrit.acceptance.UseSsh;
+import com.google.gerrit.acceptance.config.GerritConfig;
+import org.eclipse.jgit.lib.ConfigConstants;
+import org.eclipse.jgit.lib.Repository;
+import org.junit.Test;
+
+@NoHttpd
+@UseSsh
+@UseLocalDisk
+public class ConvertRefStorageIT extends AbstractDaemonTest {
+  @Test
+  @GerritConfig(name = "core.usePerRequestRefCache", value = "true")
+  public void convertsToReftableWhenPerRequestRefCacheEnabled() throws Exception {
+    adminSshSession.exec(
+        "gerrit convert-ref-storage --project " + project.get() + " --format reftable");
+    adminSshSession.assertSuccess();
+    try (Repository repo = repoManager.openRepository(project)) {
+      assertThat(
+              repo.getConfig()
+                  .getString(
+                      ConfigConstants.CONFIG_EXTENSIONS_SECTION,
+                      null,
+                      ConfigConstants.CONFIG_KEY_REF_STORAGE))
+          .isEqualTo(ConfigConstants.CONFIG_REF_STORAGE_REFTABLE);
+    }
+  }
+}
diff --git a/javatests/com/google/gerrit/acceptance/ssh/CreateProjectIT.java b/javatests/com/google/gerrit/acceptance/ssh/CreateProjectIT.java
index 8367e25..2fbe83e 100644
--- a/javatests/com/google/gerrit/acceptance/ssh/CreateProjectIT.java
+++ b/javatests/com/google/gerrit/acceptance/ssh/CreateProjectIT.java
@@ -17,11 +17,15 @@
 import static com.google.common.truth.Truth.assertThat;
 
 import com.google.gerrit.acceptance.AbstractDaemonTest;
+import com.google.gerrit.acceptance.UseLocalDisk;
 import com.google.gerrit.acceptance.UseSsh;
 import com.google.gerrit.acceptance.config.GerritConfig;
 import com.google.gerrit.entities.Project;
+import com.google.gerrit.entities.RefNames;
+import com.google.gerrit.extensions.client.RefStorage;
 import com.google.gerrit.server.project.ProjectState;
 import java.util.Optional;
+import org.eclipse.jgit.lib.Repository;
 import org.junit.Test;
 
 @UseSsh
@@ -87,6 +91,7 @@
   }
 
   @Test
+  @UseLocalDisk
   public void withEmptyBranches() throws Exception {
     String newProjectName = name("newProject");
     adminSshSession.exec("gerrit create-project " + newProjectName);
@@ -94,6 +99,71 @@
     Optional<ProjectState> projectState = projectCache.get(Project.nameKey(newProjectName));
     assertThat(projectState).isPresent();
     assertHead(newProjectName, "refs/heads/master");
+    assertThat(gApi.projects().name(newProjectName).config().refStorage)
+        .isEqualTo(RefStorage.FILES);
+  }
+
+  @Test
+  @UseLocalDisk
+  public void withFilesRefStorage() throws Exception {
+    String newProjectName = name("files");
+    adminSshSession.exec("gerrit create-project --ref-storage FILES " + newProjectName);
+    adminSshSession.assertSuccess();
+
+    assertThat(gApi.projects().name(newProjectName).config().refStorage)
+        .isEqualTo(RefStorage.FILES);
+  }
+
+  @Test
+  @UseLocalDisk
+  public void withReftableRefStorageAndInitialCommit() throws Exception {
+    String newProjectName = name("reftable");
+    adminSshSession.exec(
+        "gerrit create-project --ref-storage REFTABLE --empty-commit --branch main "
+            + newProjectName);
+    adminSshSession.assertSuccess();
+
+    assertThat(gApi.projects().name(newProjectName).config().refStorage)
+        .isEqualTo(RefStorage.REFTABLE);
+    assertHead(newProjectName, "refs/heads/main");
+    try (Repository repo = repoManager.openRepository(Project.nameKey(newProjectName))) {
+      assertThat(repo.exactRef("refs/heads/main")).isNotNull();
+      assertThat(repo.exactRef(RefNames.REFS_CONFIG)).isNotNull();
+    }
+  }
+
+  @Test
+  @UseLocalDisk
+  public void withReftableRefStorageWithoutInitialCommit() throws Exception {
+    String newProjectName = name("reftable");
+    adminSshSession.exec(
+        "gerrit create-project --ref-storage REFTABLE --branch main " + newProjectName);
+    adminSshSession.assertSuccess();
+
+    assertThat(gApi.projects().name(newProjectName).config().refStorage)
+        .isEqualTo(RefStorage.REFTABLE);
+    try (Repository repo = repoManager.openRepository(Project.nameKey(newProjectName))) {
+      assertThat(repo.exactRef("refs/heads/main")).isNull();
+      assertThat(repo.exactRef(RefNames.REFS_CONFIG)).isNotNull();
+    }
+  }
+
+  @Test
+  public void withInvalidRefStorage() throws Exception {
+    String newProjectName = name("invalid-ref-storage");
+    adminSshSession.exec("gerrit create-project --ref-storage INVALID " + newProjectName);
+    adminSshSession.assertFailure();
+
+    assertThat(projectCache.get(Project.nameKey(newProjectName))).isEmpty();
+  }
+
+  @Test
+  public void helpListsRefStorage() throws Exception {
+    adminSshSession.exec("gerrit create-project --help");
+
+    assertThat(adminSshSession.getError()).contains("--ref-storage");
+    assertThat(adminSshSession.getError()).contains("FILES");
+    assertThat(adminSshSession.getError()).contains("REFTABLE");
   }
 
   @Test
diff --git a/javatests/com/google/gerrit/acceptance/ssh/CustomIndexIT.java b/javatests/com/google/gerrit/acceptance/ssh/CustomIndexIT.java
index 4b7519a..448897c 100644
--- a/javatests/com/google/gerrit/acceptance/ssh/CustomIndexIT.java
+++ b/javatests/com/google/gerrit/acceptance/ssh/CustomIndexIT.java
@@ -24,8 +24,8 @@
 import com.google.gerrit.index.testing.AbstractFakeIndex;
 import com.google.gerrit.index.testing.FakeIndexVersionManager;
 import com.google.gerrit.server.config.GerritServerConfig;
+import com.google.gerrit.server.config.SitePaths;
 import com.google.gerrit.server.index.AbstractIndexModule;
-import com.google.gerrit.server.index.IndexDir;
 import com.google.gerrit.server.index.VersionManager;
 import com.google.gerrit.server.index.account.AccountIndex;
 import com.google.gerrit.server.index.change.ChangeIndex;
@@ -36,7 +36,6 @@
 import com.google.inject.Inject;
 import com.google.inject.Module;
 import com.google.inject.assistedinject.Assisted;
-import java.nio.file.Path;
 import org.eclipse.jgit.lib.Config;
 import org.junit.Test;
 
@@ -107,11 +106,11 @@
 
   @com.google.inject.Inject
   CustomModuleFakeIndexChange(
-      @IndexDir Path indexDir,
+      SitePaths sitePaths,
       ChangeData.Factory changeDataFactory,
       @Assisted Schema<ChangeData> schema,
       @GerritServerConfig Config cfg,
       IndexConfig indexConfig) {
-    super(indexDir, changeDataFactory, schema, cfg, indexConfig);
+    super(sitePaths, changeDataFactory, schema, cfg, indexConfig);
   }
 }
diff --git a/javatests/com/google/gerrit/acceptance/ssh/QueryIT.java b/javatests/com/google/gerrit/acceptance/ssh/QueryIT.java
index 20df43f..fad0a02 100644
--- a/javatests/com/google/gerrit/acceptance/ssh/QueryIT.java
+++ b/javatests/com/google/gerrit/acceptance/ssh/QueryIT.java
@@ -244,7 +244,7 @@
   }
 
   @Test
-  public void commentOptionInPatchSetsJSON() throws Exception {
+  public void commentOptionInPatchSetsJSONAndText() throws Exception {
     String changeId = createChange().getChangeId();
 
     ReviewInput review = new ReviewInput();
@@ -255,6 +255,7 @@
     review.comments = new HashMap<>();
     review.comments.put(comment.path, Lists.newArrayList(comment));
     gApi.changes().id(changeId).current().review(review);
+    String commentId = gApi.changes().id(changeId).commentsAsList().get(0).id;
 
     List<ChangeAttribute> changes = executeSuccessfulQuery("--patch-sets " + changeId);
     assertThat(changes).hasSize(1);
@@ -264,6 +265,12 @@
     assertThat(changes).hasSize(1);
     assertThat(changes.get(0).patchSets.get(0).comments).isNotNull();
     assertThat(changes.get(0).patchSets.get(0).comments).hasSize(1);
+    assertThat(changes.get(0).patchSets.get(0).comments.get(0).id).isEqualTo(commentId);
+
+    String textOutput =
+        adminSshSession.exec("gerrit query --format=TEXT --patch-sets --comments " + changeId);
+    adminSshSession.assertSuccess();
+    assertThat(textOutput).contains("id: " + commentId);
 
     changes = executeSuccessfulQuery("--patch-sets --comments --files " + changeId);
     assertThat(changes).hasSize(1);
diff --git a/javatests/com/google/gerrit/acceptance/ssh/SetAccountIT.java b/javatests/com/google/gerrit/acceptance/ssh/SetAccountIT.java
index 7e30b1b..959c696 100644
--- a/javatests/com/google/gerrit/acceptance/ssh/SetAccountIT.java
+++ b/javatests/com/google/gerrit/acceptance/ssh/SetAccountIT.java
@@ -22,8 +22,11 @@
 import com.google.gerrit.acceptance.NoHttpd;
 import com.google.gerrit.acceptance.TestAccount;
 import com.google.gerrit.acceptance.UseSsh;
+import com.google.gerrit.acceptance.testsuite.account.TestSshKeys;
 import com.google.gerrit.acceptance.testsuite.project.ProjectOperations;
+import com.google.gerrit.acceptance.testsuite.request.SshSessionFactory;
 import com.google.gerrit.common.data.GlobalCapability;
+import com.google.gerrit.extensions.common.SshKeyInfo;
 import com.google.gerrit.server.account.externalids.ExternalIds;
 import com.google.inject.Inject;
 import java.util.List;
@@ -37,6 +40,25 @@
   @Inject private ProjectOperations projectOperations;
 
   @Test
+  public void setAccount_addSshKey_withLifetime() throws Exception {
+    String key = TestSshKeys.publicKey(SshSessionFactory.genSshKey(), admin.email());
+    adminSshSession.exec(
+        "gerrit set-account --add-ssh-key '" + key + "' --ssh-key-lifetime 7d admin");
+    adminSshSession.assertSuccess();
+
+    List<SshKeyInfo> keys = gApi.accounts().self().listSshKeys();
+    SshKeyInfo added = keys.get(keys.size() - 1);
+    assertThat(added.sshPublicKey).isEqualTo(key);
+    assertThat(added.expiration).isNotNull();
+  }
+
+  @Test
+  public void setAccount_sshKeyLifetime_requiresAddSshKey() throws Exception {
+    adminSshSession.exec("gerrit set-account --ssh-key-lifetime 7d admin");
+    adminSshSession.assertFailure();
+  }
+
+  @Test
   public void setAccount_deleteExternalId_all() throws Exception {
     TestAccount testAccount = accountCreator.create("user1", "user1@example.com", null, null);
     adminSshSession.exec("gerrit set-account --delete-external-id ALL user1");
diff --git a/javatests/com/google/gerrit/acceptance/ssh/SshCancellationIT.java b/javatests/com/google/gerrit/acceptance/ssh/SshCancellationIT.java
index 21ce66d..70d7c50 100644
--- a/javatests/com/google/gerrit/acceptance/ssh/SshCancellationIT.java
+++ b/javatests/com/google/gerrit/acceptance/ssh/SshCancellationIT.java
@@ -14,22 +14,40 @@
 
 package com.google.gerrit.acceptance.ssh;
 
+import static com.google.common.truth.Truth.assertThat;
+import static java.util.concurrent.TimeUnit.MILLISECONDS;
+import static java.util.concurrent.TimeUnit.SECONDS;
+
 import com.google.gerrit.acceptance.AbstractDaemonTest;
 import com.google.gerrit.acceptance.ExtensionRegistry;
 import com.google.gerrit.acceptance.ExtensionRegistry.Registration;
+import com.google.gerrit.acceptance.TestMetricMaker;
 import com.google.gerrit.acceptance.UseSsh;
 import com.google.gerrit.acceptance.config.GerritConfig;
+import com.google.gerrit.extensions.events.CommentAddedListener;
+import com.google.gerrit.extensions.events.ReviewerAddedListener;
+import com.google.gerrit.index.query.Matchable;
+import com.google.gerrit.index.query.OperatorPredicate;
 import com.google.gerrit.server.cancellation.RequestCancelledException;
 import com.google.gerrit.server.cancellation.RequestStateProvider;
 import com.google.gerrit.server.project.CreateProjectArgs;
+import com.google.gerrit.server.query.change.ChangeData;
+import com.google.gerrit.server.query.change.ChangeQueryBuilder.ChangeIsOperandFactory;
 import com.google.gerrit.server.validators.ProjectCreationValidationListener;
 import com.google.gerrit.server.validators.ValidationException;
 import com.google.inject.Inject;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.concurrent.locks.LockSupport;
+import java.util.function.BooleanSupplier;
 import org.junit.Test;
 
 @UseSsh
 public class SshCancellationIT extends AbstractDaemonTest {
   @Inject private ExtensionRegistry extensionRegistry;
+  private final TestMetricMaker testMetricMaker = TestMetricMaker.getInstance();
 
   @Test
   public void handleClientDisconnected() throws Exception {
@@ -169,4 +187,149 @@
     adminSshSession.exec("gerrit create-project --deadline 0 " + name("new"));
     adminSshSession.assertSuccess();
   }
+
+  @Test
+  public void queryIsAbortedWhenClientDisconnectsEvenIfInterruptIsSwallowed() throws Exception {
+    createChange();
+    createChange();
+    createChange();
+
+    CountDownLatch matchingFirstChange = new CountDownLatch(1);
+    AtomicInteger matchedChanges = new AtomicInteger();
+    AtomicReference<Thread> queryThread = new AtomicReference<>();
+    AtomicReference<String> queryThreadName = new AtomicReference<>();
+    AtomicBoolean queryThreadInterrupted = new AtomicBoolean();
+    ChangeIsOperandFactory swallowInterruptOperand =
+        builder ->
+            new OperatorPredicate<>("is", "swallowinterrupt") {
+              @Override
+              public boolean isMatchable() {
+                return true;
+              }
+
+              @Override
+              public Matchable<ChangeData> asMatchable() {
+                return new Matchable<>() {
+                  @Override
+                  public boolean match(ChangeData changeData) {
+                    if (matchedChanges.incrementAndGet() == 1) {
+                      queryThread.set(Thread.currentThread());
+                      queryThreadName.set(Thread.currentThread().getName());
+                      matchingFirstChange.countDown();
+                      queryThreadInterrupted.set(
+                          waitFor(() -> Thread.currentThread().isInterrupted()));
+                      // Simulate a library that swallows the interrupt, e.g. H2 while it waits
+                      // for a lock.
+                      Thread.interrupted();
+                    }
+                    return true;
+                  }
+
+                  @Override
+                  public int getCost() {
+                    return 0;
+                  }
+                };
+              }
+            };
+
+    testMetricMaker.reset();
+    try (Registration registration =
+        extensionRegistry.newRegistration().add(swallowInterruptOperand, "swallowinterrupt")) {
+      var unused =
+          adminSshSession.execAndReturnReader(
+              String.format(
+                  "gerrit query status:open is:swallowinterrupt_%s",
+                  ExtensionRegistry.PLUGIN_NAME));
+      assertThat(matchingFirstChange.await(30, SECONDS)).isTrue();
+      adminSshSession.close();
+      assertThat(waitFor(() -> !queryThread.get().getName().equals(queryThreadName.get())))
+          .isTrue();
+    }
+
+    assertThat(queryThreadInterrupted.get()).isTrue();
+    assertThat(matchedChanges.get()).isEqualTo(1);
+    assertThat(
+            testMetricMaker.getCount(
+                "cancellation/cancelled_requests_count",
+                "SSH",
+                "",
+                RequestStateProvider.Reason.CLIENT_CLOSED_REQUEST))
+        .isEqualTo(1);
+  }
+
+  @Test
+  public void reviewWhoseClientDisconnectsAfterCommitIsCompletedAndCountedAsCancelled()
+      throws Exception {
+    String changeId = createChange().getChangeId();
+    int changeNumber = gApi.changes().id(changeId).get()._number;
+
+    CountDownLatch inFirstListener = new CountDownLatch(1);
+    AtomicReference<Thread> commandThread = new AtomicReference<>();
+    AtomicReference<String> commandThreadName = new AtomicReference<>();
+    AtomicBoolean commandThreadInterrupted = new AtomicBoolean();
+    AtomicInteger secondListenerCalls = new AtomicInteger();
+    CommentAddedListener disconnectAwaitingListener =
+        event -> {
+          commandThread.set(Thread.currentThread());
+          commandThreadName.set(Thread.currentThread().getName());
+          inFirstListener.countDown();
+          commandThreadInterrupted.set(waitFor(() -> Thread.currentThread().isInterrupted()));
+          // Simulate a library that swallows the interrupt, e.g. H2 while it waits for a lock.
+          Thread.interrupted();
+        };
+    CommentAddedListener secondListener = event -> secondListenerCalls.incrementAndGet();
+
+    testMetricMaker.reset();
+    try (Registration registration =
+        extensionRegistry.newRegistration().add(disconnectAwaitingListener).add(secondListener)) {
+      var unused =
+          adminSshSession.execAndReturnReader(
+              String.format("gerrit review -m done %d,1", changeNumber));
+      assertThat(inFirstListener.await(30, SECONDS)).isTrue();
+      adminSshSession.close();
+      assertThat(waitFor(() -> !commandThread.get().getName().equals(commandThreadName.get())))
+          .isTrue();
+    }
+
+    assertThat(commandThreadInterrupted.get()).isTrue();
+    assertThat(secondListenerCalls.get()).isEqualTo(1);
+    assertThat(
+            gApi.changes().id(changeId).messages().stream()
+                .anyMatch(m -> m.message.contains("done")))
+        .isTrue();
+    assertThat(
+            testMetricMaker.getCount(
+                "cancellation/cancelled_requests_count",
+                "SSH",
+                "",
+                RequestStateProvider.Reason.CLIENT_CLOSED_REQUEST))
+        .isEqualTo(1);
+  }
+
+  @Test
+  public void setReviewersReportsCancellation() throws Exception {
+    String changeId = createChange().getChangeId();
+    ReviewerAddedListener reviewerAddedListener =
+        event -> {
+          throw new RequestCancelledException(
+              RequestStateProvider.Reason.CLIENT_CLOSED_REQUEST, /* cancellationMessage= */ null);
+        };
+    try (Registration registration =
+        extensionRegistry.newRegistration().add(reviewerAddedListener)) {
+      adminSshSession.exec("gerrit set-reviewers -a " + user.email() + " " + changeId);
+      adminSshSession.assertFailure("Client Closed Request");
+    }
+  }
+
+  private static boolean waitFor(BooleanSupplier condition) {
+    long deadline = System.nanoTime() + SECONDS.toNanos(30);
+    while (!condition.getAsBoolean()) {
+      if (System.nanoTime() > deadline) {
+        return false;
+      }
+      LockSupport.parkNanos(MILLISECONDS.toNanos(10));
+    }
+    return true;
+  }
 }
diff --git a/javatests/com/google/gerrit/acceptance/ssh/SshKeyExpiryIT.java b/javatests/com/google/gerrit/acceptance/ssh/SshKeyExpiryIT.java
new file mode 100644
index 0000000..91991b3
--- /dev/null
+++ b/javatests/com/google/gerrit/acceptance/ssh/SshKeyExpiryIT.java
@@ -0,0 +1,131 @@
+// Copyright (C) 2026 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.google.gerrit.acceptance.ssh;
+
+import static com.google.common.truth.Truth.assertThat;
+import static com.google.gerrit.testing.TestActionRefUpdateContext.testRefAction;
+import static java.nio.charset.StandardCharsets.UTF_8;
+
+import com.google.gerrit.acceptance.AbstractDaemonTest;
+import com.google.gerrit.acceptance.NoHttpd;
+import com.google.gerrit.acceptance.UseSsh;
+import com.google.gerrit.acceptance.testsuite.account.TestSshKeys;
+import com.google.gerrit.acceptance.testsuite.request.SshSessionFactory;
+import com.google.gerrit.entities.RefNames;
+import com.google.gerrit.server.account.AuthorizedKeys;
+import com.google.gerrit.server.account.VersionedAuthorizedKeys;
+import com.google.gerrit.server.ssh.SshKeyCache;
+import com.google.gerrit.server.util.time.TimeUtil;
+import com.google.gerrit.testing.TestTimeUtil;
+import com.google.inject.Inject;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.security.KeyPair;
+import java.time.Duration;
+import java.time.Instant;
+import java.time.ZoneOffset;
+import java.time.format.DateTimeFormatter;
+import java.util.concurrent.TimeUnit;
+import org.apache.sshd.client.SshClient;
+import org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier;
+import org.apache.sshd.client.session.ClientSession;
+import org.apache.sshd.common.SshException;
+import org.eclipse.jgit.junit.TestRepository;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.jgit.transport.URIish;
+import org.eclipse.jgit.treewalk.TreeWalk;
+import org.junit.After;
+import org.junit.Test;
+
+@NoHttpd
+@UseSsh
+public class SshKeyExpiryIT extends AbstractDaemonTest {
+  private static final DateTimeFormatter EXPIRY_TIME =
+      DateTimeFormatter.ofPattern("yyyyMMddHHmmss'Z'").withZone(ZoneOffset.UTC);
+  private static final int TIMEOUT_MILLIS = 100_000;
+
+  @Inject private VersionedAuthorizedKeys.Accessor authorizedKeys;
+  @Inject private SshKeyCache sshKeyCache;
+
+  @Test
+  public void keyBeforeExpiryTimeCanLogin() throws Exception {
+    KeyPair key = addKeyExpiringAt(TimeUtil.now().plus(Duration.ofDays(1)));
+    assertThat(canLogin(key)).isTrue();
+  }
+
+  @Test
+  public void keyAfterExpiryTimeCannotLogin() throws Exception {
+    KeyPair key = addKeyExpiringAt(TimeUtil.now().minus(Duration.ofDays(1)));
+    assertThat(canLogin(key)).isFalse();
+  }
+
+  @Test
+  public void keyThatExpiresWhileCachedCannotLogin() throws Exception {
+    TestTimeUtil.resetWithClockStep(1, TimeUnit.SECONDS);
+    KeyPair key = addKeyExpiringAt(TimeUtil.now().plus(Duration.ofDays(1)));
+    assertThat(canLogin(key)).isTrue();
+
+    TestTimeUtil.incrementClock(2, TimeUnit.DAYS);
+    assertThat(canLogin(key)).isFalse();
+  }
+
+  @After
+  public void resetClock() {
+    TestTimeUtil.useSystemTime();
+  }
+
+  private KeyPair addKeyExpiringAt(Instant expiry) throws Exception {
+    KeyPair key = SshSessionFactory.genSshKey();
+    String pub = TestSshKeys.publicKey(key, null);
+    testRefAction(() -> authorizedKeys.addKey(user.id(), pub));
+
+    // Options are only supported in the authorized_keys file, not on keys added by the user.
+    String ref = RefNames.refsUsers(user.id());
+    try (Repository repo = repoManager.openRepository(allUsers);
+        TestRepository<Repository> tr = new TestRepository<>(repo)) {
+      RevCommit tip = tr.getRevWalk().parseCommit(repo.exactRef(ref).getObjectId());
+      ObjectId blob =
+          TreeWalk.forPath(repo, AuthorizedKeys.FILE_NAME, tip.getTree()).getObjectId(0);
+      String content = new String(repo.open(blob).getBytes(), UTF_8);
+      String option = String.format("expiry-time=\"%s\" ", EXPIRY_TIME.format(expiry));
+      String updated = content.replace(pub, option + pub);
+      tr.update(ref, tr.commit().parent(tip).add(AuthorizedKeys.FILE_NAME, updated));
+    }
+    sshKeyCache.evict(user.username());
+    return key;
+  }
+
+  private boolean canLogin(KeyPair key) throws Exception {
+    int port = new URIish(adminSshSession.getUrl()).getPort();
+    SshClient client = SshClient.setUpDefaultClient();
+    client.setServerKeyVerifier(AcceptAllServerKeyVerifier.INSTANCE);
+    client.start();
+    try (ClientSession session =
+        client
+            .connect(user.username(), new InetSocketAddress(InetAddress.getLoopbackAddress(), port))
+            .verify(TIMEOUT_MILLIS)
+            .getSession()) {
+      session.addPublicKeyIdentity(key);
+      session.auth().verify(TIMEOUT_MILLIS);
+      return true;
+    } catch (SshException e) {
+      return false;
+    } finally {
+      client.stop();
+    }
+  }
+}
diff --git a/javatests/com/google/gerrit/acceptance/ssh/SshProxyProtocolIT.java b/javatests/com/google/gerrit/acceptance/ssh/SshProxyProtocolIT.java
new file mode 100644
index 0000000..2c655e4
--- /dev/null
+++ b/javatests/com/google/gerrit/acceptance/ssh/SshProxyProtocolIT.java
@@ -0,0 +1,186 @@
+// Copyright (C) 2026 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.google.gerrit.acceptance.ssh;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import com.google.gerrit.acceptance.AbstractDaemonTest;
+import com.google.gerrit.acceptance.NoHttpd;
+import com.google.gerrit.acceptance.UseSsh;
+import com.google.gerrit.acceptance.testsuite.account.AccountOperations;
+import com.google.gerrit.acceptance.testsuite.account.TestAccount;
+import com.google.gerrit.acceptance.testsuite.account.TestSshKeys;
+import com.google.gerrit.testing.ConfigSuite;
+import com.google.inject.Inject;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.net.UnknownHostException;
+import java.nio.ByteBuffer;
+import java.nio.charset.StandardCharsets;
+import org.apache.sshd.client.SshClient;
+import org.apache.sshd.client.keyverifier.AcceptAllServerKeyVerifier;
+import org.apache.sshd.client.session.ClientSession;
+import org.apache.sshd.common.util.buffer.ByteArrayBuffer;
+import org.eclipse.jgit.lib.Config;
+import org.eclipse.jgit.transport.URIish;
+import org.junit.Test;
+
+@NoHttpd
+@UseSsh
+public class SshProxyProtocolIT extends AbstractDaemonTest {
+  private static final String PROXY_SOURCE_ADDRESS = "192.0.2.1";
+  private static final String SERVER_ADDRESS = "127.0.0.1";
+  private static final int PROXY_SOURCE_PORT = 12345;
+
+  @ConfigSuite.Default
+  public static Config defaultConfig() {
+    Config cfg = new Config();
+    cfg.setBoolean("sshd", null, "enableProxyProtocol", true);
+    return cfg;
+  }
+
+  @Inject private AccountOperations accountOperations;
+
+  @Test
+  public void proxyProtocolSourceIsReportedByShowConnections() throws Exception {
+    int sshPort = new URIish(adminSshSession.getUrl()).getPort();
+    for (ProxyProtocolFormat format : ProxyProtocolFormat.values()) {
+      if (format == ProxyProtocolFormat.V2_LOCAL) {
+        continue;
+      }
+      try (ProxyProtocolSshSession proxiedSession =
+          new ProxyProtocolSshSession(
+              sshKeys, sshPort, accountOperations.account(admin.id()).get(), format)) {
+        proxiedSession.open();
+
+        String output = adminSshSession.exec("gerrit show-connections --numeric --wide");
+        assertThat(output).contains(PROXY_SOURCE_ADDRESS);
+      }
+    }
+  }
+
+  // A v2 LOCAL command describes a connection made by the proxy itself, not a relayed client.
+  // The receiver must ignore the address block and keep the actual socket peer address.
+  @Test
+  public void proxyProtocolLocalCommandUsesActualPeerAddress() throws Exception {
+    int sshPort = new URIish(adminSshSession.getUrl()).getPort();
+    try (ProxyProtocolSshSession localSession =
+        new ProxyProtocolSshSession(
+            sshKeys,
+            sshPort,
+            accountOperations.account(admin.id()).get(),
+            ProxyProtocolFormat.V2_LOCAL)) {
+      localSession.open();
+
+      String output = adminSshSession.exec("gerrit show-connections --numeric --wide");
+      assertThat(output).contains(SERVER_ADDRESS);
+      assertThat(output).doesNotContain(PROXY_SOURCE_ADDRESS);
+    }
+  }
+
+  private enum ProxyProtocolFormat {
+    V1_PROXY,
+    V2_PROXY,
+    V2_LOCAL
+  }
+
+  private static final class ProxyProtocolSshSession implements AutoCloseable {
+    private static final byte[] PROXY_PROTOCOL_V2_SIGNATURE = {
+      0x0d, 0x0a, 0x0d, 0x0a, 0x00, 0x0d, 0x0a, 0x51, 0x55, 0x49, 0x54, 0x0a
+    };
+    private static final int TIMEOUT_MILLIS = 100_000;
+
+    private final TestSshKeys sshKeys;
+    private final int targetPort;
+    private final TestAccount account;
+    private final ProxyProtocolFormat format;
+
+    private SshClient client;
+    private ClientSession session;
+
+    ProxyProtocolSshSession(
+        TestSshKeys sshKeys, int targetPort, TestAccount account, ProxyProtocolFormat format) {
+      this.sshKeys = sshKeys;
+      this.targetPort = targetPort;
+      this.account = account;
+      this.format = format;
+    }
+
+    void open() throws Exception {
+      client = SshClient.setUpDefaultClient();
+      client.setServerKeyVerifier(AcceptAllServerKeyVerifier.INSTANCE);
+      client.setClientProxyConnector(
+          session ->
+              session
+                  .getIoSession()
+                  .writeBuffer(new ByteArrayBuffer(createProxyProtocolHeader(format, targetPort))));
+      client.start();
+      try {
+        session =
+            client
+                .connect(
+                    account.username().get(),
+                    new InetSocketAddress(InetAddress.getLoopbackAddress(), targetPort))
+                .verify(TIMEOUT_MILLIS)
+                .getSession();
+        session.addPublicKeyIdentity(sshKeys.getKeyPair(account));
+        session.auth().verify(TIMEOUT_MILLIS);
+      } catch (Exception e) {
+        close();
+        throw e;
+      }
+    }
+
+    private static byte[] createProxyProtocolHeader(ProxyProtocolFormat format, int targetPort)
+        throws UnknownHostException {
+      if (format == ProxyProtocolFormat.V1_PROXY) {
+        return ("PROXY TCP4 "
+                + PROXY_SOURCE_ADDRESS
+                + " "
+                + SERVER_ADDRESS
+                + " "
+                + PROXY_SOURCE_PORT
+                + " "
+                + targetPort
+                + "\r\n")
+            .getBytes(StandardCharsets.US_ASCII);
+      }
+
+      ByteBuffer header = ByteBuffer.allocate(28);
+      header.put(PROXY_PROTOCOL_V2_SIGNATURE);
+      header.put((byte) (format == ProxyProtocolFormat.V2_LOCAL ? 0x20 : 0x21));
+      header.put((byte) 0x11); // IPv4, stream transport.
+      header.putShort((short) 12); // IPv4 addresses and ports: 4 + 4 + 2 + 2 bytes.
+      header.put(InetAddress.getByName(PROXY_SOURCE_ADDRESS).getAddress());
+      header.put(InetAddress.getByName(SERVER_ADDRESS).getAddress());
+      header.putShort((short) PROXY_SOURCE_PORT);
+      header.putShort((short) targetPort);
+      return header.array();
+    }
+
+    @Override
+    public void close() throws Exception {
+      try {
+        if (session != null) {
+          session.close();
+        }
+      } finally {
+        if (client != null) {
+          client.stop();
+        }
+      }
+    }
+  }
+}
diff --git a/javatests/com/google/gerrit/acceptance/ssh/StreamEventsIT.java b/javatests/com/google/gerrit/acceptance/ssh/StreamEventsIT.java
index 9221999..68ed6d7 100644
--- a/javatests/com/google/gerrit/acceptance/ssh/StreamEventsIT.java
+++ b/javatests/com/google/gerrit/acceptance/ssh/StreamEventsIT.java
@@ -25,6 +25,7 @@
 import com.google.gerrit.acceptance.Sandboxed;
 import com.google.gerrit.acceptance.UseSsh;
 import com.google.gerrit.acceptance.config.GerritConfig;
+import com.google.gerrit.entities.Project;
 import com.google.gerrit.entities.RefNames;
 import com.google.gerrit.extensions.api.changes.ChangeApi;
 import com.google.gerrit.extensions.api.changes.DraftInput;
@@ -33,6 +34,7 @@
 import com.google.gerrit.extensions.registration.DynamicSet;
 import com.google.gerrit.server.events.UserScopedEventListener;
 import com.google.gerrit.server.query.change.ChangeData;
+import com.google.gson.JsonParser;
 import com.google.inject.Inject;
 import java.io.IOException;
 import java.io.Reader;
@@ -46,6 +48,7 @@
 import java.util.stream.Stream;
 import java.util.stream.StreamSupport;
 import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.Repository;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -219,7 +222,23 @@
   public void projectCreatedShowInStreamEvents() throws Exception {
     ensureStreamEventsIsRegistered();
     String projectNameCreated = createProjectOverAPI("test-repo-1", project, true, null).get();
-    waitForEvent(() -> pollEventsContaining("project-created", projectNameCreated).size() == 1);
+    List<String> projectCreatedEvents = new ArrayList<>();
+    waitForEvent(
+        () -> {
+          projectCreatedEvents.addAll(pollEventsContaining("project-created", projectNameCreated));
+          return !projectCreatedEvents.isEmpty();
+        });
+
+    String expectedGitConfig;
+    try (Repository repo = repoManager.openRepository(Project.nameKey(projectNameCreated))) {
+      expectedGitConfig = repo.getConfig().toText();
+    }
+    assertThat(
+            JsonParser.parseString(projectCreatedEvents.get(0))
+                .getAsJsonObject()
+                .get("gitConfig")
+                .getAsString())
+        .isEqualTo(expectedGitConfig);
   }
 
   @Test
diff --git a/javatests/com/google/gerrit/acceptance/testsuite/change/ChangeOperationsImplTest.java b/javatests/com/google/gerrit/acceptance/testsuite/change/ChangeOperationsImplTest.java
index ef76e20..932834c 100644
--- a/javatests/com/google/gerrit/acceptance/testsuite/change/ChangeOperationsImplTest.java
+++ b/javatests/com/google/gerrit/acceptance/testsuite/change/ChangeOperationsImplTest.java
@@ -22,6 +22,7 @@
 import static com.google.gerrit.extensions.restapi.testing.BinaryResultSubject.assertThat;
 import static com.google.gerrit.testing.GerritJUnit.assertThrows;
 import static com.google.gerrit.truth.MapSubject.assertThatMap;
+import static java.util.concurrent.TimeUnit.SECONDS;
 
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
@@ -30,6 +31,7 @@
 import com.google.common.collect.ListMultimap;
 import com.google.common.truth.Correspondence;
 import com.google.gerrit.acceptance.AbstractDaemonTest;
+import com.google.gerrit.acceptance.UseClockStep;
 import com.google.gerrit.acceptance.testsuite.account.AccountOperations;
 import com.google.gerrit.acceptance.testsuite.account.TestAccount;
 import com.google.gerrit.acceptance.testsuite.project.ProjectOperations;
@@ -1203,6 +1205,19 @@
   }
 
   @Test
+  @UseClockStep(clockStep = 0, clockStepUnit = SECONDS)
+  public void multipleNewPatchsetsCreatedWithinSameSecondHaveDistinctRevisions() throws Exception {
+    ChangeIdentifier changeIdentifier = changeOperations.newChange().create();
+    changeOperations.change(changeIdentifier).newPatchset().create();
+    PatchSet.Id patchset3Id = changeOperations.change(changeIdentifier).newPatchset().create();
+
+    ChangeInfo change = gApi.changes().id(changeIdentifier).get();
+    assertThatMap(change.revisions).hasSize(3);
+    RevisionInfo currentRevision = change.revisions.get(change.currentRevision);
+    assertThat(currentRevision._number).isEqualTo(patchset3Id.get());
+  }
+
+  @Test
   public void newPatchsetIsCopyOfPreviousPatchsetByDefault() throws Exception {
     Change.Id changeId = changeOperations.newChange().createV1();
 
diff --git a/javatests/com/google/gerrit/entities/converter/PatchSetApprovalProtoConverterTest.java b/javatests/com/google/gerrit/entities/converter/PatchSetApprovalProtoConverterTest.java
index 28f9cdb..4838a26 100644
--- a/javatests/com/google/gerrit/entities/converter/PatchSetApprovalProtoConverterTest.java
+++ b/javatests/com/google/gerrit/entities/converter/PatchSetApprovalProtoConverterTest.java
@@ -50,6 +50,7 @@
             .realAccountId(Account.id(612))
             .postSubmit(true)
             .copied(true)
+            .isAi(true)
             .build();
 
     Entities.PatchSetApproval proto = protoConverter.toProto(patchSetApproval);
@@ -71,6 +72,7 @@
             .setRealAccountId(Entities.Account_Id.newBuilder().setId(612))
             .setPostSubmit(true)
             .setCopied(true)
+            .setIsAi(true)
             .build();
     assertThat(proto).isEqualTo(expectedProto);
   }
@@ -121,6 +123,7 @@
             .realAccountId(Account.id(612))
             .postSubmit(true)
             .copied(true)
+            .isAi(true)
             .build();
 
     PatchSetApproval convertedPatchSetApproval =
@@ -169,6 +172,7 @@
     assertThat(patchSetApproval.granted()).isEqualTo(Instant.EPOCH);
     assertThat(patchSetApproval.postSubmit()).isEqualTo(false);
     assertThat(patchSetApproval.copied()).isEqualTo(false);
+    assertThat(patchSetApproval.isAi()).isEqualTo(false);
   }
 
   /** See {@link SerializedClassSubject} for background and what to do if this test fails. */
@@ -185,6 +189,7 @@
                 .put("realAccountId", Account.Id.class)
                 .put("postSubmit", boolean.class)
                 .put("copied", boolean.class)
+                .put("isAi", boolean.class)
                 .put("toBuilder", PatchSetApproval.Builder.class)
                 .build());
   }
diff --git a/javatests/com/google/gerrit/entities/converter/SafeProtoConverterTest.java b/javatests/com/google/gerrit/entities/converter/SafeProtoConverterTest.java
index a89d75d..69b6388 100644
--- a/javatests/com/google/gerrit/entities/converter/SafeProtoConverterTest.java
+++ b/javatests/com/google/gerrit/entities/converter/SafeProtoConverterTest.java
@@ -212,8 +212,8 @@
         return null;
       }
       Type genericType = field.getGenericType();
-      if (genericType instanceof ParameterizedType) {
-        return (Class<?>) ((ParameterizedType) genericType).getActualTypeArguments()[0];
+      if (genericType instanceof ParameterizedType parameterizedType) {
+        return (Class<?>) parameterizedType.getActualTypeArguments()[0];
       }
       return null;
     }
diff --git a/javatests/com/google/gerrit/extensions/common/ChangeInfoDifferTest.java b/javatests/com/google/gerrit/extensions/common/ChangeInfoDifferTest.java
index f8e7d80..49963a2 100644
--- a/javatests/com/google/gerrit/extensions/common/ChangeInfoDifferTest.java
+++ b/javatests/com/google/gerrit/extensions/common/ChangeInfoDifferTest.java
@@ -642,8 +642,8 @@
       return null;
     }
     Type genericType = field.getGenericType();
-    if (genericType instanceof ParameterizedType) {
-      return (Class<?>) ((ParameterizedType) genericType).getActualTypeArguments()[0];
+    if (genericType instanceof ParameterizedType parameterizedType) {
+      return (Class<?>) parameterizedType.getActualTypeArguments()[0];
     }
     return null;
   }
diff --git a/javatests/com/google/gerrit/httpd/raw/DocServletTest.java b/javatests/com/google/gerrit/httpd/raw/DocServletTest.java
index 2f09aa2..f90fb2f 100644
--- a/javatests/com/google/gerrit/httpd/raw/DocServletTest.java
+++ b/javatests/com/google/gerrit/httpd/raw/DocServletTest.java
@@ -15,14 +15,11 @@
 package com.google.gerrit.httpd.raw;
 
 import static com.google.common.truth.Truth.assertThat;
-import static com.google.gerrit.server.experiments.ExperimentFeaturesConstants.GERRIT_BACKEND_FEATURE_ATTACH_NONCE_TO_DOCUMENTATION;
-import static org.mockito.Mockito.when;
 
 import com.google.common.base.CharMatcher;
 import com.google.common.cache.CacheBuilder;
 import com.google.common.jimfs.Configuration;
 import com.google.common.jimfs.Jimfs;
-import com.google.gerrit.server.experiments.ExperimentFeatures;
 import com.google.gerrit.util.http.testutil.FakeHttpServletRequest;
 import com.google.gerrit.util.http.testutil.FakeHttpServletResponse;
 import java.io.IOException;
@@ -34,31 +31,20 @@
 import org.jsoup.nodes.Document;
 import org.jsoup.nodes.Element;
 import org.junit.Before;
-import org.junit.Rule;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.JUnit4;
-import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnit;
-import org.mockito.junit.MockitoRule;
 
 @RunWith(JUnit4.class)
 public class DocServletTest {
 
-  @Rule public final MockitoRule mockito = MockitoJUnit.rule();
-
-  @Mock private ExperimentFeatures experimentFeatures;
   private FileSystem fs = Jimfs.newFileSystem(Configuration.unix());
   private DocServlet docServlet;
 
   @Before
   public void setUp() throws Exception {
-    when(experimentFeatures.isFeatureEnabled(GERRIT_BACKEND_FEATURE_ATTACH_NONCE_TO_DOCUMENTATION))
-        .thenReturn(true);
-
     docServlet =
-        new DocServlet(
-            CacheBuilder.newBuilder().maximumSize(1).build(), false, experimentFeatures) {
+        new DocServlet(CacheBuilder.newBuilder().maximumSize(1).build(), false) {
           private static final long serialVersionUID = 1L;
 
           @Override
@@ -85,19 +71,6 @@
   }
 
   @Test
-  public void experimentDisabled_unchangedResponse() throws Exception {
-    when(experimentFeatures.isFeatureEnabled(GERRIT_BACKEND_FEATURE_ATTACH_NONCE_TO_DOCUMENTATION))
-        .thenReturn(false);
-    FakeHttpServletRequest request = new FakeHttpServletRequest().setPathInfo(DOC_PATH);
-    request.setAttribute("nonce", NONCE);
-    FakeHttpServletResponse response = new FakeHttpServletResponse();
-
-    docServlet.doGet(request, response);
-
-    assertThat(response.getActualBody()).isEqualTo(HTML_RESPONSE.getBytes(StandardCharsets.UTF_8));
-  }
-
-  @Test
   public void nonHtmlResponse_unchangedResponse() throws Exception {
     FakeHttpServletRequest request = new FakeHttpServletRequest().setPathInfo(NON_HTML_FILE_PATH);
     request.setAttribute("nonce", NONCE);
diff --git a/javatests/com/google/gerrit/httpd/raw/IndexHtmlUtilTest.java b/javatests/com/google/gerrit/httpd/raw/IndexHtmlUtilTest.java
index 46cd3f6b..df9f1d2 100644
--- a/javatests/com/google/gerrit/httpd/raw/IndexHtmlUtilTest.java
+++ b/javatests/com/google/gerrit/httpd/raw/IndexHtmlUtilTest.java
@@ -173,8 +173,9 @@
 
     String requestedPath = "/c/project/+/123";
     assertThat(IndexHtmlUtil.computeBasePatchNum(requestedPath)).isEqualTo(0);
+    assertThat(IndexHtmlUtil.computeBasePatchNum("/c/project/+/123/4")).isEqualTo(0);
 
-    assertThat(dynamicTemplateData(gerritApi, requestedPath, ""))
+    assertThat(dynamicTemplateData(gerritApi, "/c/project/+/123/4", ""))
         .containsAtLeast(
             "defaultChangeDetailHex", "896394",
             "changeRequestsPath", "changes/project~123");
diff --git a/javatests/com/google/gerrit/httpd/raw/IndexPreloadingUtilTest.java b/javatests/com/google/gerrit/httpd/raw/IndexPreloadingUtilTest.java
index 291a064..d785c43 100644
--- a/javatests/com/google/gerrit/httpd/raw/IndexPreloadingUtilTest.java
+++ b/javatests/com/google/gerrit/httpd/raw/IndexPreloadingUtilTest.java
@@ -58,4 +58,19 @@
         .isEqualTo(RequestedPage.PAGE_WITHOUT_PRELOADING);
     assertThat(parseRequestedPage("/")).isEqualTo(RequestedPage.DASHBOARD);
   }
+
+  @Test
+  public void computeBasePatchNumOnlyMatchesExplicitBasePatchRange() throws Exception {
+    assertThat(IndexHtmlUtil.computeBasePatchNum("/c/project/+/123")).isEqualTo(0);
+    assertThat(IndexHtmlUtil.computeBasePatchNum("/c/project/+/123/4")).isEqualTo(0);
+    assertThat(IndexHtmlUtil.computeBasePatchNum("/c/project/+/123/edit")).isEqualTo(0);
+    assertThat(IndexHtmlUtil.computeBasePatchNum("/c/project/+/123/4/foo/bar.cc")).isEqualTo(0);
+    assertThat(IndexHtmlUtil.computeBasePatchNum("/c/project/+/123/4..6")).isEqualTo(4);
+    assertThat(IndexHtmlUtil.computeBasePatchNum("/c/project/+/123/2..edit")).isEqualTo(2);
+    assertThat(IndexHtmlUtil.computeBasePatchNum("/c/project/+/123/4..6/foo/bar.cc")).isEqualTo(4);
+    assertThat(IndexHtmlUtil.computeBasePatchNum("/c/project/+/123/-1..4")).isEqualTo(-1);
+    assertThat(IndexHtmlUtil.computeBasePatchNum("/c/project/+/123/-1..4/foo/bar.cc"))
+        .isEqualTo(-1);
+    assertThat(IndexHtmlUtil.computeBasePatchNum("/c/project/+/123/comment/abc")).isEqualTo(0);
+  }
 }
diff --git a/javatests/com/google/gerrit/httpd/raw/IndexServletTest.java b/javatests/com/google/gerrit/httpd/raw/IndexServletTest.java
index 3b7f439..33f754a 100644
--- a/javatests/com/google/gerrit/httpd/raw/IndexServletTest.java
+++ b/javatests/com/google/gerrit/httpd/raw/IndexServletTest.java
@@ -199,9 +199,7 @@
     Server serverApi = mock(Server.class);
     when(serverApi.getVersion()).thenReturn("123");
     when(serverApi.topMenus()).thenReturn(ImmutableList.of());
-    ServerInfo serverInfo = new ServerInfo();
-    serverInfo.defaultTheme = "my-default-theme";
-    when(serverApi.getInfo()).thenReturn(serverInfo);
+    when(serverApi.getInfo()).thenReturn(new ServerInfo());
 
     Config configApi = mock(Config.class);
     when(configApi.server()).thenReturn(serverApi);
@@ -234,6 +232,9 @@
     assertThat(output).contains("<!DOCTYPE html>");
     assertThat(output).contains("window.CANONICAL_PATH = '" + testCanonicalUrl);
     assertThat(output).contains("<link rel=\"preload\" href=\"" + testCdnPath);
+    assertThat(output).contains("const currentThemeClass = isDark ? 'darkTheme' : 'lightTheme';");
+    assertThat(output).contains("document.documentElement.classList.add(currentThemeClass);");
+    assertThat(output).contains("link.rel = 'preload';");
     assertThat(output)
         .contains(
             "<link rel=\"icon\" type=\"image/x-icon\" href=\""
@@ -244,9 +245,8 @@
         .contains(
             "window.INITIAL_DATA = JSON.parse("
                 + "'\\x7b\\x22foo-url\\/config\\/server\\/top-menus\\x22: \\x5b\\x5d, "
-                + "\\x22foo-url\\/config\\/server\\/info\\x22: \\x7b\\x22default_theme\\x22:"
-                + "\\x22my-default-theme\\x22\\x7d, \\x22foo-url\\/config\\/server\\/version\\x22: "
-                + "\\x22123\\x22\\x7d');");
+                + "\\x22foo-url\\/config\\/server\\/info\\x22: \\x7b\\x7d, "
+                + "\\x22foo-url\\/config\\/server\\/version\\x22: \\x22123\\x22\\x7d');");
     ImmutableSet<String> enabledDefaults =
         ExperimentFeaturesConstants.DEFAULT_ENABLED_FEATURES.stream()
             .collect(ImmutableSet.toImmutableSet());
diff --git a/javatests/com/google/gerrit/index/query/QueryBuilderTest.java b/javatests/com/google/gerrit/index/query/QueryBuilderTest.java
index 42148da..150034c 100644
--- a/javatests/com/google/gerrit/index/query/QueryBuilderTest.java
+++ b/javatests/com/google/gerrit/index/query/QueryBuilderTest.java
@@ -43,10 +43,9 @@
 
     @Override
     public boolean equals(Object o) {
-      if (!(o instanceof TestPredicate)) {
+      if (!(o instanceof TestPredicate p)) {
         return false;
       }
-      TestPredicate p = (TestPredicate) o;
       return Objects.equals(field, p.field) && Objects.equals(value, p.value);
     }
   }
diff --git a/javatests/com/google/gerrit/integration/git/GitProtocolV2IT.java b/javatests/com/google/gerrit/integration/git/GitProtocolV2IT.java
index f33dc8d..fb95c40 100644
--- a/javatests/com/google/gerrit/integration/git/GitProtocolV2IT.java
+++ b/javatests/com/google/gerrit/integration/git/GitProtocolV2IT.java
@@ -66,7 +66,7 @@
   private final String[] GIT_FETCH = new String[] {"git", "-c", "protocol.version=2", "fetch"};
   private final String[] GIT_INIT = new String[] {"git", "init"};
   private final String GIT_SSH_COMMAND =
-      "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i";
+      "ssh -F none -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i";
 
   @Inject private GerritApi gApi;
   @Inject private AccountCreator accountCreator;
diff --git a/javatests/com/google/gerrit/integration/git/UploadArchiveIT.java b/javatests/com/google/gerrit/integration/git/UploadArchiveIT.java
index 7d40042..b3e57ef 100644
--- a/javatests/com/google/gerrit/integration/git/UploadArchiveIT.java
+++ b/javatests/com/google/gerrit/integration/git/UploadArchiveIT.java
@@ -58,7 +58,8 @@
   private static final String[] SSH_KEYGEN_CMD =
       new String[] {"ssh-keygen", "-t", "rsa", "-q", "-P", "", "-f"};
   private static final String GIT_SSH_COMMAND =
-      "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o 'IdentitiesOnly yes' -i";
+      "ssh -F none -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
+          + " -o 'IdentitiesOnly yes' -i";
   private static final String ARCHIVE = "archive";
 
   @Inject private GerritApi gApi;
diff --git a/javatests/com/google/gerrit/integration/ssh/NoShellIT.java b/javatests/com/google/gerrit/integration/ssh/NoShellIT.java
index f25db6e..487b0ba 100644
--- a/javatests/com/google/gerrit/integration/ssh/NoShellIT.java
+++ b/javatests/com/google/gerrit/integration/ssh/NoShellIT.java
@@ -77,6 +77,8 @@
   private ImmutableList<String> cmd() {
     return ImmutableList.<String>builder()
         .add("ssh")
+        .add("-F")
+        .add("none")
         .add("-tt")
         .add("-o")
         .add("StrictHostKeyChecking=no")
diff --git a/javatests/com/google/gerrit/integration/ssh/PeerKeysAuthIT.java b/javatests/com/google/gerrit/integration/ssh/PeerKeysAuthIT.java
index 039bc8e..bf29359 100644
--- a/javatests/com/google/gerrit/integration/ssh/PeerKeysAuthIT.java
+++ b/javatests/com/google/gerrit/integration/ssh/PeerKeysAuthIT.java
@@ -43,6 +43,8 @@
   private static final String[] SSH_COMMAND =
       new String[] {
         "ssh",
+        "-F",
+        "none",
         "-o",
         "UserKnownHostsFile=/dev/null",
         "-o",
diff --git a/javatests/com/google/gerrit/pgm/http/jetty/JettyServerTest.java b/javatests/com/google/gerrit/pgm/http/jetty/JettyServerTest.java
new file mode 100644
index 0000000..c84096c
--- /dev/null
+++ b/javatests/com/google/gerrit/pgm/http/jetty/JettyServerTest.java
@@ -0,0 +1,53 @@
+// Copyright (C) 2026 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.google.gerrit.pgm.http.jetty;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import com.google.common.collect.ImmutableList;
+import org.eclipse.jetty.server.ConnectionFactory;
+import org.eclipse.jetty.server.HttpConfiguration;
+import org.eclipse.jetty.server.HttpConnectionFactory;
+import org.eclipse.jetty.server.ProxyConnectionFactory;
+import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.ServerConnector;
+import org.junit.Test;
+
+public class JettyServerTest {
+  @Test
+  public void proxyProtocolConnectorUsesProxyConnectionFactory() {
+    HttpConfiguration config = new HttpConfiguration();
+
+    ServerConnector connector = JettyServer.newServerConnector(new Server(), 0, 0, config, true);
+    ImmutableList<ConnectionFactory> factories =
+        ImmutableList.copyOf(connector.getConnectionFactories());
+
+    assertThat(factories).hasSize(2);
+    assertThat(factories.get(0)).isInstanceOf(ProxyConnectionFactory.class);
+    assertThat(factories.get(1)).isInstanceOf(HttpConnectionFactory.class);
+  }
+
+  @Test
+  public void regularConnectorDoesNotUseProxyProtocol() {
+    HttpConfiguration config = new HttpConfiguration();
+
+    ServerConnector connector = JettyServer.newServerConnector(new Server(), 0, 0, config, false);
+    ImmutableList<ConnectionFactory> factories =
+        ImmutableList.copyOf(connector.getConnectionFactories());
+
+    assertThat(factories).hasSize(1);
+    assertThat(factories.get(0)).isInstanceOf(HttpConnectionFactory.class);
+  }
+}
diff --git a/javatests/com/google/gerrit/server/account/AuthorizedKeysTest.java b/javatests/com/google/gerrit/server/account/AuthorizedKeysTest.java
index 1a7d1fb..9374cf5 100644
--- a/javatests/com/google/gerrit/server/account/AuthorizedKeysTest.java
+++ b/javatests/com/google/gerrit/server/account/AuthorizedKeysTest.java
@@ -17,10 +17,16 @@
 import static com.google.common.truth.Truth.assertThat;
 
 import com.google.common.base.Splitter;
+import com.google.common.collect.ImmutableList;
 import com.google.gerrit.entities.Account;
+import com.google.gerrit.server.util.time.TimeUtil;
+import java.time.Instant;
+import java.time.LocalDate;
+import java.time.ZoneId;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Optional;
+import org.junit.After;
 import org.junit.Test;
 
 public class AuthorizedKeysTest {
@@ -57,6 +63,11 @@
 
   private final Account.Id accountId = Account.id(1);
 
+  @After
+  public void resetClock() {
+    TimeUtil.resetCurrentMillisSupplier();
+  }
+
   @Test
   public void test() throws Exception {
     List<Optional<AccountSshKey>> keys = new ArrayList<>();
@@ -114,17 +125,17 @@
 
   @Test
   public void validity() throws Exception {
-    AccountSshKey key = AccountSshKey.create(accountId, -1, KEY1);
+    AccountSshKey key = new AccountSshKey(accountId, -1, KEY1);
     assertThat(key.valid()).isFalse();
-    key = AccountSshKey.create(accountId, 0, KEY1);
+    key = new AccountSshKey(accountId, 0, KEY1);
     assertThat(key.valid()).isFalse();
-    key = AccountSshKey.create(accountId, 1, KEY1);
+    key = new AccountSshKey(accountId, 1, KEY1);
     assertThat(key.valid()).isTrue();
   }
 
   @Test
   public void getters() throws Exception {
-    AccountSshKey key = AccountSshKey.create(accountId, 1, KEY1);
+    AccountSshKey key = new AccountSshKey(accountId, 1, KEY1);
     assertThat(key.sshPublicKey()).isEqualTo(KEY1);
 
     List<String> keyParts = Splitter.on(" ").splitToList(KEY1);
@@ -135,7 +146,7 @@
 
   @Test
   public void keyWithNewLines() throws Exception {
-    AccountSshKey key = AccountSshKey.create(accountId, 1, KEY1_WITH_NEWLINES);
+    AccountSshKey key = new AccountSshKey(accountId, 1, KEY1_WITH_NEWLINES);
     assertThat(key.sshPublicKey()).isEqualTo(KEY1);
 
     List<String> keyParts = Splitter.on(" ").splitToList(KEY1);
@@ -144,6 +155,94 @@
     assertThat(key.comment()).isEqualTo(keyParts.get(2));
   }
 
+  @Test
+  public void expiryTimeIsParsed() {
+    assertExpiryTime("20300102Z", Instant.parse("2030-01-02T00:00:00Z"));
+    assertExpiryTime("203001021530Z", Instant.parse("2030-01-02T15:30:00Z"));
+    assertExpiryTime("20300102153045Z", Instant.parse("2030-01-02T15:30:45Z"));
+    assertExpiryTime(
+        "20300102", LocalDate.of(2030, 1, 2).atStartOfDay(ZoneId.systemDefault()).toInstant());
+  }
+
+  @Test
+  public void keyIsExpiredAfterExpiryTime() {
+    AccountSshKey key =
+        AuthorizedKeys.parseKey(accountId, 1, "expiry-time=\"20300102030405Z\" " + KEY1);
+    Instant expiry = Instant.parse("2030-01-02T03:04:05Z");
+    TimeUtil.setCurrentMillisSupplier(expiry::toEpochMilli);
+    assertThat(key.isExpired()).isFalse();
+    TimeUtil.setCurrentMillisSupplier(() -> expiry.plusSeconds(1).toEpochMilli());
+    assertThat(key.isExpired()).isTrue();
+  }
+
+  @Test
+  public void keyWithoutExpiryTimeIsNotExpired() {
+    assertThat(AuthorizedKeys.parseKey(accountId, 1, KEY1).isExpired()).isFalse();
+  }
+
+  @Test
+  public void invalidExpiryTimeIsKeptAsOption() {
+    for (String value : ImmutableList.of("soon", "20300231Z", "2030010", "")) {
+      String line = "expiry-time=\"" + value + "\" " + KEY1;
+      AccountSshKey key = AuthorizedKeys.parseKey(accountId, 1, line);
+      assertThat(key.expiryTime()).isEmpty();
+      assertThat(key.otherOptions()).containsExactly("expiry-time", value);
+      assertThat(AuthorizedKeys.format(key)).isEqualTo(line);
+    }
+  }
+
+  @Test
+  public void optionsSurviveSerialization() {
+    AccountSshKey key =
+        AuthorizedKeys.parseKey(
+            accountId,
+            1,
+            "no-pty,!agent-forwarding,expiry-time=\"20300102Z\",command=\"echo a b\" " + KEY1);
+    assertThat(key.sshPublicKey()).isEqualTo(KEY1);
+    assertThat(key.expiryTime()).hasValue(Instant.parse("2030-01-02T00:00:00Z"));
+    assertThat(key.otherOptions())
+        .containsExactly("no-pty", "true", "!agent-forwarding", "false", "command", "echo a b");
+
+    String line = AuthorizedKeys.format(key);
+    assertThat(AuthorizedKeys.parseKey(accountId, 1, line)).isEqualTo(key);
+    assertThat(AuthorizedKeys.format(AuthorizedKeys.parseKey(accountId, 1, line))).isEqualTo(line);
+  }
+
+  @Test
+  public void optionsOfInvalidKeySurviveSerialization() {
+    String content =
+        AuthorizedKeys.INVALID_KEY_COMMENT_PREFIX
+            + "expiry-time=\"20300102000000Z\",no-pty "
+            + KEY1
+            + "\n";
+    List<Optional<AccountSshKey>> keys = AuthorizedKeys.parse(accountId, content);
+    assertThat(keys.get(0).get().valid()).isFalse();
+    assertThat(keys.get(0).get().expiryTime()).hasValue(Instant.parse("2030-01-02T00:00:00Z"));
+    assertThat(AuthorizedKeys.serialize(keys)).isEqualTo(content);
+  }
+
+  @Test
+  public void keyWithoutOptionsIsSerializedAsIs() {
+    assertThat(AuthorizedKeys.format(AuthorizedKeys.parseKey(accountId, 1, KEY1))).isEqualTo(KEY1);
+  }
+
+  @Test
+  public void unparsableKeyIsKeptAsIs() {
+    String unparsable = "ssh-rsa not-base64!! john.doe@example.com";
+    AccountSshKey key = AuthorizedKeys.parseKey(accountId, 1, unparsable);
+    assertThat(key.otherOptions()).isEmpty();
+    assertThat(key.expiryTime()).isEmpty();
+    assertThat(AuthorizedKeys.format(key)).isEqualTo(unparsable);
+    assertThat(AuthorizedKeys.format(key.asInvalid())).isEqualTo(unparsable);
+  }
+
+  private void assertExpiryTime(String value, Instant expected) {
+    AccountSshKey key =
+        AuthorizedKeys.parseKey(accountId, 1, "expiry-time=\"" + value + "\" " + KEY1);
+    assertThat(key.expiryTime()).hasValue(expected);
+    assertThat(key.otherOptions()).isEmpty();
+  }
+
   private static String toWindowsLineEndings(String s) {
     return s.replace("\n", "\r\n");
   }
@@ -175,7 +274,7 @@
    * @return the expected line for this key in the authorized_keys file
    */
   private static String addKey(List<Optional<AccountSshKey>> keys, String pub) {
-    AccountSshKey key = AccountSshKey.create(Account.id(1), keys.size() + 1, pub);
+    AccountSshKey key = new AccountSshKey(Account.id(1), keys.size() + 1, pub);
     keys.add(Optional.of(key));
     return key.sshPublicKey() + "\n";
   }
@@ -186,7 +285,7 @@
    * @return the expected line for this key in the authorized_keys file
    */
   private static String addInvalidKey(List<Optional<AccountSshKey>> keys, String pub) {
-    AccountSshKey key = AccountSshKey.createInvalid(Account.id(1), keys.size() + 1, pub);
+    AccountSshKey key = new AccountSshKey(Account.id(1), keys.size() + 1, pub, false);
     keys.add(Optional.of(key));
     return AuthorizedKeys.INVALID_KEY_COMMENT_PREFIX + key.sshPublicKey() + "\n";
   }
diff --git a/javatests/com/google/gerrit/server/account/UniversalGroupBackendTest.java b/javatests/com/google/gerrit/server/account/UniversalGroupBackendTest.java
index e857ffa..1947c8d 100644
--- a/javatests/com/google/gerrit/server/account/UniversalGroupBackendTest.java
+++ b/javatests/com/google/gerrit/server/account/UniversalGroupBackendTest.java
@@ -26,9 +26,12 @@
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableSet;
 import com.google.gerrit.entities.AccountGroup;
 import com.google.gerrit.entities.AccountGroup.UUID;
 import com.google.gerrit.entities.GroupReference;
@@ -220,4 +223,42 @@
     actual = suggest(backend, "dddd");
     assertEquals(ImmutableList.of("dddd", "a", "cc", "bbb", "eeeee"), actual);
   }
+
+  @Test
+  public void knownGroupsByBackendShortCircuits() {
+    AccountGroup.UUID group1 = AccountGroup.uuid("group1");
+    AccountGroup.UUID group2 = AccountGroup.uuid("group2");
+
+    GroupMembership membership1 = mock(GroupMembership.class);
+    when(membership1.getKnownGroups()).thenReturn(ImmutableSet.of(group1));
+    when(membership1.getKnownGroupsByBackend()).thenCallRealMethod();
+    GroupBackend backend1 = mock(GroupBackend.class);
+    when(backend1.membershipsOf(any())).thenReturn(membership1);
+
+    GroupMembership membership2 = mock(GroupMembership.class);
+    when(membership2.getKnownGroups()).thenReturn(ImmutableSet.of(group2));
+    when(membership2.getKnownGroupsByBackend()).thenCallRealMethod();
+    GroupBackend backend2 = mock(GroupBackend.class);
+    when(backend2.membershipsOf(any())).thenReturn(membership2);
+
+    backends = new DynamicSet<>();
+    backends.add("gerrit", backend1);
+    backends.add("slow", backend2);
+    backend =
+        new UniversalGroupBackend(
+            new PluginSetContext<>(backends, PluginMetrics.DISABLED_INSTANCE),
+            new DisabledMetricMaker());
+
+    GroupMembership checker = backend.membershipsOf(user);
+    boolean found = false;
+    for (Set<UUID> backendGroups : checker.getKnownGroupsByBackend()) {
+      if (backendGroups.contains(group1)) {
+        found = true;
+        break;
+      }
+    }
+    assertTrue(found);
+    verify(membership1).getKnownGroups();
+    verify(membership2, never()).getKnownGroups();
+  }
 }
diff --git a/javatests/com/google/gerrit/server/account/externalids/storage/notedb/ExternalIDCacheLoaderTest.java b/javatests/com/google/gerrit/server/account/externalids/storage/notedb/ExternalIDCacheLoaderTest.java
index 03e4278..f1fead1 100644
--- a/javatests/com/google/gerrit/server/account/externalids/storage/notedb/ExternalIDCacheLoaderTest.java
+++ b/javatests/com/google/gerrit/server/account/externalids/storage/notedb/ExternalIDCacheLoaderTest.java
@@ -37,6 +37,7 @@
 import com.google.gerrit.server.git.GitRepositoryManager;
 import com.google.gerrit.server.git.meta.MetaDataUpdate;
 import com.google.gerrit.testing.InMemoryRepositoryManager;
+import com.google.inject.util.Providers;
 import java.io.IOException;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -48,6 +49,7 @@
 import org.eclipse.jgit.lib.Repository;
 import org.eclipse.jgit.revwalk.RevWalk;
 import org.eclipse.jgit.treewalk.TreeWalk;
+import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -67,20 +69,30 @@
 
   private ExternalIdFactoryNoteDbImpl externalIdFactory;
   @Mock private AuthConfig authConfig;
+  private Repository allUsersRepository;
 
   @Before
   public void setUp() throws Exception {
     externalIdFactory =
         new ExternalIdFactoryNoteDbImpl(new ExternalIdKeyFactory(() -> false), authConfig);
     externalIdCache = CacheBuilder.newBuilder().build();
-    repoManager.createRepository(ALL_USERS).close();
+    allUsersRepository = repoManager.createRepository(ALL_USERS);
     externalIdReader =
         new ExternalIdReader(
-            repoManager, ALL_USERS, new DisabledMetricMaker(), externalIdFactory, authConfig);
+            Providers.of(allUsersRepository),
+            ALL_USERS,
+            new DisabledMetricMaker(),
+            externalIdFactory,
+            authConfig);
     externalIdReaderSpy = Mockito.spy(externalIdReader);
     loader = createLoader();
   }
 
+  @After
+  public void tearDown() throws Exception {
+    allUsersRepository.close();
+  }
+
   @Test
   public void worksOnSingleCommit() throws Exception {
     ObjectId firstState = insertExternalId(1, 1);
@@ -250,8 +262,7 @@
 
   private ExternalIdCacheLoader createLoader() {
     return new ExternalIdCacheLoader(
-        repoManager,
-        ALL_USERS,
+        Providers.of(allUsersRepository),
         externalIdReaderSpy,
         externalIdCache,
         new DisabledMetricMaker(),
diff --git a/javatests/com/google/gerrit/server/cache/h2/H2CacheFactoryTest.java b/javatests/com/google/gerrit/server/cache/h2/H2CacheFactoryTest.java
index 9f55711..e06c564 100644
--- a/javatests/com/google/gerrit/server/cache/h2/H2CacheFactoryTest.java
+++ b/javatests/com/google/gerrit/server/cache/h2/H2CacheFactoryTest.java
@@ -66,7 +66,7 @@
 
     assertThat(readField(store, "url"))
         .isEqualTo(
-            "jdbc:h2:file:"
+            "jdbc:h2:async:"
                 + cacheDir.resolve("demo-cache-v2").toAbsolutePath()
                 + ";DB_CLOSE_DELAY=-1");
   }
diff --git a/javatests/com/google/gerrit/server/cache/mem/BUILD b/javatests/com/google/gerrit/server/cache/mem/BUILD
index 81b0b2e..7cd6447 100644
--- a/javatests/com/google/gerrit/server/cache/mem/BUILD
+++ b/javatests/com/google/gerrit/server/cache/mem/BUILD
@@ -9,6 +9,7 @@
         "//java/com/google/gerrit/metrics",
         "//java/com/google/gerrit/server",
         "//java/com/google/gerrit/server/cache/mem",
+        "//java/com/google/gerrit/testing:gerrit-junit",
         "//lib:guava",
         "//lib:jgit",
         "//lib:junit",
diff --git a/javatests/com/google/gerrit/server/cache/mem/DefaultMemoryCacheFactoryTest.java b/javatests/com/google/gerrit/server/cache/mem/DefaultMemoryCacheFactoryTest.java
index 7b7eed3..eff613d 100644
--- a/javatests/com/google/gerrit/server/cache/mem/DefaultMemoryCacheFactoryTest.java
+++ b/javatests/com/google/gerrit/server/cache/mem/DefaultMemoryCacheFactoryTest.java
@@ -16,9 +16,12 @@
 
 import static com.google.common.base.Functions.identity;
 import static com.google.common.truth.Truth.assertThat;
+import static com.google.gerrit.testing.GerritJUnit.assertThrows;
 
+import com.google.common.cache.Cache;
 import com.google.common.cache.CacheLoader;
 import com.google.common.cache.LoadingCache;
+import com.google.common.cache.RemovalCause;
 import com.google.common.cache.RemovalNotification;
 import com.google.common.cache.Weigher;
 import com.google.common.collect.ImmutableMap;
@@ -37,10 +40,12 @@
 import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
-import java.util.Optional;
-import java.util.Set;
+import java.util.Objects;
+import java.util.Queue;
 import java.util.concurrent.BrokenBarrierException;
 import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.CyclicBarrier;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Executors;
@@ -72,7 +77,7 @@
   private Config memoryCacheConfigWithThreadPool;
   private CyclicBarrier cacheGetStarted;
   private CyclicBarrier cacheGetCompleted;
-  private CyclicBarrier evictionReceived;
+  private CountDownLatch evictionReceived;
   private ForwardingRemovalTrackerListener forwardingRemovalListener;
   private WorkQueue workQueue;
 
@@ -104,7 +109,7 @@
     executor = Executors.newScheduledThreadPool(1);
     cacheGetStarted = new CyclicBarrier(2);
     cacheGetCompleted = new CyclicBarrier(2);
-    evictionReceived = new CyclicBarrier(2);
+    evictionReceived = new CountDownLatch(1);
   }
 
   @After
@@ -165,7 +170,7 @@
     assertThat(forwardingRemovalListener.contains(TEST_CACHE_KEY, TEST_CACHE_VALUE)).isFalse();
     cache.invalidate(TEST_CACHE_KEY);
 
-    evictionReceived.await(TEST_TIMEOUT_SEC, TimeUnit.SECONDS);
+    assertThat(evictionReceived.await(TEST_TIMEOUT_SEC, TimeUnit.SECONDS)).isTrue();
     assertThat(forwardingRemovalListener.contains(TEST_CACHE_KEY, TEST_CACHE_VALUE)).isTrue();
     assertThat(forwardingRemovalListener.removalThreadName(TEST_CACHE_KEY))
         .startsWith(threadPoolPrefix);
@@ -193,6 +198,149 @@
     assertThat(entries).containsExactly(1, 1, 2, 2);
   }
 
+  @Test
+  public void shouldNotifyWhenInvalidatingAbsentEntry() {
+    Cache<Integer, Integer> cache = memoryCacheFactoryDirectExecutor.build(newCacheDef(1));
+
+    cache.invalidate(TEST_CACHE_KEY);
+
+    assertExplicitRemoval(TEST_CACHE_KEY);
+  }
+
+  @Test
+  @SuppressWarnings("IncompatibleArgumentType")
+  public void shouldNotNotifyWhenInvalidatingWithWrongKeyType() {
+    Cache<Integer, Integer> cache = memoryCacheFactoryDirectExecutor.build(newCacheDef(1));
+
+    cache.invalidate("wrong key type");
+
+    assertThat(forwardingRemovalListener.removalEvents).isEmpty();
+  }
+
+  @Test
+  public void shouldStopBulkInvalidationAtNullKey() {
+    int keyBeforeNull = 1;
+    int keyAfterNull = 2;
+    Cache<Integer, Integer> cache = memoryCacheFactoryDirectExecutor.build(newCacheDef(2));
+    cache.put(keyBeforeNull, TEST_CACHE_VALUE);
+    cache.put(keyAfterNull, TEST_CACHE_VALUE);
+
+    assertThrows(
+        NullPointerException.class,
+        () -> cache.invalidateAll(Arrays.asList(keyBeforeNull, null, keyAfterNull)));
+
+    assertThat(cache.getIfPresent(keyBeforeNull)).isNull();
+    assertThat(cache.getIfPresent(keyAfterNull)).isEqualTo(TEST_CACHE_VALUE);
+    assertThat(forwardingRemovalListener.removalEvents).hasSize(1);
+    assertThat(forwardingRemovalListener.contains(keyBeforeNull, TEST_CACHE_VALUE)).isTrue();
+  }
+
+  @Test
+  public void shouldNotifyWhenInvalidatingAbsentLoadingCacheEntry() {
+    LoadingCache<Integer, Integer> cache =
+        memoryCacheFactoryDirectExecutor.build(newCacheDef(1), newCacheLoader(identity()));
+
+    cache.invalidate(TEST_CACHE_KEY);
+
+    assertExplicitRemoval(TEST_CACHE_KEY);
+  }
+
+  @Test
+  public void shouldNotifyWhenInvalidatingCacheWithZeroMemoryLimit() {
+    LoadingCache<Integer, Integer> cache =
+        memoryCacheFactoryDirectExecutor.build(newCacheDef(0), newCacheLoader(identity()));
+
+    cache.invalidate(TEST_CACHE_KEY);
+
+    assertExplicitRemoval(TEST_CACHE_KEY);
+  }
+
+  @Test
+  public void shouldNotifyForPresentAndAbsentKeysInBulkInvalidation() {
+    LoadingCache<Integer, Integer> cache =
+        memoryCacheFactoryDirectExecutor.build(newCacheDef(1), newCacheLoader(identity()));
+    cache.put(TEST_CACHE_KEY, TEST_CACHE_VALUE);
+
+    cache.invalidateAll(List.of(TEST_CACHE_KEY, TEST_CACHE_KEY + 1));
+
+    assertThat(forwardingRemovalListener.removalEvents).hasSize(2);
+    assertThat(forwardingRemovalListener.contains(TEST_CACHE_KEY, TEST_CACHE_VALUE)).isTrue();
+    assertThat(forwardingRemovalListener.contains(TEST_CACHE_KEY + 1, null)).isTrue();
+    for (RemovalNotification<Object, Object> notification :
+        forwardingRemovalListener.removalEvents) {
+      assertThat(notification.getCause()).isEqualTo(RemovalCause.EXPLICIT);
+    }
+  }
+
+  @Test
+  public void shouldContinueBulkInvalidationWhenExecutorIsShutDown() {
+    Cache<Integer, Integer> cache = memoryCacheFactoryWithThreadPool.build(newCacheDef(1));
+    cache.put(TEST_CACHE_KEY, TEST_CACHE_VALUE);
+    workQueue.getExecutor(DefaultMemoryCacheFactory.CACHE_EXECUTOR_PREFIX).shutdown();
+
+    cache.invalidateAll(List.of(TEST_CACHE_KEY + 1, TEST_CACHE_KEY));
+
+    assertThat(cache.getIfPresent(TEST_CACHE_KEY)).isNull();
+    assertThat(forwardingRemovalListener.removalEvents).hasSize(2);
+    assertThat(forwardingRemovalListener.contains(TEST_CACHE_KEY + 1, null)).isTrue();
+    assertThat(forwardingRemovalListener.contains(TEST_CACHE_KEY, TEST_CACHE_VALUE)).isTrue();
+    assertThat(forwardingRemovalListener.removalThreadName(TEST_CACHE_KEY + 1))
+        .isEqualTo(Thread.currentThread().getName());
+  }
+
+  @Test
+  public void shouldContinueBulkInvalidationWhenListenerThrows() {
+    ForwardingRemovalTrackerListener failingListener =
+        new ForwardingRemovalTrackerListener() {
+          @Override
+          public void onRemoval(RemovalNotification<Object, Object> notification) {
+            super.onRemoval(notification);
+            throw new IllegalStateException("Listener failed");
+          }
+        };
+    DefaultMemoryCacheFactory factory =
+        new DefaultMemoryCacheFactory(
+            memoryCacheConfigDirectExecutor, cache -> failingListener, workQueue);
+    Cache<Integer, Integer> cache = factory.build(newCacheDef(1));
+    cache.put(TEST_CACHE_KEY, TEST_CACHE_VALUE);
+
+    cache.invalidateAll(List.of(TEST_CACHE_KEY + 1, TEST_CACHE_KEY));
+
+    assertThat(cache.getIfPresent(TEST_CACHE_KEY)).isNull();
+    assertThat(failingListener.removalEvents).hasSize(2);
+  }
+
+  @Test
+  public void shouldNotifyAbsentEntryInBackgroundByDefault() throws Exception {
+    assertAbsentEntryNotificationThread(memoryCacheFactory, "ForkJoinPool");
+  }
+
+  @Test
+  public void shouldNotifyAbsentEntryInConfiguredThreadPool() throws Exception {
+    assertAbsentEntryNotificationThread(
+        memoryCacheFactoryWithThreadPool, DefaultMemoryCacheFactory.CACHE_EXECUTOR_PREFIX);
+  }
+
+  private void assertAbsentEntryNotificationThread(
+      DefaultMemoryCacheFactory factory, String threadName) throws Exception {
+    Cache<Integer, Integer> cache = factory.build(newCacheDef(1));
+
+    cache.invalidate(TEST_CACHE_KEY);
+
+    assertThat(evictionReceived.await(TEST_TIMEOUT_SEC, TimeUnit.SECONDS)).isTrue();
+    assertExplicitRemoval(TEST_CACHE_KEY);
+    assertThat(forwardingRemovalListener.removalThreadName(TEST_CACHE_KEY)).startsWith(threadName);
+  }
+
+  private void assertExplicitRemoval(int key) {
+    assertThat(forwardingRemovalListener.removalEvents).hasSize(1);
+    RemovalNotification<Object, Object> notification =
+        forwardingRemovalListener.removalEvents.iterator().next();
+    assertThat(notification.getKey()).isEqualTo(key);
+    assertThat(notification.getValue()).isNull();
+    assertThat(notification.getCause()).isEqualTo(RemovalCause.EXPLICIT);
+  }
+
   private void assertCacheEvictionIsNotBlocking(LoadingCache<Integer, Integer> disabledCache)
       throws InterruptedException, BrokenBarrierException, TimeoutException, ExecutionException {
     ScheduledFuture<Integer> cacheValue =
@@ -234,40 +382,25 @@
   }
 
   private class ForwardingRemovalTrackerListener extends ForwardingRemovalListener<Object, Object> {
-    private final ConcurrentHashMap<Object, Set<Object>> removalEvents;
+    private final Queue<RemovalNotification<Object, Object>> removalEvents;
     private final ConcurrentHashMap<Object, String> removalThreads;
 
     public ForwardingRemovalTrackerListener() {
       super(null, null);
-
-      removalEvents = new ConcurrentHashMap<>();
+      removalEvents = new ConcurrentLinkedQueue<>();
       removalThreads = new ConcurrentHashMap<>();
     }
 
     @Override
     public void onRemoval(RemovalNotification<Object, Object> notification) {
-      Set<Object> setOfValues =
-          removalEvents.computeIfAbsent(
-              notification.getKey(),
-              (key) -> {
-                Set<Object> elements = ConcurrentHashMap.newKeySet();
-                return elements;
-              });
-      setOfValues.add(notification.getValue());
-
+      removalEvents.add(notification);
       removalThreads.put(notification.getKey(), Thread.currentThread().getName());
-
-      try {
-        evictionReceived.await(TEST_TIMEOUT_SEC, TimeUnit.SECONDS);
-      } catch (InterruptedException | BrokenBarrierException | TimeoutException e) {
-        throw new IllegalStateException(e);
-      }
+      evictionReceived.countDown();
     }
 
     private boolean contains(Object key, Object value) {
-      return Optional.ofNullable(removalEvents.get(key))
-          .map(sv -> sv.contains(value))
-          .orElse(false);
+      return removalEvents.stream()
+          .anyMatch(n -> Objects.equals(n.getKey(), key) && Objects.equals(n.getValue(), value));
     }
 
     private String removalThreadName(Object key) {
@@ -289,9 +422,8 @@
       }
 
       @Override
-      @Nullable
       public TypeLiteral<Integer> keyType() {
-        return null;
+        return TypeLiteral.get(Integer.class);
       }
 
       @Override
diff --git a/javatests/com/google/gerrit/server/change/ParentDataProviderTest.java b/javatests/com/google/gerrit/server/change/ParentDataProviderTest.java
new file mode 100644
index 0000000..b246b0c
--- /dev/null
+++ b/javatests/com/google/gerrit/server/change/ParentDataProviderTest.java
@@ -0,0 +1,277 @@
+// Copyright (C) 2026 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.google.gerrit.server.change;
+
+import static com.google.common.truth.Truth.assertThat;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyCollection;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.spy;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import com.google.common.collect.ImmutableList;
+import com.google.gerrit.entities.Account;
+import com.google.gerrit.entities.Change;
+import com.google.gerrit.entities.ParentCommitData;
+import com.google.gerrit.entities.PatchSet;
+import com.google.gerrit.entities.Project;
+import com.google.gerrit.server.index.change.ChangeField;
+import com.google.gerrit.server.query.change.ChangeData;
+import com.google.gerrit.server.query.change.InternalChangeQuery;
+import com.google.gerrit.testing.InMemoryRepositoryManager;
+import com.google.gerrit.testing.InMemoryRepositoryManager.Repo;
+import com.google.gerrit.testing.TestChanges;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicInteger;
+import org.eclipse.jgit.junit.TestRepository;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.jgit.revwalk.RevWalk;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ParentDataProviderTest {
+  private static final String TARGET_BRANCH = "refs/heads/main";
+
+  private Account.Id userId;
+  private Project.NameKey project;
+  private InMemoryRepositoryManager repoManager;
+  private TestRepository<Repo> testRepo;
+
+  @Before
+  public void setUp() throws Exception {
+    userId = Account.id(1);
+    project = Project.nameKey("platform/cts");
+    repoManager = new InMemoryRepositoryManager();
+    testRepo = new TestRepository<>(repoManager.createRepository(project));
+  }
+
+  @Test
+  public void get_memoizesRepeatedCallsForSameParentAndBranch() throws Exception {
+    RevCommit baseCommit = testRepo.branch(TARGET_BRANCH).commit().create();
+    InternalChangeQuery query = mockQuery();
+    when(query.byProjectCommit(project, baseCommit.getId())).thenReturn(ImmutableList.of());
+
+    AtomicInteger queryAllocations = new AtomicInteger();
+    ParentDataProvider provider =
+        new ParentDataProvider(
+            () -> {
+              queryAllocations.incrementAndGet();
+              return query;
+            });
+
+    Repo spyRepo = spy(testRepo.getRepository());
+    try (RevWalk rw = new RevWalk(spyRepo)) {
+      for (int ps = 1; ps <= 9; ps++) {
+        ParentCommitData data =
+            provider.get(project, spyRepo, rw, baseCommit.getId(), TARGET_BRANCH);
+        assertThat(data.commitId()).hasValue(baseCommit.getId());
+        assertThat(data.branchName()).hasValue(TARGET_BRANCH);
+        assertThat(data.isMergedInTargetBranch()).isTrue();
+        assertThat(data.changeNumber()).isEmpty();
+      }
+    }
+
+    assertThat(queryAllocations.get()).isEqualTo(1);
+    verify(query).setRequestedFields(ChangeField.CHANGE_SPEC, ChangeField.PATCH_SET_SPEC);
+    verify(query).byProjectCommit(project, baseCommit.getId());
+    verify(spyRepo, times(1)).exactRef(TARGET_BRANCH);
+  }
+
+  @Test
+  public void prefetch_batchesDistinctParentCommitsIntoSingleProjectScopedQuery() throws Exception {
+    // Model the 21-patchset / 5-unique-parent scenario from b/572808865:
+    // - Group A (PS 1..4): parent is PS 2 of parentChange (42179854)
+    // - Group B (PS 5..7): parent is PS 4 of parentChange (42179854)
+    // - Group C (PS 8..16): parent is merged baseCommit1 on refs/heads/main
+    // - Group D (PS 17..19): parent is merged baseCommit2 on refs/heads/main
+    // - Group E (PS 20..21): parent is merged baseCommit3 on refs/heads/main
+    RevCommit baseCommit1 = testRepo.branch(TARGET_BRANCH).commit().create();
+    RevCommit baseCommit2 = testRepo.branch(TARGET_BRANCH).commit().parent(baseCommit1).create();
+    RevCommit baseCommit3 = testRepo.branch(TARGET_BRANCH).commit().parent(baseCommit2).create();
+
+    RevCommit parentChangePs1 = testRepo.commit().parent(baseCommit1).create();
+    RevCommit parentChangePs2 = testRepo.commit().parent(baseCommit1).create();
+    RevCommit parentChangePs3 = testRepo.commit().parent(baseCommit1).create();
+    RevCommit parentChangePs4 = testRepo.commit().parent(baseCommit1).create();
+
+    ChangeData parentChange = newChange(parentChangePs1);
+    addPatchSet(parentChange, parentChangePs2);
+    addPatchSet(parentChange, parentChangePs3);
+    addPatchSet(parentChange, parentChangePs4);
+
+    List<ObjectId> patchSetParents = new ArrayList<>();
+    for (int i = 0; i < 4; i++) {
+      patchSetParents.add(parentChangePs2.getId());
+    }
+    for (int i = 0; i < 3; i++) {
+      patchSetParents.add(parentChangePs4.getId());
+    }
+    for (int i = 0; i < 9; i++) {
+      patchSetParents.add(baseCommit1.getId());
+    }
+    for (int i = 0; i < 3; i++) {
+      patchSetParents.add(baseCommit2.getId());
+    }
+    for (int i = 0; i < 2; i++) {
+      patchSetParents.add(baseCommit3.getId());
+    }
+    assertThat(patchSetParents).hasSize(21);
+
+    InternalChangeQuery query = mockQuery();
+    when(query.byProjectCommits(eq(project), anyCollection()))
+        .thenReturn(ImmutableList.of(parentChange));
+
+    AtomicInteger queryAllocations = new AtomicInteger();
+    ParentDataProvider provider =
+        new ParentDataProvider(
+            () -> {
+              queryAllocations.incrementAndGet();
+              return query;
+            });
+
+    Repo spyRepo = spy(testRepo.getRepository());
+    try (RevWalk rw = new RevWalk(spyRepo)) {
+      provider.prefetch(project, patchSetParents);
+      assertThat(queryAllocations.get()).isEqualTo(1);
+      verify(query).setRequestedFields(ChangeField.CHANGE_SPEC, ChangeField.PATCH_SET_SPEC);
+      verify(query)
+          .byProjectCommits(
+              project,
+              ImmutableList.of(
+                  parentChangePs2.name(),
+                  parentChangePs4.name(),
+                  baseCommit1.name(),
+                  baseCommit2.name(),
+                  baseCommit3.name()));
+
+      List<ParentCommitData> results = new ArrayList<>(21);
+      for (ObjectId parentId : patchSetParents) {
+        results.add(provider.get(project, spyRepo, rw, parentId, TARGET_BRANCH));
+      }
+
+      // No additional index queries should be executed during the 21 get() calls.
+      assertThat(queryAllocations.get()).isEqualTo(1);
+      verify(query, never()).byCommit(any(String.class));
+      verify(query, never()).byProjectCommit(any(), any(ObjectId.class));
+      // Target branch ref is resolved once across all 14 base-commit patchsets (3 unique bases).
+      verify(spyRepo, times(1)).exactRef(TARGET_BRANCH);
+
+      // Verify Group A (PS 1..4 -> parentChange PS 2)
+      for (int i = 0; i < 4; i++) {
+        ParentCommitData d = results.get(i);
+        assertThat(d.changeNumber()).hasValue(parentChange.getId().get());
+        assertThat(d.patchSetNumber()).hasValue(2);
+        assertThat(d.isMergedInTargetBranch()).isFalse();
+      }
+      // Verify Group B (PS 5..7 -> parentChange PS 4)
+      for (int i = 4; i < 7; i++) {
+        ParentCommitData d = results.get(i);
+        assertThat(d.changeNumber()).hasValue(parentChange.getId().get());
+        assertThat(d.patchSetNumber()).hasValue(4);
+        assertThat(d.isMergedInTargetBranch()).isFalse();
+      }
+      // Verify Groups C, D, E (PS 8..21 -> merged base commits on refs/heads/main)
+      for (int i = 7; i < 21; i++) {
+        ParentCommitData d = results.get(i);
+        assertThat(d.changeNumber()).isEmpty();
+        assertThat(d.branchName()).hasValue(TARGET_BRANCH);
+        assertThat(d.isMergedInTargetBranch()).isTrue();
+      }
+    }
+  }
+
+  @Test
+  public void get_cachesPerTargetBranchWhileReusingChangeLookup() throws Exception {
+    RevCommit mainCommit = testRepo.branch(TARGET_BRANCH).commit().create();
+    RevCommit otherBranchCommit = testRepo.branch("refs/heads/other").commit().create();
+    assertThat(otherBranchCommit).isNotEqualTo(mainCommit);
+
+    InternalChangeQuery query = mockQuery();
+    when(query.byProjectCommit(project, mainCommit.getId())).thenReturn(ImmutableList.of());
+
+    AtomicInteger queryAllocations = new AtomicInteger();
+    ParentDataProvider provider =
+        new ParentDataProvider(
+            () -> {
+              queryAllocations.incrementAndGet();
+              return query;
+            });
+
+    try (RevWalk rw = new RevWalk(testRepo.getRepository())) {
+      ParentCommitData onMain =
+          provider.get(project, testRepo.getRepository(), rw, mainCommit.getId(), TARGET_BRANCH);
+      ParentCommitData onOther =
+          provider.get(
+              project, testRepo.getRepository(), rw, mainCommit.getId(), "refs/heads/other");
+
+      assertThat(onMain.branchName()).hasValue(TARGET_BRANCH);
+      assertThat(onMain.isMergedInTargetBranch()).isTrue();
+
+      assertThat(onOther.branchName()).hasValue("refs/heads/other");
+      assertThat(onOther.isMergedInTargetBranch()).isFalse();
+    }
+
+    // Index lookup for mainCommit was reused across both target branches.
+    assertThat(queryAllocations.get()).isEqualTo(1);
+  }
+
+  @Test
+  public void prefetch_multipleChangesForSameCommit_fallsBackToTargetBranch() throws Exception {
+    RevCommit sharedCommit = testRepo.branch(TARGET_BRANCH).commit().create();
+    ChangeData change1 = newChange(sharedCommit);
+    ChangeData change2 = newChange(sharedCommit);
+
+    InternalChangeQuery query = mockQuery();
+    when(query.byProjectCommit(project, sharedCommit.getId()))
+        .thenReturn(ImmutableList.of(change1, change2));
+
+    ParentDataProvider provider = new ParentDataProvider(() -> query);
+    try (RevWalk rw = new RevWalk(testRepo.getRepository())) {
+      provider.prefetch(project, ImmutableList.of(sharedCommit.getId()));
+      ParentCommitData data =
+          provider.get(project, testRepo.getRepository(), rw, sharedCommit.getId(), TARGET_BRANCH);
+      assertThat(data.changeNumber()).isEmpty();
+      assertThat(data.isMergedInTargetBranch()).isTrue();
+    }
+  }
+
+  private InternalChangeQuery mockQuery() {
+    InternalChangeQuery query = mock(InternalChangeQuery.class);
+    when(query.setRequestedFields(any(), any())).thenReturn(query);
+    return query;
+  }
+
+  private ChangeData newChange(ObjectId commitId) {
+    Change c = TestChanges.newChange(project, userId);
+    ChangeData cd = ChangeData.createForTest(project, c.getId(), 1, commitId);
+    cd.setChange(c);
+    cd.setPatchSets(ImmutableList.of(cd.currentPatchSet()));
+    return cd;
+  }
+
+  private void addPatchSet(ChangeData cd, ObjectId commitId) {
+    TestChanges.incrementPatchSet(cd.change());
+    PatchSet ps = TestChanges.newPatchSet(cd.change().currentPatchSetId(), commitId.name(), userId);
+    List<PatchSet> patchSets = new ArrayList<>(cd.patchSets());
+    patchSets.add(ps);
+    cd.setPatchSets(patchSets);
+  }
+}
diff --git a/javatests/com/google/gerrit/server/edit/tree/TreeCreatorTest.java b/javatests/com/google/gerrit/server/edit/tree/TreeCreatorTest.java
index 7e1a23b..270b179 100644
--- a/javatests/com/google/gerrit/server/edit/tree/TreeCreatorTest.java
+++ b/javatests/com/google/gerrit/server/edit/tree/TreeCreatorTest.java
@@ -20,13 +20,20 @@
 import static org.eclipse.jgit.lib.Constants.OBJ_BLOB;
 
 import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableSet;
 import com.google.gerrit.common.RawInputUtil;
+import java.io.IOException;
+import java.util.List;
+import org.eclipse.jgit.dircache.DirCacheEditor;
 import org.eclipse.jgit.internal.storage.dfs.DfsRepositoryDescription;
 import org.eclipse.jgit.internal.storage.dfs.InMemoryRepository;
 import org.eclipse.jgit.junit.TestRepository;
+import org.eclipse.jgit.lib.FileMode;
 import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.ObjectInserter;
 import org.eclipse.jgit.lib.ObjectReader;
 import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.revwalk.RevCommit;
 import org.eclipse.jgit.revwalk.RevObject;
 import org.eclipse.jgit.revwalk.RevTree;
 import org.eclipse.jgit.revwalk.RevWalk;
@@ -37,7 +44,7 @@
 
 public class TreeCreatorTest {
 
-  private Repository repository;
+  private InMemoryRepository repository;
   private TestRepository<?> testRepository;
 
   @Before
@@ -66,6 +73,79 @@
   }
 
   @Test
+  public void multipleFileContentModificationsCreateSinglePackfile() throws Exception {
+    TreeCreator treeCreator = TreeCreator.basedOnEmptyTree();
+    treeCreator.addTreeModifications(
+        ImmutableList.of(
+            new ChangeFileContentModification("file1.txt", RawInputUtil.create("Content 1")),
+            new ChangeFileContentModification("file2.txt", RawInputUtil.create("Content 2")),
+            new ChangeFileContentModification("dir/file3.txt", RawInputUtil.create("Content 3"))));
+    ObjectId newTreeId = treeCreator.createNewTreeAndGetId(repository);
+
+    assertThat(getFileContent(newTreeId, "file1.txt")).isEqualTo("Content 1");
+    assertThat(getFileContent(newTreeId, "file2.txt")).isEqualTo("Content 2");
+    assertThat(getFileContent(newTreeId, "dir/file3.txt")).isEqualTo("Content 3");
+    assertThat(repository.getObjectDatabase().getPacks()).hasLength(1);
+  }
+
+  @Test
+  public void multipleFileContentModificationsReuseProvidedObjectInserter() throws Exception {
+    RevCommit baseCommit = testRepository.branch("refs/heads/main").commit().create();
+    int initialPacks = repository.getObjectDatabase().getPacks().length;
+
+    try (ObjectInserter oi = repository.newObjectInserter();
+        ObjectReader or = oi.newReader()) {
+      TreeCreator treeCreator = TreeCreator.basedOn(baseCommit, oi, or);
+      treeCreator.addTreeModifications(
+          ImmutableList.of(
+              new ChangeFileContentModification("file1.txt", RawInputUtil.create("Content 1")),
+              new ChangeFileContentModification("file2.txt", RawInputUtil.create("Content 2"))));
+      ObjectId newTreeId = treeCreator.createNewTreeAndGetId(repository);
+
+      assertThat(getFileContent(newTreeId, "file1.txt")).isEqualTo("Content 1");
+      assertThat(getFileContent(newTreeId, "file2.txt")).isEqualTo("Content 2");
+      assertThat(repository.getObjectDatabase().getPacks()).hasLength(initialPacks + 1);
+    }
+  }
+
+  @Test
+  public void customTreeModificationImplementingOnlyThreeArgMethodWorks() throws Exception {
+    TreeModification customModification =
+        new TreeModification() {
+          @Override
+          public ImmutableList<DirCacheEditor.PathEdit> getPathEdits(
+              Repository repository, ObjectId treeId, ImmutableList<? extends ObjectId> parents)
+              throws IOException {
+            try (ObjectInserter inserter = repository.newObjectInserter()) {
+              ObjectId blobId = inserter.insert(OBJ_BLOB, "Legacy Custom".getBytes(UTF_8));
+              inserter.flush();
+              return ImmutableList.of(new AddPath("custom.txt", FileMode.REGULAR_FILE, blobId));
+            }
+          }
+
+          @Override
+          public ImmutableSet<String> getFilePaths() {
+            return ImmutableSet.of("custom.txt");
+          }
+        };
+
+    TreeCreator treeCreator = TreeCreator.basedOnEmptyTree();
+    treeCreator.addTreeModifications(ImmutableList.of(customModification));
+    ObjectId newTreeId = treeCreator.createNewTreeAndGetId(repository);
+
+    assertThat(getFileContent(newTreeId, "custom.txt")).isEqualTo("Legacy Custom");
+  }
+
+  @Test
+  public void changeFileContentModificationWorksViaThreeArgGetPathEdits() throws Exception {
+    ChangeFileContentModification modification =
+        new ChangeFileContentModification("direct.txt", RawInputUtil.create("Direct 3-arg"));
+    List<DirCacheEditor.PathEdit> edits =
+        modification.getPathEdits(repository, ObjectId.zeroId(), ImmutableList.of());
+    assertThat(edits).hasSize(1);
+  }
+
+  @Test
   public void renameFileModificationDoesNotComplainAboutEmptyTree() throws Exception {
     TreeCreator treeCreator = TreeCreator.basedOnEmptyTree();
     treeCreator.addTreeModifications(
diff --git a/javatests/com/google/gerrit/server/events/EventJsonTest.java b/javatests/com/google/gerrit/server/events/EventJsonTest.java
index ff876e0..4a318a5 100644
--- a/javatests/com/google/gerrit/server/events/EventJsonTest.java
+++ b/javatests/com/google/gerrit/server/events/EventJsonTest.java
@@ -571,6 +571,41 @@
     ProjectCreatedEvent event = new ProjectCreatedEvent();
     event.projectName = PROJECT;
     event.headName = REF;
+    event.gitConfig =
+        "[extensions]\n\trefStorage = reftable\n[branch \"main\"]\n\tmerge = refs/heads/main\n";
+
+    assertThatJsonMap(event)
+        .isEqualTo(
+            ImmutableMap.builder()
+                .put("projectName", PROJECT)
+                .put("headName", REF)
+                .put(
+                    "gitConfig",
+                    "[extensions]\n\trefStorage = reftable\n[branch \"main\"]\n"
+                        + "\tmerge = refs/heads/main\n")
+                .put("type", "project-created")
+                .put("eventCreatedOn", TS1)
+                .build());
+  }
+
+  @Test
+  public void projectCreatedEventGitConfigRoundTrip() {
+    ProjectCreatedEvent event = new ProjectCreatedEvent();
+    event.gitConfig =
+        "[remote \"origin\"]\n"
+            + "\tfetch = +refs/heads/*:refs/remotes/origin/*\n"
+            + "\tfetch = +refs/tags/*:refs/tags/*\n";
+
+    ProjectCreatedEvent result = gson.fromJson(gson.toJson(event), ProjectCreatedEvent.class);
+
+    assertThat(result.gitConfig).isEqualTo(event.gitConfig);
+  }
+
+  @Test
+  public void projectCreatedEventWithoutGitConfigOmitsField() {
+    ProjectCreatedEvent event = new ProjectCreatedEvent();
+    event.projectName = PROJECT;
+    event.headName = REF;
 
     assertThatJsonMap(event)
         .isEqualTo(
@@ -583,6 +618,17 @@
   }
 
   @Test
+  public void projectCreatedEventWithoutGitConfigIsBackwardCompatible() {
+    ProjectCreatedEvent event =
+        gson.fromJson(
+            "{\"type\":\"project-created\",\"projectName\":\"legacy-project\","
+                + "\"headName\":\"refs/heads/master\"}",
+            ProjectCreatedEvent.class);
+
+    assertThat(event.gitConfig).isNull();
+  }
+
+  @Test
   public void projectHeadUpdatedEvent() {
     ProjectHeadUpdatedEvent event = new ProjectHeadUpdatedEvent();
     event.projectName = PROJECT;
diff --git a/javatests/com/google/gerrit/server/git/AllUsersRepositoryProviderTest.java b/javatests/com/google/gerrit/server/git/AllUsersRepositoryProviderTest.java
index df78f7b..bac09cb 100644
--- a/javatests/com/google/gerrit/server/git/AllUsersRepositoryProviderTest.java
+++ b/javatests/com/google/gerrit/server/git/AllUsersRepositoryProviderTest.java
@@ -107,7 +107,7 @@
 
   private static class TrackingRepositoryManager extends LocalDiskRepositoryManager {
     private TrackingRepository openedRepository;
-    private Consumer<TrackingRepository> onOpen = repo -> {};
+    private volatile Consumer<TrackingRepository> onOpen = repo -> {};
 
     TrackingRepositoryManager(SitePaths site, Config cfg) {
       super(site, cfg);
diff --git a/javatests/com/google/gerrit/server/git/CodeReviewCommitGraphTest.java b/javatests/com/google/gerrit/server/git/CodeReviewCommitGraphTest.java
new file mode 100644
index 0000000..32d3e5b
--- /dev/null
+++ b/javatests/com/google/gerrit/server/git/CodeReviewCommitGraphTest.java
@@ -0,0 +1,119 @@
+// Copyright (C) 2026 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.google.gerrit.server.git;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import com.google.gerrit.server.git.CodeReviewCommit.CodeReviewRevWalk;
+import java.io.IOException;
+import java.util.Optional;
+import java.util.concurrent.atomic.AtomicInteger;
+import org.eclipse.jgit.internal.storage.commitgraph.CommitGraph;
+import org.eclipse.jgit.internal.storage.file.FileRepository;
+import org.eclipse.jgit.internal.storage.file.GC;
+import org.eclipse.jgit.junit.TestRepository;
+import org.eclipse.jgit.lib.AnyObjectId;
+import org.eclipse.jgit.lib.ConfigConstants;
+import org.eclipse.jgit.lib.ObjectLoader;
+import org.eclipse.jgit.lib.ObjectReader;
+import org.eclipse.jgit.lib.StoredConfig;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
+
+/** Tests that {@link CodeReviewRevWalk} parses commits from the commit-graph when it can. */
+public class CodeReviewCommitGraphTest {
+  @Rule public TemporaryFolder temporaryFolder = new TemporaryFolder();
+
+  private FileRepository repo;
+  private TestRepository<FileRepository> tr;
+  private RevCommit tip;
+
+  @Before
+  public void setUp() throws Exception {
+    repo = new FileRepository(temporaryFolder.newFolder("repo.git"));
+    repo.create(true);
+    tr = new TestRepository<>(repo);
+    RevCommit c1 = tr.commit().message("c1").create();
+    RevCommit c2 = tr.commit().parent(c1).message("c2").create();
+    tip = tr.commit().parent(c2).message("c3").create();
+    tr.update("refs/heads/master", tip);
+  }
+
+  @Test
+  public void commitsAreParsedFromCommitGraph() throws Exception {
+    writeCommitGraph();
+    assertThat(objectsOpenedWalkingFromTip()).isEqualTo(0);
+  }
+
+  @Test
+  public void commitsAreParsedWithoutCommitGraph() throws Exception {
+    assertThat(objectsOpenedWalkingFromTip()).isEqualTo(3);
+  }
+
+  private int objectsOpenedWalkingFromTip() throws Exception {
+    CountingReader reader = new CountingReader(repo.newObjectReader());
+    try (CodeReviewRevWalk rw = CodeReviewCommit.newRevWalk(reader)) {
+      rw.setRetainBody(false);
+      rw.markStart(rw.lookupCommit(tip));
+      int commits = 0;
+      while (rw.next() != null) {
+        commits++;
+      }
+      assertThat(commits).isEqualTo(3);
+      return reader.opens.get();
+    }
+  }
+
+  private void writeCommitGraph() throws Exception {
+    StoredConfig cfg = repo.getConfig();
+    cfg.setBoolean(ConfigConstants.CONFIG_CORE_SECTION, null, "commitGraph", true);
+    cfg.setBoolean(
+        ConfigConstants.CONFIG_GC_SECTION,
+        null,
+        ConfigConstants.CONFIG_KEY_WRITE_COMMIT_GRAPH,
+        true);
+    cfg.save();
+    new GC(repo).gc().get();
+  }
+
+  /** Reader that counts object loads and keeps exposing the commit-graph of the wrapped reader. */
+  private static class CountingReader extends ObjectReader.Filter {
+    final AtomicInteger opens = new AtomicInteger();
+    private final ObjectReader delegate;
+
+    CountingReader(ObjectReader delegate) {
+      this.delegate = delegate;
+    }
+
+    @Override
+    protected ObjectReader delegate() {
+      return delegate;
+    }
+
+    @Override
+    public ObjectLoader open(AnyObjectId objectId, int typeHint) throws IOException {
+      opens.incrementAndGet();
+      return super.open(objectId, typeHint);
+    }
+
+    @Override
+    public Optional<CommitGraph> getCommitGraph() throws IOException {
+      return delegate.getCommitGraph();
+    }
+  }
+}
diff --git a/javatests/com/google/gerrit/server/git/GitRepositoryManagerTest.java b/javatests/com/google/gerrit/server/git/GitRepositoryManagerTest.java
index 82cc049..2f7ed67 100644
--- a/javatests/com/google/gerrit/server/git/GitRepositoryManagerTest.java
+++ b/javatests/com/google/gerrit/server/git/GitRepositoryManagerTest.java
@@ -14,9 +14,13 @@
 package com.google.gerrit.server.git;
 
 import static com.google.common.truth.Truth.assertThat;
+import static org.junit.Assert.assertThrows;
 
+import com.google.gerrit.entities.Project;
 import com.google.gerrit.entities.Project.NameKey;
+import com.google.gerrit.extensions.client.RefStorage;
 import java.util.NavigableSet;
+import org.eclipse.jgit.lib.RefStorageFormat;
 import org.eclipse.jgit.lib.Repository;
 import org.junit.Before;
 import org.junit.Test;
@@ -35,6 +39,22 @@
     assertThat(objectUnderTest.canPerformGC()).isFalse();
   }
 
+  @Test
+  public void shouldRejectUnsupportedRefStorageFormat() {
+    assertThrows(
+        RefStorageNotSupportedException.class,
+        () -> objectUnderTest.createRepository(Project.nameKey("test"), RefStorage.REFTABLE));
+  }
+
+  @Test
+  public void shouldRejectUnsupportedRefStorageConversion() {
+    assertThrows(
+        RefStorageNotSupportedException.class,
+        () ->
+            objectUnderTest.convertRefStorage(
+                Project.nameKey("test"), RefStorageFormat.REFTABLE, true, true));
+  }
+
   private static class TestGitRepositoryManager implements GitRepositoryManager {
 
     @Override
diff --git a/javatests/com/google/gerrit/server/git/LocalDiskRepositoryManagerTest.java b/javatests/com/google/gerrit/server/git/LocalDiskRepositoryManagerTest.java
index 49ffe6f..2260367 100644
--- a/javatests/com/google/gerrit/server/git/LocalDiskRepositoryManagerTest.java
+++ b/javatests/com/google/gerrit/server/git/LocalDiskRepositoryManagerTest.java
@@ -19,16 +19,25 @@
 import static com.google.gerrit.testing.GerritJUnit.assertThrows;
 
 import com.google.gerrit.entities.Project;
+import com.google.gerrit.extensions.client.RefStorage;
+import com.google.gerrit.server.cache.PerThreadCache;
 import com.google.gerrit.server.config.SitePaths;
 import com.google.gerrit.server.git.GitRepositoryManager.Status;
 import com.google.gerrit.server.ioutil.HostPlatform;
+import com.google.gerrit.testing.ConfigSuite;
+import java.io.File;
 import java.io.IOException;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.StandardCopyOption;
+import java.util.concurrent.atomic.AtomicBoolean;
 import org.eclipse.jgit.errors.RepositoryNotFoundException;
+import org.eclipse.jgit.internal.storage.file.FileReftableDatabase;
+import org.eclipse.jgit.internal.storage.file.FileRepository;
+import org.eclipse.jgit.internal.storage.file.RefDirectory;
 import org.eclipse.jgit.lib.Config;
 import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.lib.RefStorageFormat;
 import org.eclipse.jgit.lib.Repository;
 import org.eclipse.jgit.lib.RepositoryCache;
 import org.eclipse.jgit.lib.RepositoryCache.FileKey;
@@ -37,19 +46,27 @@
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
+import org.junit.runner.RunWith;
 
+@RunWith(ConfigSuite.class)
 public class LocalDiskRepositoryManagerTest {
   @Rule public TemporaryFolder temporaryFolder = new TemporaryFolder();
+  @ConfigSuite.Parameter public Config cfg;
 
-  private Config cfg;
   private SitePaths site;
   private LocalDiskRepositoryManager repoManager;
 
+  @ConfigSuite.Config
+  public static Config withoutFileKeyCache() {
+    Config cfg = new Config();
+    cfg.setBoolean("core", null, "useFileKeyByProjectCache", false);
+    return cfg;
+  }
+
   @Before
   public void setUp() throws Exception {
     site = new SitePaths(temporaryFolder.newFolder().toPath());
     site.resolve("git").toFile().mkdir();
-    cfg = new Config();
     cfg.setString("gerrit", null, "basePath", "git");
     repoManager = new LocalDiskRepositoryManager(site, cfg);
   }
@@ -74,6 +91,67 @@
   }
 
   @Test
+  public void createsRequestedRefStorage() throws Exception {
+    try (Repository repo =
+        repoManager.createRepository(Project.nameKey("files"), RefStorage.FILES)) {
+      assertThat(repo.getRefDatabase()).isInstanceOf(RefDirectory.class);
+    }
+    try (Repository repo =
+        repoManager.createRepository(Project.nameKey("reftable"), RefStorage.REFTABLE)) {
+      assertThat(repo.getRefDatabase()).isInstanceOf(FileReftableDatabase.class);
+    }
+  }
+
+  @Test
+  public void conversionInvalidatesCachedRepositoryAndDetectsNoOp() throws Exception {
+    Project.NameKey name = Project.nameKey("manager-conversion");
+    repoManager.createRepository(name).close();
+    repoManager.openRepository(name).close();
+    assertThat(repoManager.convertRefStorage(name, RefStorageFormat.REFTABLE, true, false))
+        .isTrue();
+    assertThat(repoManager.convertRefStorage(name, RefStorageFormat.REFTABLE, true, false))
+        .isFalse();
+    try (PerThreadCache ignored = PerThreadCache.create();
+        Repository repo = repoManager.openRepository(name)) {
+      assertThat(repo.getRefDatabase()).isInstanceOf(FileReftableDatabase.class);
+    }
+    assertThat(repoManager.convertRefStorage(name, RefStorageFormat.FILES, true, false)).isTrue();
+    try (PerThreadCache ignored = PerThreadCache.create();
+        Repository repo = repoManager.openRepository(name)) {
+      assertThat(repo.getRefDatabase()).isInstanceOf(RefDirectory.class);
+    }
+  }
+
+  @Test
+  public void conversionPreservesDelegateRepositoryHook() throws Exception {
+    Project.NameKey name = Project.nameKey("delegated-conversion");
+    repoManager.createRepository(name).close();
+    AtomicBoolean called = new AtomicBoolean();
+    LocalDiskRepositoryManager wrappedManager =
+        new LocalDiskRepositoryManager(site, cfg) {
+          @Override
+          public Repository openRepository(Project.NameKey project)
+              throws RepositoryNotFoundException {
+            return new DelegateRepository(super.openRepository(project)) {
+              @Override
+              public void convertRefStorage(String format, boolean writeLogs, boolean backup)
+                  throws IOException {
+                called.set(true);
+                super.convertRefStorage(format, writeLogs, backup);
+              }
+            };
+          }
+        };
+
+    assertThat(wrappedManager.convertRefStorage(name, RefStorageFormat.REFTABLE, true, false))
+        .isTrue();
+    assertThat(called.get()).isTrue();
+    try (Repository repo = repoManager.openRepository(name)) {
+      assertThat(repo.getRefDatabase()).isInstanceOf(FileReftableDatabase.class);
+    }
+  }
+
+  @Test
   public void testProjectCreationWithEmptyName() throws Exception {
     assertThrows(
         RepositoryNotFoundException.class, () -> repoManager.createRepository(Project.nameKey("")));
@@ -289,6 +367,50 @@
   }
 
   @Test
+  public void detectsExternalRefStorageConversion() throws Exception {
+    Project.NameKey name = Project.nameKey("external-conversion");
+    File directory;
+    try (Repository repo = repoManager.createRepository(name)) {
+      directory = repo.getDirectory();
+    }
+    try (PerThreadCache ignored = PerThreadCache.create();
+        Repository repo = repoManager.openRepository(name)) {
+      assertThat(repo.getRefDatabase()).isInstanceOf(RefDirectory.class);
+      assertThat(repo.exactRef(Constants.HEAD).isSymbolic()).isTrue();
+    }
+
+    try (FileRepository external = new FileRepository(directory)) {
+      external.convertRefStorage(RefStorageFormat.REFTABLE, true, false);
+    }
+    try (PerThreadCache ignored = PerThreadCache.create();
+        Repository repo = repoManager.openRepository(name)) {
+      assertThat(repo.getRefDatabase()).isInstanceOf(FileReftableDatabase.class);
+      assertThat(repo.exactRef(Constants.HEAD).isSymbolic()).isTrue();
+    }
+
+    try (FileRepository external = new FileRepository(directory)) {
+      external.convertRefStorage(RefStorageFormat.FILES, true, false);
+    }
+    try (PerThreadCache ignored = PerThreadCache.create();
+        Repository repo = repoManager.openRepository(name)) {
+      assertThat(repo.getRefDatabase()).isInstanceOf(RefDirectory.class);
+      assertThat(repo.exactRef(Constants.HEAD).isSymbolic()).isTrue();
+    }
+  }
+
+  @Test
+  public void invalidRepositoryConfigDoesNotUseCachedFileKey() throws Exception {
+    Project.NameKey name = Project.nameKey("invalid-config");
+    File directory;
+    try (Repository repo = repoManager.createRepository(name)) {
+      directory = repo.getDirectory();
+    }
+    repoManager.openRepository(name).close();
+    Files.writeString(directory.toPath().resolve(Constants.CONFIG), "[invalid config");
+    assertThrows(RepositoryNotFoundException.class, () -> repoManager.openRepository(name));
+  }
+
+  @Test
   public void testOpenRepositoryAfterDeletionShouldThrowException() throws Exception {
     Project.NameKey projectNameKey = Project.nameKey("projectForDeletion");
     repoManager.createRepository(projectNameKey).close();
diff --git a/javatests/com/google/gerrit/server/git/TagSetTest.java b/javatests/com/google/gerrit/server/git/TagSetTest.java
index 089896e..9402b45 100644
--- a/javatests/com/google/gerrit/server/git/TagSetTest.java
+++ b/javatests/com/google/gerrit/server/git/TagSetTest.java
@@ -19,7 +19,11 @@
 import static com.google.common.truth.extensions.proto.ProtoTruth.assertThat;
 import static com.google.gerrit.proto.testing.SerializedClassSubject.assertThatSerializedClass;
 import static com.google.gerrit.server.cache.testing.CacheSerializerTestUtil.byteString;
+import static org.eclipse.jgit.lib.ObjectReader.OBJ_ANY;
 
+import com.google.common.cache.Cache;
+import com.google.common.cache.CacheBuilder;
+import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.ImmutableSortedSet;
 import com.google.common.collect.Streams;
@@ -32,17 +36,38 @@
 import com.google.gerrit.server.git.TagSet.Tag;
 import com.google.inject.TypeLiteral;
 import com.google.protobuf.ByteString;
+import java.io.IOException;
+import java.io.InterruptedIOException;
 import java.lang.reflect.Type;
 import java.util.Comparator;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.Optional;
+import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicReference;
+import org.eclipse.jgit.internal.storage.commitgraph.CommitGraph;
+import org.eclipse.jgit.internal.storage.dfs.DfsRepositoryDescription;
+import org.eclipse.jgit.internal.storage.dfs.InMemoryRepository;
+import org.eclipse.jgit.internal.storage.file.FileRepository;
+import org.eclipse.jgit.internal.storage.file.GC;
+import org.eclipse.jgit.junit.TestRepository;
+import org.eclipse.jgit.lib.AnyObjectId;
+import org.eclipse.jgit.lib.ConfigConstants;
 import org.eclipse.jgit.lib.ObjectId;
 import org.eclipse.jgit.lib.ObjectIdOwnerMap;
+import org.eclipse.jgit.lib.ObjectLoader;
+import org.eclipse.jgit.lib.ObjectReader;
+import org.eclipse.jgit.lib.Ref;
+import org.eclipse.jgit.lib.StoredConfig;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
 import org.roaringbitmap.RoaringBitmap;
 
 public class TagSetTest {
+  @Rule public TemporaryFolder temporaryFolder = new TemporaryFolder();
+
   @Test
   public void roundTripToProto() {
     HashMap<String, CachedRef> refs = new HashMap<>();
@@ -113,6 +138,172 @@
   }
 
   @Test
+  public void buildParsesCommitsFromCommitGraph() throws Exception {
+    AtomicInteger reads = new AtomicInteger();
+    FileRepository repo =
+        new FileRepository(temporaryFolder.newFolder("project.git")) {
+          @Override
+          public ObjectReader newObjectReader() {
+            ObjectReader delegate = super.newObjectReader();
+            return new ObjectReader.Filter() {
+              @Override
+              protected ObjectReader delegate() {
+                return delegate;
+              }
+
+              @Override
+              public ObjectLoader open(AnyObjectId objectId) throws IOException {
+                return open(objectId, OBJ_ANY);
+              }
+
+              @Override
+              public ObjectLoader open(AnyObjectId objectId, int typeHint) throws IOException {
+                reads.incrementAndGet();
+                return super.open(objectId, typeHint);
+              }
+
+              @Override
+              public Optional<CommitGraph> getCommitGraph() throws IOException {
+                return delegate.getCommitGraph();
+              }
+            };
+          }
+        };
+    repo.create(true);
+    try (TestRepository<FileRepository> tr = new TestRepository<>(repo)) {
+      RevCommit c1 = tr.commit().create();
+      RevCommit c2 = tr.commit().parent(c1).create();
+      tr.update("refs/heads/master", tr.commit().parent(c2).create());
+      tr.update("refs/tags/v1", c1);
+    }
+    StoredConfig cfg = repo.getConfig();
+    cfg.setBoolean(ConfigConstants.CONFIG_CORE_SECTION, null, "commitGraph", true);
+    cfg.setBoolean(
+        ConfigConstants.CONFIG_GC_SECTION,
+        null,
+        ConfigConstants.CONFIG_KEY_WRITE_COMMIT_GRAPH,
+        true);
+    cfg.save();
+    new GC(repo).gc().get();
+
+    reads.set(0);
+    assertThat(new TagSet(Project.nameKey("project")).build(repo, null, null)).isTrue();
+    // Only the branch and tag tips are read; the commit between them comes from the graph.
+    assertThat(reads.get()).isEqualTo(2);
+  }
+
+  @Test
+  public void buildStopsReadingObjectsWhenInterrupted() throws Exception {
+    AtomicInteger interruptedReads = new AtomicInteger();
+    // Mimics JGit's file-based object reader, which throws InterruptedIOException for every
+    // object read once the current thread is interrupted.
+    InMemoryRepository repo =
+        new InMemoryRepository(new DfsRepositoryDescription("project")) {
+          @Override
+          public ObjectReader newObjectReader() {
+            ObjectReader delegate = super.newObjectReader();
+            return new ObjectReader.Filter() {
+              @Override
+              protected ObjectReader delegate() {
+                return delegate;
+              }
+
+              @Override
+              public ObjectLoader open(AnyObjectId objectId) throws IOException {
+                return open(objectId, OBJ_ANY);
+              }
+
+              @Override
+              public ObjectLoader open(AnyObjectId objectId, int typeHint) throws IOException {
+                if (Thread.currentThread().isInterrupted()) {
+                  interruptedReads.incrementAndGet();
+                  throw new InterruptedIOException();
+                }
+                return super.open(objectId, typeHint);
+              }
+            };
+          }
+        };
+    try (TestRepository<InMemoryRepository> tr = new TestRepository<>(repo)) {
+      RevCommit root = tr.commit().create();
+      for (int i = 0; i < 10; i++) {
+        tr.update("refs/heads/branch" + i, tr.commit().parent(root).create());
+      }
+      tr.update("refs/tags/v1", tr.tag("v1", root));
+    }
+
+    Thread.currentThread().interrupt();
+    try {
+      assertThat(new TagSet(Project.nameKey("project")).build(repo, null, null)).isFalse();
+    } finally {
+      Thread.interrupted();
+    }
+
+    // The first failed read must abort the build instead of failing (and logging) once per ref.
+    assertThat(interruptedReads.get()).isEqualTo(1);
+  }
+
+  /**
+   * Interrupts a build after all refs and tags were added but before reachability was fully
+   * propagated, then checks that the incomplete TagSet was not cached and that the next build finds
+   * the tag reachable. Guards against caching a TagSet in which the tag is wrongly hidden.
+   */
+  @Test
+  public void tagSetInterruptedDuringHistoryWalkIsNotCached() throws Exception {
+    AtomicReference<ObjectId> failOn = new AtomicReference<>();
+    InMemoryRepository repo =
+        new InMemoryRepository(new DfsRepositoryDescription("project")) {
+          @Override
+          public ObjectReader newObjectReader() {
+            ObjectReader delegate = super.newObjectReader();
+            return new ObjectReader.Filter() {
+              @Override
+              protected ObjectReader delegate() {
+                return delegate;
+              }
+
+              @Override
+              public ObjectLoader open(AnyObjectId objectId) throws IOException {
+                return open(objectId, OBJ_ANY);
+              }
+
+              @Override
+              public ObjectLoader open(AnyObjectId objectId, int typeHint) throws IOException {
+                if (objectId.equals(failOn.get())) {
+                  throw new InterruptedIOException();
+                }
+                return super.open(objectId, typeHint);
+              }
+            };
+          }
+        };
+    Ref tagRef;
+    RevCommit middle;
+    try (TestRepository<InMemoryRepository> tr = new TestRepository<>(repo)) {
+      RevCommit root = tr.commit().create();
+      middle = tr.commit().parent(root).create();
+      tr.update("refs/heads/master", tr.commit().parent(middle).create());
+      tr.update("refs/tags/v1", tr.tag("v1", root));
+      tagRef = repo.exactRef("refs/tags/v1");
+    }
+    ImmutableList<Ref> include = ImmutableList.of(repo.exactRef("refs/heads/master"));
+    Cache<String, TagSetHolder> guavaCache = CacheBuilder.newBuilder().build();
+    TagCache tagCache = new TagCache(guavaCache);
+    Project.NameKey project = Project.nameKey("project");
+
+    // The middle commit is only read while propagating reachability through the history, i.e.
+    // after all refs and tags have already been added to the TagSet.
+    failOn.set(middle.copy());
+    var unused = tagCache.get(project).matcher(tagCache, repo, include);
+    assertThat(guavaCache.getIfPresent(project.get()).getTagSet()).isNull();
+
+    failOn.set(null);
+    TagMatcher m = tagCache.get(project).matcher(tagCache, repo, include);
+    assertThat(m.isReachable(tagRef)).isTrue();
+    assertThat(guavaCache.getIfPresent(project.get()).getTagSet()).isNotNull();
+  }
+
+  @Test
   public void tagSetFields() {
     assertThatSerializedClass(TagSet.class)
         .hasFields(
diff --git a/javatests/com/google/gerrit/server/git/receive/ReplaceOpTest.java b/javatests/com/google/gerrit/server/git/receive/ReplaceOpTest.java
new file mode 100644
index 0000000..42f12a9
--- /dev/null
+++ b/javatests/com/google/gerrit/server/git/receive/ReplaceOpTest.java
@@ -0,0 +1,127 @@
+// Copyright (C) 2026 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.google.gerrit.server.git.receive;
+
+import static com.google.common.truth.Truth.assertThat;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import com.google.common.collect.ImmutableMap;
+import com.google.gerrit.server.update.Context;
+import com.google.gerrit.server.update.RepoView;
+import java.io.IOException;
+import java.util.Map;
+import java.util.Optional;
+import org.eclipse.jgit.internal.storage.dfs.DfsRepositoryDescription;
+import org.eclipse.jgit.internal.storage.dfs.InMemoryRepository;
+import org.eclipse.jgit.junit.TestRepository;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.jgit.revwalk.RevWalk;
+import org.junit.Test;
+
+public class ReplaceOpTest {
+  @Test
+  public void checksEachDistinctTipOnceIncludingPreferredBranch() throws Exception {
+    try (InMemoryRepository repo = new InMemoryRepository(new DfsRepositoryDescription("test"));
+        CountingRevWalk rw = new CountingRevWalk(repo)) {
+      TestRepository<InMemoryRepository> tr = new TestRepository<>(repo);
+      RevCommit commit = rw.parseCommit(tr.commit().message("change").create());
+      RevCommit unrelated = tr.commit().message("unrelated").create();
+      RevCommit other = tr.commit().message("other").create();
+      ImmutableMap<String, ObjectId> heads =
+          ImmutableMap.of("master", unrelated, "duplicate", unrelated, "other", other);
+      assertThat(findMergedInto(rw, Optional.of(unrelated), heads, commit)).isNull();
+      // Master and duplicate share one tip; other has the only remaining distinct tip.
+      assertThat(rw.ancestryChecks).isEqualTo(2);
+    }
+  }
+
+  @Test
+  public void prefersDestinationBranchOverOtherMatchingBranches() throws Exception {
+    try (InMemoryRepository repo = new InMemoryRepository(new DfsRepositoryDescription("test"));
+        CountingRevWalk rw = new CountingRevWalk(repo)) {
+      TestRepository<InMemoryRepository> tr = new TestRepository<>(repo);
+      RevCommit commit = rw.parseCommit(tr.commit().message("change").create());
+      assertThat(findMergedInto(rw, Optional.of(commit), ImmutableMap.of("other", commit), commit))
+          .isEqualTo("refs/heads/master");
+      // A preferred-branch match returns immediately, without scanning other heads.
+      assertThat(rw.ancestryChecks).isEqualTo(1);
+    }
+  }
+
+  @Test
+  public void skipsDuplicateTipsAndFindsMatchingBranchWhenPreferredBranchIsAbsent()
+      throws Exception {
+    try (InMemoryRepository repo = new InMemoryRepository(new DfsRepositoryDescription("test"));
+        CountingRevWalk rw = new CountingRevWalk(repo)) {
+      TestRepository<InMemoryRepository> tr = new TestRepository<>(repo);
+      RevCommit commit = rw.parseCommit(tr.commit().message("change").create());
+      RevCommit unrelated = tr.commit().message("unrelated").create();
+      RevCommit tip = tr.commit().parent(commit).message("tip").create();
+      ImmutableMap<String, ObjectId> heads =
+          ImmutableMap.of("first", unrelated, "duplicate", unrelated, "matching", tip);
+      assertThat(findMergedInto(rw, Optional.empty(), heads, commit))
+          .isEqualTo("refs/heads/matching");
+      // Check the unrelated tip once, then the matching tip, despite three branch names.
+      assertThat(rw.ancestryChecks).isEqualTo(2);
+    }
+  }
+
+  @Test
+  public void skipsPreferredTipAliasAndFindsMatchingBranch() throws Exception {
+    try (InMemoryRepository repo = new InMemoryRepository(new DfsRepositoryDescription("test"));
+        CountingRevWalk rw = new CountingRevWalk(repo)) {
+      TestRepository<InMemoryRepository> tr = new TestRepository<>(repo);
+      RevCommit commit = rw.parseCommit(tr.commit().message("change").create());
+      RevCommit unrelated = tr.commit().message("unrelated").create();
+      RevCommit tip = tr.commit().parent(commit).message("tip").create();
+      ImmutableMap<String, ObjectId> heads =
+          ImmutableMap.of("master", unrelated, "alias", unrelated, "matching", tip);
+      assertThat(findMergedInto(rw, Optional.of(unrelated), heads, commit))
+          .isEqualTo("refs/heads/matching");
+      // Check the preferred tip once, skip its alias, then check the matching tip.
+      assertThat(rw.ancestryChecks).isEqualTo(2);
+    }
+  }
+
+  private static String findMergedInto(
+      RevWalk rw, Optional<ObjectId> preferred, Map<String, ObjectId> heads, RevCommit commit)
+      throws Exception {
+    Context ctx = mock(Context.class);
+    RepoView view = mock(RepoView.class);
+    when(ctx.getRevWalk()).thenReturn(rw);
+    when(ctx.getRepoView()).thenReturn(view);
+    when(view.getRef("refs/heads/master")).thenReturn(preferred);
+    when(view.getRefs("refs/heads/")).thenReturn(heads);
+    return ReplaceOp.findMergedInto(ctx, "refs/heads/master", commit);
+  }
+
+  // Count expensive ancestry checks while retaining real JGit traversal.
+  private static class CountingRevWalk extends RevWalk {
+    int ancestryChecks;
+
+    CountingRevWalk(Repository repo) {
+      super(repo);
+    }
+
+    @Override
+    public boolean isMergedInto(RevCommit base, RevCommit tip) throws IOException {
+      ancestryChecks++;
+      return super.isMergedInto(base, tip);
+    }
+  }
+}
diff --git a/javatests/com/google/gerrit/server/index/change/IndexedChangeQueryTest.java b/javatests/com/google/gerrit/server/index/change/IndexedChangeQueryTest.java
new file mode 100644
index 0000000..8507dbf
--- /dev/null
+++ b/javatests/com/google/gerrit/server/index/change/IndexedChangeQueryTest.java
@@ -0,0 +1,108 @@
+// Copyright (C) 2026 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.google.gerrit.server.index.change;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableSet;
+import com.google.gerrit.entities.Change;
+import com.google.gerrit.entities.Project;
+import com.google.gerrit.index.IndexConfig;
+import com.google.gerrit.index.QueryOptions;
+import com.google.gerrit.index.query.FieldBundle;
+import com.google.gerrit.index.query.ListResultSet;
+import com.google.gerrit.index.query.Predicate;
+import com.google.gerrit.index.query.ResultSet;
+import com.google.gerrit.server.query.change.ChangeData;
+import com.google.gerrit.server.query.change.ChangeDataSource;
+import com.google.gerrit.server.query.change.ChangeStatusPredicate;
+import java.util.List;
+import org.eclipse.jgit.lib.ObjectId;
+import org.junit.Test;
+
+public class IndexedChangeQueryTest {
+  @Test
+  public void keepsOnlyChangesOfLatestPageForMatchShortcut() throws Exception {
+    ChangeData c1 = change(1);
+    ChangeData c2 = change(2);
+    ChangeData c3 = change(3);
+    PagedIndex index = new PagedIndex(ImmutableList.of(c1, c2, c3));
+    // A page size of 2 splits the 3 changes into 2 pages.
+    IndexedChangeQuery q =
+        new IndexedChangeQuery(
+            index,
+            ChangeStatusPredicate.forStatus(Change.Status.MERGED),
+            IndexedChangeQuery.createOptions(
+                IndexConfig.createDefault(),
+                /* start= */ 0,
+                /* limit= */ 2,
+                /* fields= */ ImmutableSet.of()));
+
+    assertThat(q.read().toList()).containsExactly(c1, c2).inOrder();
+    assertThat(q.fromSourceSize()).isEqualTo(2);
+
+    ImmutableList.Builder<ChangeData> page2 = ImmutableList.builder();
+    q.restart(/* start= */ 2, /* pageSize= */ 2).forEach(page2::add);
+    assertThat(page2.build()).containsExactly(c3);
+    assertThat(q.fromSourceSize()).isEqualTo(1);
+
+    // Matching c3 would lazy load the change and fail if the shortcut was not taken.
+    assertThat(q.match(c3)).isTrue();
+  }
+
+  private static ChangeData change(int id) {
+    return ChangeData.createForTest(
+        Project.nameKey("project"), Change.id(id), 1, ObjectId.zeroId());
+  }
+
+  private static class PagedIndex extends FakeChangeIndex {
+    private final List<ChangeData> changes;
+
+    PagedIndex(List<ChangeData> changes) {
+      super(FakeChangeIndex.V2);
+      this.changes = changes;
+    }
+
+    @Override
+    public ChangeDataSource getSource(Predicate<ChangeData> p, QueryOptions opts) {
+      List<ChangeData> page =
+          changes.subList(
+              Math.min(opts.start(), changes.size()),
+              Math.min(opts.start() + opts.pageSize(), changes.size()));
+      return new ChangeDataSource() {
+        @Override
+        public int getCardinality() {
+          return page.size();
+        }
+
+        @Override
+        public boolean hasChange() {
+          return false;
+        }
+
+        @Override
+        public ResultSet<ChangeData> read() {
+          return new ListResultSet<>(page);
+        }
+
+        @Override
+        public ResultSet<FieldBundle> readRaw() {
+          throw new UnsupportedOperationException();
+        }
+      };
+    }
+  }
+}
diff --git a/javatests/com/google/gerrit/server/notedb/ChangeNotesParserTest.java b/javatests/com/google/gerrit/server/notedb/ChangeNotesParserTest.java
index f1e78ea..bf80e1a 100644
--- a/javatests/com/google/gerrit/server/notedb/ChangeNotesParserTest.java
+++ b/javatests/com/google/gerrit/server/notedb/ChangeNotesParserTest.java
@@ -764,6 +764,26 @@
   }
 
   @Test
+  public void parseIsAi() throws Exception {
+    ChangeNotesState state =
+        assertParseSucceeds("Update change\n\nPatch-set: 1\nLabel: Label1=+1\nIs-ai: true\n");
+    assertThat(state.approvals()).hasSize(1);
+    assertThat(state.approvals().get(0).getValue().isAi()).isTrue();
+
+    state = assertParseSucceeds("Update change\n\nPatch-set: 1\nLabel: Label1=+1\nIs-ai: tRUe\n");
+    assertThat(state.approvals()).hasSize(1);
+    assertThat(state.approvals().get(0).getValue().isAi()).isTrue();
+
+    state = assertParseSucceeds("Update change\n\nPatch-set: 1\nLabel: Label1=+1\nIs-ai: false\n");
+    assertThat(state.approvals()).hasSize(1);
+    assertThat(state.approvals().get(0).getValue().isAi()).isFalse();
+
+    assertParseFails("Update change\n\nPatch-set: 1\nLabel: Label1=+1\nIs-ai: invalid\n");
+    assertParseFails(
+        "Update change\n\nPatch-set: 1\nLabel: Label1=+1\nIs-ai: true\nIs-ai: false\n");
+  }
+
+  @Test
   public void parseConflicts() throws Exception {
     // No conflicts information present
     assertParseSucceeds(
diff --git a/javatests/com/google/gerrit/server/notedb/ChangeNotesStateTest.java b/javatests/com/google/gerrit/server/notedb/ChangeNotesStateTest.java
index 6f8400c..f87b3d3 100644
--- a/javatests/com/google/gerrit/server/notedb/ChangeNotesStateTest.java
+++ b/javatests/com/google/gerrit/server/notedb/ChangeNotesStateTest.java
@@ -1124,6 +1124,7 @@
                 .put("realAccountId", Account.Id.class)
                 .put("postSubmit", boolean.class)
                 .put("copied", boolean.class)
+                .put("isAi", boolean.class)
                 .put("toBuilder", PatchSetApproval.Builder.class)
                 .build());
   }
diff --git a/javatests/com/google/gerrit/server/notedb/CommitMessageOutputTest.java b/javatests/com/google/gerrit/server/notedb/CommitMessageOutputTest.java
index 8d79fad..ae4437f 100644
--- a/javatests/com/google/gerrit/server/notedb/CommitMessageOutputTest.java
+++ b/javatests/com/google/gerrit/server/notedb/CommitMessageOutputTest.java
@@ -424,8 +424,8 @@
   }
 
   private RevCommit parseCommit(ObjectId id) throws Exception {
-    if (id instanceof RevCommit) {
-      return (RevCommit) id;
+    if (id instanceof RevCommit revCommit) {
+      return revCommit;
     }
     try (RevWalk walk = new RevWalk(repo)) {
       RevCommit commit = walk.parseCommit(id);
diff --git a/javatests/com/google/gerrit/server/query/account/AbstractQueryAccountsTest.java b/javatests/com/google/gerrit/server/query/account/AbstractQueryAccountsTest.java
index 6c5527c..9c7215e 100644
--- a/javatests/com/google/gerrit/server/query/account/AbstractQueryAccountsTest.java
+++ b/javatests/com/google/gerrit/server/query/account/AbstractQueryAccountsTest.java
@@ -996,10 +996,10 @@
 
     @Override
     public boolean equals(Object other) {
-      if (!(other instanceof ByteArrayWrapper)) {
+      if (!(other instanceof ByteArrayWrapper w)) {
         return false;
       }
-      return Arrays.equals(arr, ((ByteArrayWrapper) other).arr);
+      return Arrays.equals(arr, w.arr);
     }
 
     @Override
diff --git a/javatests/com/google/gerrit/server/query/change/AbstractQueryChangesTest.java b/javatests/com/google/gerrit/server/query/change/AbstractQueryChangesTest.java
index 87bbdfe..e1c6046 100644
--- a/javatests/com/google/gerrit/server/query/change/AbstractQueryChangesTest.java
+++ b/javatests/com/google/gerrit/server/query/change/AbstractQueryChangesTest.java
@@ -90,6 +90,7 @@
 import com.google.gerrit.extensions.client.ListChangesOption;
 import com.google.gerrit.extensions.client.ProjectWatchInfo;
 import com.google.gerrit.extensions.client.ReviewerState;
+import com.google.gerrit.extensions.client.SubmitType;
 import com.google.gerrit.extensions.common.AccountInfo;
 import com.google.gerrit.extensions.common.ChangeInfo;
 import com.google.gerrit.extensions.common.ChangeInput;
@@ -165,9 +166,12 @@
 import java.util.Optional;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
+import org.eclipse.jgit.dircache.DirCacheEditor.PathEdit;
+import org.eclipse.jgit.dircache.DirCacheEntry;
 import org.eclipse.jgit.errors.ConfigInvalidException;
 import org.eclipse.jgit.errors.RepositoryNotFoundException;
 import org.eclipse.jgit.junit.TestRepository;
+import org.eclipse.jgit.lib.FileMode;
 import org.eclipse.jgit.lib.ObjectId;
 import org.eclipse.jgit.lib.ObjectInserter;
 import org.eclipse.jgit.lib.ObjectReader;
@@ -3479,6 +3483,330 @@
   }
 
   @Test
+  public void conflictsForChangeStackedOnOpenChange() throws Exception {
+    ImmutableList<Change> changes =
+        createSameFileModeChangesWithOneStackedOnOpenChange(Project.nameKey("repo"));
+    Change change2 = changes.get(0);
+    Change change3 = changes.get(1);
+    Change change4 = changes.get(2);
+
+    // change2 is stacked on the open change1. change1's commit is treated as already accepted
+    // when checking change2, so the check does not fail with a missing dependency, and change2 is
+    // correctly not reported as conflicting with change3 or change4.
+    assertQuery("conflicts:" + change3.getId().get());
+    assertQuery("conflicts:" + change4.getId().get());
+    assertQuery("conflicts:" + change2.getId().get());
+  }
+
+  @Test
+  public void conflictsForChangeStackedOnOpenChangeWithRealConflict() throws Exception {
+    ImmutableList<Change> changes =
+        createConflictingChangesWithOneStackedOnOpenChange(Project.nameKey("repo"));
+    Change change2 = changes.get(0);
+    Change change3 = changes.get(1);
+
+    // Treating change2's open dependency as accepted does not hide the genuine conflict.
+    assertQuery("conflicts:" + change3.getId().get(), change2);
+    assertQuery("conflicts:" + change2.getId().get(), change3);
+  }
+
+  @Test
+  public void conflictsForChangeStackedOnOpenChangeWithRealConflictInReverseQueryOrder()
+      throws Exception {
+    ImmutableList<Change> changes =
+        createConflictingChangesWithOneStackedOnOpenChange(Project.nameKey("repo"));
+    Change change2 = changes.get(0);
+    Change change3 = changes.get(1);
+
+    // Same as conflictsForChangeStackedOnOpenChangeWithRealConflict, but change2 is queried first,
+    // so the conflict is detected from change2's side and the cached result is reused for change3.
+    assertQuery("conflicts:" + change2.getId().get(), change3);
+    assertQuery("conflicts:" + change3.getId().get(), change2);
+  }
+
+  /**
+   * Creates changes change1 to change3 in a new project, and returns change2 and change3.
+   *
+   * <p>change1 only touches file1. change2 is stacked on change1, change3 is based directly on the
+   * branch tip, and both modify file4 differently, so change2 and change3 genuinely conflict.
+   */
+  private ImmutableList<Change> createConflictingChangesWithOneStackedOnOpenChange(
+      Project.NameKey project) throws Exception {
+    repo = createAndOpenProject(project);
+    RevCommit tip = repo.branch("master").commit().add("file4", "contents4").create();
+
+    // change1 is open, i.e. its commit is not reachable from any branch or tag.
+    RevCommit commit1 =
+        repo.parseBody(repo.commit().parent(tip).add("file1", "contents1").create());
+    insert(project, newChangeForCommit(repo, commit1));
+    RevCommit commit2 =
+        repo.parseBody(repo.commit().parent(commit1).add("file4", "contents4-2").create());
+    Change change2 = insert(project, newChangeForCommit(repo, commit2));
+    RevCommit commit3 =
+        repo.parseBody(repo.commit().parent(tip).add("file4", "contents4-3").create());
+    Change change3 = insert(project, newChangeForCommit(repo, commit3));
+    return ImmutableList.of(change2, change3);
+  }
+
+  @Test
+  public void conflictsResultDoesNotDependOnQueryOrder() throws Exception {
+    // Create the same setup as in conflictsForChangeStackedOnOpenChange twice, in two projects,
+    // and run the "conflicts:" queries in opposite orders. Since ConflictKey is symmetric, the
+    // results cached by the first queries are reused by the later ones, so both orders must give
+    // the same results.
+    ImmutableList<Change> changesA =
+        createSameFileModeChangesWithOneStackedOnOpenChange(Project.nameKey("repoA"));
+    ImmutableList<Change> changesB =
+        createSameFileModeChangesWithOneStackedOnOpenChange(Project.nameKey("repoB"));
+
+    // In repoA, change3 and change4 are queried first.
+    assertQuery("conflicts:" + changesA.get(1).getId().get());
+    assertQuery("conflicts:" + changesA.get(2).getId().get());
+    assertQuery("conflicts:" + changesA.get(0).getId().get());
+
+    // In repoB, change2 is queried first.
+    assertQuery("conflicts:" + changesB.get(0).getId().get());
+    assertQuery("conflicts:" + changesB.get(1).getId().get());
+    assertQuery("conflicts:" + changesB.get(2).getId().get());
+  }
+
+  /**
+   * Creates changes change1 to change4 in a new project, and returns change2, change3 and change4.
+   *
+   * <p>change1 only touches file1. change2, change3 and change4 each make file4, which already
+   * exists on the branch tip, executable without changing its content, and each add a distinct file
+   * of their own. A file mode change cannot cause a content conflict, and because of the distinct
+   * files none of them becomes empty when submitted after the others, so none of change2, change3
+   * and change4 genuinely conflicts with any other. change2 is stacked on change1, change3 and
+   * change4 are based directly on the branch tip.
+   */
+  private ImmutableList<Change> createSameFileModeChangesWithOneStackedOnOpenChange(
+      Project.NameKey project) throws Exception {
+    repo = createAndOpenProject(project);
+    // The project name in the commit message ensures that the commits differ between projects,
+    // since the conflicts cache is keyed on commit IDs only.
+    RevCommit tip =
+        repo.branch("master")
+            .commit()
+            .message("Tip of " + project.get())
+            .add("file4", "contents4")
+            .create();
+
+    // change1 is open, i.e. its commit is not reachable from any branch or tag.
+    RevCommit commit1 =
+        repo.parseBody(repo.commit().parent(tip).add("file1", "contents1").create());
+    insert(project, newChangeForCommit(repo, commit1));
+
+    RevCommit commit2 =
+        repo.parseBody(
+            repo.commit()
+                .parent(commit1)
+                .edit(setExecutable("file4"))
+                .add("file2", "contents2")
+                .create());
+    Change change2 = insert(project, newChangeForCommit(repo, commit2));
+    RevCommit commit3 =
+        repo.parseBody(
+            repo.commit()
+                .parent(tip)
+                .edit(setExecutable("file4"))
+                .add("file3", "contents3")
+                .create());
+    Change change3 = insert(project, newChangeForCommit(repo, commit3));
+    RevCommit commit4 =
+        repo.parseBody(
+            repo.commit()
+                .parent(tip)
+                .edit(setExecutable("file4"))
+                .add("file5", "contents5")
+                .create());
+    Change change4 = insert(project, newChangeForCommit(repo, commit4));
+    return ImmutableList.of(change2, change3, change4);
+  }
+
+  @Test
+  public void conflictsForDescendantOfQueriedChange() throws Exception {
+    Project.NameKey project = Project.nameKey("repo");
+    repo = createAndOpenProject(project);
+    RevCommit tip = repo.branch("master").commit().add("base", "contents").create();
+
+    // change1 is the change we will query "conflicts:" against below.
+    RevCommit commit1 = repo.parseBody(repo.commit().parent(tip).add("fileA", "v1").create());
+    Change change1 = insert(project, newChangeForCommit(repo, commit1));
+
+    // change2 is stacked directly on top of change1, so it fast-forwards on top of change1 and is
+    // correctly not reported.
+    RevCommit commit2 = repo.parseBody(repo.commit().parent(commit1).add("fileA", "v2").create());
+    insert(project, newChangeForCommit(repo, commit2));
+
+    // change3 is stacked on change2, i.e. two hops above change1. Like change2, it has change1 in
+    // its history, so it can never conflict with change1: it cannot be submitted without change1
+    // being submitted first.
+    RevCommit commit3 = repo.parseBody(repo.commit().parent(commit2).add("fileA", "v3").create());
+    insert(project, newChangeForCommit(repo, commit3));
+
+    // change3's parent (change2's commit) is treated as already accepted when checking change3, so
+    // the check does not fail with a missing dependency, and change3 is correctly not reported
+    // either.
+    assertQuery("conflicts:" + change1.getId().get());
+  }
+
+  @Test
+  public void conflictsAgainstAncestorOfQueriedChange() throws Exception {
+    Project.NameKey project = Project.nameKey("repo");
+    repo = createAndOpenProject(project);
+    RevCommit tip = repo.branch("master").commit().add("base", "contents").create();
+
+    // change1 is the base of a linear stack, based directly on the branch tip, and adds
+    // "shared-file".
+    RevCommit commit1 = repo.parseBody(repo.commit().parent(tip).add("shared-file", "v1").create());
+    Change change1 = insert(project, newChangeForCommit(repo, commit1));
+
+    // change2 and change3 are stacked on change1 and do not touch "shared-file".
+    RevCommit commit2 =
+        repo.parseBody(repo.commit().parent(commit1).add("unrelated2", "x").create());
+    Change change2 = insert(project, newChangeForCommit(repo, commit2));
+    RevCommit commit3 =
+        repo.parseBody(repo.commit().parent(commit2).add("unrelated3", "x").create());
+    Change change3 = insert(project, newChangeForCommit(repo, commit3));
+
+    // change4 is the query target, stacked on change3, and modifies "shared-file".
+    RevCommit commit4 =
+        repo.parseBody(repo.commit().parent(commit3).add("shared-file", "v4").create());
+    Change change4 = insert(project, newChangeForCommit(repo, commit4));
+
+    // change1 is an ancestor of change4. change4 cannot be submitted without change1 being
+    // submitted first, and a change can never conflict with its own history, so change1 is
+    // correctly not reported. Technically, change1's commit is merged into change4's commit, so
+    // the check succeeds as a fast-forward.
+    assertQuery("conflicts:" + change4.getId().get());
+
+    // Give change1 a new patch set that is no longer in change4's history and has different
+    // content in "shared-file".
+    RevCommit commit5 = repo.parseBody(repo.commit().parent(tip).add("shared-file", "v5").create());
+    change1 = newPatchSet(repo, change1, user, commit5);
+    // change1 is correctly reported as conflicting: change1's new commit cannot be merged cleanly
+    // on top of change4's commit, and neither can change4 be trivially rebased onto change1's new
+    // commit.
+    assertQuery("conflicts:" + change4.getId().get(), change1);
+
+    // Give change1 a new patch set with the same content in "shared-file" as the original commit1.
+    RevCommit commit6 = repo.parseBody(repo.commit().parent(tip).add("shared-file", "v1").create());
+    change1 = newPatchSet(repo, change1, user, commit6);
+    // change1 is still reported. The check does not rebase change4 onto change1's new patch set;
+    // it tests commit6 against commit4 as they are. With the default submit type, it merges
+    // commit6 into commit4. Their merge base is the branch tip, which lacks "shared-file", so both
+    // sides add "shared-file" with different content ("v1" vs. "v4"), which is a conflict. Other
+    // submit types report change1 as well: the merge and rebase submit types run the same merge,
+    // CHERRY_PICK applies commit6's delta to commit4 with the same result, and FAST_FORWARD_ONLY
+    // fails since neither commit contains the other.
+    //
+    // This is expected: "conflicts:" reflects the changes as they currently are, and change4
+    // depends on an outdated patch set of change1, so it cannot be submitted as is (see
+    // AbstractSubmitByMerge#dependencyOnOutdatedPatchSetOfUnsubmittedChangePreventsMerge). Once
+    // change4 is rebased onto commit6, change1 is an ancestor of change4 again and is no longer
+    // reported.
+    assertQuery("conflicts:" + change4.getId().get(), change1);
+
+    // Rebase change2, change3 and change4 onto commit6.
+    RevCommit commit7 =
+        repo.parseBody(repo.commit().parent(commit6).add("unrelated2", "x").create());
+    var unused = newPatchSet(repo, change2, user, commit7);
+    RevCommit commit8 =
+        repo.parseBody(repo.commit().parent(commit7).add("unrelated3", "x").create());
+    unused = newPatchSet(repo, change3, user, commit8);
+    RevCommit commit9 =
+        repo.parseBody(repo.commit().parent(commit8).add("shared-file", "v4").create());
+    change4 = newPatchSet(repo, change4, user, commit9);
+    assertQuery("conflicts:" + change4.getId().get());
+  }
+
+  @Test
+  public void conflictsWithAncestorOfQueriedChangeWithCherryPick() throws Exception {
+    // Create the same stack in two projects and run the "conflicts:" queries in opposite orders.
+    ImmutableList<Change> changesA =
+        createStackWithSubmitType(Project.nameKey("repoA"), SubmitType.CHERRY_PICK);
+    ImmutableList<Change> changesB =
+        createStackWithSubmitType(Project.nameKey("repoB"), SubmitType.CHERRY_PICK);
+
+    // change1 is reported as conflicting with change2, although it is an ancestor of change2. This
+    // is expected: CHERRY_PICK ignores dependencies, so change2 can be submitted without change1,
+    // which then no longer applies (see
+    // SubmitByCherryPickIT#submitDependentConflictingChangesOutOfOrder and the warning in the
+    // documentation of the submit types). The check does not consider fast-forwards (see
+    // MergeUtil#canCherryPick); it cherry-picks change1's commit onto change2's commit: relative to
+    // change1's parent (the branch tip), which lacks "shared-file", both sides add "shared-file"
+    // with different content ("v1" vs. "v2"), which is a conflict.
+    assertQuery("conflicts:" + changesA.get(1).getId().get(), changesA.get(0));
+
+    // When change1 is queried, the check cherry-picks change2's commit onto change1's commit,
+    // relative to change2's parent, which is change1's commit itself, so it applies cleanly and
+    // change2 is not reported. The cherry-pick check is not symmetric, so ConflictKey keeps the
+    // order of the commits and the result from above is not reused.
+    assertQuery("conflicts:" + changesA.get(0).getId().get());
+
+    // In repoB, change1 is queried first. The results do not depend on the query order.
+    assertQuery("conflicts:" + changesB.get(0).getId().get());
+    assertQuery("conflicts:" + changesB.get(1).getId().get(), changesB.get(0));
+  }
+
+  @Test
+  public void conflictsWithAncestorOfQueriedChangeWithRebaseAlways() throws Exception {
+    // Same as conflictsWithAncestorOfQueriedChangeWithCherryPick, but with REBASE_ALWAYS, which,
+    // unlike CHERRY_PICK, does not ignore dependencies: change2 can only be submitted together
+    // with or after change1, so they cannot conflict.
+    ImmutableList<Change> changesA =
+        createStackWithSubmitType(Project.nameKey("repoA"), SubmitType.REBASE_ALWAYS);
+    ImmutableList<Change> changesB =
+        createStackWithSubmitType(Project.nameKey("repoB"), SubmitType.REBASE_ALWAYS);
+
+    // The check merges the two commits (see RebaseSubmitStrategy#dryRun). change1's commit is
+    // merged into change2's commit, so this always succeeds and neither change is reported,
+    // regardless of the query order.
+    assertQuery("conflicts:" + changesA.get(1).getId().get());
+    assertQuery("conflicts:" + changesA.get(0).getId().get());
+
+    assertQuery("conflicts:" + changesB.get(0).getId().get());
+    assertQuery("conflicts:" + changesB.get(1).getId().get());
+  }
+
+  /**
+   * Creates a project with the given submit type and changes change1 and change2, and returns them.
+   *
+   * <p>change1 adds "shared-file", change2 is stacked on change1 and modifies "shared-file".
+   */
+  private ImmutableList<Change> createStackWithSubmitType(
+      Project.NameKey project, SubmitType submitType) throws Exception {
+    repo = createAndOpenProject(project);
+    ConfigInput conf = new ConfigInput();
+    conf.submitType = submitType;
+    gApi.projects().name(project.get()).config(conf);
+    // The project name in the commit message ensures that the commits differ between projects,
+    // since the conflicts cache is keyed on commit IDs only.
+    RevCommit tip =
+        repo.branch("master")
+            .commit()
+            .message("Tip of " + project.get())
+            .add("base", "contents")
+            .create();
+    RevCommit commit1 = repo.parseBody(repo.commit().parent(tip).add("shared-file", "v1").create());
+    Change change1 = insert(project, newChangeForCommit(repo, commit1));
+    RevCommit commit2 =
+        repo.parseBody(repo.commit().parent(commit1).add("shared-file", "v2").create());
+    Change change2 = insert(project, newChangeForCommit(repo, commit2));
+    return ImmutableList.of(change1, change2);
+  }
+
+  private static PathEdit setExecutable(String path) {
+    return new PathEdit(path) {
+      @Override
+      public void apply(DirCacheEntry ent) {
+        ent.setFileMode(FileMode.EXECUTABLE_FILE);
+      }
+    };
+  }
+
+  @Test
   @GerritConfig(name = "core.useGitattributesForMerge", value = "true")
   public void conflictsUnionContentMerge() throws Exception {
     Project.NameKey project = Project.nameKey("repo");
@@ -3546,6 +3874,33 @@
   }
 
   @Test
+  @GerritConfig(
+      name = "change.mergeabilityComputationBehavior",
+      value = "API_REF_UPDATED_AND_CHANGE_REINDEX")
+  public void mergeableForChangesStackedOnOpenChanges() throws Exception {
+    assume().that(getSchema().hasField(ChangeField.MERGEABLE_SPEC)).isTrue();
+    Project.NameKey project = Project.nameKey("repo");
+    repo = createAndOpenProject(project);
+    RevCommit base = repo.branch("master").commit().add("file4", "contents4").create();
+    repo.branch("master").commit().add("file4", "contents4-master").create();
+
+    // change1 is based on an outdated branch tip, but does not conflict with the current one.
+    // change2 is stacked on change1 and conflicts with the current branch tip. change3 is stacked
+    // on change2 and only touches its own file, but it cannot be merged without change2.
+    RevCommit commit1 = repo.parseBody(repo.commit().parent(base).add("file1", "1").create());
+    Change change1 = insert(project, newChangeForCommit(repo, commit1));
+    RevCommit commit2 =
+        repo.parseBody(repo.commit().parent(commit1).add("file4", "contents4-2").create());
+    Change change2 = insert(project, newChangeForCommit(repo, commit2));
+    RevCommit commit3 = repo.parseBody(repo.commit().parent(commit2).add("file3", "3").create());
+    Change change3 = insert(project, newChangeForCommit(repo, commit3));
+
+    // Open dependencies do not make a change unmergeable, but the content they bring in counts.
+    assertQuery("is:mergeable", change1);
+    assertQuery("-is:mergeable", change3, change2);
+  }
+
+  @Test
   public void cherrypick() throws Exception {
     assume().that(getSchema().hasField(ChangeField.CHERRY_PICK_SPEC)).isTrue();
     Project.NameKey project = Project.nameKey("repo");
@@ -4993,29 +5348,37 @@
                   .message(message.orElse("updated message"))
                   .add("file" + n, "contents " + n)
                   .create());
-
-      PatchSetInserter inserter =
-          patchSetFactory
-              .create(changeNotesFactory.createChecked(c), PatchSet.id(c.getId(), n), commit)
-              .setFireRevisionCreated(false)
-              .disableValidation();
-      testRefAction(
-          () -> {
-            try (BatchUpdate bu = updateFactory.create(c.getProject(), user, TimeUtil.now());
-                ObjectInserter oi = repo.getRepository().newObjectInserter();
-                ObjectReader reader = oi.newReader();
-                RevWalk rw = new RevWalk(reader)) {
-              bu.setRepository(repo.getRepository(), rw, oi);
-              bu.setNotify(NotifyResolver.Result.none());
-              bu.addOp(c.getId(), inserter);
-              bu.execute();
-            }
-          });
-
-      return inserter.getChange();
+      return newPatchSet(repo, c, user, commit);
     }
   }
 
+  protected Change newPatchSet(
+      TestRepository<Repository> repo, Change c, CurrentUser user, RevCommit commit)
+      throws Exception {
+    PatchSetInserter inserter =
+        patchSetFactory
+            .create(
+                changeNotesFactory.createChecked(c),
+                PatchSet.id(c.getId(), c.currentPatchSetId().get() + 1),
+                commit)
+            .setFireRevisionCreated(false)
+            .disableValidation();
+    testRefAction(
+        () -> {
+          try (BatchUpdate bu = updateFactory.create(c.getProject(), user, TimeUtil.now());
+              ObjectInserter oi = repo.getRepository().newObjectInserter();
+              ObjectReader reader = oi.newReader();
+              RevWalk rw = new RevWalk(reader)) {
+            bu.setRepository(repo.getRepository(), rw, oi);
+            bu.setNotify(NotifyResolver.Result.none());
+            bu.addOp(c.getId(), inserter);
+            bu.execute();
+          }
+        });
+
+    return inserter.getChange();
+  }
+
   protected ThrowableSubject assertThatQueryException(Object query) throws Exception {
     return assertThatQueryException(newQuery(query));
   }
diff --git a/javatests/com/google/gerrit/server/query/change/BUILD b/javatests/com/google/gerrit/server/query/change/BUILD
index 9e99928..387fdd5 100644
--- a/javatests/com/google/gerrit/server/query/change/BUILD
+++ b/javatests/com/google/gerrit/server/query/change/BUILD
@@ -53,6 +53,7 @@
     name = f[:f.index(".")],
     size = "large",
     srcs = [f],
+    shard_count = 4,
     visibility = ["//visibility:public"],
     deps = [
         ":abstract_query_tests",
diff --git a/javatests/com/google/gerrit/server/query/change/ConflictKeyTest.java b/javatests/com/google/gerrit/server/query/change/ConflictKeyTest.java
index 00c1a80..3a1424d 100644
--- a/javatests/com/google/gerrit/server/query/change/ConflictKeyTest.java
+++ b/javatests/com/google/gerrit/server/query/change/ConflictKeyTest.java
@@ -16,6 +16,7 @@
 
 import static com.google.common.truth.Truth.assertThat;
 import static com.google.common.truth.extensions.proto.ProtoTruth.assertThat;
+import static com.google.gerrit.extensions.client.SubmitType.CHERRY_PICK;
 import static com.google.gerrit.extensions.client.SubmitType.FAST_FORWARD_ONLY;
 import static com.google.gerrit.extensions.client.SubmitType.MERGE_IF_NECESSARY;
 import static com.google.gerrit.proto.testing.SerializedClassSubject.assertThatSerializedClass;
@@ -44,6 +45,20 @@
   }
 
   @Test
+  public void cherryPickPreservesInputOrder() {
+    ObjectId id1 = ObjectId.fromString("badc0feebadc0feebadc0feebadc0feebadc0fee");
+    ObjectId id2 = ObjectId.fromString("deadbeefdeadbeefdeadbeefdeadbeefdeadbeef");
+    ConflictKey id1First = ConflictKey.create(id1, id2, CHERRY_PICK, true);
+    ConflictKey id2First = ConflictKey.create(id2, id1, CHERRY_PICK, true);
+
+    assertThat(id1First)
+        .isEqualTo(ConflictKey.createWithoutNormalization(id1, id2, CHERRY_PICK, true));
+    assertThat(id2First)
+        .isEqualTo(ConflictKey.createWithoutNormalization(id2, id1, CHERRY_PICK, true));
+    assertThat(id1First).isNotEqualTo(id2First);
+  }
+
+  @Test
   public void nonFfOnlyNormalizesInputOrder() {
     ObjectId id1 = ObjectId.fromString("badc0feebadc0feebadc0feebadc0feebadc0fee");
     ObjectId id2 = ObjectId.fromString("deadbeefdeadbeefdeadbeefdeadbeefdeadbeef");
diff --git a/javatests/com/google/gerrit/server/restapi/project/ConvertRefStorageTest.java b/javatests/com/google/gerrit/server/restapi/project/ConvertRefStorageTest.java
new file mode 100644
index 0000000..b84be48
--- /dev/null
+++ b/javatests/com/google/gerrit/server/restapi/project/ConvertRefStorageTest.java
@@ -0,0 +1,146 @@
+// Copyright (C) 2026 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.google.gerrit.server.restapi.project;
+
+import static com.google.common.truth.Truth.assertThat;
+import static com.google.gerrit.testing.GerritJUnit.assertThrows;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyNoInteractions;
+import static org.mockito.Mockito.when;
+
+import com.google.gerrit.entities.Project;
+import com.google.gerrit.extensions.api.projects.RefStorageInput;
+import com.google.gerrit.extensions.restapi.AuthException;
+import com.google.gerrit.extensions.restapi.BadRequestException;
+import com.google.gerrit.extensions.restapi.ResourceConflictException;
+import com.google.gerrit.server.CurrentUser;
+import com.google.gerrit.server.git.GitRepositoryManager;
+import com.google.gerrit.server.git.RefStorageNotSupportedException;
+import com.google.gerrit.server.permissions.GlobalPermission;
+import com.google.gerrit.server.permissions.PermissionBackend;
+import com.google.gerrit.server.project.ProjectResource;
+import java.io.IOException;
+import java.text.MessageFormat;
+import org.eclipse.jgit.internal.JGitText;
+import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.lib.RefStorageFormat;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ConvertRefStorageTest {
+  private final Project.NameKey name = Project.nameKey("test");
+  private final GitRepositoryManager repoManager = mock(GitRepositoryManager.class);
+  private final PermissionBackend permissions = mock(PermissionBackend.class);
+  private final PermissionBackend.WithUser userPermissions = mock(PermissionBackend.WithUser.class);
+  private final ProjectResource resource = mock(ProjectResource.class);
+  private ConvertRefStorage view;
+
+  @Before
+  public void setUp() {
+    CurrentUser user = mock(CurrentUser.class);
+    when(resource.getNameKey()).thenReturn(name);
+    when(resource.getUser()).thenReturn(user);
+    when(permissions.user(user)).thenReturn(userPermissions);
+    view = new ConvertRefStorage(repoManager, permissions);
+  }
+
+  @Test
+  public void conversionKeepsBackupByDefault() throws Exception {
+    RefStorageInput input = new RefStorageInput();
+    input.refStorage = "REFTABLE";
+    when(repoManager.convertRefStorage(name, RefStorageFormat.REFTABLE, true, true))
+        .thenReturn(true);
+    assertThat(view.apply(resource, input).value()).isEqualTo("REFTABLE");
+    verify(repoManager).convertRefStorage(name, RefStorageFormat.REFTABLE, true, true);
+  }
+
+  @Test
+  public void conversionHonorsBackupFalse() throws Exception {
+    RefStorageInput input = new RefStorageInput();
+    input.refStorage = "FILES";
+    input.backup = false;
+    when(repoManager.convertRefStorage(name, RefStorageFormat.FILES, true, false)).thenReturn(true);
+    assertThat(view.apply(resource, input).value()).isEqualTo("FILES");
+    verify(repoManager).convertRefStorage(name, RefStorageFormat.FILES, true, false);
+  }
+
+  @Test
+  public void noOpIsConflict() {
+    RefStorageInput input = new RefStorageInput();
+    input.refStorage = "FILES";
+    assertThrows(ResourceConflictException.class, () -> view.apply(resource, input));
+  }
+
+  @Test
+  public void leftoverReftableDirIsConflict() throws Exception {
+    RefStorageInput input = new RefStorageInput();
+    input.refStorage = "REFTABLE";
+    when(repoManager.convertRefStorage(name, RefStorageFormat.REFTABLE, true, true))
+        .thenThrow(new IOException(JGitText.get().reftableDirExists));
+    ResourceConflictException thrown =
+        assertThrows(ResourceConflictException.class, () -> view.apply(resource, input));
+    assertThat(thrown).hasMessageThat().contains("Remove it before converting");
+  }
+
+  @Test
+  public void leftoverPackedRefsIsConflict() throws Exception {
+    RefStorageInput input = new RefStorageInput();
+    input.refStorage = "FILES";
+    when(repoManager.convertRefStorage(name, RefStorageFormat.FILES, true, true))
+        .thenThrow(
+            new IOException(
+                MessageFormat.format(JGitText.get().fileAlreadyExists, Constants.PACKED_REFS)));
+    ResourceConflictException thrown =
+        assertThrows(ResourceConflictException.class, () -> view.apply(resource, input));
+    assertThat(thrown).hasMessageThat().contains("Remove it before converting");
+  }
+
+  @Test
+  public void unrelatedIoErrorPropagates() throws Exception {
+    RefStorageInput input = new RefStorageInput();
+    input.refStorage = "REFTABLE";
+    when(repoManager.convertRefStorage(name, RefStorageFormat.REFTABLE, true, true))
+        .thenThrow(new IOException("disk failure"));
+    assertThrows(IOException.class, () -> view.apply(resource, input));
+  }
+
+  @Test
+  public void unsupportedManagerIsConflict() throws Exception {
+    RefStorageInput input = new RefStorageInput();
+    input.refStorage = "REFTABLE";
+    when(repoManager.convertRefStorage(name, RefStorageFormat.REFTABLE, true, true))
+        .thenThrow(new RefStorageNotSupportedException("Unsupported manager"));
+    assertThrows(ResourceConflictException.class, () -> view.apply(resource, input));
+  }
+
+  @Test
+  public void missingFormatIsBadRequest() {
+    assertThrows(BadRequestException.class, () -> view.apply(resource, new RefStorageInput()));
+    verifyNoInteractions(repoManager);
+  }
+
+  @Test
+  public void requiresServerAdministrator() throws Exception {
+    RefStorageInput input = new RefStorageInput();
+    input.refStorage = "REFTABLE";
+    doThrow(new AuthException("administrateServer required"))
+        .when(userPermissions)
+        .check(GlobalPermission.ADMINISTRATE_SERVER);
+    assertThrows(AuthException.class, () -> view.apply(resource, input));
+    verifyNoInteractions(repoManager);
+  }
+}
diff --git a/javatests/com/google/gerrit/server/schema/AllProjectsCreatorTest.java b/javatests/com/google/gerrit/server/schema/AllProjectsCreatorTest.java
index 9969f0f..782d30c 100644
--- a/javatests/com/google/gerrit/server/schema/AllProjectsCreatorTest.java
+++ b/javatests/com/google/gerrit/server/schema/AllProjectsCreatorTest.java
@@ -168,6 +168,16 @@
   }
 
   @Test
+  public void createAllProjectsWithoutInitializingDefaultAiReviewAcl() throws Exception {
+    AllProjectsInput allProjectsInput =
+        AllProjectsInput.builder().initDefaultAiReviewAcl(false).build();
+    allProjectsCreator.create(allProjectsInput);
+
+    Config config = readAllProjectsConfig(repoManager, allProjectsName);
+    assertThat(config).stringValues("access", "refs/heads/*", "aiReview").isEmpty();
+  }
+
+  @Test
   public void createAllProjectsWithoutInitializingDefaultSubmitRequirements() throws Exception {
     GroupReference adminsGroup = createGroupReference("Administrators");
     GroupReference serviceUsersGroup = createGroupReference(ServiceUserClassifier.SERVICE_USERS);
diff --git a/javatests/com/google/gerrit/server/schema/H2JGitLockAccountPatchReviewStoreIT.java b/javatests/com/google/gerrit/server/schema/H2JGitLockAccountPatchReviewStoreIT.java
index bac1b31..ef4624a 100644
--- a/javatests/com/google/gerrit/server/schema/H2JGitLockAccountPatchReviewStoreIT.java
+++ b/javatests/com/google/gerrit/server/schema/H2JGitLockAccountPatchReviewStoreIT.java
@@ -82,6 +82,26 @@
   }
 
   @Test
+  public void legacyFileUrlStartsAndStoresReviewedFlag() throws Exception {
+    SitePaths sitePaths = new SitePaths(temporaryFolder.getRoot().toPath());
+    Config cfg = new Config();
+    cfg.setString(
+        JdbcAccountPatchReviewStore.ACCOUNT_PATCH_REVIEW_DB,
+        null,
+        "url",
+        "jdbc:h2:file:"
+            + temporaryFolder.newFolder("legacy-account-patch-reviews").toPath().resolve("db"));
+    H2JGitLockAccountPatchReviewStore legacyStore =
+        new H2JGitLockAccountPatchReviewStore(cfg, sitePaths);
+    legacyStore.start();
+
+    var unused = legacyStore.markReviewed(PS, ACCOUNT, FILE);
+
+    assertThat(legacyStore.findReviewed(PS, ACCOUNT)).isPresent();
+    assertThat(legacyStore.findReviewed(PS, ACCOUNT).get().files()).containsExactly(FILE);
+  }
+
+  @Test
   public void concurrentMarksAreAllDurable() throws Exception {
     int nThreads = 8;
     int filesPerThread = 5;
diff --git a/javatests/com/google/gerrit/server/schema/H2JGitLockAccountPatchReviewStoreTest.java b/javatests/com/google/gerrit/server/schema/H2JGitLockAccountPatchReviewStoreTest.java
index c15d1c8..96bc42a 100644
--- a/javatests/com/google/gerrit/server/schema/H2JGitLockAccountPatchReviewStoreTest.java
+++ b/javatests/com/google/gerrit/server/schema/H2JGitLockAccountPatchReviewStoreTest.java
@@ -15,7 +15,7 @@
 package com.google.gerrit.server.schema;
 
 import static com.google.common.truth.Truth.assertThat;
-import static com.google.gerrit.server.schema.H2JGitLockAccountPatchReviewStore.lockTargetFromUrl;
+import static com.google.gerrit.server.schema.H2AccountPatchReviewStore.dbFileFromUrl;
 import static com.google.gerrit.testing.GerritJUnit.assertThrows;
 
 import java.io.File;
@@ -23,25 +23,29 @@
 
 public class H2JGitLockAccountPatchReviewStoreTest {
   @Test
-  public void lockTargetFromUrl_plainPath() {
-    assertThat(lockTargetFromUrl("jdbc:h2:file:/path/to/db")).isEqualTo(new File("/path/to/db"));
+  public void dbFileFromUrl_plainPath() {
+    assertThat(dbFileFromUrl("jdbc:h2:async:/path/to/db")).isEqualTo(new File("/path/to/db"));
   }
 
   @Test
-  public void lockTargetFromUrl_stripsOptions() {
-    assertThat(lockTargetFromUrl("jdbc:h2:file:/path/to/db;FILE_LOCK=NO;DB_CLOSE_DELAY=0"))
+  public void dbFileFromUrl_legacyFileUrl() {
+    assertThat(dbFileFromUrl("jdbc:h2:file:/path/to/db")).isEqualTo(new File("/path/to/db"));
+  }
+
+  @Test
+  public void dbFileFromUrl_stripsOptions() {
+    assertThat(dbFileFromUrl("jdbc:h2:file:/path/to/db;FILE_LOCK=NO;DB_CLOSE_DELAY=0"))
         .isEqualTo(new File("/path/to/db"));
   }
 
   @Test
-  public void lockTargetFromUrl_unescapesSemicolonInPath() {
-    assertThat(lockTargetFromUrl("jdbc:h2:file:/path/with\\;semi/db;FILE_LOCK=NO"))
+  public void dbFileFromUrl_unescapesSemicolonInPath() {
+    assertThat(dbFileFromUrl("jdbc:h2:async:/path/with\\;semi/db;FILE_LOCK=NO"))
         .isEqualTo(new File("/path/with;semi/db"));
   }
 
   @Test
-  public void lockTargetFromUrl_throwsOnInvalidUrls() {
-    assertThrows(
-        IllegalArgumentException.class, () -> lockTargetFromUrl("jdbc:h2:mem:/path/to/db"));
+  public void dbFileFromUrl_throwsOnInvalidUrls() {
+    assertThrows(IllegalArgumentException.class, () -> dbFileFromUrl("jdbc:h2:mem:/path/to/db"));
   }
 }
diff --git a/javatests/com/google/gerrit/server/schema/H2LockTypeMarkerTest.java b/javatests/com/google/gerrit/server/schema/H2LockTypeMarkerTest.java
new file mode 100644
index 0000000..f280423
--- /dev/null
+++ b/javatests/com/google/gerrit/server/schema/H2LockTypeMarkerTest.java
@@ -0,0 +1,71 @@
+// Copyright (C) 2026 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.google.gerrit.server.schema;
+
+import static com.google.common.truth.Truth.assertThat;
+import static com.google.gerrit.server.schema.H2AccountPatchReviewStore.claimOrVerifyLockType;
+import static com.google.gerrit.testing.GerritJUnit.assertThrows;
+
+import java.io.File;
+import java.nio.file.Files;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
+
+public class H2LockTypeMarkerTest {
+  @Rule public TemporaryFolder tmp = new TemporaryFolder();
+
+  @Test
+  public void firstStartCreatesMarker() throws Exception {
+    File db = new File(tmp.getRoot(), "account_patch_reviews");
+    claimOrVerifyLockType(db, "jgit");
+    File marker = new File(db.getPath() + ".locktype/locktype");
+    assertThat(Files.readString(marker.toPath())).isEqualTo("jgit");
+  }
+
+  @Test
+  public void sameLockTypeIsAccepted() {
+    File db = new File(tmp.getRoot(), "account_patch_reviews");
+    claimOrVerifyLockType(db, "jgit");
+    claimOrVerifyLockType(db, "jgit");
+  }
+
+  @Test
+  public void differentLockTypeIsRejected() {
+    File db = new File(tmp.getRoot(), "account_patch_reviews");
+    claimOrVerifyLockType(db, "jgit");
+    IllegalStateException e =
+        assertThrows(IllegalStateException.class, () -> claimOrVerifyLockType(db, "other"));
+    assertThat(e).hasMessageThat().contains("h2LockType=jgit");
+    assertThat(e).hasMessageThat().contains("h2LockType=other");
+  }
+
+  @Test
+  public void h2BuiltinAndJgitLockTypesConflict() {
+    File db = new File(tmp.getRoot(), "account_patch_reviews");
+    claimOrVerifyLockType(db, H2AccountPatchReviewStore.LOCK_TYPE_H2_BUILTIN);
+    assertThrows(
+        IllegalStateException.class,
+        () -> claimOrVerifyLockType(db, JdbcAccountPatchReviewStore.H2_LOCK_TYPE_JGIT));
+  }
+
+  @Test
+  public void noTempFilesAreLeftBehind() {
+    File db = new File(tmp.getRoot(), "account_patch_reviews");
+    claimOrVerifyLockType(db, "jgit");
+    claimOrVerifyLockType(db, "jgit");
+    assertThat(tmp.getRoot().list()).asList().containsExactly("account_patch_reviews.locktype");
+  }
+}
diff --git a/javatests/com/google/gerrit/server/schema/JdbcAccountPatchReviewStoreTest.java b/javatests/com/google/gerrit/server/schema/JdbcAccountPatchReviewStoreTest.java
index d8c876b..18b9479 100644
--- a/javatests/com/google/gerrit/server/schema/JdbcAccountPatchReviewStoreTest.java
+++ b/javatests/com/google/gerrit/server/schema/JdbcAccountPatchReviewStoreTest.java
@@ -16,53 +16,118 @@
 
 import static com.google.common.truth.Truth.assertThat;
 
+import com.google.gerrit.server.config.SitePaths;
 import java.nio.file.Path;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.sql.Statement;
+import org.eclipse.jgit.lib.Config;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
 
 public class JdbcAccountPatchReviewStoreTest {
+  @Rule public TemporaryFolder temporaryFolder = new TemporaryFolder();
+
   @Test
   public void checkCreateH2Url() {
     assertThat(JdbcAccountPatchReviewStore.createH2Url(Path.of("test")))
-        .isEqualTo("jdbc:h2:file:" + Path.of("test").toAbsolutePath());
+        .isEqualTo("jdbc:h2:async:" + Path.of("test").toAbsolutePath());
     assertThat(JdbcAccountPatchReviewStore.createH2Url(Path.of("test.db")))
-        .isEqualTo("jdbc:h2:file:" + Path.of("test.db").toAbsolutePath());
+        .isEqualTo("jdbc:h2:async:" + Path.of("test.db").toAbsolutePath());
     assertThat(JdbcAccountPatchReviewStore.createH2Url(Path.of("test.db.mv.db")))
-        .isEqualTo("jdbc:h2:file:" + Path.of("test.db.mv.db").toAbsolutePath());
+        .isEqualTo("jdbc:h2:async:" + Path.of("test.db.mv.db").toAbsolutePath());
     assertThat(JdbcAccountPatchReviewStore.createH2Url(Path.of("test.db.mv.db.trace.db")))
-        .isEqualTo("jdbc:h2:file:" + Path.of("test.db.mv.db.trace.db").toAbsolutePath());
+        .isEqualTo("jdbc:h2:async:" + Path.of("test.db.mv.db.trace.db").toAbsolutePath());
   }
 
   @Test
   public void checkCreateH2UrlWithPath() {
     assertThat(JdbcAccountPatchReviewStore.createH2Url(Path.of("path/to/test")))
-        .isEqualTo("jdbc:h2:file:" + Path.of("path/to/test").toAbsolutePath());
+        .isEqualTo("jdbc:h2:async:" + Path.of("path/to/test").toAbsolutePath());
     assertThat(JdbcAccountPatchReviewStore.createH2Url(Path.of("path/to/test.db")))
-        .isEqualTo("jdbc:h2:file:" + Path.of("path/to/test.db").toAbsolutePath());
+        .isEqualTo("jdbc:h2:async:" + Path.of("path/to/test.db").toAbsolutePath());
     assertThat(JdbcAccountPatchReviewStore.createH2Url(Path.of("path/to/test.db.mv.db")))
-        .isEqualTo("jdbc:h2:file:" + Path.of("path/to/test.db.mv.db").toAbsolutePath());
+        .isEqualTo("jdbc:h2:async:" + Path.of("path/to/test.db.mv.db").toAbsolutePath());
     assertThat(JdbcAccountPatchReviewStore.createH2Url(Path.of("path/to/test.db.mv.db.trace.db")))
-        .isEqualTo("jdbc:h2:file:" + Path.of("path/to/test.db.mv.db.trace.db").toAbsolutePath());
+        .isEqualTo("jdbc:h2:async:" + Path.of("path/to/test.db.mv.db.trace.db").toAbsolutePath());
   }
 
   @Test
   public void checkCreateH2UrlWithSemicolon() {
     assertThat(JdbcAccountPatchReviewStore.createH2Url(Path.of("test;test")))
         .isEqualTo(
-            "jdbc:h2:file:" + Path.of("test;test").toAbsolutePath().toString().replace(";", "\\;"));
+            "jdbc:h2:async:"
+                + Path.of("test;test").toAbsolutePath().toString().replace(";", "\\;"));
     assertThat(JdbcAccountPatchReviewStore.createH2Url(Path.of("test.db;test")))
         .isEqualTo(
-            "jdbc:h2:file:"
+            "jdbc:h2:async:"
                 + Path.of("test.db;test").toAbsolutePath().toString().replace(";", "\\;"));
     assertThat(JdbcAccountPatchReviewStore.createH2Url(Path.of("test.db.mv.db;test")))
         .isEqualTo(
-            "jdbc:h2:file:"
+            "jdbc:h2:async:"
                 + Path.of("test.db.mv.db;test").toAbsolutePath().toString().replace(";", "\\;"));
     assertThat(JdbcAccountPatchReviewStore.createH2Url(Path.of("test.db.mv.db.trace.db;test")))
         .isEqualTo(
-            "jdbc:h2:file:"
+            "jdbc:h2:async:"
                 + Path.of("test.db.mv.db.trace.db;test")
                     .toAbsolutePath()
                     .toString()
                     .replace(";", "\\;"));
   }
+
+  @Test
+  public void normalizeH2Url_preservesAsyncUrl() {
+    assertThat(JdbcAccountPatchReviewStore.normalizeH2Url("jdbc:h2:async:/path/to/db;FILE_LOCK=NO"))
+        .isEqualTo("jdbc:h2:async:/path/to/db;FILE_LOCK=NO");
+  }
+
+  @Test
+  public void normalizeH2Url_convertsLegacyFileUrlToAsyncUrl() {
+    assertThat(JdbcAccountPatchReviewStore.normalizeH2Url("jdbc:h2:file:/path/to/db;FILE_LOCK=NO"))
+        .isEqualTo("jdbc:h2:async:/path/to/db;FILE_LOCK=NO");
+  }
+
+  @Test
+  public void getUrl_normalizesLegacyFileUrlFromConfig() throws Exception {
+    Config cfg = new Config();
+    cfg.setString(
+        JdbcAccountPatchReviewStore.ACCOUNT_PATCH_REVIEW_DB,
+        null,
+        "url",
+        "jdbc:h2:file:/path/to/db;FILE_LOCK=NO");
+
+    assertThat(
+            JdbcAccountPatchReviewStore.getUrl(
+                cfg, new SitePaths(temporaryFolder.getRoot().toPath())))
+        .isEqualTo("jdbc:h2:async:/path/to/db;FILE_LOCK=NO");
+  }
+
+  @Test
+  public void normalizeH2Url_preservesNonFileH2Url() {
+    assertThat(JdbcAccountPatchReviewStore.normalizeH2Url("jdbc:h2:mem:test;DB_CLOSE_DELAY=-1"))
+        .isEqualTo("jdbc:h2:mem:test;DB_CLOSE_DELAY=-1");
+  }
+
+  @Test
+  public void createH2Url_canCreateAndReadAsyncH2Database() throws Exception {
+    String url =
+        JdbcAccountPatchReviewStore.createH2Url(
+            temporaryFolder.newFolder("db").toPath().resolve("account_patch_reviews"));
+
+    try (Connection con = DriverManager.getConnection(url);
+        Statement stmt = con.createStatement()) {
+      stmt.executeUpdate("CREATE TABLE account_patch_reviews (id INT PRIMARY KEY, path VARCHAR)");
+      stmt.executeUpdate("INSERT INTO account_patch_reviews VALUES (1, 'README.md')");
+    }
+
+    try (Connection con = DriverManager.getConnection(url);
+        Statement stmt = con.createStatement();
+        ResultSet rs = stmt.executeQuery("SELECT path FROM account_patch_reviews WHERE id = 1")) {
+      assertThat(rs.next()).isTrue();
+      assertThat(rs.getString(1)).isEqualTo("README.md");
+      assertThat(rs.next()).isFalse();
+    }
+  }
 }
diff --git a/javatests/com/google/gerrit/server/update/BUILD b/javatests/com/google/gerrit/server/update/BUILD
index a602ee9..2c72fd8 100644
--- a/javatests/com/google/gerrit/server/update/BUILD
+++ b/javatests/com/google/gerrit/server/update/BUILD
@@ -14,6 +14,7 @@
         "//java/com/google/gerrit/extensions:api",
         "//java/com/google/gerrit/git",
         "//java/com/google/gerrit/server",
+        "//java/com/google/gerrit/server/cancellation",
         "//java/com/google/gerrit/server/util/time",
         "//java/com/google/gerrit/testing:gerrit-test-util",
         "//java/com/google/gerrit/testing:test-ref-update-context",
diff --git a/javatests/com/google/gerrit/server/update/BatchUpdateTest.java b/javatests/com/google/gerrit/server/update/BatchUpdateTest.java
index c6a3abc..98b01f2 100644
--- a/javatests/com/google/gerrit/server/update/BatchUpdateTest.java
+++ b/javatests/com/google/gerrit/server/update/BatchUpdateTest.java
@@ -52,6 +52,9 @@
 import com.google.gerrit.server.account.AccountManager;
 import com.google.gerrit.server.account.AuthRequest;
 import com.google.gerrit.server.account.ServiceUserClassifier;
+import com.google.gerrit.server.cancellation.RequestCancelledException;
+import com.google.gerrit.server.cancellation.RequestStateContext;
+import com.google.gerrit.server.cancellation.RequestStateProvider;
 import com.google.gerrit.server.change.AbandonOp;
 import com.google.gerrit.server.change.AddReviewersOp;
 import com.google.gerrit.server.change.ChangeInserter;
@@ -863,6 +866,108 @@
     return id;
   }
 
+  @Test
+  public void cancellationAfterCommitDoesNotAbortPostUpdateOps() throws Exception {
+    Change.Id id = createChangeWithUpdates(1);
+    AtomicBoolean cancelled = new AtomicBoolean();
+    AtomicInteger postUpdateCalls = new AtomicInteger();
+    try (RequestStateContext _ =
+            RequestStateContext.open().addRequestStateProvider(cancelledIf(cancelled));
+        BatchUpdate bu = batchUpdateFactory.create(project, user.get(), TimeUtil.now())) {
+      bu.addOp(
+          id,
+          new AddMessageOp("First update") {
+            @Override
+            public void postUpdate(PostUpdateContext ctx) {
+              postUpdateCalls.incrementAndGet();
+              cancelled.set(true);
+            }
+          });
+      bu.addOp(
+          id,
+          new AddMessageOp("Second update") {
+            @Override
+            public void postUpdate(PostUpdateContext ctx) {
+              postUpdateCalls.incrementAndGet();
+            }
+          });
+      RequestCancelledException thrown = assertThrows(RequestCancelledException.class, bu::execute);
+      assertThat(thrown.getCancellationReason())
+          .isEqualTo(RequestStateProvider.Reason.CLIENT_CLOSED_REQUEST);
+    }
+    assertThat(postUpdateCalls.get()).isEqualTo(2);
+    assertThat(getUpdateCount(id)).isEqualTo(2);
+  }
+
+  @Test
+  public void cancellationDuringCommitDoesNotAbortPostUpdateOps() throws Exception {
+    Change.Id id = createChangeWithUpdates(1);
+    AtomicBoolean cancelled = new AtomicBoolean();
+    AtomicInteger postUpdateCalls = new AtomicInteger();
+    BatchUpdateListener cancellingListener =
+        new BatchUpdateListener() {
+          @Override
+          public BatchRefUpdate beforeUpdateRefs(BatchRefUpdate bru) {
+            cancelled.set(true);
+            return bru;
+          }
+        };
+    try (RequestStateContext _ =
+            RequestStateContext.open().addRequestStateProvider(cancelledIf(cancelled));
+        BatchUpdate bu = batchUpdateFactory.create(project, user.get(), TimeUtil.now())) {
+      bu.addOp(
+          id,
+          new AddMessageOp("Update") {
+            @Override
+            public void postUpdate(PostUpdateContext ctx) {
+              postUpdateCalls.incrementAndGet();
+            }
+          });
+      assertThrows(RequestCancelledException.class, () -> bu.execute(cancellingListener));
+    }
+    assertThat(cancelled.get()).isTrue();
+    assertThat(postUpdateCalls.get()).isEqualTo(1);
+    assertThat(getUpdateCount(id)).isEqualTo(2);
+  }
+
+  @Test
+  public void cancellationBeforeCommitAbortsBatchUpdate() throws Exception {
+    Change.Id id = createChangeWithUpdates(1);
+    ObjectId oldMetaId = getMetaId(id);
+    AtomicBoolean cancelled = new AtomicBoolean();
+    AtomicInteger postUpdateCalls = new AtomicInteger();
+    try (RequestStateContext _ =
+            RequestStateContext.open().addRequestStateProvider(cancelledIf(cancelled));
+        BatchUpdate bu = batchUpdateFactory.create(project, user.get(), TimeUtil.now())) {
+      bu.addOp(
+          id,
+          new AddMessageOp("Update") {
+            @Override
+            public boolean updateChange(ChangeContext ctx) throws Exception {
+              cancelled.set(true);
+              return super.updateChange(ctx);
+            }
+
+            @Override
+            public void postUpdate(PostUpdateContext ctx) {
+              postUpdateCalls.incrementAndGet();
+            }
+          });
+      assertThrows(RequestCancelledException.class, bu::execute);
+    }
+    assertThat(postUpdateCalls.get()).isEqualTo(0);
+    assertThat(getMetaId(id)).isEqualTo(oldMetaId);
+  }
+
+  private static RequestStateProvider cancelledIf(AtomicBoolean cancelled) {
+    return onCancelled -> {
+      if (cancelled.get()) {
+        onCancelled.onCancel(
+            RequestStateProvider.Reason.CLIENT_CLOSED_REQUEST, /* message= */ null);
+      }
+    };
+  }
+
   private Change.Id createChangeWithPatchSets(int patchSets) throws Exception {
     checkArgument(patchSets >= 2);
     Change.Id id = createChangeWithUpdates(MAX_UPDATES - 2);
diff --git a/javatests/com/google/gerrit/server/util/H2UrlTest.java b/javatests/com/google/gerrit/server/util/H2UrlTest.java
new file mode 100644
index 0000000..e2e0ac4
--- /dev/null
+++ b/javatests/com/google/gerrit/server/util/H2UrlTest.java
@@ -0,0 +1,27 @@
+// Copyright (C) 2026 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.google.gerrit.server.util;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import org.junit.Test;
+
+public class H2UrlTest {
+  @Test
+  public void prefixes() {
+    assertThat(H2Url.ASYNC_PREFIX).isEqualTo("jdbc:h2:async:");
+    assertThat(H2Url.FILE_PREFIX).isEqualTo("jdbc:h2:file:");
+  }
+}
diff --git a/javatests/com/google/gerrit/sshd/BUILD b/javatests/com/google/gerrit/sshd/BUILD
index 1905818..9c8896c 100644
--- a/javatests/com/google/gerrit/sshd/BUILD
+++ b/javatests/com/google/gerrit/sshd/BUILD
@@ -8,7 +8,8 @@
         "//java/com/google/gerrit/extensions:api",
         "//java/com/google/gerrit/server",
         "//java/com/google/gerrit/sshd",
-        "//java/com/google/gerrit/testing:gerrit-junit",
+        "//java/com/google/gerrit/testing:gerrit-test-util",
+        "//lib:jgit",
         "//lib/mina:sshd",
         "//lib/truth",
     ],
diff --git a/javatests/com/google/gerrit/sshd/SshDaemonTest.java b/javatests/com/google/gerrit/sshd/SshDaemonTest.java
new file mode 100644
index 0000000..6c459d6
--- /dev/null
+++ b/javatests/com/google/gerrit/sshd/SshDaemonTest.java
@@ -0,0 +1,89 @@
+// Copyright (C) 2026 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package com.google.gerrit.sshd;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import com.google.gerrit.testing.SystemPropertiesTestRule;
+import java.net.InetSocketAddress;
+import java.net.SocketAddress;
+import java.util.Map;
+import java.util.Optional;
+import java.util.OptionalInt;
+import org.eclipse.jgit.lib.Config;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class SshDaemonTest {
+  private static final String NIO_WORKERS_SYSPROP = "org.apache.sshd.config.nio-workers";
+
+  @Rule
+  public final SystemPropertiesTestRule systemProperties =
+      new SystemPropertiesTestRule(Map.of(NIO_WORKERS_SYSPROP, Optional.empty()));
+
+  @Test
+  public void configuredNioWorkersTakePrecedenceOverSystemProperty() {
+    Config cfg = new Config();
+    cfg.setInt("sshd", null, "nioWorkers", 3);
+    System.setProperty(NIO_WORKERS_SYSPROP, "11");
+
+    assertThat(SshDaemon.resolveNioWorkers(cfg, 16, 32)).hasValue(3);
+  }
+
+  @Test
+  public void systemPropertyNioWorkersAreLeftForSshdToResolve() {
+    System.setProperty(NIO_WORKERS_SYSPROP, "11");
+
+    assertThat(SshDaemon.resolveNioWorkers(new Config(), 16, 32)).isEmpty();
+  }
+
+  @Test
+  public void defaultNioWorkersUseSshdThreads() {
+    OptionalInt nioWorkers = SshDaemon.resolveNioWorkers(new Config(), 16, 32);
+
+    assertThat(nioWorkers).hasValue(8);
+  }
+
+  @Test
+  public void nonPositiveConfiguredNioWorkersAreIgnored() {
+    Config cfg = new Config();
+    cfg.setInt("sshd", null, "nioWorkers", 0);
+
+    assertThat(SshDaemon.resolveNioWorkers(cfg, 16, 32)).hasValue(8);
+  }
+
+  @Test
+  public void updateRemoteAddressUsesNewAddress() {
+    SocketAddress socketAddress = new InetSocketAddress("198.51.100.1", 22);
+    SocketAddress proxyAddress = new InetSocketAddress("192.0.2.1", 22);
+    SshSession sshSession = new SshSession(1, socketAddress);
+
+    sshSession.updateRemoteAddress(proxyAddress);
+
+    assertThat(sshSession.getRemoteAddress()).isEqualTo(proxyAddress);
+    assertThat(sshSession.getRemoteAddressAsString()).isEqualTo("192.0.2.1");
+  }
+
+  @Test
+  public void updateRemoteAddressIgnoresNull() {
+    SocketAddress socketAddress = new InetSocketAddress("198.51.100.1", 22);
+    SshSession sshSession = new SshSession(1, socketAddress);
+
+    sshSession.updateRemoteAddress(null);
+
+    assertThat(sshSession.getRemoteAddress()).isEqualTo(socketAddress);
+    assertThat(sshSession.getRemoteAddressAsString()).isEqualTo("198.51.100.1");
+  }
+}
diff --git a/javatests/com/google/gerrit/sshd/SshUtilTest.java b/javatests/com/google/gerrit/sshd/SshUtilTest.java
index 1585bc3..7d7e917 100644
--- a/javatests/com/google/gerrit/sshd/SshUtilTest.java
+++ b/javatests/com/google/gerrit/sshd/SshUtilTest.java
@@ -34,7 +34,7 @@
   public void shouldFailParsingOpenSshKeyWithInvalidAlgo() {
     String sshKeyWithInvalidAlgo = String.format("%s %s", INVALID_ALGO, VALID_OPENSSH_RSA_KEY);
     AccountSshKey sshKey =
-        AccountSshKey.create(TEST_ACCOUNT_ID, TEST_SSHKEY_SEQUENCE, sshKeyWithInvalidAlgo);
+        new AccountSshKey(TEST_ACCOUNT_ID, TEST_SSHKEY_SEQUENCE, sshKeyWithInvalidAlgo);
     assertThrows(InvalidKeySpecException.class, () -> SshUtil.parse(sshKey));
   }
 
@@ -43,7 +43,7 @@
     String sshKeyWithValidKeyAlgo =
         String.format("%s %s", VALID_SSH_RSA_ALGO, VALID_OPENSSH_RSA_KEY);
     AccountSshKey sshKey =
-        AccountSshKey.create(TEST_ACCOUNT_ID, TEST_SSHKEY_SEQUENCE, sshKeyWithValidKeyAlgo);
+        new AccountSshKey(TEST_ACCOUNT_ID, TEST_SSHKEY_SEQUENCE, sshKeyWithValidKeyAlgo);
     assertThat(sshKey).isNotNull();
   }
 }
diff --git a/javatests/com/google/gerrit/util/crypto/BUILD b/javatests/com/google/gerrit/util/crypto/BUILD
index 7ea0626..5de0855 100644
--- a/javatests/com/google/gerrit/util/crypto/BUILD
+++ b/javatests/com/google/gerrit/util/crypto/BUILD
@@ -6,7 +6,6 @@
     deps = [
         "//java/com/google/gerrit/util/crypto",
         "//lib:junit",
-        "//lib/bouncycastle:bcprov",
         "//lib/truth",
     ],
 )
diff --git a/lib/BUILD b/lib/BUILD
index 5648007..5af39a2 100644
--- a/lib/BUILD
+++ b/lib/BUILD
@@ -273,7 +273,6 @@
         "//lib/flogger:api",
         "//lib/guice",
         "//lib/guice:guice-assistedinject",
-        "//lib/guice:javax_inject",
         "//lib/ow2:ow2-asm",
         "//lib/ow2:ow2-asm-analysis",
         "//lib/ow2:ow2-asm-commons",
diff --git a/lib/LICENSE-h2 b/lib/LICENSE-h2
index e20e44a..34a6adc 100644
--- a/lib/LICENSE-h2
+++ b/lib/LICENSE-h2
@@ -336,6 +336,8 @@
 
 ----
 
+----
+
 Eclipse Public License, Version 1.0 (EPL-1.0)
 
 THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
@@ -554,7 +556,6 @@
 jury trial in any resulting litigation.
 ----
 
-----
 Export Control Classification Number (ECCN)
 
 As far as we know, the U.S. Export Control Classification Number
diff --git a/lib/asciidoctor/BUILD b/lib/asciidoctor/BUILD
index c4ca4da..06037d3 100644
--- a/lib/asciidoctor/BUILD
+++ b/lib/asciidoctor/BUILD
@@ -4,12 +4,15 @@
     name = "asciidoctor",
     data = ["//lib:LICENSE-asciidoctor"],
     visibility = ["//java/com/google/gerrit/asciidoctor:__pkg__"],
-    exports = ["@external_deps//:org_asciidoctor_asciidoctorj"],
+    exports = [
+        "@external_deps//:org_asciidoctor_asciidoctorj",
+        "@external_deps//:org_asciidoctor_asciidoctorj_api",
+    ],
     runtime_deps = [":jruby"],
 )
 
 java_library(
     name = "jruby",
     data = ["//lib:LICENSE-DO_NOT_DISTRIBUTE"],
-    exports = ["@external_deps//:org_jruby_jruby_complete"],
+    exports = ["@external_deps//:org_jruby_jruby"],
 )
diff --git a/lib/auto/BUILD b/lib/auto/BUILD
index 4eab274..3efec77 100644
--- a/lib/auto/BUILD
+++ b/lib/auto/BUILD
@@ -23,7 +23,7 @@
         "@external_deps//:com_google_auto_value_auto_value_annotations",
         "@external_deps//:com_google_guava_guava",
         "@external_deps//:com_squareup_javapoet",
-        "@external_deps//:javax_inject_javax_inject",
+        "@external_deps//:jakarta_inject_jakarta_inject_api",
     ],
 )
 
@@ -39,7 +39,7 @@
         "@external_deps//:com_google_auto_value_auto_value_annotations",
         "@external_deps//:com_google_guava_guava",
         "@external_deps//:com_squareup_javapoet",
-        "@external_deps//:javax_inject_javax_inject",
+        "@external_deps//:jakarta_inject_jakarta_inject_api",
     ],
 )
 
diff --git a/lib/guice/BUILD b/lib/guice/BUILD
index 12151cd..5726c65 100644
--- a/lib/guice/BUILD
+++ b/lib/guice/BUILD
@@ -54,6 +54,7 @@
 java_library(
     name = "javax_inject",
     data = ["//lib:LICENSE-Apache2.0"],
-    visibility = ["//visibility:public"],
+    # Guice 6 needs this bridge; direct consumers should use jakarta-inject.
+    visibility = ["//visibility:private"],
     exports = ["@external_deps//:javax_inject_javax_inject"],
 )
diff --git a/lib/mina/BUILD b/lib/mina/BUILD
index 00cc2e5..b0dbb60 100644
--- a/lib/mina/BUILD
+++ b/lib/mina/BUILD
@@ -5,6 +5,7 @@
     data = ["//lib:LICENSE-Apache2.0"],
     visibility = ["//visibility:public"],
     exports = [
+        "@external_deps//:org_apache_sshd_sshd_contrib",
         "@external_deps//:org_apache_sshd_sshd_mina",
         "@external_deps//:org_apache_sshd_sshd_osgi",
     ],
@@ -24,3 +25,10 @@
     visibility = ["//visibility:public"],
     exports = ["@external_deps//:org_apache_mina_mina_core"],
 )
+
+java_library(
+    name = "contrib",
+    data = ["//lib:LICENSE-Apache2.0"],
+    visibility = ["//visibility:public"],
+    exports = ["@external_deps//:org_apache_sshd_sshd_contrib"],
+)
diff --git a/lib/nongoogle_test.sh b/lib/nongoogle_test.sh
index 16d2f12..7525333 100755
--- a/lib/nongoogle_test.sh
+++ b/lib/nongoogle_test.sh
@@ -49,6 +49,7 @@
 openid-consumer
 protobuf-java
 soy
+sshd-contrib
 sshd-mina
 sshd-osgi
 sshd-sftp
diff --git a/modules/gitiles b/modules/gitiles
index e5135e3..78afdfc 160000
--- a/modules/gitiles
+++ b/modules/gitiles
@@ -1 +1 @@
-Subproject commit e5135e39eac0f5f3b91c7616f9131be32286a136
+Subproject commit 78afdfca29aa36bb664bff7f8022f89d12fb2d2b
diff --git a/modules/java-prettify b/modules/java-prettify
index 1c0ef60..b695129 160000
--- a/modules/java-prettify
+++ b/modules/java-prettify
@@ -1 +1 @@
-Subproject commit 1c0ef60424995a24452ce5ccd54f60c7eb9a5051
+Subproject commit b695129870fcd85b03e94bf46ca2d50e4c471eb5
diff --git a/modules/jgit b/modules/jgit
index 87eaf66..b853dda 160000
--- a/modules/jgit
+++ b/modules/jgit
@@ -1 +1 @@
-Subproject commit 87eaf6628b8ef58591382f15fa7e442639e1be91
+Subproject commit b853dda82fca99295636a4ac20b674bf68a8ef35
diff --git a/package.json b/package.json
index 75a1a9f..6dec603 100644
--- a/package.json
+++ b/package.json
@@ -3,14 +3,14 @@
   "version": "3.11.0",
   "description": "Gerrit Code Review",
   "dependencies": {
-    "@typescript-eslint/parser": "^8.32.0"
+    "@typescript-eslint/parser": "^8.69.0"
   },
   "devDependencies": {
     "@eslint/eslintrc": "^3.3.1",
     "@eslint/js": "^9.26.0",
     "@koa/cors": "^5.0.0",
     "@types/page": "^1.11.9",
-    "@typescript-eslint/eslint-plugin": "^8.32.0",
+    "@typescript-eslint/eslint-plugin": "^8.69.0",
     "@web/dev-server": "^0.4.6",
     "@web/dev-server-esbuild": "^1.0.4",
     "eslint": "^9.26.0",
@@ -30,7 +30,7 @@
     "rollup": "^4.49.0",
     "terser": "~5.39.0",
     "ts-lit-plugin": "^2.0.2",
-    "typescript": "5.8.2"
+    "typescript": "6.0.3"
   },
   "dependencies // comments": {
     "eslint": "eslint 9.26 upgrade in change 473401",
@@ -42,9 +42,9 @@
   },
   "resolutions": {
     "eslint": "^9.39.1",
-    "@typescript-eslint/eslint-plugin": "^8.49.0",
-    "@typescript-eslint/parser": "^8.49.0",
-    "typescript": "5.8.2",
+    "@typescript-eslint/eslint-plugin": "^8.69.0",
+    "@typescript-eslint/parser": "^8.69.0",
+    "typescript": "6.0.3",
     "vscode-css-languageservice": "^6.3.9",
     "vscode-html-languageservice": "^5.6.1"
   },
diff --git a/plugins/BUILD b/plugins/BUILD
index 2df9bfc..2ec6af1 100644
--- a/plugins/BUILD
+++ b/plugins/BUILD
@@ -51,6 +51,7 @@
     "//java/com/google/gerrit/exceptions",
     "//java/com/google/gerrit/extensions:api",
     "//java/com/google/gerrit/git",
+    "//java/com/google/gerrit/gpg",
     "//java/com/google/gerrit/index",
     "//java/com/google/gerrit/index/project",
     "//java/com/google/gerrit/index:query_exception",
@@ -75,11 +76,14 @@
     "//java/com/google/gerrit/server/util/time",
     "//java/com/google/gerrit/proto",
     "//java/com/google/gerrit/util/cli",
+    "//java/com/google/gerrit/util/crypto",
     "//java/com/google/gerrit/util/http",
     "//java/com/google/gerrit/util/logging",
     "//lib/antlr:java-runtime",
     "//lib/auto:auto-value-annotations",
     "//lib/auto:auto-value-gson",
+    "//lib/bouncycastle:bcpg-neverlink",
+    "//lib/bouncycastle:bcprov-neverlink",
     "//lib/commons:codec",
     "//lib/commons:compress",
     "//lib/commons:dbcp",
@@ -191,5 +195,9 @@
 copy_to_bin(
     name = "tsconfig-plugins-base",
     srcs = ["tsconfig-plugins-base.json"],
-    visibility = ["//plugins:__subpackages__"],
+    visibility = [
+        # polygerrit-ui/app builds the in-tree plugin API package against it.
+        "//polygerrit-ui/app:__pkg__",
+        "//plugins:__subpackages__",
+    ],
 )
diff --git a/plugins/codemirror-editor b/plugins/codemirror-editor
index d6a9c60..d44a220 160000
--- a/plugins/codemirror-editor
+++ b/plugins/codemirror-editor
@@ -1 +1 @@
-Subproject commit d6a9c60c7ca27866d8f0b01d1a48bece35dc9bc8
+Subproject commit d44a2204aa6bdee6b19ba7ece35f9c10fcc3a3e9
diff --git a/plugins/delete-project b/plugins/delete-project
index 3603583..560f49a 160000
--- a/plugins/delete-project
+++ b/plugins/delete-project
@@ -1 +1 @@
-Subproject commit 3603583484c45e578aeff66885723dfd171932fa
+Subproject commit 560f49a01d3ceb1bd087c1a3cb1b57b25d708551
diff --git a/plugins/package.json b/plugins/package.json
index 189a9d1..ae96657 100644
--- a/plugins/package.json
+++ b/plugins/package.json
@@ -3,8 +3,9 @@
   "description": "Gerrit Code Review - frontend plugin dependencies, each plugin may depend on a subset of these",
   "browser": true,
   "dependencies": {
+    "@types/mocha": "^10.0.10",
     "@codemirror/autocomplete": "^6.20.3",
-    "@codemirror/commands": "^6.11.0",
+    "@codemirror/commands": "^6.11.1",
     "@codemirror/lang-cpp": "^6.0.3",
     "@codemirror/lang-css": "^6.3.1",
     "@codemirror/lang-go": "^6.0.1",
@@ -23,14 +24,14 @@
     "@codemirror/lang-vue": "^0.1.3",
     "@codemirror/lang-xml": "^6.1.0",
     "@codemirror/lang-yaml": "^6.1.3",
-    "@codemirror/language": "^6.12.4",
+    "@codemirror/language": "^6.13.1",
     "@codemirror/language-data": "^6.5.2",
-    "@codemirror/legacy-modes": "^6.5.3",
+    "@codemirror/legacy-modes": "^6.5.5",
     "@codemirror/lint": "^6.9.7",
-    "@codemirror/search": "^6.7.1",
-    "@codemirror/state": "^6.7.1",
-    "@codemirror/view": "^6.43.9",
-    "@lezer/highlight": "^1.2.3",
+    "@codemirror/search": "^6.7.2",
+    "@codemirror/state": "^6.7.6",
+    "@codemirror/view": "^6.43.14",
+    "@lezer/highlight": "^1.2.5",
     "@gerritcodereview/typescript-api": "3.14.0",
     "@material/web": "^2.4.1",
     "@open-wc/testing": "^4.0.0",
diff --git a/plugins/plugin-manager b/plugins/plugin-manager
index 2b952a6..0813d0f 160000
--- a/plugins/plugin-manager
+++ b/plugins/plugin-manager
@@ -1 +1 @@
-Subproject commit 2b952a6156e7e0b81b7e6a5bb65a252564200974
+Subproject commit 0813d0f6c768ee9436993654fae33cd1cd751e1d
diff --git a/plugins/pnpm-lock.yaml b/plugins/pnpm-lock.yaml
index 8713e49..035f987 100644
--- a/plugins/pnpm-lock.yaml
+++ b/plugins/pnpm-lock.yaml
@@ -12,8 +12,8 @@
         specifier: ^6.20.3
         version: 6.20.3
       '@codemirror/commands':
-        specifier: ^6.11.0
-        version: 6.11.0
+        specifier: ^6.11.1
+        version: 6.11.1
       '@codemirror/lang-cpp':
         specifier: ^6.0.3
         version: 6.0.3
@@ -69,53 +69,56 @@
         specifier: ^6.1.3
         version: 6.1.3
       '@codemirror/language':
-        specifier: ^6.12.4
-        version: 6.12.4
+        specifier: ^6.13.1
+        version: 6.13.1
       '@codemirror/language-data':
         specifier: ^6.5.2
         version: 6.5.2
       '@codemirror/legacy-modes':
-        specifier: ^6.5.3
-        version: 6.5.3
+        specifier: ^6.5.5
+        version: 6.5.5
       '@codemirror/lint':
         specifier: ^6.9.7
         version: 6.9.7
       '@codemirror/search':
-        specifier: ^6.7.1
-        version: 6.7.1
+        specifier: ^6.7.2
+        version: 6.7.2
       '@codemirror/state':
-        specifier: ^6.7.1
-        version: 6.7.1
+        specifier: ^6.7.6
+        version: 6.7.6
       '@codemirror/view':
-        specifier: ^6.43.9
-        version: 6.43.9
+        specifier: ^6.43.14
+        version: 6.43.14
       '@gerritcodereview/typescript-api':
         specifier: 3.14.0
         version: 3.14.0
       '@lezer/highlight':
-        specifier: ^1.2.3
-        version: 1.2.3
+        specifier: ^1.2.5
+        version: 1.2.5
       '@material/web':
         specifier: ^2.4.1
         version: 2.4.1
       '@open-wc/testing':
         specifier: ^4.0.0
-        version: 4.0.0
+        version: 4.0.0(supports-color@7.2.0)
+      '@types/mocha':
+        specifier: ^10.0.10
+        version: 10.0.10
       '@types/sinon':
         specifier: ^17.0.4
         version: 17.0.4
       '@web/dev-server-esbuild':
         specifier: ^1.0.4
-        version: 1.0.4
+        version: 1.0.4(supports-color@7.2.0)
       '@web/test-runner':
         specifier: ^0.20.2
-        version: 0.20.2
+        version: 0.20.2(supports-color@7.2.0)
       lit:
         specifier: ^3.3.1
         version: 3.3.1
       resemblejs:
         specifier: ^5.0.0
-        version: 5.0.0
+        version: 5.0.0(supports-color@7.2.0)
       rxjs:
         specifier: ^6.6.7
         version: 6.6.7
@@ -136,8 +139,8 @@
   '@codemirror/autocomplete@6.20.3':
     resolution: {integrity: sha512-tlosUqb+3BbxCxZdu4tKeRghPFC+QM7q4X5YhKV2eCmPG+1r2F3f4AaSz5sCrFqUtX4Jh20VFTKecl16MgiV9g==}
 
-  '@codemirror/commands@6.11.0':
-    resolution: {integrity: sha512-/K4Rl5BN0OtTiPWmJCdqODu38XnDMsDxKY5rgrPnCkutPTJf2wVbkoixLfealF5Kwse/s8P8M5jAiURiwSwnFA==}
+  '@codemirror/commands@6.11.1':
+    resolution: {integrity: sha512-O/4hG3SC1YwcmQ0d2UVNDs+AsaNWd1iHVxbTeEBuqH+6bExAiPK3iS/BvpY6rZGURALv4ZD3sIgcCmRvw3ehBg==}
 
   '@codemirror/lang-angular@0.1.4':
     resolution: {integrity: sha512-oap+gsltb/fzdlTQWD6BFF4bSLKcDnlxDsLdePiJpCVNKWXSTAbiiQeYI3UmES+BLAdkmIC1WjyztC1pi/bX4g==}
@@ -169,8 +172,8 @@
   '@codemirror/lang-less@6.0.2':
     resolution: {integrity: sha512-EYdQTG22V+KUUk8Qq582g7FMnCZeEHsyuOJisHRft/mQ+ZSZ2w51NupvDUHiqtsOy7It5cHLPGfHQLpMh9bqpQ==}
 
-  '@codemirror/lang-liquid@6.3.2':
-    resolution: {integrity: sha512-6PDVU3ZnfeYyz1at1E/ttorErZvZFXXt1OPhtfe1EZJ2V2iDFa0CwPqPgG5F7NXN0yONGoBogKmFAafKTqlwIw==}
+  '@codemirror/lang-liquid@6.3.3':
+    resolution: {integrity: sha512-U9EnyzWuAx1TX3MZSKDXydKH734n1Aogk/ijKdW+jdIwmbf9zSPQYOIKggC/b2PTRjQb7ddvMktmxnfTLuv/SQ==}
 
   '@codemirror/lang-markdown@6.5.2':
     resolution: {integrity: sha512-AwBOdkWYuA//WcM0xO5PfHPUcmz/O2i5o0Nsg1U69SII/loCJlFI1Romd9xp2HYb1kYJRGZotyqRghuHH5n8Kw==}
@@ -205,23 +208,26 @@
   '@codemirror/language-data@6.5.2':
     resolution: {integrity: sha512-CPkWBKrNS8stYbEU5kwBwTf3JB1kghlbh4FSAwzGW2TEscdeHHH4FGysREW86Mqnj3Qn09s0/6Ea/TutmoTobg==}
 
-  '@codemirror/language@6.12.4':
-    resolution: {integrity: sha512-1q4PaT+o6PbgpkJt4Q8Fv5XJxTy4FUZ4MWETtyiDw3J0Pyr9E2vqcKL+k9wcvjNTIsauxvE7OfmWj3FRPHQ76A==}
+  '@codemirror/language@6.13.1':
+    resolution: {integrity: sha512-zfvU2r3TyylQLMj/te+5CnQ0rSqZi8B1oTCBbQkagcLW4Xc6imab6qN+pEJhsuNOLaJqiRyBXp9UhWA1DhVvDw==}
 
-  '@codemirror/legacy-modes@6.5.3':
-    resolution: {integrity: sha512-xCsmIzH78MyWkib9jlPaaun57XNkfbMIhagfaZVd0iLTqlpw3jXaIcbZm72MTmmn64eTZpBVNjbyYh+QXnxRsg==}
+  '@codemirror/legacy-modes@6.5.5':
+    resolution: {integrity: sha512-9ltT214oMb3Y1w5eAZMSigzrjzZnMI2Wa3Feq73rU/i4C56MkwrpfswfQYOr28C5pXr6dWwspNTMyeHXlzWMxg==}
 
   '@codemirror/lint@6.9.7':
     resolution: {integrity: sha512-28/+iWLYxKxsvGYhSYL7zaCZqLz5+FFFDq9tVsvGv9kv8RY4fFAchJ5WX9M3YrrRlTIsECjsXPqeNgnSmNP2dg==}
 
-  '@codemirror/search@6.7.1':
-    resolution: {integrity: sha512-uMe5UO6PamJtSHrXhhHOzSX3ReWtiJrva6GnPMwSOrZtiExb5X5eExhr2OUZQVvdxPsKpY3Ro2mFbQadpPWmHA==}
+  '@codemirror/search@6.7.2':
+    resolution: {integrity: sha512-gUYkYhT2+n/+VGZ+8EzE5WFkYZUZYm1VOKDudIsNqh42uRVQJ0a6Yss9sdKT3MeOYfuL1N6AZA57oza0Oyr0LA==}
 
-  '@codemirror/state@6.7.1':
-    resolution: {integrity: sha512-9QzNDgE4EYDnAHfrTlR2lwiPciiOymLtwKK+8yHQzCc7GXhAP9xdEbEJFy2IWB1j9UGUl9BsgMmTo/ImA02T7A==}
+  '@codemirror/state@6.7.6':
+    resolution: {integrity: sha512-kAz+AncRtKuIknedxT1bq4XwXv4UowhbkHU1myPrtVb/jZtImWuV5BXzv5vK6i3kYACsdiZiQKFQQ5Mq7elW8w==}
 
-  '@codemirror/view@6.43.9':
-    resolution: {integrity: sha512-sTuUzTpPMFebRhg6dawChoKKgndIwfjmJgKVxBefPElcU2NwQ6AFroupk0SFqEerQyZOGRfDNnSN8Dw/lMAsXw==}
+  '@codemirror/streamparser@6.0.0':
+    resolution: {integrity: sha512-JTFPF6xrfjt0mnfGPgzcLiMwYmvIyNaoizp8BYzv8FE8KrT6GBGDZ190rtt+O7Wke3gG/MFHyiY9YGNeimof4w==}
+
+  '@codemirror/view@6.43.14':
+    resolution: {integrity: sha512-hC45YnmJNR1rz42OF57BLoQNFMV12/13drnvibDsR2quNDmldcb4WvYVV81hFQg56i9lcqQMEDqilhX2QDcGQQ==}
 
   '@esbuild/aix-ppc64@0.25.9':
     resolution: {integrity: sha512-OaGtL73Jck6pBKjNIe24BnFE6agGl+6KxDtTfHhy1HmhthfKouEcOhqpSL64K4/0WCtbKFLOdzD/44cJ4k9opA==}
@@ -398,47 +404,47 @@
   '@jridgewell/trace-mapping@0.3.30':
     resolution: {integrity: sha512-GQ7Nw5G2lTu/BtHTKfXhKHok2WGetd4XYcVKGx00SjAk8GMwgJM3zr6zORiPGuOE+/vkc90KtTosSSvaCjKb2Q==}
 
-  '@lezer/common@1.5.2':
-    resolution: {integrity: sha512-sxQE460fPZyU3sdc8lafxiPwJHBzZRy/udNFynGQky1SePYBdhkBl1kOagA9uT3pxR8K09bOrmTUqA9wb/PjSQ==}
+  '@lezer/common@1.5.3':
+    resolution: {integrity: sha512-H0iErY4e43LpXbYDyBci5W4v/RwTgGV3YzYOlJPiGZ8RY8w51kVE+xLn1tg3Z6UmSfyETvtsUK3r7YsgDQEI7Q==}
 
   '@lezer/cpp@1.1.6':
     resolution: {integrity: sha512-vh9gWWJOXFVY8HBHK3Twzq8MgwG2iN4GSyzBP9sCGTe37P15x2R14VaBQk0VA0ezTRN1KHYBBsHhvpGZ2Xy/pA==}
 
-  '@lezer/css@1.3.6':
-    resolution: {integrity: sha512-YJE78Wcg+zX8f10hiHWQ4Az48Qr/c13eId0VtRQYLBpxHDmDeSrXIlkbl+fJGW42rWC/uoUco9mhBZeVWP/A1g==}
+  '@lezer/css@1.3.9':
+    resolution: {integrity: sha512-ZmzgvTOBdJWGIsY/ItAfN7UW8DV802oZG+jeG6E508SwEzz5YhuAajptpWPICvIyqYAD2+VjMdOS40GgGkyEOQ==}
 
   '@lezer/go@1.0.1':
     resolution: {integrity: sha512-xToRsYxwsgJNHTgNdStpcvmbVuKxTapV0dM0wey1geMMRc9aggoVyKgzYp41D2/vVOx+Ii4hmE206kvxIXBVXQ==}
 
-  '@lezer/highlight@1.2.3':
-    resolution: {integrity: sha512-qXdH7UqTvGfdVBINrgKhDsVTJTxactNNxLk7+UMwZhU13lMHaOBlJe9Vqp907ya56Y3+ed2tlqzys7jDkTmW0g==}
+  '@lezer/highlight@1.2.5':
+    resolution: {integrity: sha512-O1GMVKgtf5YspFaRzpmqkVgMtIk2HG9uMAbH6wdAIdNh3TVzCsch/+cRi+6l2//UGDKe6NB9BW3cvuR5ezMQ0w==}
 
   '@lezer/html@1.3.13':
     resolution: {integrity: sha512-oI7n6NJml729m7pjm9lvLvmXbdoMoi2f+1pwSDJkl9d68zGr7a9Btz8NdHTGQZtW2DA25ybeuv/SyDb9D5tseg==}
 
-  '@lezer/java@1.1.3':
-    resolution: {integrity: sha512-yHquUfujwg6Yu4Fd1GNHCvidIvJwi/1Xu2DaKl/pfWIA2c1oXkVvawH3NyXhCaFx4OdlYBVX5wvz2f7Aoa/4Xw==}
+  '@lezer/java@1.1.5':
+    resolution: {integrity: sha512-JppTd1iKHpeNlLYw/Zl8JX7zSY5HqAzK4zZ05lpn8l8Sk7Fo5KAKiDiMiezKoT5lfeC2xZf8HeKp1tSctj4G6Q==}
 
-  '@lezer/javascript@1.5.4':
-    resolution: {integrity: sha512-vvYx3MhWqeZtGPwDStM2dwgljd5smolYD2lR2UyFcHfxbBQebqx8yjmFmxtJ/E6nN6u1D9srOiVWm3Rb4tmcUA==}
+  '@lezer/javascript@1.5.6':
+    resolution: {integrity: sha512-sEvOqpl4vJQca0NugSQK02vQPbc5KrvoojnYGoqqFgFO0MtcYhwGiHKVEB+LuXYJnfyXo4QPA8ztbrEa4Fw5NA==}
 
   '@lezer/json@1.0.3':
     resolution: {integrity: sha512-BP9KzdF9Y35PDpv04r0VeSTKDeox5vVr3efE7eBbx3r4s3oNLfunchejZhjArmeieBH+nVOpgIiBJpEAv8ilqQ==}
 
-  '@lezer/lr@1.4.10':
-    resolution: {integrity: sha512-rnCpTIBafOx4mRp43xOxDJbFipJm/c0cia/V5TiGlhmMa+wsSdoGmUN3w5Bqrks/09Q/D4tNAmWaT8p6NRi77A==}
+  '@lezer/lr@1.4.11':
+    resolution: {integrity: sha512-UwgZcl1R66H2hDzBrA7kWyYmX6s8p5TQ+e/t7CuvgCtBEPxbEPaHYHu+pJBvTvDotEJpuQkJjbXuHiw5Cixxgw==}
 
-  '@lezer/markdown@1.7.2':
-    resolution: {integrity: sha512-iTkYvoVcKt3WkeL7qUDyXHONZEwLio4wj8KTNi2dnjQEXBZKMV63BpQrPqfsM+OkvuRbiSTAcycYAsQzLhRNoQ==}
+  '@lezer/markdown@1.8.0':
+    resolution: {integrity: sha512-X6w3A2NpyhdtGqTWRJB8gR4QDXBaFMbTOs780ZdZ15KKCfBXOQTKcB3Vr+W6tqJHVlealt53tLmHRvOqPTQgYA==}
 
-  '@lezer/php@1.0.5':
-    resolution: {integrity: sha512-W7asp9DhM6q0W6DYNwIkLSKOvxlXRrif+UXBMxzsJUuqmhE7oVU+gS3THO4S/Puh7Xzgm858UNaFi6dxTP8dJA==}
+  '@lezer/php@1.0.6':
+    resolution: {integrity: sha512-QJ2xNXPmsm/Z3IpThq8fnJrEIVpxhsIoj6GZBW0JYEd/l9zxpJZW216X4fzqQY4vgpdGIumypvI4uQjd4tnYtw==}
 
   '@lezer/python@1.1.19':
     resolution: {integrity: sha512-MhQIURHRytsNzP/YXnqpYKW6la6voAH3kyplTOOiCdjyFY6cWWGFVmYVdHIPrElqSDf4iCDktQCockB9FxuhzQ==}
 
-  '@lezer/rust@1.0.2':
-    resolution: {integrity: sha512-Lz5sIPBdF2FUXcWeCu1//ojFAZqzTQNRga0aYv6dYXqJqPfMdCAI0NzajWUd4Xijj1IKJLtjoXRPMvTKWBcqKg==}
+  '@lezer/rust@1.0.3':
+    resolution: {integrity: sha512-XxErOjZzQ7yJt1agUT4fu9qQvESZ3acgoxpPaPTPOiUx+duCjaVAtZGFIgphkHxlN05djdVAIOy/wItShMEjqQ==}
 
   '@lezer/sass@1.1.0':
     resolution: {integrity: sha512-3mMGdCTUZ/84ArHOuXWQr37pnf7f+Nw9ycPUeKX+wu19b7pSMcZGLbaXwvD2APMBDOGxPmpK/O6S1v1EvLoqgQ==}
@@ -716,12 +722,12 @@
   '@types/koa@2.15.0':
     resolution: {integrity: sha512-7QFsywoE5URbuVnG3loe03QXuGajrnotr3gQkXcEBShORai23MePfFYdhz90FEtBBpkyIYQbVD+evKtloCgX3g==}
 
-  '@types/koa@3.0.0':
-    resolution: {integrity: sha512-MOcVYdVYmkSutVHZZPh8j3+dAjLyR5Tl59CN0eKgpkE1h/LBSmPAsQQuWs+bKu7WtGNn+hKfJH9Gzml+PulmDg==}
-
   '@types/mime@1.3.5':
     resolution: {integrity: sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==}
 
+  '@types/mocha@10.0.10':
+    resolution: {integrity: sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==}
+
   '@types/node@24.3.0':
     resolution: {integrity: sha512-aPTXCrfwnDLj4VvXrm+UUCQjNEvJgNA8s5F1cvwQU+3KNltTOkBm1j30uNLyqqPNe7gE3KFzImYoZEfLhp4Yow==}
 
@@ -1928,8 +1934,8 @@
     resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==}
     engines: {node: '>=6'}
 
-  style-mod@4.1.3:
-    resolution: {integrity: sha512-i/n8VsZydrugj3Iuzll8+x/00GH2vnYsk1eomD8QiRrSAeW6ItbCQDtfXCeJHd0iwiNagqjQkvpvREEPtW3IoQ==}
+  style-mod@4.1.4:
+    resolution: {integrity: sha512-XXWIQt633/EpAFx8aZDOTjBzrCaGmhvEQlQo6MVPfa2OzO2cWo+4hV9h+6UkHYlXGfy+ODXKUdP7Pthmcu5ATw==}
 
   supports-color@7.2.0:
     resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==}
@@ -2132,46 +2138,46 @@
 
   '@codemirror/autocomplete@6.20.3':
     dependencies:
-      '@codemirror/language': 6.12.4
-      '@codemirror/state': 6.7.1
-      '@codemirror/view': 6.43.9
-      '@lezer/common': 1.5.2
+      '@codemirror/language': 6.13.1
+      '@codemirror/state': 6.7.6
+      '@codemirror/view': 6.43.14
+      '@lezer/common': 1.5.3
 
-  '@codemirror/commands@6.11.0':
+  '@codemirror/commands@6.11.1':
     dependencies:
-      '@codemirror/language': 6.12.4
-      '@codemirror/state': 6.7.1
-      '@codemirror/view': 6.43.9
-      '@lezer/common': 1.5.2
+      '@codemirror/language': 6.13.1
+      '@codemirror/state': 6.7.6
+      '@codemirror/view': 6.43.14
+      '@lezer/common': 1.5.3
 
   '@codemirror/lang-angular@0.1.4':
     dependencies:
       '@codemirror/lang-html': 6.4.12
       '@codemirror/lang-javascript': 6.2.5
-      '@codemirror/language': 6.12.4
-      '@lezer/common': 1.5.2
-      '@lezer/highlight': 1.2.3
-      '@lezer/lr': 1.4.10
+      '@codemirror/language': 6.13.1
+      '@lezer/common': 1.5.3
+      '@lezer/highlight': 1.2.5
+      '@lezer/lr': 1.4.11
 
   '@codemirror/lang-cpp@6.0.3':
     dependencies:
-      '@codemirror/language': 6.12.4
+      '@codemirror/language': 6.13.1
       '@lezer/cpp': 1.1.6
 
   '@codemirror/lang-css@6.3.1':
     dependencies:
       '@codemirror/autocomplete': 6.20.3
-      '@codemirror/language': 6.12.4
-      '@codemirror/state': 6.7.1
-      '@lezer/common': 1.5.2
-      '@lezer/css': 1.3.6
+      '@codemirror/language': 6.13.1
+      '@codemirror/state': 6.7.6
+      '@lezer/common': 1.5.3
+      '@lezer/css': 1.3.9
 
   '@codemirror/lang-go@6.0.1':
     dependencies:
       '@codemirror/autocomplete': 6.20.3
-      '@codemirror/language': 6.12.4
-      '@codemirror/state': 6.7.1
-      '@lezer/common': 1.5.2
+      '@codemirror/language': 6.13.1
+      '@codemirror/state': 6.7.6
+      '@lezer/common': 1.5.3
       '@lezer/go': 1.0.1
 
   '@codemirror/lang-html@6.4.12':
@@ -2179,144 +2185,144 @@
       '@codemirror/autocomplete': 6.20.3
       '@codemirror/lang-css': 6.3.1
       '@codemirror/lang-javascript': 6.2.5
-      '@codemirror/language': 6.12.4
-      '@codemirror/state': 6.7.1
-      '@codemirror/view': 6.43.9
-      '@lezer/common': 1.5.2
-      '@lezer/css': 1.3.6
+      '@codemirror/language': 6.13.1
+      '@codemirror/state': 6.7.6
+      '@codemirror/view': 6.43.14
+      '@lezer/common': 1.5.3
+      '@lezer/css': 1.3.9
       '@lezer/html': 1.3.13
 
   '@codemirror/lang-java@6.0.2':
     dependencies:
-      '@codemirror/language': 6.12.4
-      '@lezer/java': 1.1.3
+      '@codemirror/language': 6.13.1
+      '@lezer/java': 1.1.5
 
   '@codemirror/lang-javascript@6.2.5':
     dependencies:
       '@codemirror/autocomplete': 6.20.3
-      '@codemirror/language': 6.12.4
+      '@codemirror/language': 6.13.1
       '@codemirror/lint': 6.9.7
-      '@codemirror/state': 6.7.1
-      '@codemirror/view': 6.43.9
-      '@lezer/common': 1.5.2
-      '@lezer/javascript': 1.5.4
+      '@codemirror/state': 6.7.6
+      '@codemirror/view': 6.43.14
+      '@lezer/common': 1.5.3
+      '@lezer/javascript': 1.5.6
 
   '@codemirror/lang-jinja@6.0.1':
     dependencies:
       '@codemirror/autocomplete': 6.20.3
       '@codemirror/lang-html': 6.4.12
-      '@codemirror/language': 6.12.4
-      '@codemirror/state': 6.7.1
-      '@codemirror/view': 6.43.9
-      '@lezer/common': 1.5.2
-      '@lezer/highlight': 1.2.3
-      '@lezer/lr': 1.4.10
+      '@codemirror/language': 6.13.1
+      '@codemirror/state': 6.7.6
+      '@codemirror/view': 6.43.14
+      '@lezer/common': 1.5.3
+      '@lezer/highlight': 1.2.5
+      '@lezer/lr': 1.4.11
 
   '@codemirror/lang-json@6.0.2':
     dependencies:
-      '@codemirror/language': 6.12.4
+      '@codemirror/language': 6.13.1
       '@lezer/json': 1.0.3
 
   '@codemirror/lang-less@6.0.2':
     dependencies:
       '@codemirror/lang-css': 6.3.1
-      '@codemirror/language': 6.12.4
-      '@lezer/common': 1.5.2
-      '@lezer/highlight': 1.2.3
-      '@lezer/lr': 1.4.10
+      '@codemirror/language': 6.13.1
+      '@lezer/common': 1.5.3
+      '@lezer/highlight': 1.2.5
+      '@lezer/lr': 1.4.11
 
-  '@codemirror/lang-liquid@6.3.2':
+  '@codemirror/lang-liquid@6.3.3':
     dependencies:
       '@codemirror/autocomplete': 6.20.3
       '@codemirror/lang-html': 6.4.12
-      '@codemirror/language': 6.12.4
-      '@codemirror/state': 6.7.1
-      '@codemirror/view': 6.43.9
-      '@lezer/common': 1.5.2
-      '@lezer/highlight': 1.2.3
-      '@lezer/lr': 1.4.10
+      '@codemirror/language': 6.13.1
+      '@codemirror/state': 6.7.6
+      '@codemirror/view': 6.43.14
+      '@lezer/common': 1.5.3
+      '@lezer/highlight': 1.2.5
+      '@lezer/lr': 1.4.11
 
   '@codemirror/lang-markdown@6.5.2':
     dependencies:
       '@codemirror/autocomplete': 6.20.3
       '@codemirror/lang-html': 6.4.12
-      '@codemirror/language': 6.12.4
-      '@codemirror/state': 6.7.1
-      '@codemirror/view': 6.43.9
-      '@lezer/common': 1.5.2
-      '@lezer/markdown': 1.7.2
+      '@codemirror/language': 6.13.1
+      '@codemirror/state': 6.7.6
+      '@codemirror/view': 6.43.14
+      '@lezer/common': 1.5.3
+      '@lezer/markdown': 1.8.0
 
   '@codemirror/lang-php@6.0.2':
     dependencies:
       '@codemirror/lang-html': 6.4.12
-      '@codemirror/language': 6.12.4
-      '@codemirror/state': 6.7.1
-      '@lezer/common': 1.5.2
-      '@lezer/php': 1.0.5
+      '@codemirror/language': 6.13.1
+      '@codemirror/state': 6.7.6
+      '@lezer/common': 1.5.3
+      '@lezer/php': 1.0.6
 
   '@codemirror/lang-python@6.2.1':
     dependencies:
       '@codemirror/autocomplete': 6.20.3
-      '@codemirror/language': 6.12.4
-      '@codemirror/state': 6.7.1
-      '@lezer/common': 1.5.2
+      '@codemirror/language': 6.13.1
+      '@codemirror/state': 6.7.6
+      '@lezer/common': 1.5.3
       '@lezer/python': 1.1.19
 
   '@codemirror/lang-rust@6.0.2':
     dependencies:
-      '@codemirror/language': 6.12.4
-      '@lezer/rust': 1.0.2
+      '@codemirror/language': 6.13.1
+      '@lezer/rust': 1.0.3
 
   '@codemirror/lang-sass@6.0.2':
     dependencies:
       '@codemirror/lang-css': 6.3.1
-      '@codemirror/language': 6.12.4
-      '@codemirror/state': 6.7.1
-      '@lezer/common': 1.5.2
+      '@codemirror/language': 6.13.1
+      '@codemirror/state': 6.7.6
+      '@lezer/common': 1.5.3
       '@lezer/sass': 1.1.0
 
   '@codemirror/lang-sql@6.10.0':
     dependencies:
       '@codemirror/autocomplete': 6.20.3
-      '@codemirror/language': 6.12.4
-      '@codemirror/state': 6.7.1
-      '@lezer/common': 1.5.2
-      '@lezer/highlight': 1.2.3
-      '@lezer/lr': 1.4.10
+      '@codemirror/language': 6.13.1
+      '@codemirror/state': 6.7.6
+      '@lezer/common': 1.5.3
+      '@lezer/highlight': 1.2.5
+      '@lezer/lr': 1.4.11
 
   '@codemirror/lang-vue@0.1.3':
     dependencies:
       '@codemirror/lang-html': 6.4.12
       '@codemirror/lang-javascript': 6.2.5
-      '@codemirror/language': 6.12.4
-      '@lezer/common': 1.5.2
-      '@lezer/highlight': 1.2.3
-      '@lezer/lr': 1.4.10
+      '@codemirror/language': 6.13.1
+      '@lezer/common': 1.5.3
+      '@lezer/highlight': 1.2.5
+      '@lezer/lr': 1.4.11
 
   '@codemirror/lang-wast@6.0.2':
     dependencies:
-      '@codemirror/language': 6.12.4
-      '@lezer/common': 1.5.2
-      '@lezer/highlight': 1.2.3
-      '@lezer/lr': 1.4.10
+      '@codemirror/language': 6.13.1
+      '@lezer/common': 1.5.3
+      '@lezer/highlight': 1.2.5
+      '@lezer/lr': 1.4.11
 
   '@codemirror/lang-xml@6.1.0':
     dependencies:
       '@codemirror/autocomplete': 6.20.3
-      '@codemirror/language': 6.12.4
-      '@codemirror/state': 6.7.1
-      '@codemirror/view': 6.43.9
-      '@lezer/common': 1.5.2
+      '@codemirror/language': 6.13.1
+      '@codemirror/state': 6.7.6
+      '@codemirror/view': 6.43.14
+      '@lezer/common': 1.5.3
       '@lezer/xml': 1.0.6
 
   '@codemirror/lang-yaml@6.1.3':
     dependencies:
       '@codemirror/autocomplete': 6.20.3
-      '@codemirror/language': 6.12.4
-      '@codemirror/state': 6.7.1
-      '@lezer/common': 1.5.2
-      '@lezer/highlight': 1.2.3
-      '@lezer/lr': 1.4.10
+      '@codemirror/language': 6.13.1
+      '@codemirror/state': 6.7.6
+      '@lezer/common': 1.5.3
+      '@lezer/highlight': 1.2.5
+      '@lezer/lr': 1.4.11
       '@lezer/yaml': 1.0.4
 
   '@codemirror/language-data@6.5.2':
@@ -2331,7 +2337,7 @@
       '@codemirror/lang-jinja': 6.0.1
       '@codemirror/lang-json': 6.0.2
       '@codemirror/lang-less': 6.0.2
-      '@codemirror/lang-liquid': 6.3.2
+      '@codemirror/lang-liquid': 6.3.3
       '@codemirror/lang-markdown': 6.5.2
       '@codemirror/lang-php': 6.0.2
       '@codemirror/lang-python': 6.2.1
@@ -2342,43 +2348,46 @@
       '@codemirror/lang-wast': 6.0.2
       '@codemirror/lang-xml': 6.1.0
       '@codemirror/lang-yaml': 6.1.3
-      '@codemirror/language': 6.12.4
-      '@codemirror/legacy-modes': 6.5.3
+      '@codemirror/language': 6.13.1
+      '@codemirror/legacy-modes': 6.5.5
 
-  '@codemirror/language@6.12.4':
+  '@codemirror/language@6.13.1':
     dependencies:
-      '@codemirror/state': 6.7.1
-      '@codemirror/view': 6.43.9
-      '@lezer/common': 1.5.2
-      '@lezer/highlight': 1.2.3
-      '@lezer/lr': 1.4.10
-      style-mod: 4.1.3
+      '@codemirror/state': 6.7.6
+      '@codemirror/streamparser': 6.0.0
+      '@codemirror/view': 6.43.14
+      '@lezer/common': 1.5.3
+      '@lezer/highlight': 1.2.5
+      '@lezer/lr': 1.4.11
+      style-mod: 4.1.4
 
-  '@codemirror/legacy-modes@6.5.3':
+  '@codemirror/legacy-modes@6.5.5':
     dependencies:
-      '@codemirror/language': 6.12.4
+      '@codemirror/streamparser': 6.0.0
 
   '@codemirror/lint@6.9.7':
     dependencies:
-      '@codemirror/state': 6.7.1
-      '@codemirror/view': 6.43.9
+      '@codemirror/state': 6.7.6
+      '@codemirror/view': 6.43.14
       crelt: 1.0.7
 
-  '@codemirror/search@6.7.1':
+  '@codemirror/search@6.7.2':
     dependencies:
-      '@codemirror/state': 6.7.1
-      '@codemirror/view': 6.43.9
+      '@codemirror/state': 6.7.6
+      '@codemirror/view': 6.43.14
       crelt: 1.0.7
 
-  '@codemirror/state@6.7.1':
+  '@codemirror/state@6.7.6':
     dependencies:
       '@marijn/find-cluster-break': 1.0.4
 
-  '@codemirror/view@6.43.9':
+  '@codemirror/streamparser@6.0.0': {}
+
+  '@codemirror/view@6.43.14':
     dependencies:
-      '@codemirror/state': 6.7.1
+      '@codemirror/state': 6.7.6
       crelt: 1.0.7
-      style-mod: 4.1.3
+      style-mod: 4.1.4
       w3c-keyname: 2.2.8
 
   '@esbuild/aix-ppc64@0.25.9':
@@ -2476,98 +2485,98 @@
       '@jridgewell/resolve-uri': 3.1.2
       '@jridgewell/sourcemap-codec': 1.5.5
 
-  '@lezer/common@1.5.2': {}
+  '@lezer/common@1.5.3': {}
 
   '@lezer/cpp@1.1.6':
     dependencies:
-      '@lezer/common': 1.5.2
-      '@lezer/highlight': 1.2.3
-      '@lezer/lr': 1.4.10
+      '@lezer/common': 1.5.3
+      '@lezer/highlight': 1.2.5
+      '@lezer/lr': 1.4.11
 
-  '@lezer/css@1.3.6':
+  '@lezer/css@1.3.9':
     dependencies:
-      '@lezer/common': 1.5.2
-      '@lezer/highlight': 1.2.3
-      '@lezer/lr': 1.4.10
+      '@lezer/common': 1.5.3
+      '@lezer/highlight': 1.2.5
+      '@lezer/lr': 1.4.11
 
   '@lezer/go@1.0.1':
     dependencies:
-      '@lezer/common': 1.5.2
-      '@lezer/highlight': 1.2.3
-      '@lezer/lr': 1.4.10
+      '@lezer/common': 1.5.3
+      '@lezer/highlight': 1.2.5
+      '@lezer/lr': 1.4.11
 
-  '@lezer/highlight@1.2.3':
+  '@lezer/highlight@1.2.5':
     dependencies:
-      '@lezer/common': 1.5.2
+      '@lezer/common': 1.5.3
 
   '@lezer/html@1.3.13':
     dependencies:
-      '@lezer/common': 1.5.2
-      '@lezer/highlight': 1.2.3
-      '@lezer/lr': 1.4.10
+      '@lezer/common': 1.5.3
+      '@lezer/highlight': 1.2.5
+      '@lezer/lr': 1.4.11
 
-  '@lezer/java@1.1.3':
+  '@lezer/java@1.1.5':
     dependencies:
-      '@lezer/common': 1.5.2
-      '@lezer/highlight': 1.2.3
-      '@lezer/lr': 1.4.10
+      '@lezer/common': 1.5.3
+      '@lezer/highlight': 1.2.5
+      '@lezer/lr': 1.4.11
 
-  '@lezer/javascript@1.5.4':
+  '@lezer/javascript@1.5.6':
     dependencies:
-      '@lezer/common': 1.5.2
-      '@lezer/highlight': 1.2.3
-      '@lezer/lr': 1.4.10
+      '@lezer/common': 1.5.3
+      '@lezer/highlight': 1.2.5
+      '@lezer/lr': 1.4.11
 
   '@lezer/json@1.0.3':
     dependencies:
-      '@lezer/common': 1.5.2
-      '@lezer/highlight': 1.2.3
-      '@lezer/lr': 1.4.10
+      '@lezer/common': 1.5.3
+      '@lezer/highlight': 1.2.5
+      '@lezer/lr': 1.4.11
 
-  '@lezer/lr@1.4.10':
+  '@lezer/lr@1.4.11':
     dependencies:
-      '@lezer/common': 1.5.2
+      '@lezer/common': 1.5.3
 
-  '@lezer/markdown@1.7.2':
+  '@lezer/markdown@1.8.0':
     dependencies:
-      '@lezer/common': 1.5.2
-      '@lezer/highlight': 1.2.3
+      '@lezer/common': 1.5.3
+      '@lezer/highlight': 1.2.5
 
-  '@lezer/php@1.0.5':
+  '@lezer/php@1.0.6':
     dependencies:
-      '@lezer/common': 1.5.2
-      '@lezer/highlight': 1.2.3
-      '@lezer/lr': 1.4.10
+      '@lezer/common': 1.5.3
+      '@lezer/highlight': 1.2.5
+      '@lezer/lr': 1.4.11
 
   '@lezer/python@1.1.19':
     dependencies:
-      '@lezer/common': 1.5.2
-      '@lezer/highlight': 1.2.3
-      '@lezer/lr': 1.4.10
+      '@lezer/common': 1.5.3
+      '@lezer/highlight': 1.2.5
+      '@lezer/lr': 1.4.11
 
-  '@lezer/rust@1.0.2':
+  '@lezer/rust@1.0.3':
     dependencies:
-      '@lezer/common': 1.5.2
-      '@lezer/highlight': 1.2.3
-      '@lezer/lr': 1.4.10
+      '@lezer/common': 1.5.3
+      '@lezer/highlight': 1.2.5
+      '@lezer/lr': 1.4.11
 
   '@lezer/sass@1.1.0':
     dependencies:
-      '@lezer/common': 1.5.2
-      '@lezer/highlight': 1.2.3
-      '@lezer/lr': 1.4.10
+      '@lezer/common': 1.5.3
+      '@lezer/highlight': 1.2.5
+      '@lezer/lr': 1.4.11
 
   '@lezer/xml@1.0.6':
     dependencies:
-      '@lezer/common': 1.5.2
-      '@lezer/highlight': 1.2.3
-      '@lezer/lr': 1.4.10
+      '@lezer/common': 1.5.3
+      '@lezer/highlight': 1.2.5
+      '@lezer/lr': 1.4.11
 
   '@lezer/yaml@1.0.4':
     dependencies:
-      '@lezer/common': 1.5.2
-      '@lezer/highlight': 1.2.3
-      '@lezer/lr': 1.4.10
+      '@lezer/common': 1.5.3
+      '@lezer/highlight': 1.2.5
+      '@lezer/lr': 1.4.11
 
   '@lit-labs/ssr-dom-shim@1.4.0': {}
 
@@ -2575,10 +2584,10 @@
     dependencies:
       '@lit-labs/ssr-dom-shim': 1.4.0
 
-  '@mapbox/node-pre-gyp@1.0.11':
+  '@mapbox/node-pre-gyp@1.0.11(supports-color@7.2.0)':
     dependencies:
       detect-libc: 2.1.2
-      https-proxy-agent: 5.0.1
+      https-proxy-agent: 5.0.1(supports-color@7.2.0)
       make-dir: 3.1.0
       node-fetch: 2.7.0
       nopt: 5.0.0
@@ -2619,10 +2628,10 @@
       '@open-wc/dedupe-mixin': 2.0.1
       lit: 3.3.1
 
-  '@open-wc/semantic-dom-diff@0.20.1':
+  '@open-wc/semantic-dom-diff@0.20.1(supports-color@7.2.0)':
     dependencies:
       '@types/chai': 4.3.20
-      '@web/test-runner-commands': 0.9.0
+      '@web/test-runner-commands': 0.9.0(supports-color@7.2.0)
     transitivePeerDependencies:
       - bufferutil
       - supports-color
@@ -2634,10 +2643,10 @@
       lit: 3.3.1
       lit-html: 3.3.1
 
-  '@open-wc/testing@4.0.0':
+  '@open-wc/testing@4.0.0(supports-color@7.2.0)':
     dependencies:
       '@esm-bundle/chai': 4.3.4-fix.0
-      '@open-wc/semantic-dom-diff': 0.20.1
+      '@open-wc/semantic-dom-diff': 0.20.1(supports-color@7.2.0)
       '@open-wc/testing-helpers': 3.0.1
       '@types/chai-dom': 1.11.3
       '@types/sinon-chai': 3.2.12
@@ -2647,12 +2656,12 @@
       - supports-color
       - utf-8-validate
 
-  '@puppeteer/browsers@2.10.7':
+  '@puppeteer/browsers@2.10.7(supports-color@7.2.0)':
     dependencies:
-      debug: 4.4.1
-      extract-zip: 2.0.1
+      debug: 4.4.1(supports-color@7.2.0)
+      extract-zip: 2.0.1(supports-color@7.2.0)
       progress: 2.0.3
-      proxy-agent: 6.5.0
+      proxy-agent: 6.5.0(supports-color@7.2.0)
       semver: 7.7.4
       tar-fs: 3.1.0
       yargs: 17.7.2
@@ -2833,7 +2842,7 @@
 
   '@types/koa-compose@3.2.8':
     dependencies:
-      '@types/koa': 3.0.0
+      '@types/koa': 2.15.0
 
   '@types/koa@2.15.0':
     dependencies:
@@ -2846,19 +2855,10 @@
       '@types/koa-compose': 3.2.8
       '@types/node': 24.3.0
 
-  '@types/koa@3.0.0':
-    dependencies:
-      '@types/accepts': 1.3.7
-      '@types/content-disposition': 0.5.9
-      '@types/cookies': 0.9.1
-      '@types/http-assert': 1.5.6
-      '@types/http-errors': 2.0.5
-      '@types/keygrip': 1.0.6
-      '@types/koa-compose': 3.2.8
-      '@types/node': 24.3.0
-
   '@types/mime@1.3.5': {}
 
+  '@types/mocha@10.0.10': {}
+
   '@types/node@24.3.0':
     dependencies:
       undici-types: 7.10.0
@@ -2910,7 +2910,7 @@
 
   '@web/config-loader@0.3.3': {}
 
-  '@web/dev-server-core@0.7.5':
+  '@web/dev-server-core@0.7.5(supports-color@7.2.0)':
     dependencies:
       '@types/koa': 2.15.0
       '@types/ws': 7.4.7
@@ -2921,10 +2921,10 @@
       get-stream: 6.0.1
       is-stream: 2.0.1
       isbinaryfile: 5.0.5
-      koa: 2.16.2
+      koa: 2.16.2(supports-color@7.2.0)
       koa-etag: 4.0.0
-      koa-send: 5.0.1
-      koa-static: 5.0.0
+      koa-send: 5.0.1(supports-color@7.2.0)
+      koa-static: 5.0.0(supports-color@7.2.0)
       lru-cache: 8.0.5
       mime-types: 2.1.35
       parse5: 6.0.1
@@ -2935,10 +2935,10 @@
       - supports-color
       - utf-8-validate
 
-  '@web/dev-server-esbuild@1.0.4':
+  '@web/dev-server-esbuild@1.0.4(supports-color@7.2.0)':
     dependencies:
       '@mdn/browser-compat-data': 4.2.1
-      '@web/dev-server-core': 0.7.5
+      '@web/dev-server-core': 0.7.5(supports-color@7.2.0)
       esbuild: 0.25.9
       parse5: 6.0.1
       ua-parser-js: 1.0.41
@@ -2947,10 +2947,10 @@
       - supports-color
       - utf-8-validate
 
-  '@web/dev-server-rollup@0.6.4':
+  '@web/dev-server-rollup@0.6.4(supports-color@7.2.0)':
     dependencies:
       '@rollup/plugin-node-resolve': 15.3.1(rollup@4.49.0)
-      '@web/dev-server-core': 0.7.5
+      '@web/dev-server-core': 0.7.5(supports-color@7.2.0)
       nanocolors: 0.2.13
       parse5: 6.0.1
       rollup: 4.49.0
@@ -2960,13 +2960,13 @@
       - supports-color
       - utf-8-validate
 
-  '@web/dev-server@0.4.6':
+  '@web/dev-server@0.4.6(supports-color@7.2.0)':
     dependencies:
       '@babel/code-frame': 7.27.1
       '@types/command-line-args': 5.2.3
       '@web/config-loader': 0.3.3
-      '@web/dev-server-core': 0.7.5
-      '@web/dev-server-rollup': 0.6.4
+      '@web/dev-server-core': 0.7.5(supports-color@7.2.0)
+      '@web/dev-server-rollup': 0.6.4(supports-color@7.2.0)
       camelcase: 6.3.0
       command-line-args: 5.2.1
       command-line-usage: 7.0.3
@@ -2975,7 +2975,7 @@
       internal-ip: 6.2.0
       nanocolors: 0.2.13
       open: 8.4.2
-      portfinder: 1.0.37
+      portfinder: 1.0.37(supports-color@7.2.0)
     transitivePeerDependencies:
       - bufferutil
       - supports-color
@@ -2986,28 +2986,28 @@
       '@types/parse5': 6.0.3
       parse5: 6.0.1
 
-  '@web/test-runner-chrome@0.18.1':
+  '@web/test-runner-chrome@0.18.1(supports-color@7.2.0)':
     dependencies:
-      '@web/test-runner-core': 0.13.4
-      '@web/test-runner-coverage-v8': 0.8.0
-      chrome-launcher: 0.15.2
-      puppeteer-core: 24.17.0
+      '@web/test-runner-core': 0.13.4(supports-color@7.2.0)
+      '@web/test-runner-coverage-v8': 0.8.0(supports-color@7.2.0)
+      chrome-launcher: 0.15.2(supports-color@7.2.0)
+      puppeteer-core: 24.17.0(supports-color@7.2.0)
     transitivePeerDependencies:
       - bare-buffer
       - bufferutil
       - supports-color
       - utf-8-validate
 
-  '@web/test-runner-commands@0.9.0':
+  '@web/test-runner-commands@0.9.0(supports-color@7.2.0)':
     dependencies:
-      '@web/test-runner-core': 0.13.4
+      '@web/test-runner-core': 0.13.4(supports-color@7.2.0)
       mkdirp: 1.0.4
     transitivePeerDependencies:
       - bufferutil
       - supports-color
       - utf-8-validate
 
-  '@web/test-runner-core@0.13.4':
+  '@web/test-runner-core@0.13.4(supports-color@7.2.0)':
     dependencies:
       '@babel/code-frame': 7.27.1
       '@types/babel__code-frame': 7.0.6
@@ -3017,7 +3017,7 @@
       '@types/istanbul-lib-coverage': 2.0.6
       '@types/istanbul-reports': 3.0.4
       '@web/browser-logs': 0.4.1
-      '@web/dev-server-core': 0.7.5
+      '@web/dev-server-core': 0.7.5(supports-color@7.2.0)
       chokidar: 4.0.3
       cli-cursor: 3.1.0
       co-body: 6.2.0
@@ -3040,9 +3040,9 @@
       - supports-color
       - utf-8-validate
 
-  '@web/test-runner-coverage-v8@0.8.0':
+  '@web/test-runner-coverage-v8@0.8.0(supports-color@7.2.0)':
     dependencies:
-      '@web/test-runner-core': 0.13.4
+      '@web/test-runner-core': 0.13.4(supports-color@7.2.0)
       istanbul-lib-coverage: 3.2.2
       lru-cache: 8.0.5
       picomatch: 2.3.1
@@ -3052,23 +3052,23 @@
       - supports-color
       - utf-8-validate
 
-  '@web/test-runner-mocha@0.9.0':
+  '@web/test-runner-mocha@0.9.0(supports-color@7.2.0)':
     dependencies:
-      '@web/test-runner-core': 0.13.4
+      '@web/test-runner-core': 0.13.4(supports-color@7.2.0)
     transitivePeerDependencies:
       - bufferutil
       - supports-color
       - utf-8-validate
 
-  '@web/test-runner@0.20.2':
+  '@web/test-runner@0.20.2(supports-color@7.2.0)':
     dependencies:
       '@web/browser-logs': 0.4.1
       '@web/config-loader': 0.3.3
-      '@web/dev-server': 0.4.6
-      '@web/test-runner-chrome': 0.18.1
-      '@web/test-runner-commands': 0.9.0
-      '@web/test-runner-core': 0.13.4
-      '@web/test-runner-mocha': 0.9.0
+      '@web/dev-server': 0.4.6(supports-color@7.2.0)
+      '@web/test-runner-chrome': 0.18.1(supports-color@7.2.0)
+      '@web/test-runner-commands': 0.9.0(supports-color@7.2.0)
+      '@web/test-runner-core': 0.13.4(supports-color@7.2.0)
+      '@web/test-runner-mocha': 0.9.0(supports-color@7.2.0)
       camelcase: 6.3.0
       command-line-args: 5.2.1
       command-line-usage: 7.0.3
@@ -3076,7 +3076,7 @@
       diff: 5.2.0
       globby: 11.1.0
       nanocolors: 0.2.13
-      portfinder: 1.0.37
+      portfinder: 1.0.37(supports-color@7.2.0)
       source-map: 0.7.6
     transitivePeerDependencies:
       - bare-buffer
@@ -3092,9 +3092,9 @@
       mime-types: 2.1.35
       negotiator: 0.6.3
 
-  agent-base@6.0.2:
+  agent-base@6.0.2(supports-color@7.2.0):
     dependencies:
-      debug: 4.4.1
+      debug: 4.4.1(supports-color@7.2.0)
     transitivePeerDependencies:
       - supports-color
     optional: true
@@ -3199,9 +3199,9 @@
 
   camelcase@6.3.0: {}
 
-  canvas@2.11.2:
+  canvas@2.11.2(supports-color@7.2.0):
     dependencies:
-      '@mapbox/node-pre-gyp': 1.0.11
+      '@mapbox/node-pre-gyp': 1.0.11(supports-color@7.2.0)
       nan: 2.26.2
       simple-get: 3.1.1
     transitivePeerDependencies:
@@ -3229,12 +3229,12 @@
   chownr@2.0.0:
     optional: true
 
-  chrome-launcher@0.15.2:
+  chrome-launcher@0.15.2(supports-color@7.2.0):
     dependencies:
       '@types/node': 24.3.0
       escape-string-regexp: 4.0.0
       is-wsl: 2.2.0
-      lighthouse-logger: 1.4.2
+      lighthouse-logger: 1.4.2(supports-color@7.2.0)
     transitivePeerDependencies:
       - supports-color
 
@@ -3320,17 +3320,23 @@
 
   debounce@1.2.1: {}
 
-  debug@2.6.9:
+  debug@2.6.9(supports-color@7.2.0):
     dependencies:
       ms: 2.0.0
+    optionalDependencies:
+      supports-color: 7.2.0
 
-  debug@3.2.7:
+  debug@3.2.7(supports-color@7.2.0):
     dependencies:
       ms: 2.1.3
+    optionalDependencies:
+      supports-color: 7.2.0
 
-  debug@4.4.1:
+  debug@4.4.1(supports-color@7.2.0):
     dependencies:
       ms: 2.1.3
+    optionalDependencies:
+      supports-color: 7.2.0
 
   decompress-response@4.2.1:
     dependencies:
@@ -3469,9 +3475,9 @@
       signal-exit: 3.0.7
       strip-final-newline: 2.0.0
 
-  extract-zip@2.0.1:
+  extract-zip@2.0.1(supports-color@7.2.0):
     dependencies:
-      debug: 4.4.1
+      debug: 4.4.1(supports-color@7.2.0)
       get-stream: 5.2.0
       yauzl: 2.10.0
     optionalDependencies:
@@ -3559,11 +3565,11 @@
 
   get-stream@6.0.1: {}
 
-  get-uri@6.0.5:
+  get-uri@6.0.5(supports-color@7.2.0):
     dependencies:
       basic-ftp: 5.0.5
       data-uri-to-buffer: 6.0.2
-      debug: 4.4.1
+      debug: 4.4.1(supports-color@7.2.0)
     transitivePeerDependencies:
       - supports-color
 
@@ -3637,25 +3643,25 @@
       statuses: 2.0.1
       toidentifier: 1.0.1
 
-  http-proxy-agent@7.0.2:
+  http-proxy-agent@7.0.2(supports-color@7.2.0):
     dependencies:
       agent-base: 7.1.4
-      debug: 4.4.1
+      debug: 4.4.1(supports-color@7.2.0)
     transitivePeerDependencies:
       - supports-color
 
-  https-proxy-agent@5.0.1:
+  https-proxy-agent@5.0.1(supports-color@7.2.0):
     dependencies:
-      agent-base: 6.0.2
-      debug: 4.4.1
+      agent-base: 6.0.2(supports-color@7.2.0)
+      debug: 4.4.1(supports-color@7.2.0)
     transitivePeerDependencies:
       - supports-color
     optional: true
 
-  https-proxy-agent@7.0.6:
+  https-proxy-agent@7.0.6(supports-color@7.2.0):
     dependencies:
       agent-base: 7.1.4
-      debug: 4.4.1
+      debug: 4.4.1(supports-color@7.2.0)
     transitivePeerDependencies:
       - supports-color
 
@@ -3768,29 +3774,29 @@
     dependencies:
       etag: 1.8.1
 
-  koa-send@5.0.1:
+  koa-send@5.0.1(supports-color@7.2.0):
     dependencies:
-      debug: 4.4.1
+      debug: 4.4.1(supports-color@7.2.0)
       http-errors: 1.8.1
       resolve-path: 1.4.0
     transitivePeerDependencies:
       - supports-color
 
-  koa-static@5.0.0:
+  koa-static@5.0.0(supports-color@7.2.0):
     dependencies:
-      debug: 3.2.7
-      koa-send: 5.0.1
+      debug: 3.2.7(supports-color@7.2.0)
+      koa-send: 5.0.1(supports-color@7.2.0)
     transitivePeerDependencies:
       - supports-color
 
-  koa@2.16.2:
+  koa@2.16.2(supports-color@7.2.0):
     dependencies:
       accepts: 1.3.8
       cache-content-type: 1.0.1
       content-disposition: 0.5.4
       content-type: 1.0.5
       cookies: 0.9.1
-      debug: 4.4.1
+      debug: 4.4.1(supports-color@7.2.0)
       delegates: 1.0.0
       depd: 2.0.0
       destroy: 1.2.0
@@ -3811,9 +3817,9 @@
     transitivePeerDependencies:
       - supports-color
 
-  lighthouse-logger@1.4.2:
+  lighthouse-logger@1.4.2(supports-color@7.2.0):
     dependencies:
-      debug: 2.6.9
+      debug: 2.6.9(supports-color@7.2.0)
       marky: 1.3.0
     transitivePeerDependencies:
       - supports-color
@@ -3977,16 +3983,16 @@
     dependencies:
       p-finally: 1.0.0
 
-  pac-proxy-agent@7.2.0:
+  pac-proxy-agent@7.2.0(supports-color@7.2.0):
     dependencies:
       '@tootallnate/quickjs-emscripten': 0.23.0
       agent-base: 7.1.4
-      debug: 4.4.1
-      get-uri: 6.0.5
-      http-proxy-agent: 7.0.2
-      https-proxy-agent: 7.0.6
+      debug: 4.4.1(supports-color@7.2.0)
+      get-uri: 6.0.5(supports-color@7.2.0)
+      http-proxy-agent: 7.0.2(supports-color@7.2.0)
+      https-proxy-agent: 7.0.6(supports-color@7.2.0)
       pac-resolver: 7.0.1
-      socks-proxy-agent: 8.0.5
+      socks-proxy-agent: 8.0.5(supports-color@7.2.0)
     transitivePeerDependencies:
       - supports-color
 
@@ -4015,25 +4021,25 @@
 
   picomatch@4.0.3: {}
 
-  portfinder@1.0.37:
+  portfinder@1.0.37(supports-color@7.2.0):
     dependencies:
       async: 3.2.6
-      debug: 4.4.1
+      debug: 4.4.1(supports-color@7.2.0)
     transitivePeerDependencies:
       - supports-color
 
   progress@2.0.3: {}
 
-  proxy-agent@6.5.0:
+  proxy-agent@6.5.0(supports-color@7.2.0):
     dependencies:
       agent-base: 7.1.4
-      debug: 4.4.1
-      http-proxy-agent: 7.0.2
-      https-proxy-agent: 7.0.6
+      debug: 4.4.1(supports-color@7.2.0)
+      http-proxy-agent: 7.0.2(supports-color@7.2.0)
+      https-proxy-agent: 7.0.6(supports-color@7.2.0)
       lru-cache: 7.18.3
-      pac-proxy-agent: 7.2.0
+      pac-proxy-agent: 7.2.0(supports-color@7.2.0)
       proxy-from-env: 1.1.0
-      socks-proxy-agent: 8.0.5
+      socks-proxy-agent: 8.0.5(supports-color@7.2.0)
     transitivePeerDependencies:
       - supports-color
 
@@ -4046,11 +4052,11 @@
 
   punycode@2.3.1: {}
 
-  puppeteer-core@24.17.0:
+  puppeteer-core@24.17.0(supports-color@7.2.0):
     dependencies:
-      '@puppeteer/browsers': 2.10.7
+      '@puppeteer/browsers': 2.10.7(supports-color@7.2.0)
       chromium-bidi: 8.0.0(devtools-protocol@0.0.1475386)
-      debug: 4.4.1
+      debug: 4.4.1(supports-color@7.2.0)
       devtools-protocol: 0.0.1475386
       typed-query-selector: 2.12.0
       ws: 8.18.3
@@ -4084,9 +4090,9 @@
 
   require-directory@2.1.1: {}
 
-  resemblejs@5.0.0:
+  resemblejs@5.0.0(supports-color@7.2.0):
     optionalDependencies:
-      canvas: 2.11.2
+      canvas: 2.11.2(supports-color@7.2.0)
     transitivePeerDependencies:
       - encoding
       - supports-color
@@ -4234,10 +4240,10 @@
 
   smart-buffer@4.2.0: {}
 
-  socks-proxy-agent@8.0.5:
+  socks-proxy-agent@8.0.5(supports-color@7.2.0):
     dependencies:
       agent-base: 7.1.4
-      debug: 4.4.1
+      debug: 4.4.1(supports-color@7.2.0)
       socks: 2.8.7
     transitivePeerDependencies:
       - supports-color
@@ -4280,7 +4286,7 @@
 
   strip-final-newline@2.0.0: {}
 
-  style-mod@4.1.3: {}
+  style-mod@4.1.4: {}
 
   supports-color@7.2.0:
     dependencies:
diff --git a/plugins/replication b/plugins/replication
index 23d3866..a85cebf 160000
--- a/plugins/replication
+++ b/plugins/replication
@@ -1 +1 @@
-Subproject commit 23d386651175ca83d214793749852339684d3c2c
+Subproject commit a85cebf0c00e46c924231789c62c81910b7a7dee
diff --git a/plugins/tsconfig-plugins-base.json b/plugins/tsconfig-plugins-base.json
index b41f410..9f978af 100644
--- a/plugins/tsconfig-plugins-base.json
+++ b/plugins/tsconfig-plugins-base.json
@@ -24,6 +24,7 @@
     "noFallthroughCasesInSwitch": true,/* Report errors for fallthrough cases in switch statement. */
 
     "skipLibCheck": true, /* Do not check node_modules */
+    "types": ["mocha"],
 
     /* Module Resolution Options */
     "moduleResolution": "bundler",
diff --git a/plugins/yarn.lock b/plugins/yarn.lock
index 9a504e0..023f211 100644
--- a/plugins/yarn.lock
+++ b/plugins/yarn.lock
@@ -26,10 +26,10 @@
     "@codemirror/view" "^6.17.0"
     "@lezer/common" "^1.0.0"
 
-"@codemirror/commands@^6.11.0":
-  version "6.11.0"
-  resolved "https://registry.yarnpkg.com/@codemirror/commands/-/commands-6.11.0.tgz#2194d6fcad9ed787dcc42667db0e0543fab2e0ef"
-  integrity sha512-/K4Rl5BN0OtTiPWmJCdqODu38XnDMsDxKY5rgrPnCkutPTJf2wVbkoixLfealF5Kwse/s8P8M5jAiURiwSwnFA==
+"@codemirror/commands@^6.11.1":
+  version "6.11.1"
+  resolved "https://registry.yarnpkg.com/@codemirror/commands/-/commands-6.11.1.tgz#1ec31ffb4d87babd096b5857e68cdba3bb989abd"
+  integrity sha512-O/4hG3SC1YwcmQ0d2UVNDs+AsaNWd1iHVxbTeEBuqH+6bExAiPK3iS/BvpY6rZGURALv4ZD3sIgcCmRvw3ehBg==
   dependencies:
     "@codemirror/language" "^6.0.0"
     "@codemirror/state" "^6.7.0"
@@ -148,9 +148,9 @@
     "@lezer/lr" "^1.0.0"
 
 "@codemirror/lang-liquid@^6.0.0":
-  version "6.3.2"
-  resolved "https://registry.yarnpkg.com/@codemirror/lang-liquid/-/lang-liquid-6.3.2.tgz#623bf5776d9069ddae371ac9a1bd1914d70107b8"
-  integrity sha512-6PDVU3ZnfeYyz1at1E/ttorErZvZFXXt1OPhtfe1EZJ2V2iDFa0CwPqPgG5F7NXN0yONGoBogKmFAafKTqlwIw==
+  version "6.3.3"
+  resolved "https://registry.yarnpkg.com/@codemirror/lang-liquid/-/lang-liquid-6.3.3.tgz#a089d4c264268cd7422db5f0dd2470c9d08b979c"
+  integrity sha512-U9EnyzWuAx1TX3MZSKDXydKH734n1Aogk/ijKdW+jdIwmbf9zSPQYOIKggC/b2PTRjQb7ddvMktmxnfTLuv/SQ==
   dependencies:
     "@codemirror/autocomplete" "^6.0.0"
     "@codemirror/lang-html" "^6.0.0"
@@ -303,24 +303,25 @@
     "@codemirror/language" "^6.0.0"
     "@codemirror/legacy-modes" "^6.4.0"
 
-"@codemirror/language@^6.0.0", "@codemirror/language@^6.12.4", "@codemirror/language@^6.3.0", "@codemirror/language@^6.4.0", "@codemirror/language@^6.6.0", "@codemirror/language@^6.8.0":
-  version "6.12.4"
-  resolved "https://registry.yarnpkg.com/@codemirror/language/-/language-6.12.4.tgz#01e70fd5aa3a8a067ff1dfec75d5b6394cdfa058"
-  integrity sha512-1q4PaT+o6PbgpkJt4Q8Fv5XJxTy4FUZ4MWETtyiDw3J0Pyr9E2vqcKL+k9wcvjNTIsauxvE7OfmWj3FRPHQ76A==
+"@codemirror/language@^6.0.0", "@codemirror/language@^6.13.1", "@codemirror/language@^6.3.0", "@codemirror/language@^6.4.0", "@codemirror/language@^6.6.0", "@codemirror/language@^6.8.0":
+  version "6.13.1"
+  resolved "https://registry.yarnpkg.com/@codemirror/language/-/language-6.13.1.tgz#61eb04c0265102ff9bb24d9a3ee633d37e84e324"
+  integrity sha512-zfvU2r3TyylQLMj/te+5CnQ0rSqZi8B1oTCBbQkagcLW4Xc6imab6qN+pEJhsuNOLaJqiRyBXp9UhWA1DhVvDw==
   dependencies:
     "@codemirror/state" "^6.0.0"
+    "@codemirror/streamparser" "^6.0.0"
     "@codemirror/view" "^6.23.0"
     "@lezer/common" "^1.5.0"
     "@lezer/highlight" "^1.0.0"
     "@lezer/lr" "^1.0.0"
     style-mod "^4.0.0"
 
-"@codemirror/legacy-modes@^6.4.0", "@codemirror/legacy-modes@^6.5.3":
-  version "6.5.3"
-  resolved "https://registry.yarnpkg.com/@codemirror/legacy-modes/-/legacy-modes-6.5.3.tgz#5dcac7cdc430d32ad8af1c2c9bce392fad1b5fcb"
-  integrity sha512-xCsmIzH78MyWkib9jlPaaun57XNkfbMIhagfaZVd0iLTqlpw3jXaIcbZm72MTmmn64eTZpBVNjbyYh+QXnxRsg==
+"@codemirror/legacy-modes@^6.4.0", "@codemirror/legacy-modes@^6.5.5":
+  version "6.5.5"
+  resolved "https://registry.yarnpkg.com/@codemirror/legacy-modes/-/legacy-modes-6.5.5.tgz#2eb27876122e8e5a1c7e88273b1b7c4eb078aa8a"
+  integrity sha512-9ltT214oMb3Y1w5eAZMSigzrjzZnMI2Wa3Feq73rU/i4C56MkwrpfswfQYOr28C5pXr6dWwspNTMyeHXlzWMxg==
   dependencies:
-    "@codemirror/language" "^6.0.0"
+    "@codemirror/streamparser" "^6.0.0"
 
 "@codemirror/lint@^6.0.0", "@codemirror/lint@^6.9.7":
   version "6.9.7"
@@ -331,26 +332,31 @@
     "@codemirror/view" "^6.42.0"
     crelt "^1.0.5"
 
-"@codemirror/search@^6.7.1":
-  version "6.7.1"
-  resolved "https://registry.yarnpkg.com/@codemirror/search/-/search-6.7.1.tgz#2523a762871d18ad982edc2d4b2fa1da483b0392"
-  integrity sha512-uMe5UO6PamJtSHrXhhHOzSX3ReWtiJrva6GnPMwSOrZtiExb5X5eExhr2OUZQVvdxPsKpY3Ro2mFbQadpPWmHA==
+"@codemirror/search@^6.7.2":
+  version "6.7.2"
+  resolved "https://registry.yarnpkg.com/@codemirror/search/-/search-6.7.2.tgz#93a49eb21c026de473c4fc3a047b8fd67784b0f0"
+  integrity sha512-gUYkYhT2+n/+VGZ+8EzE5WFkYZUZYm1VOKDudIsNqh42uRVQJ0a6Yss9sdKT3MeOYfuL1N6AZA57oza0Oyr0LA==
   dependencies:
     "@codemirror/state" "^6.0.0"
     "@codemirror/view" "^6.37.0"
     crelt "^1.0.5"
 
-"@codemirror/state@^6.0.0", "@codemirror/state@^6.7.0", "@codemirror/state@^6.7.1":
-  version "6.7.1"
-  resolved "https://registry.yarnpkg.com/@codemirror/state/-/state-6.7.1.tgz#9e88a17448c1dbc7b50acbeeec979ed7ccf1d6fc"
-  integrity sha512-9QzNDgE4EYDnAHfrTlR2lwiPciiOymLtwKK+8yHQzCc7GXhAP9xdEbEJFy2IWB1j9UGUl9BsgMmTo/ImA02T7A==
+"@codemirror/state@^6.0.0", "@codemirror/state@^6.7.0", "@codemirror/state@^6.7.6":
+  version "6.7.6"
+  resolved "https://registry.yarnpkg.com/@codemirror/state/-/state-6.7.6.tgz#48af761fae3947745f17fa143cc5b5084225388d"
+  integrity sha512-kAz+AncRtKuIknedxT1bq4XwXv4UowhbkHU1myPrtVb/jZtImWuV5BXzv5vK6i3kYACsdiZiQKFQQ5Mq7elW8w==
   dependencies:
     "@marijn/find-cluster-break" "^1.0.0"
 
-"@codemirror/view@^6.0.0", "@codemirror/view@^6.17.0", "@codemirror/view@^6.23.0", "@codemirror/view@^6.27.0", "@codemirror/view@^6.37.0", "@codemirror/view@^6.42.0", "@codemirror/view@^6.43.9":
-  version "6.43.9"
-  resolved "https://registry.yarnpkg.com/@codemirror/view/-/view-6.43.9.tgz#85c44ad1bc5fc930e5642e7313643dab7dc866a4"
-  integrity sha512-sTuUzTpPMFebRhg6dawChoKKgndIwfjmJgKVxBefPElcU2NwQ6AFroupk0SFqEerQyZOGRfDNnSN8Dw/lMAsXw==
+"@codemirror/streamparser@^6.0.0":
+  version "6.0.0"
+  resolved "https://registry.yarnpkg.com/@codemirror/streamparser/-/streamparser-6.0.0.tgz#cc48a8f67e9001222d69938fabab157d68ce59d6"
+  integrity sha512-JTFPF6xrfjt0mnfGPgzcLiMwYmvIyNaoizp8BYzv8FE8KrT6GBGDZ190rtt+O7Wke3gG/MFHyiY9YGNeimof4w==
+
+"@codemirror/view@^6.0.0", "@codemirror/view@^6.17.0", "@codemirror/view@^6.23.0", "@codemirror/view@^6.27.0", "@codemirror/view@^6.37.0", "@codemirror/view@^6.42.0", "@codemirror/view@^6.43.14":
+  version "6.43.14"
+  resolved "https://registry.yarnpkg.com/@codemirror/view/-/view-6.43.14.tgz#a4b76ca6a47ef7c371b41f5c5222ba0815e36991"
+  integrity sha512-hC45YnmJNR1rz42OF57BLoQNFMV12/13drnvibDsR2quNDmldcb4WvYVV81hFQg56i9lcqQMEDqilhX2QDcGQQ==
   dependencies:
     "@codemirror/state" "^6.7.0"
     crelt "^1.0.6"
@@ -523,9 +529,9 @@
     "@jridgewell/sourcemap-codec" "^1.4.14"
 
 "@lezer/common@^1.0.0", "@lezer/common@^1.0.2", "@lezer/common@^1.1.0", "@lezer/common@^1.2.0", "@lezer/common@^1.2.1", "@lezer/common@^1.3.0", "@lezer/common@^1.5.0":
-  version "1.5.2"
-  resolved "https://registry.yarnpkg.com/@lezer/common/-/common-1.5.2.tgz#d6840db13779e3f1b42e70c9a97c4086d12fae22"
-  integrity sha512-sxQE460fPZyU3sdc8lafxiPwJHBzZRy/udNFynGQky1SePYBdhkBl1kOagA9uT3pxR8K09bOrmTUqA9wb/PjSQ==
+  version "1.5.3"
+  resolved "https://registry.yarnpkg.com/@lezer/common/-/common-1.5.3.tgz#1f0bf96f8f4949ef761991934b2f93947133b2ec"
+  integrity sha512-H0iErY4e43LpXbYDyBci5W4v/RwTgGV3YzYOlJPiGZ8RY8w51kVE+xLn1tg3Z6UmSfyETvtsUK3r7YsgDQEI7Q==
 
 "@lezer/cpp@^1.0.0":
   version "1.1.6"
@@ -537,9 +543,9 @@
     "@lezer/lr" "^1.0.0"
 
 "@lezer/css@^1.1.0", "@lezer/css@^1.1.7":
-  version "1.3.6"
-  resolved "https://registry.yarnpkg.com/@lezer/css/-/css-1.3.6.tgz#2cdae5b532beaa5cf1e7dccb918d8b190b6c6d14"
-  integrity sha512-YJE78Wcg+zX8f10hiHWQ4Az48Qr/c13eId0VtRQYLBpxHDmDeSrXIlkbl+fJGW42rWC/uoUco9mhBZeVWP/A1g==
+  version "1.3.9"
+  resolved "https://registry.yarnpkg.com/@lezer/css/-/css-1.3.9.tgz#489ffec6b23d9a2275bd3d3faa35e8ace72096f4"
+  integrity sha512-ZmzgvTOBdJWGIsY/ItAfN7UW8DV802oZG+jeG6E508SwEzz5YhuAajptpWPICvIyqYAD2+VjMdOS40GgGkyEOQ==
   dependencies:
     "@lezer/common" "^1.2.0"
     "@lezer/highlight" "^1.0.0"
@@ -554,10 +560,10 @@
     "@lezer/highlight" "^1.0.0"
     "@lezer/lr" "^1.3.0"
 
-"@lezer/highlight@^1.0.0", "@lezer/highlight@^1.1.3", "@lezer/highlight@^1.2.0", "@lezer/highlight@^1.2.3":
-  version "1.2.3"
-  resolved "https://registry.yarnpkg.com/@lezer/highlight/-/highlight-1.2.3.tgz#a20f324b71148a2ea9ba6ff42e58bbfaec702857"
-  integrity sha512-qXdH7UqTvGfdVBINrgKhDsVTJTxactNNxLk7+UMwZhU13lMHaOBlJe9Vqp907ya56Y3+ed2tlqzys7jDkTmW0g==
+"@lezer/highlight@^1.0.0", "@lezer/highlight@^1.1.3", "@lezer/highlight@^1.2.0", "@lezer/highlight@^1.2.5":
+  version "1.2.5"
+  resolved "https://registry.yarnpkg.com/@lezer/highlight/-/highlight-1.2.5.tgz#af43ba19f2cd50713eb045ab827085a0aa6d8592"
+  integrity sha512-O1GMVKgtf5YspFaRzpmqkVgMtIk2HG9uMAbH6wdAIdNh3TVzCsch/+cRi+6l2//UGDKe6NB9BW3cvuR5ezMQ0w==
   dependencies:
     "@lezer/common" "^1.3.0"
 
@@ -571,18 +577,18 @@
     "@lezer/lr" "^1.0.0"
 
 "@lezer/java@^1.0.0":
-  version "1.1.3"
-  resolved "https://registry.yarnpkg.com/@lezer/java/-/java-1.1.3.tgz#9efd6a29b4142d07f211076a6fb5e8061c85e147"
-  integrity sha512-yHquUfujwg6Yu4Fd1GNHCvidIvJwi/1Xu2DaKl/pfWIA2c1oXkVvawH3NyXhCaFx4OdlYBVX5wvz2f7Aoa/4Xw==
+  version "1.1.5"
+  resolved "https://registry.yarnpkg.com/@lezer/java/-/java-1.1.5.tgz#6d66ec3b6f25f020d4f306bc4c73e2fb82e0e7b5"
+  integrity sha512-JppTd1iKHpeNlLYw/Zl8JX7zSY5HqAzK4zZ05lpn8l8Sk7Fo5KAKiDiMiezKoT5lfeC2xZf8HeKp1tSctj4G6Q==
   dependencies:
     "@lezer/common" "^1.2.0"
     "@lezer/highlight" "^1.0.0"
     "@lezer/lr" "^1.0.0"
 
 "@lezer/javascript@^1.0.0":
-  version "1.5.4"
-  resolved "https://registry.yarnpkg.com/@lezer/javascript/-/javascript-1.5.4.tgz#11746955f957d33c0933f17d7594db54a8b4beea"
-  integrity sha512-vvYx3MhWqeZtGPwDStM2dwgljd5smolYD2lR2UyFcHfxbBQebqx8yjmFmxtJ/E6nN6u1D9srOiVWm3Rb4tmcUA==
+  version "1.5.6"
+  resolved "https://registry.yarnpkg.com/@lezer/javascript/-/javascript-1.5.6.tgz#31edb7f3e8c433eb0e6ef295024f26a9bf093d6c"
+  integrity sha512-sEvOqpl4vJQca0NugSQK02vQPbc5KrvoojnYGoqqFgFO0MtcYhwGiHKVEB+LuXYJnfyXo4QPA8ztbrEa4Fw5NA==
   dependencies:
     "@lezer/common" "^1.2.0"
     "@lezer/highlight" "^1.1.3"
@@ -598,24 +604,24 @@
     "@lezer/lr" "^1.0.0"
 
 "@lezer/lr@^1.0.0", "@lezer/lr@^1.1.0", "@lezer/lr@^1.3.0", "@lezer/lr@^1.3.1", "@lezer/lr@^1.3.3", "@lezer/lr@^1.4.0":
-  version "1.4.10"
-  resolved "https://registry.yarnpkg.com/@lezer/lr/-/lr-1.4.10.tgz#b3acc36e5ad049b74ddb7719594e7e74d9161ff5"
-  integrity sha512-rnCpTIBafOx4mRp43xOxDJbFipJm/c0cia/V5TiGlhmMa+wsSdoGmUN3w5Bqrks/09Q/D4tNAmWaT8p6NRi77A==
+  version "1.4.11"
+  resolved "https://registry.yarnpkg.com/@lezer/lr/-/lr-1.4.11.tgz#e335231c2c8e58a8d0e78de8dbcebf64ba6c7681"
+  integrity sha512-UwgZcl1R66H2hDzBrA7kWyYmX6s8p5TQ+e/t7CuvgCtBEPxbEPaHYHu+pJBvTvDotEJpuQkJjbXuHiw5Cixxgw==
   dependencies:
     "@lezer/common" "^1.0.0"
 
 "@lezer/markdown@^1.0.0":
-  version "1.7.2"
-  resolved "https://registry.yarnpkg.com/@lezer/markdown/-/markdown-1.7.2.tgz#dfe0249813dc8faa60b4659a4ca2b8da6dcaf753"
-  integrity sha512-iTkYvoVcKt3WkeL7qUDyXHONZEwLio4wj8KTNi2dnjQEXBZKMV63BpQrPqfsM+OkvuRbiSTAcycYAsQzLhRNoQ==
+  version "1.8.0"
+  resolved "https://registry.yarnpkg.com/@lezer/markdown/-/markdown-1.8.0.tgz#3732d82e872098f3143849a9e25631b9d236b5c6"
+  integrity sha512-X6w3A2NpyhdtGqTWRJB8gR4QDXBaFMbTOs780ZdZ15KKCfBXOQTKcB3Vr+W6tqJHVlealt53tLmHRvOqPTQgYA==
   dependencies:
     "@lezer/common" "^1.5.0"
     "@lezer/highlight" "^1.0.0"
 
 "@lezer/php@^1.0.0":
-  version "1.0.5"
-  resolved "https://registry.yarnpkg.com/@lezer/php/-/php-1.0.5.tgz#4e6b79daa97b98f0ba300f592e6916661339e661"
-  integrity sha512-W7asp9DhM6q0W6DYNwIkLSKOvxlXRrif+UXBMxzsJUuqmhE7oVU+gS3THO4S/Puh7Xzgm858UNaFi6dxTP8dJA==
+  version "1.0.6"
+  resolved "https://registry.yarnpkg.com/@lezer/php/-/php-1.0.6.tgz#9a5b41f7405e72beec7cb3e511ea4ab9196dfb20"
+  integrity sha512-QJ2xNXPmsm/Z3IpThq8fnJrEIVpxhsIoj6GZBW0JYEd/l9zxpJZW216X4fzqQY4vgpdGIumypvI4uQjd4tnYtw==
   dependencies:
     "@lezer/common" "^1.2.0"
     "@lezer/highlight" "^1.0.0"
@@ -631,9 +637,9 @@
     "@lezer/lr" "^1.0.0"
 
 "@lezer/rust@^1.0.0":
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/@lezer/rust/-/rust-1.0.2.tgz#cc9a75605d67182a0e799ac40b1965a61dcc6ef0"
-  integrity sha512-Lz5sIPBdF2FUXcWeCu1//ojFAZqzTQNRga0aYv6dYXqJqPfMdCAI0NzajWUd4Xijj1IKJLtjoXRPMvTKWBcqKg==
+  version "1.0.3"
+  resolved "https://registry.yarnpkg.com/@lezer/rust/-/rust-1.0.3.tgz#55113d3b82b3de318b5b9188fe91cecbd266481c"
+  integrity sha512-XxErOjZzQ7yJt1agUT4fu9qQvESZ3acgoxpPaPTPOiUx+duCjaVAtZGFIgphkHxlN05djdVAIOy/wItShMEjqQ==
   dependencies:
     "@lezer/common" "^1.2.0"
     "@lezer/highlight" "^1.0.0"
@@ -1121,6 +1127,11 @@
   resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.5.tgz#1ef302e01cf7d2b5a0fa526790c9123bf1d06690"
   integrity sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==
 
+"@types/mocha@^10.0.10":
+  version "10.0.10"
+  resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-10.0.10.tgz#91f62905e8d23cbd66225312f239454a23bebfa0"
+  integrity sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==
+
 "@types/node@*":
   version "24.3.0"
   resolved "https://registry.yarnpkg.com/@types/node/-/node-24.3.0.tgz#89b09f45cb9a8ee69466f18ee5864e4c3eb84dec"
@@ -3349,9 +3360,9 @@
   integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==
 
 style-mod@^4.0.0, style-mod@^4.1.0:
-  version "4.1.3"
-  resolved "https://registry.yarnpkg.com/style-mod/-/style-mod-4.1.3.tgz#6e9012255bb799bdac37e288f7671b5d71bf9f73"
-  integrity sha512-i/n8VsZydrugj3Iuzll8+x/00GH2vnYsk1eomD8QiRrSAeW6ItbCQDtfXCeJHd0iwiNagqjQkvpvREEPtW3IoQ==
+  version "4.1.4"
+  resolved "https://registry.yarnpkg.com/style-mod/-/style-mod-4.1.4.tgz#b8d718efca020766f90e0969daa751d5cccc5fd4"
+  integrity sha512-XXWIQt633/EpAFx8aZDOTjBzrCaGmhvEQlQo6MVPfa2OzO2cWo+4hV9h+6UkHYlXGfy+ODXKUdP7Pthmcu5ATw==
 
 supports-color@^7.1.0, supports-color@^7.2.0:
   version "7.2.0"
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index aeae959..a7656cf 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -1,3 +1,161 @@
+---
+lockfileVersion: '9.0'
+
+importers:
+
+  .:
+    configDependencies: {}
+    packageManagerDependencies:
+      pnpm:
+        specifier: 12.13.0
+        version: 12.13.0
+
+packages:
+
+  '@pnpm/exe.android-arm64@12.13.0':
+    resolution: {integrity: sha512-BI++xXYAk3lTLQ1695b3pAAaLwzUTQqKyT5UukVd1NU5qv7h/rUfVCiV5hrLksdbgPMWcic8gf9uXMiqTlerzg==}
+    cpu: [arm64]
+    os: [android]
+
+  '@pnpm/exe.android-x64@12.13.0':
+    resolution: {integrity: sha512-bFq6cnbSB3fezJ0siOtuoRqLiR3VXFCZvUUFa0wlZ4a3EaJYsnnDli4ZTe8/bDfX1UhNMFxAAiSAKg7xITu+Zw==}
+    cpu: [x64]
+    os: [android]
+
+  '@pnpm/exe.darwin-arm64@12.13.0':
+    resolution: {integrity: sha512-9rRpaMGxxrv5YbptsRTIeG+q2IzQyrkRKXkD30pb7weCC6Xz6vQzfkItzrUZsb2bXyYd7fSsq+luTsreXBQYyQ==}
+    cpu: [arm64]
+    os: [darwin]
+
+  '@pnpm/exe.darwin-x64@12.13.0':
+    resolution: {integrity: sha512-A+VFQakozmXIo8kxtcP9sZCKIi94f9uB5jLXRvwnNSA5G6/G6Iq/8E17+fIPf4bm7xvR+qeM794Nz98Q52lutQ==}
+    cpu: [x64]
+    os: [darwin]
+
+  '@pnpm/exe.freebsd-x64@12.13.0':
+    resolution: {integrity: sha512-HqT2ppLDxmpO8jTgl44BLdrBQoQXE73HHBElYRKvxL47d4maQ0sfk+fI+bfeDpRTqKzc5JZfj85yjRo7anqioA==}
+    cpu: [x64]
+    os: [freebsd]
+
+  '@pnpm/exe.linux-arm64-musl@12.13.0':
+    resolution: {integrity: sha512-yZfm/7h1Kdd1XTNf9+F2Gt5R4WuQKMRbkMIpbzCtxpzniPEKGo/2kymNxdHq3jIcfnzHnP+KBR/YONZ+4Icq+g==}
+    cpu: [arm64]
+    os: [linux]
+    libc: [musl]
+
+  '@pnpm/exe.linux-arm64@12.13.0':
+    resolution: {integrity: sha512-jp29ia+fTNhheXzt4FRUw5CwFW9caPNEdLRuy7/Dlbv3sj+iHldfJXfCojkPE4g71NPVwMpY5Eoc7nkfWexqrA==}
+    cpu: [arm64]
+    os: [linux]
+    libc: [glibc]
+
+  '@pnpm/exe.linux-ppc64@12.13.0':
+    resolution: {integrity: sha512-BO8Nz70baL6KV0G9p+Lx8l6BQYFE11KDEOTTjSNZdiUMMyN1byeDlls10ZgCIaIq5ELlLJ0F/LKieNjubOC7BA==}
+    cpu: [ppc64]
+    os: [linux]
+    libc: [glibc]
+
+  '@pnpm/exe.linux-riscv64@12.13.0':
+    resolution: {integrity: sha512-LrGM+VzpNghXuHK1XSMNEsochaLscAYkllSPLF3Y4CQpaOFYmiZoX+G3TN+T3pYRxdgvwWJCqbbdwRJZFykrig==}
+    cpu: [riscv64]
+    os: [linux]
+    libc: [glibc]
+
+  '@pnpm/exe.linux-s390x@12.13.0':
+    resolution: {integrity: sha512-0Xetcb9OJpXYmJ7rMDh3oFszIvbQl0F8UNh7oJnbLJY1K5PtDgYVkjqwb1JpjU0mkr0b4HKkFdZhlYh7XEGTvw==}
+    cpu: [s390x]
+    os: [linux]
+    libc: [glibc]
+
+  '@pnpm/exe.linux-x64-musl@12.13.0':
+    resolution: {integrity: sha512-LSD/snRsouEGA52HrTfEbGrCGdkkr5gXfQym26Ogu3I7sc5dJHUHyp8GnA7ewXrFOSRCJXH25mnmQ6Jpit572Q==}
+    cpu: [x64]
+    os: [linux]
+    libc: [musl]
+
+  '@pnpm/exe.linux-x64@12.13.0':
+    resolution: {integrity: sha512-t4EYUFG4SPYaJJVQToWIPq/lLBquCPCxMtt9vV//HirSDl332dnxDnwgvdW29sqLg3Ob2x7zFQ69HZLyoCyfpQ==}
+    cpu: [x64]
+    os: [linux]
+    libc: [glibc]
+
+  '@pnpm/exe.win32-arm64@12.13.0':
+    resolution: {integrity: sha512-aDzzll9stgP+p6KKYHNzuShZhBCaxabv481xK5BjfvSnyFbjzu7ksKUIVlsiAw4xAXnrIqvEj0lQarsbBRcIQA==}
+    cpu: [arm64]
+    os: [win32]
+
+  '@pnpm/exe.win32-x64@12.13.0':
+    resolution: {integrity: sha512-Nkw4hDJTcmuO6zDjkTo4Dz7pG2ojEifSBGC4QbFJFIfBoRbN88GIMu/Lm1woxd7ONhJFlfJ+dJeiDyuP0NKtSA==}
+    cpu: [x64]
+    os: [win32]
+
+  pnpm@12.13.0:
+    resolution: {integrity: sha512-HlVxm/JugJ3OXFCE/euqZO+z2pA4rl1oqfimgxHxpFhByMO3ajcpjDtm9rzIBAmpt/M8eKcWij6Q+2Wl2CNa5A==}
+    engines: {node: '>=18.*'}
+    hasBin: true
+
+snapshots:
+
+  '@pnpm/exe.android-arm64@12.13.0':
+    optional: true
+
+  '@pnpm/exe.android-x64@12.13.0':
+    optional: true
+
+  '@pnpm/exe.darwin-arm64@12.13.0':
+    optional: true
+
+  '@pnpm/exe.darwin-x64@12.13.0':
+    optional: true
+
+  '@pnpm/exe.freebsd-x64@12.13.0':
+    optional: true
+
+  '@pnpm/exe.linux-arm64-musl@12.13.0':
+    optional: true
+
+  '@pnpm/exe.linux-arm64@12.13.0':
+    optional: true
+
+  '@pnpm/exe.linux-ppc64@12.13.0':
+    optional: true
+
+  '@pnpm/exe.linux-riscv64@12.13.0':
+    optional: true
+
+  '@pnpm/exe.linux-s390x@12.13.0':
+    optional: true
+
+  '@pnpm/exe.linux-x64-musl@12.13.0':
+    optional: true
+
+  '@pnpm/exe.linux-x64@12.13.0':
+    optional: true
+
+  '@pnpm/exe.win32-arm64@12.13.0':
+    optional: true
+
+  '@pnpm/exe.win32-x64@12.13.0':
+    optional: true
+
+  pnpm@12.13.0:
+    optionalDependencies:
+      '@pnpm/exe.android-arm64': 12.13.0
+      '@pnpm/exe.android-x64': 12.13.0
+      '@pnpm/exe.darwin-arm64': 12.13.0
+      '@pnpm/exe.darwin-x64': 12.13.0
+      '@pnpm/exe.freebsd-x64': 12.13.0
+      '@pnpm/exe.linux-arm64': 12.13.0
+      '@pnpm/exe.linux-arm64-musl': 12.13.0
+      '@pnpm/exe.linux-ppc64': 12.13.0
+      '@pnpm/exe.linux-riscv64': 12.13.0
+      '@pnpm/exe.linux-s390x': 12.13.0
+      '@pnpm/exe.linux-x64': 12.13.0
+      '@pnpm/exe.linux-x64-musl': 12.13.0
+      '@pnpm/exe.win32-arm64': 12.13.0
+      '@pnpm/exe.win32-x64': 12.13.0
+
+---
 lockfileVersion: '9.0'
 
 settings:
@@ -6,9 +164,9 @@
 
 overrides:
   eslint: ^9.39.1
-  '@typescript-eslint/eslint-plugin': ^8.49.0
-  '@typescript-eslint/parser': ^8.49.0
-  typescript: 5.8.2
+  '@typescript-eslint/eslint-plugin': ^8.69.0
+  '@typescript-eslint/parser': ^8.69.0
+  typescript: 6.0.3
   vscode-css-languageservice: ^6.3.9
   vscode-html-languageservice: ^5.6.1
 
@@ -17,15 +175,15 @@
   .:
     dependencies:
       '@typescript-eslint/parser':
-        specifier: ^8.49.0
-        version: 8.49.0(eslint@9.39.1)(typescript@5.8.2)
+        specifier: ^8.69.0
+        version: 8.69.0(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3)
     devDependencies:
       '@eslint/eslintrc':
         specifier: ^3.3.1
-        version: 3.3.3
+        version: 3.3.3(supports-color@7.2.0)
       '@eslint/js':
         specifier: ^9.26.0
-        version: 9.39.1
+        version: 9.39.5
       '@koa/cors':
         specifier: ^5.0.0
         version: 5.0.0
@@ -33,47 +191,47 @@
         specifier: ^1.11.9
         version: 1.11.9
       '@typescript-eslint/eslint-plugin':
-        specifier: ^8.49.0
-        version: 8.49.0(@typescript-eslint/parser@8.49.0(eslint@9.39.1)(typescript@5.8.2))(eslint@9.39.1)(typescript@5.8.2)
+        specifier: ^8.69.0
+        version: 8.69.0(@typescript-eslint/parser@8.69.0(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3)
       '@web/dev-server':
         specifier: ^0.4.6
-        version: 0.4.6
+        version: 0.4.6(supports-color@7.2.0)
       '@web/dev-server-esbuild':
         specifier: ^1.0.4
-        version: 1.0.4
+        version: 1.0.4(supports-color@7.2.0)
       eslint:
         specifier: ^9.39.1
-        version: 9.39.1
+        version: 9.39.1(supports-color@7.2.0)
       eslint-config-google:
         specifier: ^0.14.0
-        version: 0.14.0(eslint@9.39.1)
+        version: 0.14.0(eslint@9.39.1(supports-color@7.2.0))
       eslint-plugin-es-x:
         specifier: 8.0.0
-        version: 8.0.0(eslint@9.39.1)
+        version: 8.0.0(eslint@9.39.1(supports-color@7.2.0))
       eslint-plugin-html:
         specifier: ^8.1.3
         version: 8.1.3
       eslint-plugin-import:
         specifier: ^2.31.0
-        version: 2.32.0(@typescript-eslint/parser@8.49.0(eslint@9.39.1)(typescript@5.8.2))(eslint@9.39.1)
+        version: 2.32.0(@typescript-eslint/parser@8.69.0(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)
       eslint-plugin-jsdoc:
         specifier: ^50.6.11
-        version: 50.8.0(eslint@9.39.1)
+        version: 50.8.0(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)
       eslint-plugin-lit:
         specifier: ^1.15.0
-        version: 1.15.0(eslint@9.39.1)
+        version: 1.15.0(eslint@9.39.1(supports-color@7.2.0))
       eslint-plugin-n:
         specifier: ^17.17.0
-        version: 17.23.1(eslint@9.39.1)(typescript@5.8.2)
+        version: 17.23.1(eslint@9.39.1(supports-color@7.2.0))(typescript@6.0.3)
       eslint-plugin-prettier:
         specifier: ^5.4.0
-        version: 5.5.4(eslint-config-prettier@9.1.0(eslint@9.39.1))(eslint@9.39.1)(prettier@2.8.8)
+        version: 5.5.4(eslint-config-prettier@9.1.0(eslint@9.39.1(supports-color@7.2.0)))(eslint@9.39.1(supports-color@7.2.0))(prettier@2.8.8)
       eslint-plugin-regex:
         specifier: ^1.10.0
-        version: 1.10.0(eslint@9.39.1)
+        version: 1.10.0(eslint@9.39.1(supports-color@7.2.0))
       gts:
         specifier: ^6.0.2
-        version: 6.0.2(typescript@5.8.2)
+        version: 6.0.2(supports-color@7.2.0)(typescript@6.0.3)
       lit-analyzer:
         specifier: ^2.0.3
         version: 2.0.3
@@ -93,8 +251,8 @@
         specifier: ^2.0.2
         version: 2.0.2
       typescript:
-        specifier: 5.8.2
-        version: 5.8.2
+        specifier: 6.0.3
+        version: 6.0.3
 
 packages:
 
@@ -270,8 +428,8 @@
     cpu: [x64]
     os: [win32]
 
-  '@eslint-community/eslint-utils@4.9.0':
-    resolution: {integrity: sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==}
+  '@eslint-community/eslint-utils@4.10.1':
+    resolution: {integrity: sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==}
     engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
     peerDependencies:
       eslint: ^9.39.1
@@ -300,6 +458,10 @@
     resolution: {integrity: sha512-S26Stp4zCy88tH94QbBv3XCuzRQiZ9yXofEILmglYTh/Ug/a9/umqvgFtYBAo3Lp0nsI/5/qH1CCrbdK3AP1Tw==}
     engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
 
+  '@eslint/js@9.39.5':
+    resolution: {integrity: sha512-QywQuszQh77pIXCsq998c8hbhSTI/azTty1Z6N53dmAudKHhy573j3yvRLsX2BSp8YpLtoCEG8E9DJe+8zUh4A==}
+    engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
+
   '@eslint/object-schema@2.1.7':
     resolution: {integrity: sha512-VtAOaymWVfZcmZbp6E2mympDIHvyjXs/12LqWYjVw6qjrfF+VK+fyG33kChz3nnK+SU5/NeHOqrTEHS8sXO3OA==}
     engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@@ -557,9 +719,6 @@
   '@types/koa@2.15.0':
     resolution: {integrity: sha512-7QFsywoE5URbuVnG3loe03QXuGajrnotr3gQkXcEBShORai23MePfFYdhz90FEtBBpkyIYQbVD+evKtloCgX3g==}
 
-  '@types/koa@3.0.0':
-    resolution: {integrity: sha512-MOcVYdVYmkSutVHZZPh8j3+dAjLyR5Tl59CN0eKgpkE1h/LBSmPAsQQuWs+bKu7WtGNn+hKfJH9Gzml+PulmDg==}
-
   '@types/mime@1.3.5':
     resolution: {integrity: sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==}
 
@@ -596,63 +755,63 @@
   '@types/ws@7.4.7':
     resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==}
 
-  '@typescript-eslint/eslint-plugin@8.49.0':
-    resolution: {integrity: sha512-JXij0vzIaTtCwu6SxTh8qBc66kmf1xs7pI4UOiMDFVct6q86G0Zs7KRcEoJgY3Cav3x5Tq0MF5jwgpgLqgKG3A==}
+  '@typescript-eslint/eslint-plugin@8.69.0':
+    resolution: {integrity: sha512-t5jQTKPIgVW1PE6dR6H6Qz5gm8zjMlX5/2gRaOGd9eO6V7J+tQc6iWKukEe7dY8u9HyYasQ0yfF0/FSSTEO2gA==}
     engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
     peerDependencies:
-      '@typescript-eslint/parser': ^8.49.0
+      '@typescript-eslint/parser': ^8.69.0
       eslint: ^9.39.1
-      typescript: 5.8.2
+      typescript: 6.0.3
 
-  '@typescript-eslint/parser@8.49.0':
-    resolution: {integrity: sha512-N9lBGA9o9aqb1hVMc9hzySbhKibHmB+N3IpoShyV6HyQYRGIhlrO5rQgttypi+yEeKsKI4idxC8Jw6gXKD4THA==}
+  '@typescript-eslint/parser@8.69.0':
+    resolution: {integrity: sha512-l4b0DhWioGg6Gt2ebGlvfkFMOjRsauxtsnDRwUSRX1qHq3HdTfQHV8wW9zEXeciai6HfeaKOedQn2Zoofx3WBw==}
     engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
     peerDependencies:
       eslint: ^9.39.1
-      typescript: 5.8.2
+      typescript: 6.0.3
 
-  '@typescript-eslint/project-service@8.49.0':
-    resolution: {integrity: sha512-/wJN0/DKkmRUMXjZUXYZpD1NEQzQAAn9QWfGwo+Ai8gnzqH7tvqS7oNVdTjKqOcPyVIdZdyCMoqN66Ia789e7g==}
+  '@typescript-eslint/project-service@8.69.0':
+    resolution: {integrity: sha512-yi4obFrHMmnsesWehHbkg9zMA7Jt8cXT+mKM08G999pH1yT6nqgsHx7MYm0uY1wAj8CqiBXYRJ7WAT0QdQHQXg==}
     engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
     peerDependencies:
-      typescript: 5.8.2
+      typescript: 6.0.3
 
-  '@typescript-eslint/scope-manager@8.49.0':
-    resolution: {integrity: sha512-npgS3zi+/30KSOkXNs0LQXtsg9ekZ8OISAOLGWA/ZOEn0ZH74Ginfl7foziV8DT+D98WfQ5Kopwqb/PZOaIJGg==}
+  '@typescript-eslint/scope-manager@8.69.0':
+    resolution: {integrity: sha512-ewfspqWvSxKSOaplqAUNbaSFO0eB6w1EtQ+esfYFRm3614Ty4uNtExkcbgd6nWsXphbqKyf9ZYdbZdv2xEoWEQ==}
     engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
 
-  '@typescript-eslint/tsconfig-utils@8.49.0':
-    resolution: {integrity: sha512-8prixNi1/6nawsRYxet4YOhnbW+W9FK/bQPxsGB1D3ZrDzbJ5FXw5XmzxZv82X3B+ZccuSxo/X8q9nQ+mFecWA==}
+  '@typescript-eslint/tsconfig-utils@8.69.0':
+    resolution: {integrity: sha512-xNqK7YTDZsLniQMV/4rpFR8Z5JlqeRvVjuG1YgF/mdPVH84HSD19L8CczMA0qg2RfwEV231GHH3VnToJDo4MfQ==}
     engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
     peerDependencies:
-      typescript: 5.8.2
+      typescript: 6.0.3
 
-  '@typescript-eslint/type-utils@8.49.0':
-    resolution: {integrity: sha512-KTExJfQ+svY8I10P4HdxKzWsvtVnsuCifU5MvXrRwoP2KOlNZ9ADNEWWsQTJgMxLzS5VLQKDjkCT/YzgsnqmZg==}
+  '@typescript-eslint/type-utils@8.69.0':
+    resolution: {integrity: sha512-ZfoJAVg3JZndQEpEl9petVlxau3lRuElc4HRMuAlLCf8to04/iHz692RUSNmXKDjEuJmIL+KZ2/BsOcBc16dsA==}
     engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
     peerDependencies:
       eslint: ^9.39.1
-      typescript: 5.8.2
+      typescript: 6.0.3
 
-  '@typescript-eslint/types@8.49.0':
-    resolution: {integrity: sha512-e9k/fneezorUo6WShlQpMxXh8/8wfyc+biu6tnAqA81oWrEic0k21RHzP9uqqpyBBeBKu4T+Bsjy9/b8u7obXQ==}
+  '@typescript-eslint/types@8.69.0':
+    resolution: {integrity: sha512-K3VrubUPhlo9VDBS6QdI8YB5j7ClpqLRdefcz6PFrhnwicehBweqQ9Evhl4l+FYz0HdDmMqIiSX0aldGRYtDCA==}
     engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
 
-  '@typescript-eslint/typescript-estree@8.49.0':
-    resolution: {integrity: sha512-jrLdRuAbPfPIdYNppHJ/D0wN+wwNfJ32YTAm10eJVsFmrVpXQnDWBn8niCSMlWjvml8jsce5E/O+86IQtTbJWA==}
+  '@typescript-eslint/typescript-estree@8.69.0':
+    resolution: {integrity: sha512-AdFkgqck3Vudb/kWnxlyafU/4aBhHrbQ9locP2N4psXTy5mOBg0SHJumnLvx7r6g1gV4DKvUFwV2nJZBoqOD8w==}
     engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
     peerDependencies:
-      typescript: 5.8.2
+      typescript: 6.0.3
 
-  '@typescript-eslint/utils@8.49.0':
-    resolution: {integrity: sha512-N3W7rJw7Rw+z1tRsHZbK395TWSYvufBXumYtEGzypgMUthlg0/hmCImeA8hgO2d2G4pd7ftpxxul2J8OdtdaFA==}
+  '@typescript-eslint/utils@8.69.0':
+    resolution: {integrity: sha512-tUbx60BBqQa31kXF5MCsOOLL5E/WzUuxIn7YpAvq+eaUlqvk8/NXnXMBNAdLCr0icjkzem7iUA5QqWHe/hJ1aw==}
     engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
     peerDependencies:
       eslint: ^9.39.1
-      typescript: 5.8.2
+      typescript: 6.0.3
 
-  '@typescript-eslint/visitor-keys@8.49.0':
-    resolution: {integrity: sha512-LlKaciDe3GmZFphXIc79THF/YYBugZ7FS1pO581E/edlVVNbZKDy93evqmrfQ9/Y4uN0vVhX4iuchq26mK/iiA==}
+  '@typescript-eslint/visitor-keys@8.69.0':
+    resolution: {integrity: sha512-+rmdgPA+EXkNgKYvHvFfhrs35utXbwaC5PGpDquSXcoXQDKUA5UjV0LmTucG/4JXkM31BTu4TilHtrN8IVBe8w==}
     engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
 
   '@vscode/l10n@0.0.18':
@@ -776,11 +935,16 @@
   balanced-match@1.0.2:
     resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
 
+  balanced-match@4.0.4:
+    resolution: {integrity: sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==}
+    engines: {node: 18 || 20 || >=22}
+
   brace-expansion@1.1.12:
     resolution: {integrity: sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==}
 
-  brace-expansion@2.0.2:
-    resolution: {integrity: sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==}
+  brace-expansion@5.0.9:
+    resolution: {integrity: sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==}
+    engines: {node: 20 || >=22}
 
   braces@3.0.3:
     resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==}
@@ -1258,9 +1422,14 @@
     resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==}
     engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
 
+  eslint-visitor-keys@5.0.1:
+    resolution: {integrity: sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==}
+    engines: {node: ^20.19.0 || ^22.13.0 || >=24}
+
   eslint@9.39.1:
     resolution: {integrity: sha512-BhHmn2yNOFA9H9JmmIVKJmd288g9hrVRDkdoIgRCRuSySRUHH7r/DI6aAXW9T1WwUuY3DFgrcaqB+deURBLR5g==}
     engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
+    deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options.
     hasBin: true
     peerDependencies:
       jiti: '*'
@@ -1450,7 +1619,7 @@
     engines: {node: '>=18'}
     hasBin: true
     peerDependencies:
-      typescript: 5.8.2
+      typescript: 6.0.3
 
   hard-rejection@2.1.0:
     resolution: {integrity: sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==}
@@ -1521,8 +1690,8 @@
     resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==}
     engines: {node: '>= 4'}
 
-  ignore@7.0.5:
-    resolution: {integrity: sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==}
+  ignore@7.0.8:
+    resolution: {integrity: sha512-YYNsSlXBjMk92SKnkwvB5LOVSa6OznlFUGcsvrFgNJbJCd0M1XKeFVRc8ZByeCqz32FivYNHJVooLmdqrmvp/Q==}
     engines: {node: '>= 4'}
 
   import-fresh@3.3.1:
@@ -1874,13 +2043,13 @@
     resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==}
     engines: {node: '>=4'}
 
+  minimatch@10.2.6:
+    resolution: {integrity: sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==}
+    engines: {node: 18 || 20 || >=22}
+
   minimatch@3.1.2:
     resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==}
 
-  minimatch@9.0.5:
-    resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==}
-    engines: {node: '>=16 || 14 >=14.17'}
-
   minimist-options@4.1.0:
     resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==}
     engines: {node: '>= 6'}
@@ -2235,8 +2404,8 @@
     resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==}
     hasBin: true
 
-  semver@7.7.3:
-    resolution: {integrity: sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==}
+  semver@7.8.5:
+    resolution: {integrity: sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==}
     engines: {node: '>=10'}
     hasBin: true
 
@@ -2427,16 +2596,16 @@
     resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==}
     engines: {node: '>=8'}
 
-  ts-api-utils@2.1.0:
-    resolution: {integrity: sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==}
+  ts-api-utils@2.5.0:
+    resolution: {integrity: sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==}
     engines: {node: '>=18.12'}
     peerDependencies:
-      typescript: 5.8.2
+      typescript: 6.0.3
 
   ts-declaration-location@1.0.7:
     resolution: {integrity: sha512-EDyGAwH1gO0Ausm9gV6T2nUvBgXT5kGoCMJPllOaooZ+4VvJiKBdZE7wK18N1deEowhcUptS+5GXZK8U/fvpwA==}
     peerDependencies:
-      typescript: 5.8.2
+      typescript: 6.0.3
 
   ts-lit-plugin@2.0.2:
     resolution: {integrity: sha512-DPXlVxhjWHxg8AyBLcfSYt2JXgpANV1ssxxwjY98o26gD8MzeiM68HFW9c2VeDd1CjoR3w7B/6/uKxwBQe+ioA==}
@@ -2497,8 +2666,8 @@
     resolution: {integrity: sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==}
     engines: {node: '>= 0.4'}
 
-  typescript@5.8.2:
-    resolution: {integrity: sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==}
+  typescript@6.0.3:
+    resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==}
     engines: {node: '>=14.17'}
     hasBin: true
 
@@ -2656,7 +2825,7 @@
   '@es-joy/jsdoccomment@0.50.2':
     dependencies:
       '@types/estree': 1.0.8
-      '@typescript-eslint/types': 8.49.0
+      '@typescript-eslint/types': 8.69.0
       comment-parser: 1.4.1
       esquery: 1.6.0
       jsdoc-type-pratt-parser: 4.1.0
@@ -2739,17 +2908,17 @@
   '@esbuild/win32-x64@0.25.9':
     optional: true
 
-  '@eslint-community/eslint-utils@4.9.0(eslint@9.39.1)':
+  '@eslint-community/eslint-utils@4.10.1(eslint@9.39.1(supports-color@7.2.0))':
     dependencies:
-      eslint: 9.39.1
+      eslint: 9.39.1(supports-color@7.2.0)
       eslint-visitor-keys: 3.4.3
 
   '@eslint-community/regexpp@4.12.2': {}
 
-  '@eslint/config-array@0.21.1':
+  '@eslint/config-array@0.21.1(supports-color@7.2.0)':
     dependencies:
       '@eslint/object-schema': 2.1.7
-      debug: 4.4.3
+      debug: 4.4.3(supports-color@7.2.0)
       minimatch: 3.1.2
     transitivePeerDependencies:
       - supports-color
@@ -2762,10 +2931,10 @@
     dependencies:
       '@types/json-schema': 7.0.15
 
-  '@eslint/eslintrc@3.3.3':
+  '@eslint/eslintrc@3.3.3(supports-color@7.2.0)':
     dependencies:
       ajv: 6.12.6
-      debug: 4.4.3
+      debug: 4.4.3(supports-color@7.2.0)
       espree: 10.4.0
       globals: 14.0.0
       ignore: 5.3.2
@@ -2778,6 +2947,8 @@
 
   '@eslint/js@9.39.1': {}
 
+  '@eslint/js@9.39.5': {}
+
   '@eslint/object-schema@2.1.7': {}
 
   '@eslint/plugin-kit@0.4.1':
@@ -2974,7 +3145,7 @@
 
   '@types/koa-compose@3.2.8':
     dependencies:
-      '@types/koa': 3.0.0
+      '@types/koa': 2.15.0
 
   '@types/koa@2.15.0':
     dependencies:
@@ -2987,17 +3158,6 @@
       '@types/koa-compose': 3.2.8
       '@types/node': 24.3.0
 
-  '@types/koa@3.0.0':
-    dependencies:
-      '@types/accepts': 1.3.7
-      '@types/content-disposition': 0.5.9
-      '@types/cookies': 0.9.1
-      '@types/http-assert': 1.5.6
-      '@types/http-errors': 2.0.5
-      '@types/keygrip': 1.0.6
-      '@types/koa-compose': 3.2.8
-      '@types/node': 24.3.0
-
   '@types/mime@1.3.5': {}
 
   '@types/minimist@1.2.5': {}
@@ -3033,96 +3193,96 @@
     dependencies:
       '@types/node': 24.3.0
 
-  '@typescript-eslint/eslint-plugin@8.49.0(@typescript-eslint/parser@8.49.0(eslint@9.39.1)(typescript@5.8.2))(eslint@9.39.1)(typescript@5.8.2)':
+  '@typescript-eslint/eslint-plugin@8.69.0(@typescript-eslint/parser@8.69.0(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3)':
     dependencies:
       '@eslint-community/regexpp': 4.12.2
-      '@typescript-eslint/parser': 8.49.0(eslint@9.39.1)(typescript@5.8.2)
-      '@typescript-eslint/scope-manager': 8.49.0
-      '@typescript-eslint/type-utils': 8.49.0(eslint@9.39.1)(typescript@5.8.2)
-      '@typescript-eslint/utils': 8.49.0(eslint@9.39.1)(typescript@5.8.2)
-      '@typescript-eslint/visitor-keys': 8.49.0
-      eslint: 9.39.1
-      ignore: 7.0.5
+      '@typescript-eslint/parser': 8.69.0(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3)
+      '@typescript-eslint/scope-manager': 8.69.0
+      '@typescript-eslint/type-utils': 8.69.0(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3)
+      '@typescript-eslint/utils': 8.69.0(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3)
+      '@typescript-eslint/visitor-keys': 8.69.0
+      eslint: 9.39.1(supports-color@7.2.0)
+      ignore: 7.0.8
       natural-compare: 1.4.0
-      ts-api-utils: 2.1.0(typescript@5.8.2)
-      typescript: 5.8.2
+      ts-api-utils: 2.5.0(typescript@6.0.3)
+      typescript: 6.0.3
     transitivePeerDependencies:
       - supports-color
 
-  '@typescript-eslint/parser@8.49.0(eslint@9.39.1)(typescript@5.8.2)':
+  '@typescript-eslint/parser@8.69.0(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3)':
     dependencies:
-      '@typescript-eslint/scope-manager': 8.49.0
-      '@typescript-eslint/types': 8.49.0
-      '@typescript-eslint/typescript-estree': 8.49.0(typescript@5.8.2)
-      '@typescript-eslint/visitor-keys': 8.49.0
-      debug: 4.4.3
-      eslint: 9.39.1
-      typescript: 5.8.2
+      '@typescript-eslint/scope-manager': 8.69.0
+      '@typescript-eslint/types': 8.69.0
+      '@typescript-eslint/typescript-estree': 8.69.0(supports-color@7.2.0)(typescript@6.0.3)
+      '@typescript-eslint/visitor-keys': 8.69.0
+      debug: 4.4.3(supports-color@7.2.0)
+      eslint: 9.39.1(supports-color@7.2.0)
+      typescript: 6.0.3
     transitivePeerDependencies:
       - supports-color
 
-  '@typescript-eslint/project-service@8.49.0(typescript@5.8.2)':
+  '@typescript-eslint/project-service@8.69.0(supports-color@7.2.0)(typescript@6.0.3)':
     dependencies:
-      '@typescript-eslint/tsconfig-utils': 8.49.0(typescript@5.8.2)
-      '@typescript-eslint/types': 8.49.0
-      debug: 4.4.3
-      typescript: 5.8.2
+      '@typescript-eslint/tsconfig-utils': 8.69.0(typescript@6.0.3)
+      '@typescript-eslint/types': 8.69.0
+      debug: 4.4.3(supports-color@7.2.0)
+      typescript: 6.0.3
     transitivePeerDependencies:
       - supports-color
 
-  '@typescript-eslint/scope-manager@8.49.0':
+  '@typescript-eslint/scope-manager@8.69.0':
     dependencies:
-      '@typescript-eslint/types': 8.49.0
-      '@typescript-eslint/visitor-keys': 8.49.0
+      '@typescript-eslint/types': 8.69.0
+      '@typescript-eslint/visitor-keys': 8.69.0
 
-  '@typescript-eslint/tsconfig-utils@8.49.0(typescript@5.8.2)':
+  '@typescript-eslint/tsconfig-utils@8.69.0(typescript@6.0.3)':
     dependencies:
-      typescript: 5.8.2
+      typescript: 6.0.3
 
-  '@typescript-eslint/type-utils@8.49.0(eslint@9.39.1)(typescript@5.8.2)':
+  '@typescript-eslint/type-utils@8.69.0(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3)':
     dependencies:
-      '@typescript-eslint/types': 8.49.0
-      '@typescript-eslint/typescript-estree': 8.49.0(typescript@5.8.2)
-      '@typescript-eslint/utils': 8.49.0(eslint@9.39.1)(typescript@5.8.2)
-      debug: 4.4.3
-      eslint: 9.39.1
-      ts-api-utils: 2.1.0(typescript@5.8.2)
-      typescript: 5.8.2
+      '@typescript-eslint/types': 8.69.0
+      '@typescript-eslint/typescript-estree': 8.69.0(supports-color@7.2.0)(typescript@6.0.3)
+      '@typescript-eslint/utils': 8.69.0(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3)
+      debug: 4.4.3(supports-color@7.2.0)
+      eslint: 9.39.1(supports-color@7.2.0)
+      ts-api-utils: 2.5.0(typescript@6.0.3)
+      typescript: 6.0.3
     transitivePeerDependencies:
       - supports-color
 
-  '@typescript-eslint/types@8.49.0': {}
+  '@typescript-eslint/types@8.69.0': {}
 
-  '@typescript-eslint/typescript-estree@8.49.0(typescript@5.8.2)':
+  '@typescript-eslint/typescript-estree@8.69.0(supports-color@7.2.0)(typescript@6.0.3)':
     dependencies:
-      '@typescript-eslint/project-service': 8.49.0(typescript@5.8.2)
-      '@typescript-eslint/tsconfig-utils': 8.49.0(typescript@5.8.2)
-      '@typescript-eslint/types': 8.49.0
-      '@typescript-eslint/visitor-keys': 8.49.0
-      debug: 4.4.3
-      minimatch: 9.0.5
-      semver: 7.7.3
+      '@typescript-eslint/project-service': 8.69.0(supports-color@7.2.0)(typescript@6.0.3)
+      '@typescript-eslint/tsconfig-utils': 8.69.0(typescript@6.0.3)
+      '@typescript-eslint/types': 8.69.0
+      '@typescript-eslint/visitor-keys': 8.69.0
+      debug: 4.4.3(supports-color@7.2.0)
+      minimatch: 10.2.6
+      semver: 7.8.5
       tinyglobby: 0.2.15
-      ts-api-utils: 2.1.0(typescript@5.8.2)
-      typescript: 5.8.2
+      ts-api-utils: 2.5.0(typescript@6.0.3)
+      typescript: 6.0.3
     transitivePeerDependencies:
       - supports-color
 
-  '@typescript-eslint/utils@8.49.0(eslint@9.39.1)(typescript@5.8.2)':
+  '@typescript-eslint/utils@8.69.0(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3)':
     dependencies:
-      '@eslint-community/eslint-utils': 4.9.0(eslint@9.39.1)
-      '@typescript-eslint/scope-manager': 8.49.0
-      '@typescript-eslint/types': 8.49.0
-      '@typescript-eslint/typescript-estree': 8.49.0(typescript@5.8.2)
-      eslint: 9.39.1
-      typescript: 5.8.2
+      '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.1(supports-color@7.2.0))
+      '@typescript-eslint/scope-manager': 8.69.0
+      '@typescript-eslint/types': 8.69.0
+      '@typescript-eslint/typescript-estree': 8.69.0(supports-color@7.2.0)(typescript@6.0.3)
+      eslint: 9.39.1(supports-color@7.2.0)
+      typescript: 6.0.3
     transitivePeerDependencies:
       - supports-color
 
-  '@typescript-eslint/visitor-keys@8.49.0':
+  '@typescript-eslint/visitor-keys@8.69.0':
     dependencies:
-      '@typescript-eslint/types': 8.49.0
-      eslint-visitor-keys: 4.2.1
+      '@typescript-eslint/types': 8.69.0
+      eslint-visitor-keys: 5.0.1
 
   '@vscode/l10n@0.0.18': {}
 
@@ -3130,7 +3290,7 @@
 
   '@web/config-loader@0.3.3': {}
 
-  '@web/dev-server-core@0.7.5':
+  '@web/dev-server-core@0.7.5(supports-color@7.2.0)':
     dependencies:
       '@types/koa': 2.15.0
       '@types/ws': 7.4.7
@@ -3141,10 +3301,10 @@
       get-stream: 6.0.1
       is-stream: 2.0.1
       isbinaryfile: 5.0.5
-      koa: 2.16.2
+      koa: 2.16.2(supports-color@7.2.0)
       koa-etag: 4.0.0
-      koa-send: 5.0.1
-      koa-static: 5.0.0
+      koa-send: 5.0.1(supports-color@7.2.0)
+      koa-static: 5.0.0(supports-color@7.2.0)
       lru-cache: 8.0.5
       mime-types: 2.1.35
       parse5: 6.0.1
@@ -3155,10 +3315,10 @@
       - supports-color
       - utf-8-validate
 
-  '@web/dev-server-esbuild@1.0.4':
+  '@web/dev-server-esbuild@1.0.4(supports-color@7.2.0)':
     dependencies:
       '@mdn/browser-compat-data': 4.2.1
-      '@web/dev-server-core': 0.7.5
+      '@web/dev-server-core': 0.7.5(supports-color@7.2.0)
       esbuild: 0.25.9
       parse5: 6.0.1
       ua-parser-js: 1.0.41
@@ -3167,10 +3327,10 @@
       - supports-color
       - utf-8-validate
 
-  '@web/dev-server-rollup@0.6.4':
+  '@web/dev-server-rollup@0.6.4(supports-color@7.2.0)':
     dependencies:
       '@rollup/plugin-node-resolve': 15.3.1(rollup@4.53.3)
-      '@web/dev-server-core': 0.7.5
+      '@web/dev-server-core': 0.7.5(supports-color@7.2.0)
       nanocolors: 0.2.13
       parse5: 6.0.1
       rollup: 4.53.3
@@ -3180,13 +3340,13 @@
       - supports-color
       - utf-8-validate
 
-  '@web/dev-server@0.4.6':
+  '@web/dev-server@0.4.6(supports-color@7.2.0)':
     dependencies:
       '@babel/code-frame': 7.27.1
       '@types/command-line-args': 5.2.3
       '@web/config-loader': 0.3.3
-      '@web/dev-server-core': 0.7.5
-      '@web/dev-server-rollup': 0.6.4
+      '@web/dev-server-core': 0.7.5(supports-color@7.2.0)
+      '@web/dev-server-rollup': 0.6.4(supports-color@7.2.0)
       camelcase: 6.3.0
       command-line-args: 5.2.1
       command-line-usage: 7.0.3
@@ -3195,7 +3355,7 @@
       internal-ip: 6.2.0
       nanocolors: 0.2.13
       open: 8.4.2
-      portfinder: 1.0.37
+      portfinder: 1.0.37(supports-color@7.2.0)
     transitivePeerDependencies:
       - bufferutil
       - supports-color
@@ -3308,14 +3468,16 @@
 
   balanced-match@1.0.2: {}
 
+  balanced-match@4.0.4: {}
+
   brace-expansion@1.1.12:
     dependencies:
       balanced-match: 1.0.2
       concat-map: 0.0.1
 
-  brace-expansion@2.0.2:
+  brace-expansion@5.0.9:
     dependencies:
-      balanced-match: 1.0.2
+      balanced-match: 4.0.4
 
   braces@3.0.3:
     dependencies:
@@ -3325,7 +3487,7 @@
 
   builtins@5.1.0:
     dependencies:
-      semver: 7.7.3
+      semver: 7.8.5
 
   cache-content-type@1.0.1:
     dependencies:
@@ -3475,13 +3637,17 @@
 
   debounce@1.2.1: {}
 
-  debug@3.2.7:
+  debug@3.2.7(supports-color@7.2.0):
     dependencies:
       ms: 2.1.3
+    optionalDependencies:
+      supports-color: 7.2.0
 
-  debug@4.4.3:
+  debug@4.4.3(supports-color@7.2.0):
     dependencies:
       ms: 2.1.3
+    optionalDependencies:
+      supports-color: 7.2.0
 
   decamelize-keys@1.1.1:
     dependencies:
@@ -3696,54 +3862,54 @@
 
   escape-string-regexp@4.0.0: {}
 
-  eslint-compat-utils@0.5.1(eslint@9.39.1):
+  eslint-compat-utils@0.5.1(eslint@9.39.1(supports-color@7.2.0)):
     dependencies:
-      eslint: 9.39.1
-      semver: 7.7.3
+      eslint: 9.39.1(supports-color@7.2.0)
+      semver: 7.8.5
 
-  eslint-config-google@0.14.0(eslint@9.39.1):
+  eslint-config-google@0.14.0(eslint@9.39.1(supports-color@7.2.0)):
     dependencies:
-      eslint: 9.39.1
+      eslint: 9.39.1(supports-color@7.2.0)
 
-  eslint-config-prettier@9.1.0(eslint@9.39.1):
+  eslint-config-prettier@9.1.0(eslint@9.39.1(supports-color@7.2.0)):
     dependencies:
-      eslint: 9.39.1
+      eslint: 9.39.1(supports-color@7.2.0)
 
-  eslint-import-resolver-node@0.3.9:
+  eslint-import-resolver-node@0.3.9(supports-color@7.2.0):
     dependencies:
-      debug: 3.2.7
+      debug: 3.2.7(supports-color@7.2.0)
       is-core-module: 2.16.1
       resolve: 1.22.10
     transitivePeerDependencies:
       - supports-color
 
-  eslint-module-utils@2.12.1(@typescript-eslint/parser@8.49.0(eslint@9.39.1)(typescript@5.8.2))(eslint-import-resolver-node@0.3.9)(eslint@9.39.1):
+  eslint-module-utils@2.12.1(@typescript-eslint/parser@8.69.0(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint-import-resolver-node@0.3.9(supports-color@7.2.0))(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0):
     dependencies:
-      debug: 3.2.7
+      debug: 3.2.7(supports-color@7.2.0)
     optionalDependencies:
-      '@typescript-eslint/parser': 8.49.0(eslint@9.39.1)(typescript@5.8.2)
-      eslint: 9.39.1
-      eslint-import-resolver-node: 0.3.9
+      '@typescript-eslint/parser': 8.69.0(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3)
+      eslint: 9.39.1(supports-color@7.2.0)
+      eslint-import-resolver-node: 0.3.9(supports-color@7.2.0)
     transitivePeerDependencies:
       - supports-color
 
-  eslint-plugin-es-x@7.8.0(eslint@9.39.1):
+  eslint-plugin-es-x@7.8.0(eslint@9.39.1(supports-color@7.2.0)):
     dependencies:
-      '@eslint-community/eslint-utils': 4.9.0(eslint@9.39.1)
+      '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.1(supports-color@7.2.0))
       '@eslint-community/regexpp': 4.12.2
-      eslint: 9.39.1
-      eslint-compat-utils: 0.5.1(eslint@9.39.1)
+      eslint: 9.39.1(supports-color@7.2.0)
+      eslint-compat-utils: 0.5.1(eslint@9.39.1(supports-color@7.2.0))
 
-  eslint-plugin-es-x@8.0.0(eslint@9.39.1):
+  eslint-plugin-es-x@8.0.0(eslint@9.39.1(supports-color@7.2.0)):
     dependencies:
-      '@eslint-community/eslint-utils': 4.9.0(eslint@9.39.1)
+      '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.1(supports-color@7.2.0))
       '@eslint-community/regexpp': 4.12.2
-      eslint: 9.39.1
-      eslint-compat-utils: 0.5.1(eslint@9.39.1)
+      eslint: 9.39.1(supports-color@7.2.0)
+      eslint-compat-utils: 0.5.1(eslint@9.39.1(supports-color@7.2.0))
 
-  eslint-plugin-es@4.1.0(eslint@9.39.1):
+  eslint-plugin-es@4.1.0(eslint@9.39.1(supports-color@7.2.0)):
     dependencies:
-      eslint: 9.39.1
+      eslint: 9.39.1(supports-color@7.2.0)
       eslint-utils: 2.1.0
       regexpp: 3.2.0
 
@@ -3751,18 +3917,18 @@
     dependencies:
       htmlparser2: 10.0.0
 
-  eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.49.0(eslint@9.39.1)(typescript@5.8.2))(eslint@9.39.1):
+  eslint-plugin-import@2.32.0(@typescript-eslint/parser@8.69.0(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0):
     dependencies:
       '@rtsao/scc': 1.1.0
       array-includes: 3.1.9
       array.prototype.findlastindex: 1.2.6
       array.prototype.flat: 1.3.3
       array.prototype.flatmap: 1.3.3
-      debug: 3.2.7
+      debug: 3.2.7(supports-color@7.2.0)
       doctrine: 2.1.0
-      eslint: 9.39.1
-      eslint-import-resolver-node: 0.3.9
-      eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.49.0(eslint@9.39.1)(typescript@5.8.2))(eslint-import-resolver-node@0.3.9)(eslint@9.39.1)
+      eslint: 9.39.1(supports-color@7.2.0)
+      eslint-import-resolver-node: 0.3.9(supports-color@7.2.0)
+      eslint-module-utils: 2.12.1(@typescript-eslint/parser@8.69.0(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint-import-resolver-node@0.3.9(supports-color@7.2.0))(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)
       hasown: 2.0.2
       is-core-module: 2.16.1
       is-glob: 4.0.3
@@ -3774,83 +3940,83 @@
       string.prototype.trimend: 1.0.9
       tsconfig-paths: 3.15.0
     optionalDependencies:
-      '@typescript-eslint/parser': 8.49.0(eslint@9.39.1)(typescript@5.8.2)
+      '@typescript-eslint/parser': 8.69.0(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3)
     transitivePeerDependencies:
       - eslint-import-resolver-typescript
       - eslint-import-resolver-webpack
       - supports-color
 
-  eslint-plugin-jsdoc@50.8.0(eslint@9.39.1):
+  eslint-plugin-jsdoc@50.8.0(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0):
     dependencies:
       '@es-joy/jsdoccomment': 0.50.2
       are-docs-informative: 0.0.2
       comment-parser: 1.4.1
-      debug: 4.4.3
+      debug: 4.4.3(supports-color@7.2.0)
       escape-string-regexp: 4.0.0
-      eslint: 9.39.1
+      eslint: 9.39.1(supports-color@7.2.0)
       espree: 10.4.0
       esquery: 1.6.0
       parse-imports-exports: 0.2.4
-      semver: 7.7.3
+      semver: 7.8.5
       spdx-expression-parse: 4.0.0
     transitivePeerDependencies:
       - supports-color
 
-  eslint-plugin-lit@1.15.0(eslint@9.39.1):
+  eslint-plugin-lit@1.15.0(eslint@9.39.1(supports-color@7.2.0)):
     dependencies:
-      eslint: 9.39.1
+      eslint: 9.39.1(supports-color@7.2.0)
       parse5: 6.0.1
       parse5-htmlparser2-tree-adapter: 6.0.1
       requireindex: 1.2.0
 
-  eslint-plugin-n@15.7.0(eslint@9.39.1):
+  eslint-plugin-n@15.7.0(eslint@9.39.1(supports-color@7.2.0)):
     dependencies:
       builtins: 5.1.0
-      eslint: 9.39.1
-      eslint-plugin-es: 4.1.0(eslint@9.39.1)
-      eslint-utils: 3.0.0(eslint@9.39.1)
+      eslint: 9.39.1(supports-color@7.2.0)
+      eslint-plugin-es: 4.1.0(eslint@9.39.1(supports-color@7.2.0))
+      eslint-utils: 3.0.0(eslint@9.39.1(supports-color@7.2.0))
       ignore: 5.3.2
       is-core-module: 2.16.1
       minimatch: 3.1.2
       resolve: 1.22.10
-      semver: 7.7.3
+      semver: 7.8.5
 
-  eslint-plugin-n@17.23.1(eslint@9.39.1)(typescript@5.8.2):
+  eslint-plugin-n@17.23.1(eslint@9.39.1(supports-color@7.2.0))(typescript@6.0.3):
     dependencies:
-      '@eslint-community/eslint-utils': 4.9.0(eslint@9.39.1)
+      '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.1(supports-color@7.2.0))
       enhanced-resolve: 5.18.3
-      eslint: 9.39.1
-      eslint-plugin-es-x: 7.8.0(eslint@9.39.1)
+      eslint: 9.39.1(supports-color@7.2.0)
+      eslint-plugin-es-x: 7.8.0(eslint@9.39.1(supports-color@7.2.0))
       get-tsconfig: 4.13.0
       globals: 15.15.0
       globrex: 0.1.2
       ignore: 5.3.2
-      semver: 7.7.3
-      ts-declaration-location: 1.0.7(typescript@5.8.2)
+      semver: 7.8.5
+      ts-declaration-location: 1.0.7(typescript@6.0.3)
     transitivePeerDependencies:
       - typescript
 
-  eslint-plugin-prettier@5.2.1(eslint-config-prettier@9.1.0(eslint@9.39.1))(eslint@9.39.1)(prettier@3.3.3):
+  eslint-plugin-prettier@5.2.1(eslint-config-prettier@9.1.0(eslint@9.39.1(supports-color@7.2.0)))(eslint@9.39.1(supports-color@7.2.0))(prettier@3.3.3):
     dependencies:
-      eslint: 9.39.1
+      eslint: 9.39.1(supports-color@7.2.0)
       prettier: 3.3.3
       prettier-linter-helpers: 1.0.0
       synckit: 0.9.3
     optionalDependencies:
-      eslint-config-prettier: 9.1.0(eslint@9.39.1)
+      eslint-config-prettier: 9.1.0(eslint@9.39.1(supports-color@7.2.0))
 
-  eslint-plugin-prettier@5.5.4(eslint-config-prettier@9.1.0(eslint@9.39.1))(eslint@9.39.1)(prettier@2.8.8):
+  eslint-plugin-prettier@5.5.4(eslint-config-prettier@9.1.0(eslint@9.39.1(supports-color@7.2.0)))(eslint@9.39.1(supports-color@7.2.0))(prettier@2.8.8):
     dependencies:
-      eslint: 9.39.1
+      eslint: 9.39.1(supports-color@7.2.0)
       prettier: 2.8.8
       prettier-linter-helpers: 1.0.0
       synckit: 0.11.11
     optionalDependencies:
-      eslint-config-prettier: 9.1.0(eslint@9.39.1)
+      eslint-config-prettier: 9.1.0(eslint@9.39.1(supports-color@7.2.0))
 
-  eslint-plugin-regex@1.10.0(eslint@9.39.1):
+  eslint-plugin-regex@1.10.0(eslint@9.39.1(supports-color@7.2.0)):
     dependencies:
-      eslint: 9.39.1
+      eslint: 9.39.1(supports-color@7.2.0)
 
   eslint-scope@8.4.0:
     dependencies:
@@ -3861,9 +4027,9 @@
     dependencies:
       eslint-visitor-keys: 1.3.0
 
-  eslint-utils@3.0.0(eslint@9.39.1):
+  eslint-utils@3.0.0(eslint@9.39.1(supports-color@7.2.0)):
     dependencies:
-      eslint: 9.39.1
+      eslint: 9.39.1(supports-color@7.2.0)
       eslint-visitor-keys: 2.1.0
 
   eslint-visitor-keys@1.3.0: {}
@@ -3874,14 +4040,16 @@
 
   eslint-visitor-keys@4.2.1: {}
 
-  eslint@9.39.1:
+  eslint-visitor-keys@5.0.1: {}
+
+  eslint@9.39.1(supports-color@7.2.0):
     dependencies:
-      '@eslint-community/eslint-utils': 4.9.0(eslint@9.39.1)
+      '@eslint-community/eslint-utils': 4.10.1(eslint@9.39.1(supports-color@7.2.0))
       '@eslint-community/regexpp': 4.12.2
-      '@eslint/config-array': 0.21.1
+      '@eslint/config-array': 0.21.1(supports-color@7.2.0)
       '@eslint/config-helpers': 0.4.2
       '@eslint/core': 0.17.0
-      '@eslint/eslintrc': 3.3.3
+      '@eslint/eslintrc': 3.3.3(supports-color@7.2.0)
       '@eslint/js': 9.39.1
       '@eslint/plugin-kit': 0.4.1
       '@humanfs/node': 0.16.7
@@ -3891,7 +4059,7 @@
       ajv: 6.12.6
       chalk: 4.1.2
       cross-spawn: 7.0.6
-      debug: 4.4.3
+      debug: 4.4.3(supports-color@7.2.0)
       escape-string-regexp: 4.0.0
       eslint-scope: 8.4.0
       eslint-visitor-keys: 4.2.1
@@ -4098,15 +4266,15 @@
 
   graceful-fs@4.2.11: {}
 
-  gts@6.0.2(typescript@5.8.2):
+  gts@6.0.2(supports-color@7.2.0)(typescript@6.0.3):
     dependencies:
-      '@typescript-eslint/eslint-plugin': 8.49.0(@typescript-eslint/parser@8.49.0(eslint@9.39.1)(typescript@5.8.2))(eslint@9.39.1)(typescript@5.8.2)
-      '@typescript-eslint/parser': 8.49.0(eslint@9.39.1)(typescript@5.8.2)
+      '@typescript-eslint/eslint-plugin': 8.69.0(@typescript-eslint/parser@8.69.0(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3)
+      '@typescript-eslint/parser': 8.69.0(eslint@9.39.1(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3)
       chalk: 4.1.2
-      eslint: 9.39.1
-      eslint-config-prettier: 9.1.0(eslint@9.39.1)
-      eslint-plugin-n: 15.7.0(eslint@9.39.1)
-      eslint-plugin-prettier: 5.2.1(eslint-config-prettier@9.1.0(eslint@9.39.1))(eslint@9.39.1)(prettier@3.3.3)
+      eslint: 9.39.1(supports-color@7.2.0)
+      eslint-config-prettier: 9.1.0(eslint@9.39.1(supports-color@7.2.0))
+      eslint-plugin-n: 15.7.0(eslint@9.39.1(supports-color@7.2.0))
+      eslint-plugin-prettier: 5.2.1(eslint-config-prettier@9.1.0(eslint@9.39.1(supports-color@7.2.0)))(eslint@9.39.1(supports-color@7.2.0))(prettier@3.3.3)
       execa: 5.1.1
       inquirer: 7.3.3
       json5: 2.2.3
@@ -4114,7 +4282,7 @@
       ncp: 2.0.0
       prettier: 3.3.3
       rimraf: 3.0.2
-      typescript: 5.8.2
+      typescript: 6.0.3
       write-file-atomic: 4.0.2
     transitivePeerDependencies:
       - '@types/eslint'
@@ -4188,7 +4356,7 @@
 
   ignore@5.3.2: {}
 
-  ignore@7.0.5: {}
+  ignore@7.0.8: {}
 
   import-fresh@3.3.1:
     dependencies:
@@ -4419,29 +4587,29 @@
     dependencies:
       etag: 1.8.1
 
-  koa-send@5.0.1:
+  koa-send@5.0.1(supports-color@7.2.0):
     dependencies:
-      debug: 4.4.3
+      debug: 4.4.3(supports-color@7.2.0)
       http-errors: 1.8.1
       resolve-path: 1.4.0
     transitivePeerDependencies:
       - supports-color
 
-  koa-static@5.0.0:
+  koa-static@5.0.0(supports-color@7.2.0):
     dependencies:
-      debug: 3.2.7
-      koa-send: 5.0.1
+      debug: 3.2.7(supports-color@7.2.0)
+      koa-send: 5.0.1(supports-color@7.2.0)
     transitivePeerDependencies:
       - supports-color
 
-  koa@2.16.2:
+  koa@2.16.2(supports-color@7.2.0):
     dependencies:
       accepts: 1.3.8
       cache-content-type: 1.0.1
       content-disposition: 0.5.4
       content-type: 1.0.5
       cookies: 0.9.1
-      debug: 4.4.3
+      debug: 4.4.3(supports-color@7.2.0)
       delegates: 1.0.0
       depd: 2.0.0
       destroy: 1.2.0
@@ -4556,14 +4724,14 @@
 
   min-indent@1.0.1: {}
 
+  minimatch@10.2.6:
+    dependencies:
+      brace-expansion: 5.0.9
+
   minimatch@3.1.2:
     dependencies:
       brace-expansion: 1.1.12
 
-  minimatch@9.0.5:
-    dependencies:
-      brace-expansion: 2.0.2
-
   minimist-options@4.1.0:
     dependencies:
       arrify: 1.0.1
@@ -4597,7 +4765,7 @@
     dependencies:
       hosted-git-info: 4.1.0
       is-core-module: 2.16.1
-      semver: 7.7.3
+      semver: 7.8.5
       validate-npm-package-license: 3.0.4
 
   npm-run-all@4.1.5:
@@ -4770,10 +4938,10 @@
 
   pify@3.0.0: {}
 
-  portfinder@1.0.37:
+  portfinder@1.0.37(supports-color@7.2.0):
     dependencies:
       async: 3.2.6
-      debug: 4.4.3
+      debug: 4.4.3(supports-color@7.2.0)
     transitivePeerDependencies:
       - supports-color
 
@@ -4938,7 +5106,7 @@
 
   semver@6.3.1: {}
 
-  semver@7.7.3: {}
+  semver@7.8.5: {}
 
   set-function-length@1.2.2:
     dependencies:
@@ -5149,14 +5317,14 @@
 
   trim-newlines@3.0.1: {}
 
-  ts-api-utils@2.1.0(typescript@5.8.2):
+  ts-api-utils@2.5.0(typescript@6.0.3):
     dependencies:
-      typescript: 5.8.2
+      typescript: 6.0.3
 
-  ts-declaration-location@1.0.7(typescript@5.8.2):
+  ts-declaration-location@1.0.7(typescript@6.0.3):
     dependencies:
       picomatch: 4.0.3
-      typescript: 5.8.2
+      typescript: 6.0.3
 
   ts-lit-plugin@2.0.2:
     dependencies:
@@ -5228,7 +5396,7 @@
       possible-typed-array-names: 1.1.0
       reflect.getprototypeof: 1.0.10
 
-  typescript@5.8.2: {}
+  typescript@6.0.3: {}
 
   typical@4.0.0: {}
 
@@ -5280,7 +5448,7 @@
     dependencies:
       fast-glob: 3.3.3
       ts-simple-type: 2.0.0-next.0
-      typescript: 5.8.2
+      typescript: 6.0.3
       yargs: 17.7.2
 
   webidl-conversions@7.0.0: {}
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index 7d40629..833fdda 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -1 +1,9 @@
 onlyBuiltDependencies: []
+
+overrides:
+  "eslint": "^9.39.1"
+  "@typescript-eslint/eslint-plugin": "^8.69.0"
+  "@typescript-eslint/parser": "^8.69.0"
+  "typescript": "6.0.3"
+  "vscode-css-languageservice": "^6.3.9"
+  "vscode-html-languageservice": "^5.6.1"
diff --git a/polygerrit-ui/BUILD b/polygerrit-ui/BUILD
index 8cf523d..eaa46e4 100644
--- a/polygerrit-ui/BUILD
+++ b/polygerrit-ui/BUILD
@@ -63,6 +63,8 @@
         # fonts and every screenshot differs in height by a few pixels.
         "//lib/fonts:robotofonts",
         "//lib/fonts:material-icons",
+        "//webapp:diffy.png",
+        "//webapp:gerrit_icon.png",
     ],
 )
 
diff --git a/polygerrit-ui/README.md b/polygerrit-ui/README.md
index 6baaa66..3f3dd57 100644
--- a/polygerrit-ui/README.md
+++ b/polygerrit-ui/README.md
@@ -80,6 +80,26 @@
 3. Run: bazel build gerrit
 4. If lock updated → rerun build
 
+## TypeScript compiler version
+
+The `tsc` used by the Bazel build is selected by `rules_ts` in
+`polygerrit-ui/polygerrit.MODULE.bazel`:
+
+```
+rules_ts_ext.deps(
+    version_from = "@npm//:typescript/resolved.json",
+)
+```
+
+`resolved.json` is generated by `npm_translate_lock` from the lockfile, so the
+Bazel compiler tracks the version and integrity that yarn actually resolved —
+the same flow as the dependency management above. The exact pin still lives in
+the `typescript` entry of the root `package.json` (and `tools/node_tools/
+package.json`); `resolved.json` just reports whatever that pin resolved to, and
+supplies the integrity from the lockfile rather than from an `rules_ts` mirror
+table. To change the compiler version, edit the `package.json` pin and rerun
+the yarn → pnpm workflow above.
+
 ## Why Yarn stays
 
 - gradual migration from `yarn` to `pnpm`
@@ -100,6 +120,36 @@
 - pnpm-lock.yaml becomes canonical
 - yarn.lock removed
 
+## Building plugins against the in-tree (non-published) plugin API
+
+Frontend plugins import the TypeScript plugin API by package name,
+`@gerritcodereview/typescript-api`. For standalone plugins (built outside the
+Gerrit tree) that name resolves to the npm release
+(link:https://www.npmjs.com/package/@gerritcodereview/typescript-api[@gerritcodereview/typescript-api]),
+which lags behind `master`.
+
+Plugins built inside the Gerrit tree (the core plugin submodules, and any
+plugin symlinked under `plugins/` by CI) instead build against the API of the
+branch they are built with, `polygerrit-ui/app/api` — so they can use APIs that
+this branch adds but that are not published to npm yet. Nothing in the plugin
+has to opt in: a plugin just imports `@gerritcodereview/typescript-api` and
+depends on `//plugins:node_modules`, exactly like `plugins/codemirror-editor`.
+
+This works via `npm_replace_package` in `polygerrit-ui/polygerrit.MODULE.bazel`:
+`plugins/package.json` still pins the published version, but the `plugins_npm`
+lock substitutes the in-tree `//polygerrit-ui/app:plugin_api_npm_package` (the
+branch API, packaged like the npm release) for it at link time. So:
+
+```sh
+# Builds against the branch API, no npm publish and no packed tarball needed:
+bazelisk build plugins/<plugin>/...
+```
+
+Do not reintroduce a packed-tarball workflow (`publish.sh --pack` plus a
+`file:`/`../*.tgz` dependency) for this: a relative tarball path cannot be
+resolved by `npm_translate_lock`, which runs `pnpm` in a sandboxed external
+repository, not in the source tree.
+
 ## Setup TypeScript support in the IDE
 
 Modern IDEs should automatically handle TypeScript settings from
@@ -116,6 +166,34 @@
 --project polygerrit-ui/app/tsconfig.json
 ```
 
+## Type checking
+
+The frontend is type-checked two ways, and CI runs both. Keep both green.
+
+Type-check with Bazel (production and tests):
+
+```sh
+bazelisk build //polygerrit-ui/app:compile_pg_with_tests
+```
+
+Type-check without Bazel (this is CI's "run type checker" step):
+
+```sh
+yarn compile
+# runs: tsc --project ./polygerrit-ui/app/tsconfig.json
+```
+
+Type-aware lint with Bazel:
+
+```sh
+bazelisk test //polygerrit-ui/app:lint_test
+```
+
+The two type-check paths use different tsconfigs. Bazel splits production
+(`tsconfig_bazel.json`) from tests (`tsconfig_bazel_test.json`, which sets
+`types: ["mocha"]`). The non-Bazel `tsc` uses the base `tsconfig.json`, which
+also type-checks tests and therefore sets `types: ["mocha"]`; production
+overrides it with `types: []` in `tsconfig_bazel.json`.
 ## Developing locally
 
 The preferred method for development is to serve the web files locally using the
diff --git a/polygerrit-ui/app/BUILD b/polygerrit-ui/app/BUILD
index f2ae231..ca18218 100644
--- a/polygerrit-ui/app/BUILD
+++ b/polygerrit-ui/app/BUILD
@@ -1,3 +1,4 @@
+load("@aspect_rules_js//npm:defs.bzl", "npm_package")
 load("@aspect_rules_ts//ts:defs.bzl", "ts_config", "ts_project")
 load("@npm//:lit-analyzer/package_json.bzl", lit_analyzer_bin = "bin")
 load("@ui_npm//:defs.bzl", "npm_link_all_packages")
@@ -55,6 +56,49 @@
     ],
 )
 
+# The plugin TypeScript API of this branch (polygerrit-ui/app/api), packaged
+# like the published @gerritcodereview/typescript-api. In-tree plugins build
+# against it instead of the npm release, so they can use APIs that this branch
+# adds but that are not published to npm yet. Wired up via npm_replace_package
+# in polygerrit-ui/polygerrit.MODULE.bazel.
+#
+# These targets live here, one level up from api/, on purpose: app/BUILD
+# already globs api/** as its own sources (see compile_pg above), so api/
+# cannot own a BUILD of its own. See api/BUILD_for_publishing_api_only.
+ts_project(
+    name = "plugin_api_compiled",
+    srcs = glob(["api/**/*.ts"]),
+    extends = "//plugins:tsconfig-plugins-base",
+    incremental = True,
+    out_dir = "_plugin_api_out",
+    root_dir = "api",
+    # The API package has no tests, so drop the "mocha" type lib that the
+    # shared plugins base tsconfig pulls in for plugin tests. Otherwise tsc
+    # demands @types/mocha, which this pure-types compile has no dep on.
+    tsconfig = {"compilerOptions": {
+        "rootDir": "api",
+        "types": [],
+    }},
+)
+
+npm_package(
+    name = "plugin_api_npm_package",
+    srcs = glob(
+        ["api/**/*"],
+        exclude = [
+            "api/BUILD_for_publishing_api_only",
+            "api/publish.sh",
+            "api/tsconfig.json",
+            "api/tsconfig.publish.json",
+        ],
+    ) + [":plugin_api_compiled"],
+    package = "@gerritcodereview/typescript-api",
+    root_paths = [
+        "polygerrit-ui/app/api",
+        "polygerrit-ui/app/_plugin_api_out",
+    ],
+)
+
 ts_config(
     name = "ts_config_bazel_test",
     src = "tsconfig_bazel_test.json",
diff --git a/polygerrit-ui/app/api/ai-code-review.ts b/polygerrit-ui/app/api/ai-code-review.ts
index edf2711..c3dccfd 100644
--- a/polygerrit-ui/app/api/ai-code-review.ts
+++ b/polygerrit-ui/app/api/ai-code-review.ts
@@ -262,6 +262,22 @@
   privacy_url?: string;
 }
 
+/**
+ * The `name` of the error that `AiCodeReviewProvider.getModels()` rejects with.
+ */
+export enum ModelsLoadingErrorName {
+  /**
+   * The user has not configured an API token. Gerrit then links the user to
+   * the settings, where the token can be added.
+   */
+  MISSING_API_TOKEN = 'MissingApiTokenError',
+  /**
+   * Any failure other than a missing API token, e.g. when the provider could
+   * not load its AI providers. Gerrit then only shows the error message.
+   */
+  AI_PROVIDERS_LOADING = 'AiProvidersLoadingError',
+}
+
 export declare interface Actions {
   /**
    * The actions available to the user. Should be displayed in the UI in the
diff --git a/polygerrit-ui/app/api/flows.ts b/polygerrit-ui/app/api/flows.ts
index 150bfe4..bfe5de2 100644
--- a/polygerrit-ui/app/api/flows.ts
+++ b/polygerrit-ui/app/api/flows.ts
@@ -4,7 +4,17 @@
  * SPDX-License-Identifier: Apache-2.0
  */
 
-import {ChangeInfo} from './rest-api';
+import {ChangeInfo, FlowInfo, FlowInput} from './rest-api';
+
+/**
+ * Snapshot of Gerrit's Flows state for the active change.
+ */
+export declare interface FlowsStateInfo {
+  isEnabled: boolean;
+  flows: FlowInfo[];
+  loading: boolean;
+  errorMessage?: string;
+}
 
 /**
  * Information about a custom condition that can be used in a flow.
@@ -85,4 +95,37 @@
    * You cannot unregister.
    */
   registerAutosubmitProvider(provider: FlowsAutosubmitProvider): void;
+
+  /**
+   * Returns the current flows state for the active change, if available.
+   */
+  getState(): FlowsStateInfo | undefined;
+
+  /**
+   * Subscribes to changes in the active change's flows state.
+   * Returns an unsubscribe function.
+   */
+  onStateChanged(callback: (state: FlowsStateInfo) => void): () => void;
+
+  /**
+   * Creates a flow on the active change and triggers a reload of `FlowsModel`
+   * when `reload` is true (default).
+   * Rejects when flows are disabled/unloaded or on HTTP error.
+   */
+  createFlow(
+    flowInput: FlowInput,
+    reload?: boolean
+  ): Promise<FlowInfo | undefined>;
+
+  /**
+   * Deletes a flow on the active change and triggers a reload of `FlowsModel`
+   * when `reload` is true (default).
+   * Rejects when flows are disabled/unloaded or on HTTP error.
+   */
+  deleteFlow(flowId: string, reload?: boolean): Promise<void>;
+
+  /**
+   * Reloads flows for the active change in `FlowsModel`.
+   */
+  reload(): void;
 }
diff --git a/polygerrit-ui/app/api/hook.ts b/polygerrit-ui/app/api/hook.ts
index 7ee9915..9079c50 100644
--- a/polygerrit-ui/app/api/hook.ts
+++ b/polygerrit-ui/app/api/hook.ts
@@ -25,6 +25,12 @@
   slot?: string;
   /** Defaults to false. */
   replace?: boolean;
+  /**
+   * Optional sort order for components registered on the same endpoint or slot.
+   * Lower numbers are placed first; components without `order` are placed after
+   * ordered components.
+   */
+  order?: number;
 }
 
 export declare interface HookApi<T extends PluginElement> {
diff --git a/polygerrit-ui/app/api/package.json b/polygerrit-ui/app/api/package.json
index 3f0d394..e34f8d3 100644
--- a/polygerrit-ui/app/api/package.json
+++ b/polygerrit-ui/app/api/package.json
@@ -1,9 +1,9 @@
 {
   "name": "@gerritcodereview/typescript-api",
-  "version": "3.14.0",
+  "version": "3.16.0",
   "description": "Gerrit Code Review - TypeScript API",
   "homepage": "https://www.gerritcodereview.com/",
   "browser": true,
   "dependencies": {},
   "license": "Apache-2.0"
-}
\ No newline at end of file
+}
diff --git a/polygerrit-ui/app/api/rest-api.ts b/polygerrit-ui/app/api/rest-api.ts
index 85dcbc3..833167b 100644
--- a/polygerrit-ui/app/api/rest-api.ts
+++ b/polygerrit-ui/app/api/rest-api.ts
@@ -180,6 +180,12 @@
   NO_CHANGE = 'NO_CHANGE',
 }
 
+/** Reference storage format of a repository. */
+export enum RefStorage {
+  FILES = 'FILES',
+  REFTABLE = 'REFTABLE',
+}
+
 /**
  * All supported submit types.
  * https://gerrit-review.googlesource.com/Documentation/rest-api-projects.html#submit-type-info
@@ -255,6 +261,7 @@
 export declare interface AccountsConfigInfo {
   visibility: string;
   default_display_name: DefaultDisplayNameConfig;
+  enable_delete?: boolean;
 }
 
 /**
@@ -273,7 +280,6 @@
 export declare interface ActionNameToActionInfoMap {
   [actionType: string]: ActionInfo | undefined;
   // List of actions explicitly used in code:
-  aiReview?: ActionInfo;
   wip?: ActionInfo;
   publishEdit?: ActionInfo;
   rebaseEdit?: ActionInfo;
@@ -306,6 +312,7 @@
   date?: Timestamp;
   tag?: ReviewInputTag;
   post_submit?: boolean; // not set if false
+  is_ai?: boolean; // not set if false
 }
 
 /**
@@ -363,6 +370,7 @@
   large_change: number;
   update_delay: number;
   submit_whole_topic?: boolean;
+  enforce_whole_topic_submit?: boolean;
   disable_private_changes?: boolean;
   mergeability_computation_behavior: MergeabilityComputationBehavior;
   conflicts_predicate_enabled?: boolean;
@@ -533,6 +541,7 @@
   actions?: {[viewName: string]: ActionInfo};
   reject_empty_commit?: InheritedBooleanInfo;
   enable_reviewer_by_email: InheritedBooleanInfo;
+  ref_storage?: RefStorage;
 }
 
 /**
@@ -1085,7 +1094,7 @@
  * https://gerrit-review.googlesource.com/Documentation/rest-api-config.html#receive-info
  */
 export declare interface ReceiveInfo {
-  enable_signed_push?: string;
+  enable_signed_push?: boolean;
 }
 
 export type RepoName = BrandType<string, '_repoName'>;
@@ -1199,6 +1208,17 @@
 }
 
 /**
+ * Describes the change-scoped permissions of the calling user on a change.
+ * https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#change-permissions-info
+ *
+ * `permissions` lists the names of the granted permissions (e.g.
+ * 'aiReview'); a name is present if and only if the permission is granted.
+ */
+export declare interface ChangePermissionsInfo {
+  permissions?: string[];
+}
+
+/**
  * The push options that can be specified by the user on push
  * https://gerrit-review.googlesource.com/Documentation/rest-api-config.html#validation-option-info
  */
diff --git a/polygerrit-ui/app/api/styles.ts b/polygerrit-ui/app/api/styles.ts
index cc5924c..4cfd716 100644
--- a/polygerrit-ui/app/api/styles.ts
+++ b/polygerrit-ui/app/api/styles.ts
@@ -28,6 +28,7 @@
   form: Style;
   material: Style;
   menuPage: Style;
+  shared: Style;
   spinner: Style;
   subPage: Style;
   table: Style;
diff --git a/polygerrit-ui/app/api/suggestions.ts b/polygerrit-ui/app/api/suggestions.ts
index 8ea6302..8dfcfcf 100644
--- a/polygerrit-ui/app/api/suggestions.ts
+++ b/polygerrit-ui/app/api/suggestions.ts
@@ -49,6 +49,14 @@
   suggestCode?(commentData: SuggestCodeRequest): Promise<SuggestCodeResponse>;
   suggestFix?(commentData: SuggestCodeRequest): Promise<SuggestedFixResponse>;
   /**
+   * Called when a user explicitly clicks "Get AI Fix" (for example, on a
+   * published comment thread or a check result). Falls back to `suggestFix` if
+   * not implemented. Plugins that delegate fix resolution externally (for
+   * example, to a chat panel) may return `{responseCode: ResponseCode.OK,
+   * fix_suggestions: []}` to suppress the "no fix found" notification.
+   */
+  requestAiFix?(commentData: SuggestCodeRequest): Promise<SuggestedFixResponse>;
+  /**
    * Gets the title to display on the fix suggestion preview.
    *
    * @param fix_suggestions A list of suggested fixes.
diff --git a/polygerrit-ui/app/api/tsconfig.publish.json b/polygerrit-ui/app/api/tsconfig.publish.json
index 4402487..fc06932 100644
--- a/polygerrit-ui/app/api/tsconfig.publish.json
+++ b/polygerrit-ui/app/api/tsconfig.publish.json
@@ -1,4 +1,7 @@
 {
   "extends": "./tsconfig-plugins-base.json",
+  "compilerOptions": {
+    "types": []
+  },
   "include": ["./**/*.ts"]
 }
diff --git a/polygerrit-ui/app/constants/constants.ts b/polygerrit-ui/app/constants/constants.ts
index f9bf9f6..968021a 100644
--- a/polygerrit-ui/app/constants/constants.ts
+++ b/polygerrit-ui/app/constants/constants.ts
@@ -23,6 +23,7 @@
   InheritedBooleanInfoConfiguredValue,
   MergeabilityComputationBehavior,
   ProblemInfoStatus,
+  RefStorage,
   RepoState,
   RequirementStatus,
   ReviewerState,
@@ -44,6 +45,7 @@
   InheritedBooleanInfoConfiguredValue,
   MergeabilityComputationBehavior,
   ProblemInfoStatus,
+  RefStorage,
   RepoState,
   RequirementStatus,
   ReviewerState,
diff --git a/polygerrit-ui/app/constants/reporting.ts b/polygerrit-ui/app/constants/reporting.ts
index 96bbcfd..ea4cfd5a 100644
--- a/polygerrit-ui/app/constants/reporting.ts
+++ b/polygerrit-ui/app/constants/reporting.ts
@@ -107,6 +107,10 @@
   COMMENT_COMPLETION = 'CommentCompletion',
   // Time for AI chat requests to complete
   AI_CHAT_REQUEST = 'AiChatRequest',
+  // Time to load stack diff file list and initial file diff
+  STACK_DIFF_LOAD = 'StackDiffLoad',
+  // Time to load a single file diff in the stack diff dialog
+  STACK_DIFF_FILE_LOAD = 'StackDiffFileLoad',
 }
 
 export enum Interaction {
@@ -192,6 +196,10 @@
   AI_CHAT_FAILURE = 'ai-chat-failure',
   // Revert hunk clicked in diff edit mode
   REVERT_DELTA_CLICKED = 'revert-delta-clicked',
+  STACK_DIFF_DIALOG_OPENED = 'stack-diff-dialog-opened',
+  STACK_DIFF_RANGE_CHANGED = 'stack-diff-range-changed',
+  STACK_DIFF_FILE_SELECTED = 'stack-diff-file-selected',
+  STACK_DIFF_RESET_CHAIN = 'stack-diff-reset-chain',
 }
 
 /**
diff --git a/polygerrit-ui/app/elements/admin/gr-admin-view/gr-admin-view_test.ts b/polygerrit-ui/app/elements/admin/gr-admin-view/gr-admin-view_test.ts
index 2f9d901..db593d5 100644
--- a/polygerrit-ui/app/elements/admin/gr-admin-view/gr-admin-view_test.ts
+++ b/polygerrit-ui/app/elements/admin/gr-admin-view/gr-admin-view_test.ts
@@ -598,7 +598,7 @@
         await element.updateComplete;
         const selected = queryAndAssert(element, 'gr-page-nav .selected');
         assert.isOk(selected);
-        assert.equal(selected.textContent!.trim(), 'Repositories');
+        assert.equal(selected.textContent.trim(), 'Repositories');
       });
 
       test('repo', async () => {
@@ -612,7 +612,7 @@
         await element.updateComplete;
         const selected = queryAndAssert(element, 'gr-page-nav .selected');
         assert.isOk(selected);
-        assert.equal(selected.textContent!.trim(), 'foo');
+        assert.equal(selected.textContent.trim(), 'foo');
       });
 
       test('repo access', async () => {
@@ -627,7 +627,7 @@
         await element.updateComplete;
         const selected = queryAndAssert(element, 'gr-page-nav .selected');
         assert.isOk(selected);
-        assert.equal(selected.textContent!.trim(), 'Access');
+        assert.equal(selected.textContent.trim(), 'Access');
       });
 
       test('repo dashboards', async () => {
@@ -642,7 +642,7 @@
         await element.updateComplete;
         const selected = queryAndAssert(element, 'gr-page-nav .selected');
         assert.isOk(selected);
-        assert.equal(selected.textContent!.trim(), 'Dashboards');
+        assert.equal(selected.textContent.trim(), 'Dashboards');
       });
     });
 
@@ -676,7 +676,7 @@
         await element.updateComplete;
         const selected = queryAndAssert(element, 'gr-page-nav .selected');
         assert.isOk(selected);
-        assert.equal(selected.textContent!.trim(), 'Groups');
+        assert.equal(selected.textContent.trim(), 'Groups');
       });
 
       test('internal group', async () => {
@@ -696,7 +696,7 @@
         assert.isTrue(element.groupIsInternal);
         const selected = queryAndAssert(element, 'gr-page-nav .selected');
         assert.isOk(selected);
-        assert.equal(selected.textContent!.trim(), 'foo');
+        assert.equal(selected.textContent.trim(), 'foo');
       });
 
       test('external group', async () => {
@@ -722,7 +722,7 @@
         assert.isFalse(element.groupIsInternal);
         const selected = queryAndAssert(element, 'gr-page-nav .selected');
         assert.isOk(selected);
-        assert.equal(selected.textContent!.trim(), 'foo');
+        assert.equal(selected.textContent.trim(), 'foo');
       });
 
       test('group members', async () => {
@@ -737,7 +737,7 @@
         await element.updateComplete;
         const selected = queryAndAssert(element, 'gr-page-nav .selected');
         assert.isOk(selected);
-        assert.equal(selected.textContent!.trim(), 'Members');
+        assert.equal(selected.textContent.trim(), 'Members');
       });
     });
   });
diff --git a/polygerrit-ui/app/elements/admin/gr-create-repo-dialog/gr-create-repo-dialog.ts b/polygerrit-ui/app/elements/admin/gr-create-repo-dialog/gr-create-repo-dialog.ts
index e8d1c70..ebd388b 100644
--- a/polygerrit-ui/app/elements/admin/gr-create-repo-dialog/gr-create-repo-dialog.ts
+++ b/polygerrit-ui/app/elements/admin/gr-create-repo-dialog/gr-create-repo-dialog.ts
@@ -11,6 +11,8 @@
   ProjectInput,
   RepoName,
 } from '../../../types/common';
+import {MdCheckbox} from '@material/web/checkbox/checkbox';
+import {RefStorage} from '../../../constants/constants';
 import {AutocompleteQuery} from '../../shared/gr-autocomplete/gr-autocomplete';
 import {getAppContext} from '../../../services/app-context';
 import {convertToString} from '../../../utils/string-util';
@@ -56,6 +58,7 @@
     permissions_only: false,
     name: '' as RepoName,
     branches: [],
+    ref_storage: RefStorage.FILES,
   };
 
   /* private but used in test */
@@ -270,6 +273,28 @@
               </span>
             </div>
           </section>
+          <section>
+            <div class="title-flex">
+              <span class="title">
+                <gr-tooltip-content
+                  has-tooltip
+                  title="Store references using the reftable backend instead of the default files backend."
+                >
+                  Reftable <gr-icon icon="info"></gr-icon>
+                </gr-tooltip-content>
+              </span>
+            </div>
+            <div class="value-flex">
+              <span class="value">
+                <md-checkbox
+                  id="reftable"
+                  ?checked=${this.repoConfig.ref_storage ===
+                  RefStorage.REFTABLE}
+                  @change=${this.handleReftableChanged}
+                ></md-checkbox>
+              </span>
+            </div>
+          </section>
         </div>
       </div>
     `;
@@ -355,6 +380,14 @@
     };
   }
 
+  private handleReftableChanged(e: Event) {
+    const checked = (e.target as MdCheckbox).checked;
+    this.repoConfig = {
+      ...this.repoConfig,
+      ref_storage: checked ? RefStorage.REFTABLE : RefStorage.FILES,
+    };
+  }
+
   private handlePermissionsOnlyChangeChanged() {
     this.repoConfig = {
       ...this.repoConfig,
diff --git a/polygerrit-ui/app/elements/admin/gr-create-repo-dialog/gr-create-repo-dialog_test.ts b/polygerrit-ui/app/elements/admin/gr-create-repo-dialog/gr-create-repo-dialog_test.ts
index aeb0d32..075f5bb 100644
--- a/polygerrit-ui/app/elements/admin/gr-create-repo-dialog/gr-create-repo-dialog_test.ts
+++ b/polygerrit-ui/app/elements/admin/gr-create-repo-dialog/gr-create-repo-dialog_test.ts
@@ -12,6 +12,7 @@
   stubRestApi,
 } from '../../../test/test-utils';
 import {BranchName, GroupId, RepoName} from '../../../types/common';
+import {RefStorage} from '../../../constants/constants';
 import {GrAutocomplete} from '../../shared/gr-autocomplete/gr-autocomplete';
 import {assert, fixture, html} from '@open-wc/testing';
 import {MdCheckbox} from '@material/web/checkbox/checkbox';
@@ -142,6 +143,24 @@
                 </span>
               </div>
             </section>
+            <section>
+              <div class="title-flex">
+                <span class="title">
+                  <gr-tooltip-content
+                    has-tooltip=""
+                    title="Store references using the reftable backend instead of the default files backend."
+                  >
+                    Reftable
+                    <gr-icon icon="info"> </gr-icon>
+                  </gr-tooltip-content>
+                </span>
+              </div>
+              <div class="value-flex">
+                <span class="value">
+                  <md-checkbox id="reftable"> </md-checkbox>
+                </span>
+              </div>
+            </section>
           </div>
         </div>
       `
@@ -155,12 +174,36 @@
     assert.isFalse(queryAndAssert<MdCheckbox>(element, '#parentRepo').checked);
   });
 
+  test('reftable checkbox shown and defaults to files', () => {
+    const checkbox = queryAndAssert<MdCheckbox>(element, '#reftable');
+    assert.isFalse(checkbox.checked);
+    assert.equal(element.repoConfig.ref_storage, RefStorage.FILES);
+  });
+
+  test('reftable checkbox toggles ref storage', async () => {
+    const checkbox = queryAndAssert<MdCheckbox>(element, '#reftable');
+    checkbox.checked = true;
+    checkbox.dispatchEvent(
+      new Event('change', {bubbles: true, composed: true})
+    );
+    await element.updateComplete;
+    assert.equal(element.repoConfig.ref_storage, RefStorage.REFTABLE);
+
+    checkbox.checked = false;
+    checkbox.dispatchEvent(
+      new Event('change', {bubbles: true, composed: true})
+    );
+    await element.updateComplete;
+    assert.equal(element.repoConfig.ref_storage, RefStorage.FILES);
+  });
+
   test('repo created', async () => {
     const configInputObj = {
       name: 'test-repo-new' as RepoName,
       create_empty_commit: true,
       parent: 'All-Project' as RepoName,
       permissions_only: false,
+      ref_storage: RefStorage.FILES,
     };
 
     const saveStub = stubRestApi('createRepo').returns(
@@ -177,6 +220,7 @@
       create_empty_commit: true,
       parent: 'All-Project' as RepoName,
       permissions_only: false,
+      ref_storage: RefStorage.FILES,
     };
 
     element.repoOwner = 'test';
diff --git a/polygerrit-ui/app/elements/admin/gr-permission/gr-permission.ts b/polygerrit-ui/app/elements/admin/gr-permission/gr-permission.ts
index 362ab22..827ff3e 100644
--- a/polygerrit-ui/app/elements/admin/gr-permission/gr-permission.ts
+++ b/polygerrit-ui/app/elements/admin/gr-permission/gr-permission.ts
@@ -346,7 +346,7 @@
     if (!this.permission || !this.permission.id || !this.docsBaseUrl) {
       return undefined;
     }
-    let anchor = getAccessDocsAnchor(this.permission.id as string);
+    let anchor = getAccessDocsAnchor(this.permission.id);
     if (!anchor && this.section === 'GLOBAL_CAPABILITIES') {
       anchor = `capability_${this.permission.id}`;
     }
@@ -413,6 +413,7 @@
     this.permission.value.exclusive = (e.target as MdSwitch).selected;
     // Allows overall access page to know a change has been made.
     fire(this, 'access-modified', {});
+    this.requestUpdate();
   }
 
   handleRemovePermission() {
diff --git a/polygerrit-ui/app/elements/admin/gr-permission/gr-permission_test.ts b/polygerrit-ui/app/elements/admin/gr-permission/gr-permission_test.ts
index 2f268e0..1350886 100644
--- a/polygerrit-ui/app/elements/admin/gr-permission/gr-permission_test.ts
+++ b/polygerrit-ui/app/elements/admin/gr-permission/gr-permission_test.ts
@@ -507,16 +507,43 @@
       element.section = 'refs/*' as GitRef;
       await element.updateComplete;
 
+      const exclusiveToggle = queryAndAssert<MdSwitch>(
+        element,
+        '#exclusiveToggle'
+      );
+      const rightContainer = queryAndAssert(element, '.right');
+      const getRightText = () =>
+        rightContainer.textContent?.replace(/\s+/g, ' ').trim();
+
       assert.isFalse(element.originalExclusiveValue);
       assert.isNotOk(element.permission!.value.modified);
-      queryAndAssert<MdSwitch>(element, '#exclusiveToggle').click();
+      assert.isFalse(exclusiveToggle.selected);
+      assert.equal(getRightText(), 'Not Exclusive Remove');
+
+      exclusiveToggle.click();
       await element.updateComplete;
       assert.isTrue(element.permission!.value.exclusive);
       assert.isTrue(element.permission!.value.modified);
       assert.isFalse(element.originalExclusiveValue);
+      assert.isTrue(exclusiveToggle.selected);
+      assert.equal(getRightText(), 'Exclusive Remove');
+
+      exclusiveToggle.click();
+      await element.updateComplete;
+      assert.isFalse(element.permission!.value.exclusive);
+      assert.isFalse(exclusiveToggle.selected);
+      assert.equal(getRightText(), 'Not Exclusive Remove');
+
+      exclusiveToggle.click();
+      await element.updateComplete;
+      assert.isTrue(element.permission!.value.exclusive);
+      assert.equal(getRightText(), 'Exclusive Remove');
+
       element.editing = false;
       await element.updateComplete;
       assert.isFalse(element.permission!.value.exclusive);
+      assert.isFalse(exclusiveToggle.selected);
+      assert.equal(getRightText(), 'Not Exclusive Remove');
     });
 
     test('modifying emits access-modified event', async () => {
diff --git a/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access.ts b/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access.ts
index afd1849..3bac38d 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access.ts
+++ b/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access.ts
@@ -610,10 +610,7 @@
       return addRemoveObj;
     }
 
-    this.recursivelyUpdateAddRemoveObj(
-      this.local as unknown as PropertyTreeNode,
-      addRemoveObj
-    );
+    this.recursivelyUpdateAddRemoveObj(this.local, addRemoveObj);
 
     if (inheritFromChanged) {
       addRemoveObj.parent = inheritsFromId;
diff --git a/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access_test.ts b/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access_test.ts
index 49463bd..18b2b1c 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access_test.ts
+++ b/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access_test.ts
@@ -198,10 +198,10 @@
     const accessStub = stubRestApi('getRepoAccessRights');
 
     accessStub
-      .withArgs('New Repo' as RepoName)
+      .withArgs('New Repo')
       .returns(Promise.resolve(JSON.parse(JSON.stringify(accessRes))));
     accessStub
-      .withArgs('Another New Repo' as RepoName)
+      .withArgs('Another New Repo')
       .returns(Promise.resolve(JSON.parse(JSON.stringify(accessRes2))));
     const capabilitiesStub = stubRestApi('getCapabilities');
     capabilitiesStub.returns(Promise.resolve(capabilitiesRes));
diff --git a/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list.ts b/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list.ts
index 9845490..05c956a 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list.ts
+++ b/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list.ts
@@ -65,6 +65,8 @@
 
   @state() isOwner = false;
 
+  @state() private canAdd = false;
+
   @state() loggedIn = false;
 
   @state() offset = 0;
@@ -159,7 +161,8 @@
     if (!this.detailType) return nothing;
     return html`
       <gr-list-view
-        .createNew=${this.loggedIn}
+        .createNew=${this.loggedIn &&
+        (this.detailType !== RepoDetailView.BRANCHES || this.canAdd)}
         .createNewText=${this.detailType === RepoDetailView.BRANCHES
           ? 'Create Branch'
           : ' Create Tag'}
@@ -371,10 +374,12 @@
   }
 
   // private but used in test
-  determineIfOwner(repo: RepoName) {
-    return this.restApiService
-      .getRepoAccess(repo)
-      .then(access => (this.isOwner = !!access?.[repo]?.is_owner));
+  determineRepoAccess(repo: RepoName) {
+    this.canAdd = false;
+    return this.restApiService.getRepoAccess(repo).then(access => {
+      this.isOwner = !!access?.[repo]?.is_owner;
+      this.canAdd = !!access?.[repo]?.can_add;
+    });
   }
 
   // private but used in test
@@ -397,7 +402,7 @@
     this.getLoggedIn().then(loggedIn => {
       this.loggedIn = loggedIn;
       if (loggedIn && this.repo) {
-        this.determineIfOwner(this.repo);
+        this.determineRepoAccess(this.repo);
       }
     });
 
diff --git a/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list_test.ts b/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list_test.ts
index 2def741..c5ddb8e 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list_test.ts
+++ b/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list_test.ts
@@ -20,7 +20,6 @@
   GitRef,
   GroupId,
   GroupName,
-  RepoAccessGroups,
   RepoAccessInfoMap,
   RepoName,
   TagInfo,
@@ -86,6 +85,74 @@
 }
 
 suite('gr-repo-detail-list', () => {
+  suite('creation button visibility', () => {
+    for (const {detail, loggedIn, canAdd, visible} of [
+      {
+        detail: RepoDetailView.BRANCHES,
+        loggedIn: true,
+        canAdd: true,
+        visible: true,
+      },
+      {
+        detail: RepoDetailView.BRANCHES,
+        loggedIn: true,
+        canAdd: false,
+        visible: false,
+      },
+      {
+        detail: RepoDetailView.BRANCHES,
+        loggedIn: true,
+        canAdd: undefined,
+        visible: false,
+      },
+      {
+        detail: RepoDetailView.BRANCHES,
+        loggedIn: false,
+        canAdd: true,
+        visible: false,
+      },
+      {
+        detail: RepoDetailView.TAGS,
+        loggedIn: true,
+        canAdd: undefined,
+        visible: true,
+      },
+      {
+        detail: RepoDetailView.TAGS,
+        loggedIn: false,
+        canAdd: undefined,
+        visible: false,
+      },
+    ] as const) {
+      test(`${detail}, logged in: ${loggedIn}, can_add: ${canAdd}`, async () => {
+        stubRestApi('getRepoAccess').resolves({
+          test: {
+            revision: 'xxxx',
+            local: {},
+            owner_of: [],
+            groups: {},
+            config_web_links: [],
+            can_add: canAdd,
+          },
+        });
+        const element = await fixture<GrRepoDetailList>(
+          html`<gr-repo-detail-list></gr-repo-detail-list>`
+        );
+        element.repo = 'test' as RepoName;
+        element.detailType = detail;
+        element.loggedIn = loggedIn;
+        await element.determineRepoAccess(element.repo);
+        await element.updateComplete;
+        const list = queryAndAssert<GrListView>(element, 'gr-list-view');
+        await list.updateComplete;
+        assert.equal(
+          queryAndAssert<GrButton>(list, '#createNew').hidden,
+          !visible
+        );
+      });
+    }
+  });
+
   suite('Branches', () => {
     let element: GrRepoDetailList;
     let branches: BranchInfo[];
@@ -2021,12 +2088,12 @@
                   url: 'test',
                   name: 'test' as GroupName,
                 },
-              } as RepoAccessGroups,
+              },
               config_web_links: [{name: 'gitiles', url: 'test'}],
             },
           } as RepoAccessInfoMap)
         );
-        await element.determineIfOwner('test' as RepoName);
+        await element.determineRepoAccess('test' as RepoName);
         assert.equal(element.isOwner, false);
         assert.equal(
           getComputedStyle(
@@ -2075,7 +2142,7 @@
                   url: 'test',
                   name: 'test' as GroupName,
                 },
-              } as RepoAccessGroups,
+              },
               config_web_links: [{name: 'gitiles', url: 'test'}],
             },
           } as RepoAccessInfoMap)
@@ -2084,7 +2151,7 @@
           element,
           'handleSaveRevision'
         );
-        await element.determineIfOwner('test' as RepoName);
+        await element.determineRepoAccess('test' as RepoName);
         assert.equal(element.isOwner, true);
         // The revision container for non-editing enabled row is not visible.
         assert.equal(getComputedStyle(revisionNoEditing).display, 'none');
diff --git a/polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list_test.ts b/polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list_test.ts
index 13e1cc7..b8539ab 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list_test.ts
+++ b/polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list_test.ts
@@ -534,7 +534,7 @@
         adminView: AdminChildView.REPOS,
         filter: 'test',
         offset: 25,
-      } as AdminViewState;
+      };
       await element._paramsChanged();
       assert.isTrue(repoStub.lastCall.calledWithExactly('test', 25, 25));
     });
diff --git a/polygerrit-ui/app/elements/admin/gr-repo-submit-requirements/gr-repo-submit-requirements-template-dialog.ts b/polygerrit-ui/app/elements/admin/gr-repo-submit-requirements/gr-repo-submit-requirements-template-dialog.ts
index 746efa1..7da64f0 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo-submit-requirements/gr-repo-submit-requirements-template-dialog.ts
+++ b/polygerrit-ui/app/elements/admin/gr-repo-submit-requirements/gr-repo-submit-requirements-template-dialog.ts
@@ -15,6 +15,7 @@
 import {materialStyles} from '../../../styles/gr-material-styles';
 import '../../shared/gr-button/gr-button';
 import {tableStyles} from '../../../styles/gr-table-styles';
+import '../../shared/gr-dialog/gr-dialog';
 
 @customElement('gr-repo-submit-requirements-template-dialog')
 export class GrRepoSubmitRequirementsTemplateDialog extends LitElement {
diff --git a/polygerrit-ui/app/elements/admin/gr-repo-submit-requirements/gr-repo-submit-requirements.ts b/polygerrit-ui/app/elements/admin/gr-repo-submit-requirements/gr-repo-submit-requirements.ts
index ccd70c5..775cc1b 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo-submit-requirements/gr-repo-submit-requirements.ts
+++ b/polygerrit-ui/app/elements/admin/gr-repo-submit-requirements/gr-repo-submit-requirements.ts
@@ -35,6 +35,7 @@
 import {MdCheckbox} from '@material/web/checkbox/checkbox';
 import './gr-repo-submit-requirements-template-dialog';
 import {GrRepoSubmitRequirementsTemplateDialog} from './gr-repo-submit-requirements-template-dialog';
+import '../../shared/gr-dialog/gr-dialog';
 
 @customElement('gr-repo-submit-requirements')
 export class GrRepoSubmitRequirements extends LitElement {
diff --git a/polygerrit-ui/app/elements/admin/gr-repo-submit-requirements/gr-repo-submit-requirements_test.ts b/polygerrit-ui/app/elements/admin/gr-repo-submit-requirements/gr-repo-submit-requirements_test.ts
index dec430a..90cb7ed 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo-submit-requirements/gr-repo-submit-requirements_test.ts
+++ b/polygerrit-ui/app/elements/admin/gr-repo-submit-requirements/gr-repo-submit-requirements_test.ts
@@ -181,7 +181,7 @@
             </table>
           </gr-list-view>
           <dialog id="createDialog" tabindex="-1">
-            <gr-dialog>
+            <gr-dialog role="dialog">
               <div class="header" slot="header">Create Submit Requirement</div>
               <div class="main" slot="main">
                 <div class="gr-form-styles">
@@ -336,7 +336,7 @@
         id="deleteDialog"
         tabindex="-1"
       >
-        <gr-dialog>
+        <gr-dialog role="dialog">
           <div
             class="header"
             slot="header"
@@ -449,7 +449,7 @@
               submittability_expression: 'label:Verified=+1',
               override_expression: 'ownerin:Project-Owners',
               allow_override_in_child_projects: true,
-            } as SubmitRequirementInfo,
+            },
           },
           bubbles: true,
           composed: true,
diff --git a/polygerrit-ui/app/elements/admin/gr-repo/gr-repo.ts b/polygerrit-ui/app/elements/admin/gr-repo/gr-repo.ts
index e4fc88d..dd45e63 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo/gr-repo.ts
+++ b/polygerrit-ui/app/elements/admin/gr-repo/gr-repo.ts
@@ -6,6 +6,7 @@
 import '../../plugins/gr-endpoint-decorator/gr-endpoint-decorator';
 import '../../plugins/gr-endpoint-param/gr-endpoint-param';
 import '../../shared/gr-button/gr-button';
+import '../../shared/gr-dialog/gr-dialog';
 import '../../shared/gr-download-commands/gr-download-commands';
 import '../gr-repo-plugin-config/gr-repo-plugin-config';
 import {navigationToken} from '../../core/gr-navigation/gr-navigation';
@@ -22,11 +23,16 @@
 } from '../../../types/common';
 import {
   InheritedBooleanInfoConfiguredValue,
+  RefStorage,
   RepoState,
   SubmitType,
 } from '../../../constants/constants';
 import {assertIsDefined, hasOwnProperty} from '../../../utils/common-util';
-import {firePageError, fireTitleChange} from '../../../utils/event-util';
+import {
+  fireAlert,
+  firePageError,
+  fireTitleChange,
+} from '../../../utils/event-util';
 import {getAppContext} from '../../../services/app-context';
 import {WebLinkInfo} from '../../../types/diff';
 import {ErrorCallback} from '../../../api/rest';
@@ -37,7 +43,7 @@
 import {BindValueChangeEvent} from '../../../types/events';
 import {deepClone} from '../../../utils/deep-util';
 import {css, html, LitElement, nothing, PropertyValues} from 'lit';
-import {customElement, property, state} from 'lit/decorators.js';
+import {customElement, property, query, state} from 'lit/decorators.js';
 import {createChangeUrl} from '../../../models/views/change';
 import {when} from 'lit/directives/when.js';
 import {subscribe} from '../../lit/subscription-controller';
@@ -50,11 +56,15 @@
 import {Command} from '../../shared/gr-download-commands/gr-download-commands';
 import '@material/web/textfield/outlined-text-field';
 import {materialStyles} from '../../../styles/gr-material-styles';
+import {modalStyles} from '../../../styles/gr-modal-styles';
 import '../../shared/gr-autogrow-textarea/gr-autogrow-textarea';
 import {GrAutogrowTextarea} from '../../shared/gr-autogrow-textarea/gr-autogrow-textarea';
 import {formStyles} from '../../../styles/form-styles';
 import '@material/web/select/outlined-select';
 import '@material/web/select/select-option';
+import '@material/web/checkbox/checkbox';
+import {MdCheckbox} from '@material/web/checkbox/checkbox';
+import '../../shared/gr-icon/gr-icon';
 
 const STATES = {
   active: {value: RepoState.ACTIVE, label: 'Active'},
@@ -113,6 +123,9 @@
   @state() readOnly = true;
 
   // private but used in test
+  @state() isAdmin = false;
+
+  // private but used in test
   @state() disableSaveWithoutReview = true;
 
   @state() private states = Object.values(STATES);
@@ -130,6 +143,13 @@
 
   @state() private pluginConfigChanged = false;
 
+  @state() private isConverting = false;
+
+  @state() private keepBackup = false;
+
+  @query('#convertRefStorageModal')
+  private readonly convertRefStorageModal?: HTMLDialogElement;
+
   private readonly getUserModel = resolve(this, userModelToken);
 
   private readonly restApiService = getAppContext().restApiService;
@@ -155,6 +175,11 @@
       () => this.getConfigModel().serverConfig$,
       config => (this.serverConfig = config)
     );
+    subscribe(
+      this,
+      () => this.getUserModel().isAdmin$,
+      isAdmin => (this.isAdmin = isAdmin)
+    );
   }
 
   override connectedCallback() {
@@ -171,10 +196,35 @@
       grFormStyles,
       subpageStyles,
       sharedStyles,
+      modalStyles,
       css`
         .info {
           margin-bottom: var(--spacing-xl);
         }
+        #convertRefStorageBtn {
+          margin-left: var(--spacing-m);
+        }
+        #keepBackupOption {
+          align-items: center;
+          display: flex;
+          gap: var(--spacing-s);
+        }
+        #keepBackupOption label {
+          cursor: pointer;
+        }
+        /* Pin a stable width so toggling the backup option, which changes the
+           amount of body text, does not resize the dialog. */
+        #convertRefStorageModal gr-dialog {
+          width: calc(min(36em, 90vw));
+        }
+        .warning {
+          color: var(--warning-foreground);
+        }
+        .warning gr-icon {
+          color: var(--warning-icon-color);
+          vertical-align: bottom;
+          margin-right: var(--spacing-s);
+        }
         h2.edited:after {
           color: var(--deemphasized-text-color);
           content: ' *';
@@ -226,8 +276,9 @@
             </h2>
             <div id="form">
               <fieldset>
-                ${this.renderDescription()} ${this.renderRepoOptions()}
-                ${this.renderPluginConfig()}
+                ${this.renderDescription()}
+                ${this.renderRefStorage(configChanged)}
+                ${this.renderRepoOptions()} ${this.renderPluginConfig()}
                 <gr-button
                   id="saveBtn"
                   ?disabled=${this.readOnly ||
@@ -302,6 +353,77 @@
     `;
   }
 
+  private renderRefStorage(configChanged: boolean) {
+    return html`
+      <h3 id="RefStorage" class="heading-3">Ref Storage</h3>
+      <fieldset>
+        <section>
+          <span class="title">Format</span>
+          <span class="value" id="refStorageFormat"
+            >${this.currentRefStorageLabel}</span
+          >
+          ${when(
+            this.showConvertRefStorage,
+            () => html`<gr-button
+              id="convertRefStorageBtn"
+              ?disabled=${this.readOnly || configChanged || this.isConverting}
+              title=${configChanged
+                ? 'Save or discard configuration edits before converting'
+                : nothing}
+              @click=${() => {
+                // Reset on open as well as on @close, so the dialog is always
+                // shown unchecked even if a prior instance was torn down while
+                // open (e.g. the convert affordance disappeared mid-dialog).
+                this.keepBackup = false;
+                this.convertRefStorageModal?.showModal();
+              }}
+              >Convert to ${this.convertTargetLabel}</gr-button
+            >`
+          )}
+        </section>
+      </fieldset>
+      ${when(
+        this.showConvertRefStorage,
+        () => html`<dialog
+          id="convertRefStorageModal"
+          tabindex="-1"
+          @close=${() => {
+            this.keepBackup = false;
+          }}
+        >
+          <gr-dialog
+            confirm-label="Convert"
+            @confirm=${this.handleConvertRefStorageConfirm}
+            @cancel=${() => this.convertRefStorageModal?.close()}
+          >
+            <div class="header" slot="header">
+              Convert to ${this.convertTargetLabel}
+            </div>
+            <div class="main" slot="main">
+              <p>
+                Convert ${this.repo} to the ${this.convertTargetLabel} ref
+                storage backend?
+              </p>
+              <section id="keepBackupOption">
+                <md-checkbox
+                  id="keepBackupCheckbox"
+                  ?checked=${this.keepBackup}
+                  @change=${(e: Event) => {
+                    this.keepBackup = (e.target as MdCheckbox).checked;
+                  }}
+                ></md-checkbox>
+                <label for="keepBackupCheckbox"
+                  >Keep a backup of the previous ref storage</label
+                >
+              </section>
+              ${this.renderConvertBackupNote()}
+            </div>
+          </gr-dialog>
+        </dialog>`
+      )}
+    `;
+  }
+
   private renderRepoOptions() {
     return html`
       <h3 id="Options" class="heading-3">Repository Options</h3>
@@ -628,8 +750,7 @@
           <md-outlined-text-field
             id="maxGitObjSizeInput"
             class="showBlueFocusBorder"
-            type="number"
-            min="0"
+            type="text"
             ?disabled=${this.readOnly}
             .value=${this.repoConfig?.max_object_size_limit?.configured_value ??
             ''}
@@ -936,6 +1057,10 @@
     const configInputObj: ConfigInput = {};
     for (const configKey of Object.keys(repoConfig)) {
       const key = configKey as keyof ConfigInfo;
+      if (key === 'ref_storage') {
+        // This is changed only through the dedicated conversion endpoint.
+        continue;
+      }
       if (key === 'default_submit_type') {
         // default_submit_type is not in the input type, and the
         // configured value was already copied to submit_type by
@@ -998,6 +1123,77 @@
       });
   }
 
+  // Conversion requires the global administrateServer capability.
+  private get showConvertRefStorage() {
+    return this.isAdmin && this.repoConfig?.ref_storage !== undefined;
+  }
+
+  private get convertTarget(): RefStorage {
+    return this.repoConfig?.ref_storage === RefStorage.REFTABLE
+      ? RefStorage.FILES
+      : RefStorage.REFTABLE;
+  }
+
+  private refStorageLabel(storage?: RefStorage) {
+    return storage === RefStorage.REFTABLE ? 'Reftable' : 'Files';
+  }
+
+  private get convertTargetLabel() {
+    return this.refStorageLabel(this.convertTarget);
+  }
+
+  private get currentRefStorageLabel() {
+    return this.refStorageLabel(this.repoConfig?.ref_storage);
+  }
+
+  private renderConvertBackupNote() {
+    if (!this.keepBackup) {
+      return html`<p>The previous ref storage is removed after conversion.</p>`;
+    }
+    // Only converting away from reftable is hazardous: the old reftable/ dir is
+    // left in place and blocks a later conversion back. The .old files from a
+    // files->reftable conversion are harmless.
+    if (this.convertTarget === RefStorage.FILES) {
+      return html`<div class="warning">
+        <gr-icon icon="warning"></gr-icon>
+        The previous ${this.currentRefStorageLabel} ref storage is kept as a
+        backup. A later conversion back to ${this.currentRefStorageLabel} will
+        fail until the leftover reftable directory is removed manually.
+      </div>`;
+    }
+    return html`<p>
+      The previous ${this.currentRefStorageLabel} ref storage is kept as a
+      backup. Remove it manually when no longer needed.
+    </p>`;
+  }
+
+  async handleConvertRefStorageConfirm() {
+    const repo = this.repo;
+    const targetName = this.convertTargetLabel;
+    const target = this.convertTarget;
+    // Snapshot the backup choice before closing the dialog, since closing it
+    // resets keepBackup via the dialog's @close handler.
+    const backup = this.keepBackup;
+    this.convertRefStorageModal?.close();
+    if (!repo || !this.showConvertRefStorage || this.hasConfigChanged()) return;
+    if (this.isConverting) return;
+    this.isConverting = true;
+    try {
+      // convertRepoRefStorage reports failures itself (reportServerError),
+      // so only react to success here, like handleSaveRepoConfig.
+      const response = await this.restApiService.convertRepoRefStorage(
+        repo,
+        target,
+        backup
+      );
+      if (!response?.ok) return;
+      fireAlert(this, `Converted ${repo} to ${targetName}`);
+      await this.loadRepo();
+    } finally {
+      this.isConverting = false;
+    }
+  }
+
   private isEdited(
     original?: InheritedBooleanInfo | MaxObjectSizeLimitInfo,
     repo?: InheritedBooleanInfo | MaxObjectSizeLimitInfo
diff --git a/polygerrit-ui/app/elements/admin/gr-repo/gr-repo_test.ts b/polygerrit-ui/app/elements/admin/gr-repo/gr-repo_test.ts
index d974130..ce1595e 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo/gr-repo_test.ts
+++ b/polygerrit-ui/app/elements/admin/gr-repo/gr-repo_test.ts
@@ -30,7 +30,6 @@
   MaxObjectSizeLimitInfo,
   PluginParameterToConfigParameterInfoMap,
   ProjectAccessInfo,
-  RepoAccessGroups,
   RepoAccessInfoMap,
   RepoName,
 } from '../../../types/common';
@@ -38,6 +37,7 @@
   ConfigParameterInfoType,
   InheritedBooleanInfoConfiguredValue,
   PermissionAction,
+  RefStorage,
   RepoState,
   SubmitType,
 } from '../../../constants/constants';
@@ -52,6 +52,7 @@
 import {MdOutlinedTextField} from '@material/web/textfield/outlined-text-field';
 import {GrAutogrowTextarea} from '../../shared/gr-autogrow-textarea/gr-autogrow-textarea';
 import {MdOutlinedSelect} from '@material/web/select/outlined-select';
+import {MdCheckbox} from '@material/web/checkbox/checkbox';
 
 suite('gr-repo tests', () => {
   let element: GrRepo;
@@ -164,6 +165,210 @@
     element = await fixture(html`<gr-repo></gr-repo>`);
   });
 
+  async function setRefStorage(format: RefStorage, isAdmin = true) {
+    element.repo = REPO as RepoName;
+    await element.loadRepo();
+    await element.updateComplete;
+    element.repoConfig = {...repoConf, ref_storage: format};
+    element.isAdmin = isAdmin;
+    element.readOnly = false;
+    await element.updateComplete;
+  }
+
+  test('conversion is hidden for a project owner who is not an administrator', async () => {
+    await setRefStorage(RefStorage.FILES, false);
+    assert.lengthOf(queryAll(element, '#convertRefStorageBtn'), 0);
+  });
+
+  for (const format of [RefStorage.FILES, RefStorage.REFTABLE]) {
+    test(`converts from ${format} and reloads configuration`, async () => {
+      await setRefStorage(format);
+      const target =
+        format === RefStorage.FILES ? RefStorage.REFTABLE : RefStorage.FILES;
+      const convert = stubRestApi('convertRepoRefStorage').resolves(
+        new Response()
+      );
+      const reload = sinon.stub(element, 'loadRepo').resolves();
+      assert.lengthOf(queryAll(element, '#convertRefStorageBtn'), 1);
+
+      await element.handleConvertRefStorageConfirm();
+
+      assert.isTrue(convert.calledWithExactly(REPO as RepoName, target, false));
+      assert.isTrue(reload.calledOnce);
+    });
+  }
+
+  test('conversion keeps a backup when the option is checked', async () => {
+    await setRefStorage(RefStorage.FILES);
+    const convert = stubRestApi('convertRepoRefStorage').resolves(
+      new Response()
+    );
+    sinon.stub(element, 'loadRepo').resolves();
+    // Confirm calls dialog.close(), which resets keepBackup via @close. The
+    // flag is snapshotted before close, so the conversion still sees backup=true.
+    const dialog = queryAndAssert<HTMLDialogElement>(
+      element,
+      '#convertRefStorageModal'
+    );
+    dialog.showModal();
+    await element.updateComplete;
+    assert.isTrue(dialog.open);
+    const checkbox = queryAndAssert<MdCheckbox>(element, '#keepBackupCheckbox');
+    checkbox.checked = true;
+    checkbox.dispatchEvent(new Event('change'));
+
+    await element.handleConvertRefStorageConfirm();
+
+    assert.isTrue(
+      convert.calledWithExactly(REPO as RepoName, RefStorage.REFTABLE, true)
+    );
+  });
+
+  test('closing the convert dialog resets the backup option', async () => {
+    await setRefStorage(RefStorage.FILES);
+    const convert = stubRestApi('convertRepoRefStorage').resolves(
+      new Response()
+    );
+    sinon.stub(element, 'loadRepo').resolves();
+    const dialog = queryAndAssert<HTMLDialogElement>(
+      element,
+      '#convertRefStorageModal'
+    );
+    dialog.showModal();
+    await element.updateComplete;
+    assert.isTrue(dialog.open);
+    const checkbox = queryAndAssert<MdCheckbox>(element, '#keepBackupCheckbox');
+    checkbox.checked = true;
+    checkbox.dispatchEvent(new Event('change'));
+    await element.updateComplete;
+
+    // Dismiss via dialog.close() (the Cancel/ESC path) so @close runs and clears
+    // the choice. A later conversion must not inherit a stale keep-backup.
+    const closed = new Promise<void>(resolve =>
+      dialog.addEventListener('close', () => resolve(), {once: true})
+    );
+    dialog.close();
+    await closed;
+    await element.updateComplete;
+
+    await element.handleConvertRefStorageConfirm();
+
+    assert.isTrue(
+      convert.calledWithExactly(REPO as RepoName, RefStorage.REFTABLE, false)
+    );
+  });
+
+  // textContent preserves the template's newlines/indentation; collapse them.
+  function normalizedText(el: Element) {
+    return (el.textContent ?? '').replace(/\s+/g, ' ').trim();
+  }
+
+  test('convert-to-reftable backup note keeps backup without a failure warning', async () => {
+    await setRefStorage(RefStorage.FILES);
+    const main = queryAndAssert(element, '#convertRefStorageModal .main');
+    assert.include(normalizedText(main), 'removed after conversion');
+
+    const checkbox = queryAndAssert<MdCheckbox>(element, '#keepBackupCheckbox');
+    checkbox.checked = true;
+    checkbox.dispatchEvent(new Event('change'));
+    await element.updateComplete;
+
+    // Converting away from files leaves only harmless .old files, so no
+    // round-trip failure is claimed.
+    assert.include(normalizedText(main), 'kept as a backup');
+    assert.include(normalizedText(main), 'Remove it manually');
+    assert.notInclude(normalizedText(main), 'will fail');
+  });
+
+  test('convert-to-files backup note warns about the blocked round-trip', async () => {
+    await setRefStorage(RefStorage.REFTABLE);
+    const main = queryAndAssert(element, '#convertRefStorageModal .main');
+
+    const checkbox = queryAndAssert<MdCheckbox>(element, '#keepBackupCheckbox');
+    checkbox.checked = true;
+    checkbox.dispatchEvent(new Event('change'));
+    await element.updateComplete;
+
+    // Converting away from reftable leaves the reftable/ dir, which blocks a
+    // later conversion back to reftable.
+    assert.include(normalizedText(main), 'kept as a backup');
+    assert.include(normalizedText(main), 'will fail');
+    assert.include(normalizedText(main), 'leftover reftable directory');
+  });
+
+  test('opening the convert dialog resets the backup choice', async () => {
+    await setRefStorage(RefStorage.FILES);
+    const convert = stubRestApi('convertRepoRefStorage').resolves(
+      new Response()
+    );
+    sinon.stub(element, 'loadRepo').resolves();
+    const dialog = queryAndAssert<HTMLDialogElement>(
+      element,
+      '#convertRefStorageModal'
+    );
+    const checkbox = queryAndAssert<MdCheckbox>(element, '#keepBackupCheckbox');
+    checkbox.checked = true;
+    checkbox.dispatchEvent(new Event('change'));
+    await element.updateComplete;
+    assert.isTrue(checkbox.checked);
+    assert.isFalse(dialog.open);
+
+    queryAndAssert<GrButton>(element, '#convertRefStorageBtn').click();
+    await element.updateComplete;
+
+    assert.isTrue(dialog.open);
+    assert.isFalse(checkbox.checked);
+
+    await element.handleConvertRefStorageConfirm();
+
+    assert.isTrue(
+      convert.calledWithExactly(REPO as RepoName, RefStorage.REFTABLE, false)
+    );
+  });
+
+  test('ordinary config saves omit the read-only ref storage', () => {
+    const config = {...repoConf, ref_storage: RefStorage.REFTABLE};
+    assert.notProperty(element.formatRepoConfigForSave(config), 'ref_storage');
+  });
+
+  test('conversion does not discard unsaved configuration edits', async () => {
+    await setRefStorage(RefStorage.FILES);
+    element.repoConfig = {
+      ...repoConf,
+      ref_storage: RefStorage.FILES,
+      description: 'Unsaved description',
+    };
+    await element.updateComplete;
+    const convert = stubRestApi('convertRepoRefStorage');
+    assert.isTrue(
+      queryAndAssert<GrButton>(element, '#convertRefStorageBtn').hasAttribute(
+        'disabled'
+      )
+    );
+
+    await element.handleConvertRefStorageConfirm();
+
+    assert.isFalse(convert.called);
+  });
+
+  test('conversion guards against concurrent calls', async () => {
+    await setRefStorage(RefStorage.FILES);
+    let resolveConvert: (value: Response) => void = () => {};
+    const convert = stubRestApi('convertRepoRefStorage').returns(
+      new Promise<Response>(resolve => {
+        resolveConvert = resolve;
+      })
+    );
+    sinon.stub(element, 'loadRepo').resolves();
+
+    const first = element.handleConvertRefStorageConfirm();
+    const second = element.handleConvertRefStorageConfirm();
+    assert.isTrue(convert.calledOnce);
+
+    resolveConvert(new Response());
+    await Promise.all([first, second]);
+  });
+
   test('render', async () => {
     element.repo = REPO as RepoName;
     await element.loadRepo();
@@ -232,6 +437,20 @@
                </fieldset>
                <h3
                  class="heading-3"
+                 id="RefStorage"
+               >
+                 Ref Storage
+               </h3>
+               <fieldset>
+                 <section>
+                   <span class="title"> Format </span>
+                   <span class="value" id="refStorageFormat">
+                     Files
+                   </span>
+                 </section>
+               </fieldset>
+               <h3
+                 class="heading-3"
                  id="Options"
                >
                  Repository Options
@@ -730,8 +949,7 @@
                        disabled=""
                        id="maxGitObjSizeInput"
                        inputmode=""
-                       min="0"
-                       type="number"
+                       type="text"
                      >
                      </md-outlined-text-field>
                    </span>
@@ -1080,7 +1298,7 @@
               url: 'test',
               name: 'test' as GroupName,
             },
-          } as RepoAccessGroups,
+          },
           config_web_links: [{name: 'gitiles', url: 'test'}],
         },
       } as RepoAccessInfoMap)
@@ -1195,7 +1413,7 @@
           url: 'test',
           name: 'test' as GroupName,
         },
-      } as RepoAccessGroups,
+      },
       config_web_links: [{name: 'gitiles', url: 'test'}],
     };
     let getRepoAccessStub: sinon.SinonStub;
@@ -1243,6 +1461,57 @@
       );
     });
 
+    test('max object size limit input accepts unit suffixes', async () => {
+      await element.loadRepo();
+      await element.updateComplete;
+      const input = queryAndAssert<MdOutlinedTextField>(
+        element,
+        '#maxGitObjSizeInput'
+      );
+      input.value = '5m';
+      input.dispatchEvent(new Event('input', {bubbles: true, composed: true}));
+      await element.updateComplete;
+      assert.equal(
+        element.formatRepoConfigForSave(element.repoConfig)
+          .max_object_size_limit,
+        '5m' as MaxObjectSizeLimitInfo
+      );
+    });
+
+    test('max object size limit displays existing value with unit suffix', async () => {
+      repoStub.returns(
+        Promise.resolve({
+          ...repoConf,
+          max_object_size_limit: {
+            value: '5242880',
+            configured_value: '5m' as MaxObjectSizeLimitInfo,
+          },
+        })
+      );
+      await element.loadRepo();
+      await element.updateComplete;
+      const input = queryAndAssert<MdOutlinedTextField>(
+        element,
+        '#maxGitObjSizeInput'
+      );
+      assert.equal(input.value, '5m');
+    });
+
+    test('convert ref storage', async () => {
+      await setRefStorage(RefStorage.FILES);
+      const convertStub = stubRestApi('convertRepoRefStorage').returns(
+        Promise.resolve(new Response())
+      );
+      await element.handleConvertRefStorageConfirm();
+      assert.isTrue(
+        convertStub.calledWithExactly(
+          REPO as RepoName,
+          RefStorage.REFTABLE,
+          false
+        )
+      );
+    });
+
     test('fields update and save correctly', async () => {
       const configInputObj = {
         description: 'new description',
diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item.ts b/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item.ts
index 35bb894..a9c8477 100644
--- a/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item.ts
+++ b/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item.ts
@@ -17,7 +17,6 @@
 import {navigationToken} from '../../core/gr-navigation/gr-navigation';
 import {getDisplayName} from '../../../utils/display-name-util';
 import {getAppContext} from '../../../services/app-context';
-import {truncatePath} from '../../../utils/path-list-util';
 import {isSelf, isServiceUser} from '../../../utils/account-util';
 import {
   AccountInfo,
@@ -280,6 +279,28 @@
         .spacer {
           height: 0;
           overflow: hidden;
+          /* The spacer sets the subject column's preferred width. Cap it so
+             long subjects don't take spare width away from other columns. */
+          max-width: 60ch;
+        }
+        /* The repo cell uses the same container/content/spacer layout as the
+           subject, so it shrinks with the table instead of holding its full
+           width. The spacer wraps, so it doesn't set a large minimum width;
+           min-width keeps enough of the name visible. */
+        .repo .spacer {
+          min-width: 8rem;
+          white-space: normal;
+          overflow-wrap: anywhere;
+        }
+        /* Elide the start of long repo names so the distinctive end of the
+           name stays visible. The inner span keeps the text itself LTR. */
+        .repo .content {
+          direction: rtl;
+          text-align: left;
+        }
+        .repo .content > span {
+          direction: ltr;
+          unicode-bidi: isolate;
         }
         .size gr-tooltip-content {
           margin: -0.4rem -0.6rem;
@@ -420,20 +441,21 @@
             min-width: 0;
             max-width: 100%;
           }
-          .repo {
+          .repo,
+          .cell.branch {
+            display: flex;
             flex: 0 1 auto;
             min-width: 0;
             max-width: 100%;
           }
-          .repo a {
+          .repo a,
+          .branch a {
             white-space: normal;
             overflow-wrap: anywhere;
           }
-          .repo .truncatedRepo {
-            display: none;
-          }
-          .repo .fullRepo {
+          .repo .content {
             display: block;
+            direction: ltr;
           }
           .cell.votes {
             display: flex;
@@ -493,15 +515,14 @@
       ${this.renderCellSelectionBox()}
       <div class="change-header">
         ${this.renderCellStar()} ${this.renderCellNumber(changeUrl)}
-        ${this.renderCellRepo()}
+        ${this.renderCellRepo()} ${this.renderCellBranch()}
       </div>
       <div class="change-subject">${this.renderCellSubject(changeUrl)}</div>
       <div class="change-metadata">
         ${this.renderCellOwner()} ${this.renderCellReviewers()}
-        ${this.renderCellBranch()} ${this.renderCellHashtags()}
-        ${this.renderCellUpdated()} ${this.renderCellSubmitted()}
-        ${this.renderCellWaiting()} ${this.renderCellSize()}
-        ${this.renderCellRequirements()}
+        ${this.renderCellHashtags()} ${this.renderCellUpdated()}
+        ${this.renderCellSubmitted()} ${this.renderCellWaiting()}
+        ${this.renderCellSize()} ${this.renderCellRequirements()}
         <div class="cell votes">
           ${this.applicableLabels.map(labelName =>
             this.renderChangeLabels(labelName)
@@ -649,10 +670,17 @@
     const repo = this.change?.project ?? '';
     return html`
       <td class="cell repo">
-        <a class="fullRepo" href=${this.computeRepoUrl()}> ${repo} </a>
-        <a class="truncatedRepo" href=${this.computeRepoUrl()} title=${repo}>
-          ${truncatePath(repo, 2)}
-        </a>
+        <div class="container">
+          <a
+            class="fullRepo content"
+            href=${this.computeRepoUrl()}
+            title=${repo}
+          >
+            <span>${repo}</span>
+          </a>
+          <div class="spacer">${repo}</div>
+          <span>&nbsp;</span>
+        </div>
       </td>
     `;
   }
@@ -663,7 +691,7 @@
     return html`
       <td class="cell branch">
         <a href=${this.computeRepoBranchURL()}> ${this.change?.branch} </a>
-        ${this.renderChangeBranch()}
+        ${this.narrowScreen ? '' : this.renderChangeBranch()}
       </td>
     `;
   }
diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item_test.ts b/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item_test.ts
index 8498348..17ac1cb 100644
--- a/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item_test.ts
+++ b/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item_test.ts
@@ -429,7 +429,7 @@
     assert.equal(setUrlStub.lastCall.firstArg, '/c/a/test/repo/+/42');
   });
 
-  test('narrow rows show the number and respect hidden repo', async () => {
+  test('narrow rows show the number and respect hidden repo and branch', async () => {
     await setViewport({width: 390, height: 900});
     await waitUntil(() => !!query(element, '.change-header'));
     element.change = change;
@@ -445,15 +445,33 @@
       '42'
     );
     assert.isNotOk(query(element, '.repo'));
+    assert.isNotOk(query(element, '.branch'));
     assert.isOk(query(element, '.change-subject .subject'));
     assert.isOk(query(element, '.change-metadata .owner'));
     assert.isOk(query(element, '.change-metadata .votes'));
 
+    element.visibleChangeTableColumns = [
+      ColumnNames.SUBJECT,
+      ColumnNames.OWNER,
+      ColumnNames.REPO,
+      ColumnNames.BRANCH,
+    ];
+    await element.updateComplete;
+    const branch = queryAndAssert(element, '.change-header .branch');
+    assert.equal(branch.previousElementSibling?.className, 'cell repo');
+    assert.equal(branch.textContent?.trim(), 'test-branch');
+    assert.equal(
+      queryAndAssert(branch, 'a').getAttribute('href'),
+      '/q/project:a/test/repo+branch:test-branch'
+    );
+    assert.isNotOk(query(element, '.change-metadata .branch'));
+
     await setViewport({width: 1000, height: 900});
     await waitUntil(() => !query(element, '.change-header'));
     assert.isNotOk(query(element, '.change-subject'));
     assert.isNotOk(query(element, '.number'));
     assert.isOk(query(element, '.subject'));
+    assert.isOk(query(element, '.branch gr-limited-text'));
   });
 
   test('renders', async () => {
@@ -498,16 +516,17 @@
           highlightattention=""
         ></gr-account-label>
         <div></div>
-        <a class="fullRepo" href="/q/project:test-project+status:open">
-          test-project
-        </a>
-        <a
-          class="truncatedRepo"
-          href="/q/project:test-project+status:open"
-          title="test-project"
-        >
-          test-project
-        </a>
+        <div class="container">
+          <a
+            class="fullRepo content"
+            href="/q/project:test-project+status:open"
+            title="test-project"
+          >
+            <span>test-project</span>
+          </a>
+          <div class="spacer">test-project</div>
+          <span></span>
+        </div>
         <a href="/q/project:test-project+branch:test-branch"> test-branch </a>
         <gr-date-formatter withtooltip=""></gr-date-formatter>
         <gr-date-formatter withtooltip=""></gr-date-formatter>
diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list-view/gr-change-list-view_test.ts b/polygerrit-ui/app/elements/change-list/gr-change-list-view/gr-change-list-view_test.ts
index 6f7c2a1..215b5bf 100644
--- a/polygerrit-ui/app/elements/change-list/gr-change-list-view/gr-change-list-view_test.ts
+++ b/polygerrit-ui/app/elements/change-list/gr-change-list-view/gr-change-list-view_test.ts
@@ -9,7 +9,6 @@
 import {GrChangeListView} from './gr-change-list-view';
 import {query, queryAndAssert} from '../../../test/test-utils';
 import {createChange} from '../../../test/test-data-generators';
-import {ChangeInfo} from '../../../api/rest-api';
 import {assert, fixture, html, waitUntil} from '@open-wc/testing';
 import {GrChangeList} from '../gr-change-list/gr-change-list';
 import {GrChangeListSection} from '../gr-change-list-section/gr-change-list-section';
@@ -162,7 +161,9 @@
   test('nextArrow', async () => {
     element.changes = Array(25)
       .fill(0)
-      .map(_ => ({...createChange(), _more_changes: true} as ChangeInfo));
+      .map(_ => {
+        return {...createChange(), _more_changes: true};
+      });
     element.loading = false;
     await element.updateComplete;
     assert.isFalse(query(element, '#nextArrow')?.hasAttribute('disabled'));
@@ -187,7 +188,9 @@
 
     element.changes = Array(25)
       .fill(0)
-      .map(_ => ({...createChange(), _more_changes: true} as ChangeInfo));
+      .map(_ => {
+        return {...createChange(), _more_changes: true};
+      });
     element.loading = false;
     await element.updateComplete;
     element.handleNextPage();
diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list_screenshot_test.ts b/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list_screenshot_test.ts
index 594130b..3d83d8c 100644
--- a/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list_screenshot_test.ts
+++ b/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list_screenshot_test.ts
@@ -23,6 +23,7 @@
 import {GrChangeListItem} from '../gr-change-list-item/gr-change-list-item';
 import {GrChangeListSection} from '../gr-change-list-section/gr-change-list-section';
 import {
+  BranchName,
   ChangeInfo,
   NumericChangeId,
   RepoName,
@@ -139,6 +140,7 @@
                 attention_set: {
                   [change.owner._account_id!]: {account: change.owner},
                 },
+                branch: 'stable/very-long-branch-name' as BranchName,
                 reviewers: {
                   REVIEWER: [
                     {
@@ -224,6 +226,21 @@
           repo.getBoundingClientRect().bottom,
           subject.getBoundingClientRect().top
         );
+        const branch = first.querySelector('.change-header .branch')!;
+        assert.equal(branch.previousElementSibling, repo);
+        assert.isNull(first.querySelector('.change-metadata .branch'));
+        const branchLink = branch.querySelector<HTMLElement>('a')!;
+        assert.equal(branchLink.textContent?.trim(), element.changes[0].branch);
+        assert.isAbove(branchLink.clientWidth, 0);
+        assert.isAtMost(branchLink.scrollWidth, branchLink.clientWidth);
+        assert.isAtLeast(
+          branch.getBoundingClientRect().left,
+          repo.getBoundingClientRect().right
+        );
+        assert.isAtMost(
+          branch.getBoundingClientRect().bottom,
+          subject.getBoundingClientRect().top
+        );
         const accountLabel = first.querySelector('gr-account-label')!;
         const name = accountLabel.shadowRoot!.querySelector('.name')!;
         assert.isBelow(
diff --git a/polygerrit-ui/app/elements/change-list/gr-dashboard-view/gr-dashboard-view_test.ts b/polygerrit-ui/app/elements/change-list/gr-dashboard-view/gr-dashboard-view_test.ts
index 54b0f63..66060a0 100644
--- a/polygerrit-ui/app/elements/change-list/gr-dashboard-view/gr-dashboard-view_test.ts
+++ b/polygerrit-ui/app/elements/change-list/gr-dashboard-view/gr-dashboard-view_test.ts
@@ -606,7 +606,7 @@
       queryAndAssert<HTMLDivElement>(
         element,
         '#emptyOutgoing'
-      ).textContent!.trim(),
+      ).textContent.trim(),
       'No changes'
     );
     query<GrCreateChangeHelp>(element, 'gr-create-change-help');
@@ -618,7 +618,7 @@
       queryAndAssert<HTMLDivElement>(
         element,
         '#emptyOutgoing'
-      ).textContent!.trim(),
+      ).textContent.trim(),
       'No changes'
     );
     assert.isOk(query<GrCreateChangeHelp>(element, 'gr-create-change-help'));
diff --git a/polygerrit-ui/app/elements/change-list/gr-repo-header/gr-repo-header_test.ts b/polygerrit-ui/app/elements/change-list/gr-repo-header/gr-repo-header_test.ts
index 71b2ecd..1c9a691 100644
--- a/polygerrit-ui/app/elements/change-list/gr-repo-header/gr-repo-header_test.ts
+++ b/polygerrit-ui/app/elements/change-list/gr-repo-header/gr-repo-header_test.ts
@@ -19,7 +19,7 @@
 
   setup(async () => {
     element = await fixture(
-      html`<gr-repo-header .repo=${'test' as RepoName}></gr-repo-header>`
+      html`<gr-repo-header .repo=${'test'}></gr-repo-header>`
     );
   });
 
diff --git a/polygerrit-ui/app/elements/change/gr-ai-prompt-dialog/gr-ai-prompt-dialog_test.ts b/polygerrit-ui/app/elements/change/gr-ai-prompt-dialog/gr-ai-prompt-dialog_test.ts
index b78189c..f971e56 100644
--- a/polygerrit-ui/app/elements/change/gr-ai-prompt-dialog/gr-ai-prompt-dialog_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-ai-prompt-dialog/gr-ai-prompt-dialog_test.ts
@@ -230,7 +230,7 @@
       {
         ...createThread({
           message: 'test comment',
-          author: {name: 'Tester'} as AccountInfo,
+          author: {name: 'Tester'},
           unresolved: true,
         }),
         path: 'test.txt',
diff --git a/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions.ts b/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions.ts
index 91a22f0..27a2438 100644
--- a/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions.ts
+++ b/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions.ts
@@ -505,6 +505,8 @@
 
   @state() chatCapabilitiesLoaded = false;
 
+  @state() canAiReview = false;
+
   @state() deletedReviewers: AccountInfo[] = [];
 
   private aiChatLoadingCleanup?: () => void;
@@ -571,6 +573,11 @@
     );
     subscribe(
       this,
+      () => this.getChangeModel().canAiReview$,
+      x => (this.canAiReview = x)
+    );
+    subscribe(
+      this,
       () => this.getChangeModel().editMode$,
       x => (this.editMode = x)
     );
@@ -678,10 +685,6 @@
             --gr-button-padding: var(--spacing-m);
             white-space: nowrap;
           }
-          gr-button,
-          gr-dropdown {
-            margin: 0;
-          }
           #actionLoadingMessage {
             margin: var(--spacing-m);
             text-align: center;
@@ -1204,7 +1207,7 @@
     if (this.change?.status === ChangeStatus.MERGED) {
       return null;
     }
-    let result;
+    let result: string | null | undefined;
     for (const [label, labelInfo] of Object.entries(this.change.labels)) {
       if (!(label in this.change.permitted_labels)) {
         continue;
@@ -1218,33 +1221,32 @@
       }
       if (
         label === StandardLabels.PRESUBMIT_VERIFIED ||
-        label.toLowerCase().startsWith('presubmit')
+        label.toLowerCase().includes('presubmit')
       ) {
         continue;
       }
       if (status === LabelStatus.NEED) {
-        if (result) {
-          // More than one label is missing, so check if Code Review can be
-          // given
-          result = null;
-          break;
-        }
-        result = label;
+        // More than one label is missing, so clear result and check if Code
+        // Review can be given.
+        result = result === undefined ? label : null;
       }
     }
-    // Allow the user to use quick approve to vote the max score on code review
-    // even if it is already granted by someone else. Does not apply if the
-    // user owns the change or has already granted the max score themselves.
+    // Prioritize Code-Review if the user can grant the max score and has not
+    // already done so, even if Code-Review is already approved by someone else,
+    // marked optional (e.g. via Submit Requirements), or another label is
+    // needed. Does not apply if the user owns the change.
     const codeReviewLabel = this.change.labels[StandardLabels.CODE_REVIEW];
     const codeReviewPermittedValues =
       this.change.permitted_labels[StandardLabels.CODE_REVIEW];
     if (
-      !result &&
       codeReviewLabel &&
-      codeReviewPermittedValues &&
+      codeReviewPermittedValues?.length &&
       this.account?._account_id &&
       isDetailedLabelInfo(codeReviewLabel) &&
       !isOwner(this.change, this.account) &&
+      Number(
+        codeReviewPermittedValues[codeReviewPermittedValues.length - 1]
+      ) === getVotingRange(codeReviewLabel)?.max &&
       getApprovalInfo(codeReviewLabel, this.account)?.value !==
         getVotingRange(codeReviewLabel)?.max
     ) {
@@ -1282,12 +1284,7 @@
   }
 
   private getAiChatAction(): UIActionInfo | null {
-    // Wait for the actions endpoint to respond before deciding visibility.
-    if (this.revisionActions === undefined) {
-      return null;
-    }
-    // Hide only when the server explicitly denies AI review.
-    if (this.revisionActions.aiReview?.enabled === false) {
+    if (!this.canAiReview) {
       return null;
     }
     if (!this.aiPluginsRegistered) {
@@ -1926,15 +1923,17 @@
   }
 
   // private but used in test
-  handleSubmitConfirm() {
+  handleSubmitConfirm(e: CustomEvent<{submitWholeTopic: boolean}>) {
     if (!this.canSubmitChange()) {
       return;
     }
+    const submitWholeTopic = e.detail?.submitWholeTopic ?? false;
     this.hideAllDialogs();
     this.fireAction(
       '/submit',
       assertUIActionInfo(this.revisionActions?.submit),
-      true
+      true,
+      submitWholeTopic ? {submit_whole_topic: true} : undefined
     );
   }
 
diff --git a/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions_test.ts b/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions_test.ts
index a8a31c6..41360f1 100644
--- a/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions_test.ts
@@ -47,7 +47,6 @@
   RepoName,
   ReviewInput,
   TopicName,
-  ValidationOptionsInfo,
 } from '../../../types/common';
 import {ActionType, RevisionActions} from '../../../api/change-actions';
 import {SinonFakeTimers, SinonStubbedMember} from 'sinon';
@@ -120,7 +119,7 @@
       stubRestApi('getValidationOptions').returns(
         Promise.resolve({
           validation_options: [{name: 'o1', description: 'option 1'}],
-        } as ValidationOptionsInfo)
+        })
       );
 
       sinon
@@ -375,7 +374,7 @@
       test('chatCapabilitiesLoaded', async () => {
         stubFlags('isEnabled').returns(true);
         element.aiPluginsRegistered = true;
-        element.revisionActions = {};
+        element.canAiReview = true;
         chatModel.updateState({
           models: undefined,
           actions: undefined,
@@ -410,32 +409,14 @@
         element.aiPluginsRegistered = true;
       });
 
-      test('hidden when aiReview action has enabled: false', async () => {
-        element.revisionActions = {
-          aiReview: {enabled: false} as ActionInfo,
-        };
+      test('hidden when canAiReview is false', async () => {
+        element.canAiReview = false;
         await element.updateComplete;
         assert.isUndefined(query(element, 'gr-button[data-action-key="chat"]'));
       });
 
-      test('hidden while revisionActions is undefined', async () => {
-        element.revisionActions = undefined;
-        await element.updateComplete;
-        assert.isUndefined(query(element, 'gr-button[data-action-key="chat"]'));
-      });
-
-      test('shown when revisionActions has no aiReview entry', async () => {
-        element.revisionActions = {};
-        await element.updateComplete;
-        assert.isDefined(
-          queryAndAssert(element, 'gr-button[data-action-key="chat"]')
-        );
-      });
-
-      test('shown when aiReview action has enabled: true', async () => {
-        element.revisionActions = {
-          aiReview: {enabled: true} as ActionInfo,
-        };
+      test('shown when canAiReview is true', async () => {
+        element.canAiReview = true;
         await element.updateComplete;
         assert.isDefined(
           queryAndAssert(element, 'gr-button[data-action-key="chat"]')
@@ -636,10 +617,11 @@
       // Create 'reland' via addActionButton to mimic plugin behavior
       const relandKey = element.addActionButton(ActionType.CHANGE, 'Reland');
 
-      // Mock AI Chat action - set revisionActions before actions to avoid
+      // Mock AI Chat action - set canAiReview before actions to avoid
       // change setter overwriting element.actions
       stubFlags('isEnabled').returns(true);
       element.aiPluginsRegistered = true;
+      element.canAiReview = true;
       element.change = {
         ...element.change!,
         actions: {
@@ -749,19 +731,24 @@
     test('handleSubmitConfirm', () => {
       const fireStub = sinon.stub(element, 'fireAction');
       sinon.stub(element, 'canSubmitChange').returns(true);
-      element.handleSubmitConfirm();
+      element.handleSubmitConfirm(
+        new CustomEvent('confirm', {detail: {submitWholeTopic: false}})
+      );
       assert.isTrue(fireStub.calledOnce);
       assert.deepEqual(fireStub.lastCall.args, [
         '/submit',
         assertUIActionInfo(element.revisionActions?.submit),
         true,
+        undefined,
       ]);
     });
 
     test('handleSubmitConfirm when not able to submit', () => {
       const fireStub = sinon.stub(element, 'fireAction');
       sinon.stub(element, 'canSubmitChange').returns(false);
-      element.handleSubmitConfirm();
+      element.handleSubmitConfirm(
+        new CustomEvent('confirm', {detail: {submitWholeTopic: false}})
+      );
       assert.isFalse(fireStub.called);
     });
 
@@ -2574,9 +2561,13 @@
             'Presubmit-Verified': {
               values: {'-1': '', ' 0': '', '+1': ''},
             },
+            'Verified-ghash-presubmit-kokoro': {
+              values: {'-1': '', ' 0': '', '+1': ''},
+            },
           },
           permitted_labels: {
             'Presubmit-Verified': ['-1', ' 0', '+1'],
+            'Verified-ghash-presubmit-kokoro': ['-1', ' 0', '+1'],
           },
         };
         await element.updateComplete;
@@ -2587,6 +2578,32 @@
         assert.isNotOk(approveButton);
       });
 
+      test('prioritizes optional Code-Review over other missing labels', async () => {
+        element.change = {
+          ...createChangeViewChange(),
+          current_revision: 'abc1234' as CommitId,
+          labels: {
+            'Code-Review': {
+              optional: true,
+              values: {'-2': '', '-1': '', ' 0': '', '+1': '', '+2': ''},
+            },
+            'Verified-custom': {
+              values: {'-1': '', ' 0': '', '+1': ''},
+            },
+          },
+          permitted_labels: {
+            'Code-Review': ['-2', '-1', ' 0', '+1', '+2'],
+            'Verified-custom': ['-1', ' 0', '+1'],
+          },
+        };
+        await element.updateComplete;
+        const approveButton = queryAndAssert(
+          element,
+          "gr-button[data-action-key='review']"
+        );
+        assert.equal(approveButton.getAttribute('data-label'), 'Code-Review+2');
+      });
+
       test('rejected presubmit label blocks quick approve', async () => {
         element.change = {
           ...createChangeViewChange(),
@@ -2661,10 +2678,9 @@
         element.setActionOverflow(ActionType.REVISION, 'submit', true);
         await element.updateComplete;
         assert.isNotOk(query(element, '[data-action-key="submit"]'));
-        assert.strictEqual(
-          queryAndAssert<GrDropdown>(element, '#moreActions').items![3].id,
-          'submit-revision'
-        );
+        const items = queryAndAssert<GrDropdown>(element, '#moreActions')
+          .items!;
+        assert.isTrue(items.some(item => item.id === 'submit-revision'));
       });
 
       suite('waitForChangeReachable', () => {
@@ -2727,7 +2743,7 @@
         element.change = {
           ...createChangeViewChange(),
           current_revision_number: element.latestPatchNum,
-          revisions: createRevisions(element.latestPatchNum as number),
+          revisions: createRevisions(element.latestPatchNum),
           messages: createChangeMessages(1),
         };
         element.change._number = 42 as NumericChangeId;
diff --git a/polygerrit-ui/app/elements/change/gr-change-autocomplete/gr-change-autocomplete.ts b/polygerrit-ui/app/elements/change/gr-change-autocomplete/gr-change-autocomplete.ts
index 9bef8a5..f6b903a 100644
--- a/polygerrit-ui/app/elements/change/gr-change-autocomplete/gr-change-autocomplete.ts
+++ b/polygerrit-ui/app/elements/change/gr-change-autocomplete/gr-change-autocomplete.ts
@@ -128,13 +128,12 @@
           (this.excludeChangeNum === undefined ||
             change.changeNum !== this.excludeChangeNum)
       )
-      .map(
-        change =>
-          ({
-            name: change.description,
-            value: `${change.changeNum}`,
-          } as AutocompleteSuggestion)
-      );
+      .map(change => {
+        return {
+          name: change.description,
+          value: `${change.changeNum}`,
+        };
+      });
   }
 }
 
diff --git a/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata.ts b/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata.ts
index 4c05e68..ce39410 100644
--- a/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata.ts
+++ b/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata.ts
@@ -337,8 +337,8 @@
         <h3 class="metadata-title heading-3">Change Info</h3>
         ${this.renderShowAllButton()}
       </div>
-      ${this.renderSubmitted()} ${this.renderUpdated()} ${this.renderOwner()}
-      ${this.renderNonOwner(ChangeRole.UPLOADER)}
+      ${this.renderSubmitted()} ${this.renderCreated()} ${this.renderUpdated()}
+      ${this.renderOwner()} ${this.renderNonOwner(ChangeRole.UPLOADER)}
       ${this.renderNonOwner(ChangeRole.AUTHOR)}
       ${this.renderNonOwner(ChangeRole.COMMITTER)} ${this.renderReviewers()}
       ${this.renderCCs()} ${this.renderProjectBranch()} ${this.renderParent()}
@@ -389,6 +389,26 @@
     </section> `;
   }
 
+  private renderCreated() {
+    return html`<section class=${this.computeDisplayState(Metadata.CREATED)}>
+      <span class="title">
+        <gr-tooltip-content
+          has-tooltip
+          title="Time when the first patchset of this change was uploaded."
+        >
+          Created
+        </gr-tooltip-content>
+      </span>
+      <span class="value">
+        <gr-date-formatter
+          withTooltip
+          .dateStr=${this.change!.created}
+          showYesterday
+        ></gr-date-formatter>
+      </span>
+    </section>`;
+  }
+
   private renderUpdated() {
     return html`<section class=${this.computeDisplayState(Metadata.UPDATED)}>
       <span class="title">
diff --git a/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata_test.ts b/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata_test.ts
index ae9e411..df310df 100644
--- a/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata_test.ts
@@ -89,6 +89,20 @@
         <span class="title">
           <gr-tooltip-content
             has-tooltip=""
+            title="Time when the first patchset of this change was uploaded."
+          >
+            Created
+          </gr-tooltip-content>
+        </span>
+        <span class="value">
+          <gr-date-formatter showyesterday="" withtooltip="">
+          </gr-date-formatter>
+        </span>
+      </section>
+      <section class="hideDisplay">
+        <span class="title">
+          <gr-tooltip-content
+            has-tooltip=""
             title="Last update of (meta)data for this change."
           >
             Updated
@@ -460,7 +474,7 @@
       serverConfig = {
         ...createServerInfo(),
         receive: {
-          enable_signed_push: 'true',
+          enable_signed_push: true,
         },
       };
       change = {
@@ -898,9 +912,7 @@
 
       element.handleTopicChanged(new CustomEvent('test', {detail: newTopic}));
 
-      assert.isTrue(
-        setChangeTopicStub.calledWith(42 as NumericChangeId, newTopic)
-      );
+      assert.isTrue(setChangeTopicStub.calledWith(42, newTopic));
       await setChangeTopicStub.lastCall.returnValue;
       await waitUntilCalled(alertStub, 'alertStub');
       assert.deepEqual(alertStub.lastCall.args[0].detail, {
@@ -923,7 +935,7 @@
       remove.click();
 
       assert.isTrue(chip?.disabled);
-      assert.isTrue(setChangeTopicStub.calledWith(42 as NumericChangeId));
+      assert.isTrue(setChangeTopicStub.calledWith(42));
       await setChangeTopicStub.lastCall.returnValue;
       await waitUntilCalled(alertStub, 'alertStub');
       assert.deepEqual(alertStub.lastCall.args[0].detail, {
@@ -944,7 +956,7 @@
         new CustomEvent('test', {detail: 'new hashtag'})
       );
       assert.isTrue(
-        setChangeHashtagStub.calledWith(42 as NumericChangeId, {
+        setChangeHashtagStub.calledWith(42, {
           add: ['new hashtag' as Hashtag],
         })
       );
@@ -972,7 +984,7 @@
     );
     assert.isTrue(
       updateIdentityInChangeEditStub.calledWith(
-        42 as NumericChangeId,
+        42,
         'user',
         'user@example.com',
         'AUTHOR'
diff --git a/polygerrit-ui/app/elements/change/gr-change-summary/gr-change-summary.ts b/polygerrit-ui/app/elements/change/gr-change-summary/gr-change-summary.ts
index d9de5f4e..580c4b6 100644
--- a/polygerrit-ui/app/elements/change/gr-change-summary/gr-change-summary.ts
+++ b/polygerrit-ui/app/elements/change/gr-change-summary/gr-change-summary.ts
@@ -10,7 +10,7 @@
 import '../../checks/gr-checks-action';
 import '../gr-ai-prompt-dialog/gr-ai-prompt-dialog';
 import {css, html, LitElement, nothing} from 'lit';
-import {customElement, property, query, state} from 'lit/decorators.js';
+import {customElement, query, state} from 'lit/decorators.js';
 import {subscribe} from '../../lit/subscription-controller';
 import {sharedStyles} from '../../../styles/shared-styles';
 import {modalStyles} from '../../../styles/gr-modal-styles';
@@ -29,12 +29,7 @@
   isRunningScheduledOrCompleted,
 } from '../../../models/checks/checks-util';
 import {getMentionedThreads, isUnresolved} from '../../../utils/comment-util';
-import {
-  AccountInfo,
-  ActionNameToActionInfoMap,
-  CommentThread,
-  DropdownLink,
-} from '../../../types/common';
+import {AccountInfo, CommentThread, DropdownLink} from '../../../types/common';
 import {FlowInfo, FlowStageState} from '../../../api/rest-api';
 import {Tab} from '../../../constants/constants';
 import {ChecksTabState} from '../../../types/events';
@@ -109,15 +104,7 @@
   @state()
   flows: FlowInfo[] = [];
 
-  @property({type: Object}) revisionActions?: ActionNameToActionInfoMap;
-
-  // Hide until the actions endpoint responds; then hide only on explicit deny.
-  private get canAiReview(): boolean {
-    return (
-      this.revisionActions !== undefined &&
-      this.revisionActions.aiReview?.enabled !== false
-    );
-  }
+  @state() canAiReview = false;
 
   private get canShowAiReview(): boolean {
     return !!this.selfAccount && this.canAiReview;
@@ -221,6 +208,11 @@
       () => this.getFlowsModel().flows$,
       x => (this.flows = x)
     );
+    subscribe(
+      this,
+      () => this.getChangeModel().canAiReview$,
+      x => (this.canAiReview = x)
+    );
   }
 
   static override get styles() {
@@ -271,6 +263,7 @@
         }
         div.info .right,
         div.error .right {
+          flex: 1;
           overflow: hidden;
         }
         div.info .right .message,
diff --git a/polygerrit-ui/app/elements/change/gr-change-summary/gr-change-summary_screenshot_test.ts b/polygerrit-ui/app/elements/change/gr-change-summary/gr-change-summary_screenshot_test.ts
index 045186e..0a5846c 100644
--- a/polygerrit-ui/app/elements/change/gr-change-summary/gr-change-summary_screenshot_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-change-summary/gr-change-summary_screenshot_test.ts
@@ -82,7 +82,7 @@
   });
 
   test('screenshot with AI Review Prompt', async () => {
-    element.revisionActions = {aiReview: {label: 'AI Review', enabled: true}};
+    element.canAiReview = true;
     await element.updateComplete;
     await visualDiff(element, 'gr-change-summary-with-ai-review-prompt');
     await visualDiffDarkTheme(
diff --git a/polygerrit-ui/app/elements/change/gr-change-summary/gr-change-summary_test.ts b/polygerrit-ui/app/elements/change/gr-change-summary/gr-change-summary_test.ts
index 9744398..4e5ec6b 100644
--- a/polygerrit-ui/app/elements/change/gr-change-summary/gr-change-summary_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-change-summary/gr-change-summary_test.ts
@@ -68,7 +68,7 @@
       createCommentThread([createComment()]),
       createCommentThread([{...createComment(), unresolved: true}]),
     ];
-    element.revisionActions = {};
+    element.canAiReview = true;
     await element.updateComplete;
     assert.shadowDom.equal(
       element,
@@ -106,7 +106,7 @@
     );
   });
 
-  test('renders AI review button when revisionActions allow AI review', async () => {
+  test('renders AI review button when canAiReview is true', async () => {
     commentsModel.setState({
       drafts: {
         a: [createDraft(), createDraft(), createDraft()],
@@ -118,7 +118,7 @@
       createCommentThread([createComment()]),
       createCommentThread([{...createComment(), unresolved: true}]),
     ];
-    element.revisionActions = {aiReview: {label: 'AI Review', enabled: true}};
+    element.canAiReview = true;
     await element.updateComplete;
     assert.shadowDom.equal(
       element,
@@ -156,7 +156,7 @@
     );
   });
 
-  test('hides AI review button when revisionActions deny AI review', async () => {
+  test('hides AI review button when canAiReview is false', async () => {
     commentsModel.setState({
       drafts: {
         a: [createDraft(), createDraft(), createDraft()],
@@ -168,7 +168,7 @@
       createCommentThread([createComment()]),
       createCommentThread([{...createComment(), unresolved: true}]),
     ];
-    element.revisionActions = {aiReview: {label: 'AI Review', enabled: false}};
+    element.canAiReview = false;
     await element.updateComplete;
     assert.isUndefined(query(element, 'gr-button'));
   });
@@ -197,6 +197,20 @@
     );
   });
 
+  test('expands summary message container so trailing italics are not clipped', async () => {
+    element.runs = [checkRun0];
+    element.messages = ['Status: *Merged*'];
+    element.showChecksSummary = true;
+    await element.updateComplete;
+    const info = queryAndAssert(element, '.checksSummary .info');
+    const right = queryAndAssert(element, '.checksSummary .info .right');
+    assert.equal(getComputedStyle(right).flexGrow, '1');
+    assert.isAbove(
+      right.getBoundingClientRect().width,
+      info.getBoundingClientRect().width - 50
+    );
+  });
+
   suite('checks summary', () => {
     const checkSummary = async (runs: CheckRun[], texts: string[]) => {
       element.runs = runs;
diff --git a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.ts b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.ts
index 5b2bdef..0ff2c51 100644
--- a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.ts
+++ b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.ts
@@ -125,7 +125,7 @@
 import {checksModelToken} from '../../../models/checks/checks-model';
 import {changeModelToken} from '../../../models/change/change-model';
 import {chatModelToken} from '../../../models/chat/chat-model';
-import {css, html, LitElement, nothing} from 'lit';
+import {css, html, LitElement, nothing, PropertyValues} from 'lit';
 import {a11yStyles} from '../../../styles/gr-a11y-styles';
 import {materialStyles} from '../../../styles/gr-material-styles';
 import {sharedStyles} from '../../../styles/shared-styles';
@@ -281,6 +281,9 @@
   private editingCommitMessage = false;
 
   @state()
+  commitMessageMarkdown = false;
+
+  @state()
   private latestCommitMessage = '';
 
   @state() basePatchNum: BasePatchSetNum = PARENT;
@@ -466,6 +469,10 @@
 
   private headerEl?: HTMLElement;
 
+  private readonly handleOpenChatPanel = () => {
+    this.getChatModel().setChatPanelOpen(true);
+  };
+
   private headerResizeObserver = new ResizeObserver(entries => {
     for (const entry of entries) {
       const height = entry.borderBoxSize[0].blockSize;
@@ -497,12 +504,11 @@
       this.onOpenDiffInChangeView(e)
     );
     this.addEventListener('show-tab', e => this.setActiveTab(e));
-    this.addEventListener(
-      'close-chat-panel',
-      () => (this.showSidebarChat = false)
+    this.addEventListener('close-chat-panel', () =>
+      this.getChatModel().setChatPanelOpen(false)
     );
     this.addEventListener('explain-code-requested', e => {
-      this.showSidebarChat = true;
+      this.getChatModel().setChatPanelOpen(true);
       this.getChatModel().processChatRequest(e.detail);
     });
   }
@@ -770,6 +776,13 @@
         this.revertingChange = revertingChange;
       }
     );
+    subscribe(
+      this,
+      () => this.getChatModel().chatPanelOpen$,
+      open => {
+        this.showSidebarChat = open;
+      }
+    );
   }
 
   override connectedCallback() {
@@ -785,6 +798,7 @@
     // Or consider using either firstConnectedCallback() or constructor().
     document.addEventListener('visibilitychange', this.handleVisibilityChange);
     document.addEventListener('scroll', this.handleScroll);
+    document.addEventListener('open-chat-panel', this.handleOpenChatPanel);
   }
 
   override firstUpdated() {
@@ -833,6 +847,7 @@
       this.handleVisibilityChange
     );
     document.removeEventListener('scroll', this.handleScroll);
+    document.removeEventListener('open-chat-panel', this.handleOpenChatPanel);
     this.scrollTask?.cancel();
 
     if (this.updateCheckTimerHandle) {
@@ -853,9 +868,8 @@
       css`
         :host {
           --sidebar-top: calc(
-            var(--main-header-height) + var(--change-header-height, 38px)
+            var(--main-header-height, 0px) + var(--change-header-height, 38px)
           );
-          --sidebar-bottom-overflow: var(--main-footer-height);
         }
         .tabs {
           display: flex;
@@ -911,6 +925,8 @@
           display: flex;
           flex: 1;
           min-width: 500px;
+          /* Needed to overflow on mobile properly */
+          max-width: 100%;
         }
         .headerSubject {
           font-family: var(--header-font-family);
@@ -978,6 +994,11 @@
         .commitMessage gr-formatted-text {
           overflow-wrap: anywhere;
         }
+        .commitMessage gr-formatted-text[markdown] {
+          font-family: var(--font-family);
+          font-size: var(--font-size-normal);
+          line-height: var(--line-height-normal);
+        }
         #commitMessageEditor {
           /* Account for border and padding and rounding errors. */
           min-width: calc(72ch + 2px + 2 * var(--spacing-m) + 0.4px);
@@ -1180,6 +1201,15 @@
         .sidebar {
           height: var(--sidebar-height);
         }
+        .sidebar gr-endpoint-decorator[name='chat-panel'] {
+          display: block;
+          height: 100%;
+        }
+        .sidebar
+          gr-endpoint-decorator[name='chat-panel']
+          > :not(gr-endpoint-param) {
+          height: 100%;
+        }
       `,
     ];
   }
@@ -1258,12 +1288,22 @@
   }
 
   private toggleChat() {
-    this.showSidebarChat = !this.showSidebarChat;
+    this.getChatModel().setChatPanelOpen(!this.showSidebarChat);
   }
 
   private renderSidebar() {
-    if (!this.showSidebarChat) return;
-    return html`<chat-panel></chat-panel>`;
+    if (!this.showSidebarChat) {
+      return nothing;
+    }
+    return html`
+      <gr-endpoint-decorator name="chat-panel">
+        <gr-endpoint-param name="change" .value=${this.change}>
+        </gr-endpoint-param>
+        <gr-endpoint-param name="revision" .value=${this.revision}>
+        </gr-endpoint-param>
+        <chat-panel></chat-panel>
+      </gr-endpoint-decorator>
+    `;
   }
 
   private renderChangeInfoSection() {
@@ -1443,8 +1483,10 @@
               <gr-editable-content
                 id="commitMessageEditor"
                 .editing=${this.editingCommitMessage}
+                .markdown=${this.commitMessageMarkdown}
                 .content=${this.latestCommitMessage}
                 @editing-changed=${this.handleEditingChanged}
+                @markdown-changed=${this.handleMarkdownChanged}
                 @content-changed=${this.handleContentChanged}
                 .storageKey=${`c${this.change?._number}_rev${this.change?.current_revision}`}
                 .hideEditCommitMessage=${hideEditCommitMessage}
@@ -1453,14 +1495,12 @@
               >
                 <gr-formatted-text
                   .content=${this.latestCommitMessage}
-                  .markdown=${false}
+                  ?markdown=${this.commitMessageMarkdown}
                 ></gr-formatted-text>
               </gr-editable-content>
             </div>
             <h3 class="assistive-tech-only">Comments and Checks Summary</h3>
-            <gr-change-summary
-              .revisionActions=${this.currentRevisionActions}
-            ></gr-change-summary>
+            <gr-change-summary></gr-change-summary>
             <gr-endpoint-decorator name="commit-container">
               <gr-endpoint-param name="change" .value=${this.change}>
               </gr-endpoint-param>
@@ -1781,6 +1821,10 @@
     this.editingCommitMessage = e.detail.value;
   }
 
+  private handleMarkdownChanged(e: ValueChangedEvent<boolean>) {
+    this.commitMessageMarkdown = e.detail.value;
+  }
+
   private handleContentChanged(e: ValueChangedEvent) {
     // optimistic update
     this.latestCommitMessage = e.detail.value ?? '';
@@ -1838,7 +1882,9 @@
   }
 
   private computeChangeStatusChips() {
-    if (!this.change || this.mergeable === undefined) return [];
+    if (!this.change) {
+      return [];
+    }
 
     const options = {
       mergeable: this.mergeable,
@@ -2076,8 +2122,17 @@
     }
   }
 
+  override willUpdate(changedProperties: PropertyValues) {
+    if (changedProperties.has('changeNum')) {
+      this.commitMessageMarkdown = false;
+    }
+  }
+
   // Private but used in tests.
   changeChanged(oldChange: ParsedChangeInfo | undefined) {
+    if (oldChange?._number !== this.change?._number) {
+      this.commitMessageMarkdown = false;
+    }
     this.allPatchSets = computeAllPatchSets(this.change);
     if (!this.change) return;
     this.labelsChanged(oldChange?.labels, this.change.labels);
@@ -2436,7 +2491,7 @@
     const classes = ['header'];
     const status = this.computeChangeStatusChips()?.[0];
     if (status) {
-      classes.push(status.toLowerCase());
+      classes.push(status.toLowerCase().replace(/\s/g, '-'));
     }
     if (this.editMode) {
       classes.push('editMode');
diff --git a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_screenshot_test.ts b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_screenshot_test.ts
index 97568af..43cface 100644
--- a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_screenshot_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_screenshot_test.ts
@@ -26,7 +26,9 @@
   waitUntil,
 } from '../../../test/test-utils';
 import {testResolver} from '../../../test/common-test-setup';
+import {AccessPermissionId} from '../../../utils/access-util';
 import {changeModelToken} from '../../../models/change/change-model';
+import {chatModelToken} from '../../../models/chat/chat-model';
 import {commentsModelToken} from '../../../models/comments/comments-model';
 import {
   ChangeChildView,
@@ -243,6 +245,11 @@
 
     const changeModel = testResolver(changeModelToken);
     changeModel.updateStateChange(change);
+    // The "Review Agent" action and "Create AI Review Prompt" link are
+    // gated on the ai_review permission from /changes/{id}/permissions.
+    changeModel.updateState({
+      permissions: {permissions: [AccessPermissionId.AI_REVIEW]},
+    });
 
     // Set comments model to a settled state (not loading)
     const commentsModel = testResolver(commentsModelToken);
@@ -369,9 +376,7 @@
   test('full page 1280px with chat panel', async () => {
     // Set viewport to ensure media queries respond correctly
     await setViewport({width: 1280, height: 800});
-    // Force open the chat panel
-    // eslint-disable-next-line @typescript-eslint/no-explicit-any
-    (element as any).showSidebarChat = true;
+    testResolver(chatModelToken).setChatPanelOpen(true);
 
     const container = document.createElement('div');
     container.style.width = '1280px';
@@ -393,6 +398,15 @@
       await waitUntil(
         () => !!element.shadowRoot!.querySelector('gr-file-list')
       );
+      await waitUntil(
+        () =>
+          document.documentElement.style.getPropertyValue(
+            '--change-header-height'
+          ) !== '0px' &&
+          document.documentElement.style.getPropertyValue(
+            '--change-header-height'
+          ) !== ''
+      );
 
       await visualDiff(container, 'gr-change-view-1280px-chat-open');
       await visualDiffDarkTheme(container, 'gr-change-view-1280px-chat-open');
@@ -400,4 +414,60 @@
       document.body.removeChild(container);
     }
   });
+
+  test('commit message markdown preview', async () => {
+    await setViewport({width: 801, height: 900});
+
+    const revisions = createRevisions(3);
+    revisions['3'].commit!.message =
+      '### Test commit\n\nWith **bold** and `code`.';
+
+    const changeModel = testResolver(changeModelToken);
+    changeModel.updateStateChange({
+      ...element.change!,
+      revisions,
+    });
+    await element.updateComplete;
+
+    const container = document.createElement('div');
+    container.style.width = '801px';
+    container.style.height = '900px';
+    container.style.overflow = 'hidden';
+    container.style.display = 'block';
+    container.style.backgroundColor = 'var(--view-background-color, #fff)';
+    container.appendChild(element);
+    document.body.appendChild(container);
+
+    try {
+      await waitUntil(() => !!element.fileList);
+      await element.updateComplete;
+      if (element.fileList) {
+        await element.fileList.updateComplete;
+      }
+      await waitUntil(
+        () => !!element.shadowRoot!.querySelector('gr-file-list')
+      );
+
+      const toggleBtn = element.commitMessageEditor?.shadowRoot?.querySelector(
+        'gr-button.markdown-toggle'
+      ) as HTMLElement | null;
+      toggleBtn?.click();
+      await element.commitMessageEditor?.updateComplete;
+      await element.updateComplete;
+      await waitUntil(
+        () =>
+          !!element.shadowRoot
+            ?.querySelector('gr-formatted-text')
+            ?.shadowRoot?.querySelector('div.markdown-html h3')
+      );
+
+      await visualDiff(container, 'gr-change-view-commit-markdown-801px');
+      await visualDiffDarkTheme(
+        container,
+        'gr-change-view-commit-markdown-801px'
+      );
+    } finally {
+      document.body.removeChild(container);
+    }
+  });
 });
diff --git a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_test.ts b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_test.ts
index 268fb5e..1e4f09b 100644
--- a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_test.ts
@@ -83,6 +83,7 @@
 import {UserModel, userModelToken} from '../../../models/user/user-model';
 import {pluginLoaderToken} from '../../shared/gr-js-api-interface/gr-plugin-loader';
 import {commentsModelToken} from '../../../models/comments/comments-model';
+import {GrEditableContent} from '../../shared/gr-editable-content/gr-editable-content';
 
 suite('gr-change-view tests', () => {
   let element: GrChangeView;
@@ -1172,6 +1173,24 @@
     assert.equal(element.computeHeaderClass(), 'header editMode');
   });
 
+  test('header class computation with status and undefined mergeable', () => {
+    element.change = {
+      ...createChangeViewChange(),
+      status: ChangeStatus.NEW,
+    };
+    element.mergeable = undefined;
+    assert.equal(element.computeHeaderClass(), 'header active');
+
+    element.mergeable = false;
+    assert.equal(element.computeHeaderClass(), 'header merge-conflict');
+
+    element.change = {
+      ...createChangeViewChange(),
+      status: ChangeStatus.MERGED,
+    };
+    assert.equal(element.computeHeaderClass(), 'header merged');
+  });
+
   test('maybeScrollToMessage', async () => {
     element.change = {
       ...createChangeViewChange(),
@@ -1651,5 +1670,156 @@
 
     assert.isFalse(contentWithSidebar.hideSide);
     assert.isTrue(processChatRequestStub.calledOnceWithExactly(event.detail));
+    const decorator = queryAndAssert(
+      element,
+      'gr-endpoint-decorator[name="chat-panel"]'
+    );
+    queryAndAssert(decorator, 'chat-panel');
+  });
+
+  test('open-chat-panel on document opens sidebar without calling processChatRequest', async () => {
+    const chatModel = testResolver(chatModelToken);
+    const processChatRequestStub = sinon.stub(chatModel, 'processChatRequest');
+    const contentWithSidebar = queryAndAssert<GrContentWithSidebar>(
+      element,
+      'gr-content-with-sidebar'
+    );
+    assert.isTrue(contentWithSidebar.hideSide);
+
+    document.dispatchEvent(new CustomEvent('open-chat-panel'));
+    await element.updateComplete;
+
+    assert.isFalse(contentWithSidebar.hideSide);
+    assert.isFalse(processChatRequestStub.called);
+  });
+
+  test('chat-panel endpoint can be replaced by a plugin', async () => {
+    element.change = {...createChangeViewChange(), labels: {}};
+    element.revision = createRevision();
+    await element.updateComplete;
+
+    const promise = mockPromise();
+    window.Gerrit.install(
+      promise.resolve,
+      '0.1',
+      'http://some/plugins/chat-plugin.js'
+    );
+    const plugin = (await promise) as PluginApi;
+
+    class CustomPluginChatPanel extends HTMLElement {
+      change?: unknown;
+
+      revision?: unknown;
+    }
+
+    const customChatTagName = 'custom-plugin-chat-panel';
+    if (!customElements.get(customChatTagName)) {
+      customElements.define(customChatTagName, CustomPluginChatPanel);
+    }
+
+    plugin.registerCustomComponent('chat-panel', customChatTagName, {
+      replace: true,
+    });
+
+    element.dispatchEvent(
+      new CustomEvent('explain-code-requested', {
+        detail: {prompt: ''},
+        bubbles: true,
+        composed: true,
+      })
+    );
+    await element.updateComplete;
+
+    const decorator = queryAndAssert(
+      element,
+      'gr-endpoint-decorator[name="chat-panel"]'
+    );
+    await waitUntil(() => !!decorator.querySelector(customChatTagName));
+
+    const customChat = queryAndAssert<CustomPluginChatPanel>(
+      decorator,
+      customChatTagName
+    );
+    assert.isNull(decorator.querySelector('chat-panel'));
+    assert.equal(customChat.change, element.change);
+    assert.equal(customChat.revision, element.revision);
+  });
+
+  test('toggles commit message markdown and preserves state across edit', async () => {
+    element.change = createChangeViewChange();
+    element.revision = createRevision();
+    element.loggedIn = true;
+    element.loading = false;
+    await element.updateComplete;
+
+    const editor = queryAndAssert<GrEditableContent>(
+      element,
+      '#commitMessageEditor'
+    );
+    editor.isUploader = true;
+    sinon.stub(editor, 'loadEmails').resolves();
+    await editor.updateComplete;
+
+    const formattedText = queryAndAssert<HTMLElement & {markdown: boolean}>(
+      editor,
+      'gr-formatted-text'
+    );
+    assert.isFalse(formattedText.markdown);
+    assert.isFalse(formattedText.hasAttribute('markdown'));
+
+    const toggleButton = queryAndAssert<HTMLElement>(
+      editor,
+      'gr-button.markdown-toggle'
+    );
+    toggleButton.click();
+    await editor.updateComplete;
+    await element.updateComplete;
+
+    assert.isTrue(formattedText.markdown);
+    assert.isTrue(formattedText.hasAttribute('markdown'));
+
+    // Pressing Edit while in Markdown mode hides both Markdown toggle and Edit buttons
+    const editButton = queryAndAssert<HTMLElement>(
+      editor,
+      'gr-button.edit-commit-message'
+    );
+    editButton.click();
+    await waitUntil(() => editor.editing);
+    await editor.updateComplete;
+    await element.updateComplete;
+
+    assert.isTrue(editor.hideEditCommitMessage);
+    assert.isNull(
+      editor.shadowRoot?.querySelector('gr-button.markdown-toggle')
+    );
+    assert.isNull(
+      editor.shadowRoot?.querySelector('gr-button.edit-commit-message')
+    );
+
+    // Canceling edit restores the viewer with Markdown still enabled
+    const cancelButton = queryAndAssert<HTMLElement>(
+      editor,
+      'gr-button.cancel-button'
+    );
+    cancelButton.click();
+    await editor.updateComplete;
+    await element.updateComplete;
+
+    assert.isFalse(editor.editing);
+    assert.isTrue(element.commitMessageMarkdown);
+    assert.isTrue(formattedText.markdown);
+    assert.isTrue(formattedText.hasAttribute('markdown'));
+
+    // Navigating to a different change resets commitMessageMarkdown to false
+    element.change = {
+      ...createChangeViewChange(),
+      _number: 999 as NumericChangeId,
+    };
+    await element.updateComplete;
+    await editor.updateComplete;
+
+    assert.isFalse(element.commitMessageMarkdown);
+    assert.isFalse(formattedText.markdown);
+    assert.isFalse(formattedText.hasAttribute('markdown'));
   });
 });
diff --git a/polygerrit-ui/app/elements/change/gr-confirm-move-dialog/gr-confirm-move-dialog_test.ts b/polygerrit-ui/app/elements/change/gr-confirm-move-dialog/gr-confirm-move-dialog_test.ts
index 3fe2e0b..af4e641 100644
--- a/polygerrit-ui/app/elements/change/gr-confirm-move-dialog/gr-confirm-move-dialog_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-confirm-move-dialog/gr-confirm-move-dialog_test.ts
@@ -7,7 +7,7 @@
 import './gr-confirm-move-dialog';
 import {GrConfirmMoveDialog} from './gr-confirm-move-dialog';
 import {queryAndAssert, stubRestApi} from '../../../test/test-utils';
-import {BranchName, GitRef, RepoName} from '../../../types/common';
+import {BranchName, GitRef} from '../../../types/common';
 import {assert, fixture, html} from '@open-wc/testing';
 import {GrAutocomplete} from '../../shared/gr-autocomplete/gr-autocomplete';
 
@@ -30,7 +30,7 @@
     });
     element = await fixture(
       html`<gr-confirm-move-dialog
-        .project=${'test-repo' as RepoName}
+        .project=${'test-repo'}
       ></gr-confirm-move-dialog>`
     );
   });
diff --git a/polygerrit-ui/app/elements/change/gr-confirm-revert-dialog/gr-confirm-revert-dialog_test.ts b/polygerrit-ui/app/elements/change/gr-confirm-revert-dialog/gr-confirm-revert-dialog_test.ts
index acdb84b..71e5815 100644
--- a/polygerrit-ui/app/elements/change/gr-confirm-revert-dialog/gr-confirm-revert-dialog_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-confirm-revert-dialog/gr-confirm-revert-dialog_test.ts
@@ -15,7 +15,6 @@
   ChangeSubmissionId,
   CommitId,
   TopicName,
-  ValidationOptionsInfo,
 } from '../../../types/common';
 import './gr-confirm-revert-dialog';
 import {GrConfirmRevertDialog} from './gr-confirm-revert-dialog';
@@ -169,7 +168,7 @@
       stubRestApi('getValidationOptions').returns(
         Promise.resolve({
           validation_options: [{name: 'o1', description: 'option 1'}],
-        } as ValidationOptionsInfo)
+        })
       );
     });
 
diff --git a/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog.ts b/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog.ts
index 8a1070f..d2ef591 100644
--- a/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog.ts
+++ b/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog.ts
@@ -8,12 +8,15 @@
 import '../../plugins/gr-endpoint-decorator/gr-endpoint-decorator';
 import '../../plugins/gr-endpoint-param/gr-endpoint-param';
 import '../gr-thread-list/gr-thread-list';
+import '../../shared/gr-button/gr-button';
 import {
   ActionInfo,
   ChangeActionDialog,
+  ChangeInfo,
   CommentThread,
   EDIT,
   RevisionInfo,
+  ServerInfo,
 } from '../../../types/common';
 import {GrDialog} from '../../shared/gr-dialog/gr-dialog';
 import {pluralize} from '../../../utils/string-util';
@@ -26,8 +29,11 @@
 import {EditRevisionInfo, ParsedChangeInfo} from '../../../types/types';
 import {commentsModelToken} from '../../../models/comments/comments-model';
 import {changeModelToken} from '../../../models/change/change-model';
+import {configModelToken} from '../../../models/config/config-model';
+import {relatedChangesModelToken} from '../../../models/change/related-changes-model';
 import {resolve} from '../../../models/dependency';
 import {fireNoBubbleNoCompose} from '../../../utils/event-util';
+import {createSearchUrl} from '../../../models/views/search';
 import {createChangeUrl} from '../../../models/views/change';
 import {navigationToken} from '../../core/gr-navigation/gr-navigation';
 
@@ -64,14 +70,24 @@
   initialised = false;
 
   @state()
+  private serverConfig?: ServerInfo;
+
+  @state()
+  private sameTopicChanges: ChangeInfo[] = [];
+
+  @state()
   sortedRevisions: (RevisionInfo | EditRevisionInfo)[] = [];
 
   private getCommentsModel = resolve(this, commentsModelToken);
 
   private getChangeModel = resolve(this, changeModelToken);
 
+  private getConfigModel = resolve(this, configModelToken);
+
   private getNavigation = resolve(this, navigationToken);
 
+  private getRelatedChangesModel = resolve(this, relatedChangesModelToken);
+
   static override get styles() {
     return [
       sharedStyles,
@@ -80,9 +96,42 @@
         #dialog {
           min-width: 40em;
         }
+        .topicDashboardLink {
+          display: block;
+          margin-top: var(--spacing-m);
+        }
+        .warningBox {
+          display: flex;
+          align-items: flex-start;
+          gap: var(--spacing-s);
+          background-color: var(--warning-background);
+          color: var(--warning-foreground);
+          border: 1px solid var(--warning-foreground);
+          border-radius: var(--border-radius);
+          padding: var(--spacing-m) var(--spacing-l);
+          margin-bottom: var(--spacing-l);
+        }
+        .warningBox gr-icon {
+          color: var(--warning-foreground);
+          flex-shrink: 0;
+          margin-top: 2px;
+        }
+
+        .footer-buttons {
+          display: flex;
+          align-items: center;
+          gap: var(--spacing-l);
+          flex: 1;
+        }
+        .footer-space {
+          flex-grow: 1;
+        }
         p {
           margin-bottom: var(--spacing-l);
         }
+        p:last-child {
+          margin-bottom: 0;
+        }
         .warningBeforeSubmit {
           color: var(--warning-foreground);
           vertical-align: top;
@@ -115,6 +164,69 @@
       () => this.getChangeModel().revisions$,
       x => (this.sortedRevisions = x)
     );
+    subscribe(
+      this,
+      () => this.getConfigModel().serverConfig$,
+      x => (this.serverConfig = x)
+    );
+    subscribe(
+      this,
+      () => this.getRelatedChangesModel().sameTopicChanges$,
+      x => (this.sameTopicChanges = x ?? [])
+    );
+  }
+
+  private isWholeTopicEnforced() {
+    return (
+      this.serverConfig?.change.submit_whole_topic ||
+      this.serverConfig?.change.enforce_whole_topic_submit
+    );
+  }
+
+  private hasSameTopicUnsubmittableChanges() {
+    return this.sameTopicChanges.some(c => !c.submittable);
+  }
+
+  private renderTopicWarning() {
+    if (
+      !this.sameTopicChanges.length ||
+      !this.hasSameTopicUnsubmittableChanges()
+    )
+      return '';
+    return html`
+      <div class="warningBox">
+        <gr-icon icon="warning" filled></gr-icon>
+        Some changes in this topic are not ready to submit.
+      </div>
+    `;
+  }
+
+  private renderTopicSection() {
+    const topic = this.change?.topic;
+    if (!topic) return '';
+    const dashboardUrl = createSearchUrl({topic});
+    return html`
+      <div class="section">
+        ${this.renderTopicWarning()}
+        <a
+          class="topicDashboardLink"
+          href=${dashboardUrl}
+          target="_blank"
+          rel="noopener noreferrer"
+          >View all changes with topic <strong>${topic}</strong></a
+        >
+      </div>
+    `;
+  }
+
+  private renderWarnings() {
+    const private_ = this.renderPrivate();
+    const unresolvedComments = this.renderUnresolvedCommentCount();
+    const changeEdit = this.renderChangeEdit();
+    if (!private_ && !unresolvedComments && !changeEdit) return '';
+    return html`
+      <div class="section">${private_}${unresolvedComments}${changeEdit}</div>
+    `;
   }
 
   private renderPrivate() {
@@ -175,13 +287,17 @@
 
   private renderInitialised() {
     if (!this.initialised) return '';
+    const hasTopicWithChanges =
+      !!this.change?.topic && this.sameTopicChanges.length > 0;
+    const submitWholeTopicDisabled = this.hasSameTopicUnsubmittableChanges();
+    const showSubmitButton =
+      !hasTopicWithChanges || !this.isWholeTopicEnforced();
     return html`
       <div class="header" slot="header">${this.action?.label}</div>
       <div class="main" slot="main">
         <gr-endpoint-decorator name="confirm-submit-change">
           <p>Ready to submit "<strong>${this.change?.subject}</strong>"?</p>
-          ${this.renderPrivate()} ${this.renderUnresolvedCommentCount()}
-          ${this.renderChangeEdit()}
+          ${this.renderWarnings()} ${this.renderTopicSection()}
           <gr-endpoint-param
             name="change"
             .value=${this.change}
@@ -192,13 +308,31 @@
           ></gr-endpoint-param>
         </gr-endpoint-decorator>
       </div>
+      <div class="footer-buttons" slot="footer">
+        <div class="footer-space"></div>
+        <gr-button link @click=${this.handleCancelTap}>Cancel</gr-button>
+        ${showSubmitButton
+          ? html`<gr-button primary @click=${this.handleConfirmTap}
+              >Submit</gr-button
+            >`
+          : ''}
+        ${hasTopicWithChanges
+          ? html`<gr-button
+              primary
+              ?disabled=${submitWholeTopicDisabled}
+              @click=${this.handleSubmitWholeTopicTap}
+              >Submit Whole Topic</gr-button
+            >`
+          : ''}
+      </div>
     `;
   }
 
   override render() {
     return html` <gr-dialog
       id="dialog"
-      confirm-label="Continue"
+      confirm-label=""
+      cancel-label=""
       confirm-on-enter=""
       @cancel=${this.handleCancelTap}
       @confirm=${this.handleConfirmTap}
@@ -212,7 +346,12 @@
   }
 
   resetFocus() {
-    this.dialog?.resetFocus();
+    // Buttons are rendered directly in slot="footer", not by gr-dialog,
+    // so focus the Submit button directly instead of delegating to gr-dialog.
+    const submitBtn = this.shadowRoot?.querySelector<HTMLElement>(
+      '.footer-buttons gr-button[primary]'
+    );
+    submitBtn?.focus();
   }
 
   // Private method, but visible for testing.
@@ -232,7 +371,13 @@
   private handleConfirmTap(e: Event) {
     e.preventDefault();
     e.stopPropagation();
-    fireNoBubbleNoCompose(this, 'confirm', {});
+    fireNoBubbleNoCompose(this, 'confirm', {submitWholeTopic: false});
+  }
+
+  private handleSubmitWholeTopicTap(e: Event) {
+    e.preventDefault();
+    e.stopPropagation();
+    fireNoBubbleNoCompose(this, 'confirm', {submitWholeTopic: true});
   }
 
   private handleCancelTap(e: Event) {
diff --git a/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog_screenshot_test.ts b/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog_screenshot_test.ts
new file mode 100644
index 0000000..749304c
--- /dev/null
+++ b/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog_screenshot_test.ts
@@ -0,0 +1,199 @@
+/**
+ * @license
+ * Copyright (C) 2026 The Android Open Source Project
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import '../../../test/common-test-setup';
+import './gr-confirm-submit-dialog';
+import {fixture, html} from '@open-wc/testing';
+// Until https://github.com/modernweb-dev/web/issues/2804 is fixed
+// @ts-ignore
+import {visualDiff} from '@web/test-runner-visual-regression';
+import {GrConfirmSubmitDialog} from './gr-confirm-submit-dialog';
+import {visualDiffDarkTheme} from '../../../test/test-utils';
+import {testResolver} from '../../../test/common-test-setup';
+import {relatedChangesModelToken} from '../../../models/change/related-changes-model';
+import {configModelToken} from '../../../models/config/config-model';
+import {
+  createChange,
+  createChangeConfig,
+  createParsedChange,
+  createServerInfo,
+} from '../../../test/test-data-generators';
+import {RepoName, TopicName} from '../../../types/common';
+
+suite('gr-confirm-submit-dialog screenshot tests', () => {
+  let element: GrConfirmSubmitDialog;
+
+  setup(async () => {
+    element = await fixture<GrConfirmSubmitDialog>(
+      html`<gr-confirm-submit-dialog></gr-confirm-submit-dialog>`
+    );
+    element.action = {label: 'Submit'};
+    element.initialised = true;
+  });
+
+  test('no topic', async () => {
+    element.change = {
+      ...createParsedChange(),
+      subject: 'My change subject',
+      revisions: {},
+    };
+    await element.updateComplete;
+
+    await visualDiff(element, 'gr-confirm-submit-dialog-no-topic');
+    await visualDiffDarkTheme(element, 'gr-confirm-submit-dialog-no-topic');
+  });
+
+  test('with topic, all changes submittable', async () => {
+    const relatedChangesModel = testResolver(relatedChangesModelToken);
+    relatedChangesModel.updateState({
+      sameTopicChanges: [
+        {
+          ...createChange(),
+          subject: 'Change A',
+          project: 'repo/a' as RepoName,
+          submittable: true,
+        },
+        {
+          ...createChange(),
+          subject: 'Change B',
+          project: 'repo/b' as RepoName,
+          submittable: true,
+        },
+      ],
+    });
+    element.change = {
+      ...createParsedChange(),
+      subject: 'My change subject',
+      topic: 'my-feature-topic' as TopicName,
+      revisions: {},
+    };
+    await element.updateComplete;
+
+    await visualDiff(element, 'gr-confirm-submit-dialog-topic-all-submittable');
+    await visualDiffDarkTheme(
+      element,
+      'gr-confirm-submit-dialog-topic-all-submittable'
+    );
+  });
+
+  test('with topic, some changes not submittable', async () => {
+    const relatedChangesModel = testResolver(relatedChangesModelToken);
+    relatedChangesModel.updateState({
+      sameTopicChanges: [
+        {
+          ...createChange(),
+          subject: 'Change A',
+          project: 'repo/a' as RepoName,
+          submittable: true,
+        },
+        {
+          ...createChange(),
+          subject: 'Change B - not ready',
+          project: 'repo/b' as RepoName,
+          submittable: false,
+        },
+      ],
+    });
+    element.change = {
+      ...createParsedChange(),
+      subject: 'My change subject',
+      topic: 'my-feature-topic' as TopicName,
+      revisions: {},
+    };
+    await element.updateComplete;
+
+    await visualDiff(element, 'gr-confirm-submit-dialog-topic-unsubmittable');
+    await visualDiffDarkTheme(
+      element,
+      'gr-confirm-submit-dialog-topic-unsubmittable'
+    );
+  });
+
+  test('whole topic enforced, all changes submittable', async () => {
+    const configModel = testResolver(configModelToken);
+    configModel.updateState({
+      serverConfig: {
+        ...createServerInfo(),
+        change: {...createChangeConfig(), submit_whole_topic: true},
+      },
+    });
+    const relatedChangesModel = testResolver(relatedChangesModelToken);
+    relatedChangesModel.updateState({
+      sameTopicChanges: [
+        {
+          ...createChange(),
+          subject: 'Change A',
+          project: 'repo/a' as RepoName,
+          submittable: true,
+        },
+        {
+          ...createChange(),
+          subject: 'Change B',
+          project: 'repo/b' as RepoName,
+          submittable: true,
+        },
+      ],
+    });
+    element.change = {
+      ...createParsedChange(),
+      subject: 'My change subject',
+      topic: 'my-feature-topic' as TopicName,
+      revisions: {},
+    };
+    await element.updateComplete;
+
+    await visualDiff(
+      element,
+      'gr-confirm-submit-dialog-topic-enforced-all-submittable'
+    );
+    await visualDiffDarkTheme(
+      element,
+      'gr-confirm-submit-dialog-topic-enforced-all-submittable'
+    );
+  });
+
+  test('whole topic enforced, some changes not submittable', async () => {
+    const configModel = testResolver(configModelToken);
+    configModel.updateState({
+      serverConfig: {
+        ...createServerInfo(),
+        change: {...createChangeConfig(), submit_whole_topic: true},
+      },
+    });
+    const relatedChangesModel = testResolver(relatedChangesModelToken);
+    relatedChangesModel.updateState({
+      sameTopicChanges: [
+        {
+          ...createChange(),
+          subject: 'Change A',
+          project: 'repo/a' as RepoName,
+          submittable: true,
+        },
+        {
+          ...createChange(),
+          subject: 'Change B - not ready',
+          project: 'repo/b' as RepoName,
+          submittable: false,
+        },
+      ],
+    });
+    element.change = {
+      ...createParsedChange(),
+      subject: 'My change subject',
+      topic: 'my-feature-topic' as TopicName,
+      revisions: {},
+    };
+    await element.updateComplete;
+
+    await visualDiff(
+      element,
+      'gr-confirm-submit-dialog-topic-enforced-unsubmittable'
+    );
+    await visualDiffDarkTheme(
+      element,
+      'gr-confirm-submit-dialog-topic-enforced-unsubmittable'
+    );
+  });
+});
diff --git a/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog_test.ts b/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog_test.ts
index d221e16..abcded6 100644
--- a/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog_test.ts
@@ -5,14 +5,20 @@
  */
 import '../../../test/common-test-setup';
 import {
+  createChange,
+  createChangeConfig,
   createParsedChange,
   createRevision,
+  createServerInfo,
   createThread,
 } from '../../../test/test-data-generators';
-import {EDIT} from '../../../types/common';
+import {EDIT, RepoName, TopicName} from '../../../types/common';
 import {GrConfirmSubmitDialog} from './gr-confirm-submit-dialog';
 import './gr-confirm-submit-dialog';
+import {configModelToken} from '../../../models/config/config-model';
 import {assert, fixture, html} from '@open-wc/testing';
+import {testResolver} from '../../../test/common-test-setup';
+import {relatedChangesModelToken} from '../../../models/change/related-changes-model';
 
 suite('gr-confirm-submit-dialog tests', () => {
   let element: GrConfirmSubmitDialog;
@@ -37,7 +43,8 @@
       element,
       /* HTML */ `
         <gr-dialog
-          confirm-label="Continue"
+          cancel-label=""
+          confirm-label=""
           confirm-on-enter=""
           id="dialog"
           role="dialog"
@@ -54,6 +61,20 @@
               <gr-endpoint-param name="action"> </gr-endpoint-param>
             </gr-endpoint-decorator>
           </div>
+          <div class="footer-buttons" slot="footer">
+            <div class="footer-space"></div>
+            <gr-button aria-disabled="false" link="" role="button" tabindex="0">
+              Cancel
+            </gr-button>
+            <gr-button
+              aria-disabled="false"
+              primary=""
+              role="button"
+              tabindex="0"
+            >
+              Submit
+            </gr-button>
+          </div>
         </gr-dialog>
       `
     );
@@ -74,6 +95,210 @@
     );
   });
 
+  test('renders topic dashboard link when change has a topic', async () => {
+    const relatedChangesModel = testResolver(relatedChangesModelToken);
+    relatedChangesModel.updateState({
+      sameTopicChanges: [
+        {
+          ...createChange(),
+          subject: 'Change A',
+          project: 'repo/a' as RepoName,
+        },
+      ],
+    });
+    element.action = {label: 'Submit'};
+    element.change = {
+      ...createParsedChange(),
+      subject: 'my-subject',
+      topic: 'my-topic' as TopicName,
+      revisions: {},
+    };
+    await element.updateComplete;
+
+    const link = element.shadowRoot!.querySelector(
+      'a.topicDashboardLink'
+    ) as HTMLAnchorElement;
+    assert.isNotNull(link);
+    assert.include(link.textContent, 'my-topic');
+    assert.equal(link.target, '_blank');
+    assert.include(link.href, 'my-topic');
+  });
+
+  test('does not render topic section when change has no topic', async () => {
+    element.action = {label: 'Submit'};
+    element.change = {
+      ...createParsedChange(),
+      subject: 'my-subject',
+      revisions: {},
+    };
+    await element.updateComplete;
+
+    assert.isNull(element.shadowRoot!.querySelector('a.topicDashboardLink'));
+  });
+
+  test('warning shown when topic has unsubmittable changes', async () => {
+    const relatedChangesModel = testResolver(relatedChangesModelToken);
+    relatedChangesModel.updateState({
+      sameTopicChanges: [
+        {
+          ...createChange(),
+          subject: 'Change A',
+          project: 'repo/a' as RepoName,
+          submittable: false,
+        },
+      ],
+    });
+    element.action = {label: 'Submit'};
+    element.change = {
+      ...createParsedChange(),
+      subject: 'my-subject',
+      topic: 'my-topic' as TopicName,
+      revisions: {},
+    };
+    await element.updateComplete;
+
+    const warning = element.shadowRoot!.querySelector('.warningBox');
+    assert.isNotNull(warning);
+    assert.include(
+      warning.textContent,
+      'Some changes in this topic are not ready to submit.'
+    );
+  });
+
+  test('no warning shown when all topic changes are submittable', async () => {
+    const relatedChangesModel = testResolver(relatedChangesModelToken);
+    relatedChangesModel.updateState({
+      sameTopicChanges: [
+        {
+          ...createChange(),
+          subject: 'Change A',
+          project: 'repo/a' as RepoName,
+          submittable: true,
+        },
+      ],
+    });
+    element.action = {label: 'Submit'};
+    element.change = {
+      ...createParsedChange(),
+      subject: 'my-subject',
+      topic: 'my-topic' as TopicName,
+      revisions: {},
+    };
+    await element.updateComplete;
+
+    assert.isNull(element.shadowRoot!.querySelector('.warningBox'));
+  });
+
+  test('Submit Whole Topic button present when topic has changes', async () => {
+    const relatedChangesModel = testResolver(relatedChangesModelToken);
+    relatedChangesModel.updateState({
+      sameTopicChanges: [
+        {
+          ...createChange(),
+          subject: 'Change A',
+          project: 'repo/a' as RepoName,
+          submittable: true,
+        },
+      ],
+    });
+    element.action = {label: 'Submit'};
+    element.change = {
+      ...createParsedChange(),
+      subject: 'my-subject',
+      topic: 'my-topic' as TopicName,
+      revisions: {},
+    };
+    await element.updateComplete;
+
+    const btns = element.shadowRoot!.querySelectorAll(
+      '.footer-buttons gr-button[primary]'
+    );
+    assert.equal(btns.length, 2);
+    const wholeTopicBtn = btns[1] as HTMLElement;
+    assert.include(wholeTopicBtn.textContent, 'Submit Whole Topic');
+    assert.isFalse(wholeTopicBtn.hasAttribute('disabled'));
+  });
+
+  test('Submit Whole Topic button disabled when topic has unsubmittable changes', async () => {
+    const relatedChangesModel = testResolver(relatedChangesModelToken);
+    relatedChangesModel.updateState({
+      sameTopicChanges: [
+        {
+          ...createChange(),
+          subject: 'Change A',
+          project: 'repo/a' as RepoName,
+          submittable: false,
+        },
+      ],
+    });
+    element.action = {label: 'Submit'};
+    element.change = {
+      ...createParsedChange(),
+      subject: 'my-subject',
+      topic: 'my-topic' as TopicName,
+      revisions: {},
+    };
+    await element.updateComplete;
+
+    const btns = element.shadowRoot!.querySelectorAll(
+      '.footer-buttons gr-button[primary]'
+    );
+    assert.equal(btns.length, 2);
+    const wholeTopicBtn = btns[1] as HTMLElement;
+    assert.isTrue(wholeTopicBtn.hasAttribute('disabled'));
+  });
+
+  test('Submit Whole Topic button absent when change has no topic', async () => {
+    element.action = {label: 'Submit'};
+    element.change = {
+      ...createParsedChange(),
+      subject: 'my-subject',
+      revisions: {},
+    };
+    await element.updateComplete;
+
+    const btns = element.shadowRoot!.querySelectorAll(
+      '.footer-buttons gr-button[primary]'
+    );
+    assert.equal(btns.length, 1);
+    assert.include(btns[0].textContent, 'Submit');
+    assert.notInclude(btns[0].textContent, 'Whole');
+  });
+
+  test('Submit Whole Topic button fires confirm with submitWholeTopic=true', async () => {
+    const relatedChangesModel = testResolver(relatedChangesModelToken);
+    relatedChangesModel.updateState({
+      sameTopicChanges: [
+        {
+          ...createChange(),
+          subject: 'Change A',
+          project: 'repo/a' as RepoName,
+          submittable: true,
+        },
+      ],
+    });
+    element.action = {label: 'Submit'};
+    element.change = {
+      ...createParsedChange(),
+      subject: 'my-subject',
+      topic: 'my-topic' as TopicName,
+      revisions: {},
+    };
+    await element.updateComplete;
+
+    let detail: {submitWholeTopic: boolean} | undefined;
+    element.addEventListener('confirm', (e: Event) => {
+      detail = (e as CustomEvent).detail;
+    });
+
+    const btns = element.shadowRoot!.querySelectorAll(
+      '.footer-buttons gr-button[primary]'
+    );
+    (btns[1] as HTMLElement).click();
+
+    assert.isTrue(detail?.submitWholeTopic);
+  });
+
   test('computeHasChangeEdit', () => {
     element.change = {
       ...createParsedChange(),
@@ -93,4 +318,77 @@
     };
     assert.isFalse(element.computeHasChangeEdit());
   });
+
+  suite('whole topic enforced by server config', () => {
+    setup(() => {
+      const configModel = testResolver(configModelToken);
+      configModel.updateState({
+        serverConfig: {
+          ...createServerInfo(),
+          change: {...createChangeConfig(), submit_whole_topic: true},
+        },
+      });
+    });
+
+    test('only Submit Whole Topic button shown when enforced', async () => {
+      const relatedChangesModel = testResolver(relatedChangesModelToken);
+      relatedChangesModel.updateState({
+        sameTopicChanges: [
+          {
+            ...createChange(),
+            subject: 'Change A',
+            project: 'repo/a' as RepoName,
+            submittable: true,
+          },
+        ],
+      });
+      element.action = {label: 'Submit'};
+      element.change = {
+        ...createParsedChange(),
+        subject: 'my-subject',
+        topic: 'my-topic' as TopicName,
+        revisions: {},
+      };
+      await element.updateComplete;
+
+      const btns = element.shadowRoot!.querySelectorAll(
+        '.footer-buttons gr-button[primary]'
+      );
+      assert.equal(btns.length, 1);
+      assert.include(btns[0].textContent, 'Submit Whole Topic');
+    });
+
+    test('Submit Whole Topic fires confirm with submitWholeTopic=true when enforced', async () => {
+      const relatedChangesModel = testResolver(relatedChangesModelToken);
+      relatedChangesModel.updateState({
+        sameTopicChanges: [
+          {
+            ...createChange(),
+            subject: 'Change A',
+            project: 'repo/a' as RepoName,
+            submittable: true,
+          },
+        ],
+      });
+      element.action = {label: 'Submit'};
+      element.change = {
+        ...createParsedChange(),
+        subject: 'my-subject',
+        topic: 'my-topic' as TopicName,
+        revisions: {},
+      };
+      await element.updateComplete;
+
+      let detail: {submitWholeTopic: boolean} | undefined;
+      element.addEventListener('confirm', (e: Event) => {
+        detail = (e as CustomEvent).detail;
+      });
+      const btn = element.shadowRoot!.querySelector<HTMLElement>(
+        '.footer-buttons gr-button[primary]'
+      )!;
+      btn.click();
+
+      assert.isTrue(detail?.submitWholeTopic);
+    });
+  });
 });
diff --git a/polygerrit-ui/app/elements/change/gr-file-list-header/gr-file-list-header.ts b/polygerrit-ui/app/elements/change/gr-file-list-header/gr-file-list-header.ts
index bca0a468..f3aeb00 100644
--- a/polygerrit-ui/app/elements/change/gr-file-list-header/gr-file-list-header.ts
+++ b/polygerrit-ui/app/elements/change/gr-file-list-header/gr-file-list-header.ts
@@ -350,7 +350,6 @@
   }
 
   private renderDiffPrefsContainer() {
-    if (this.editMode) return nothing;
     return html`
       <span id="diffPrefsContainer">
         <gr-tooltip-content has-tooltip title="Diff preferences">
diff --git a/polygerrit-ui/app/elements/change/gr-file-list-header/gr-file-list-header_test.ts b/polygerrit-ui/app/elements/change/gr-file-list-header/gr-file-list-header_test.ts
index 42cf780..be3ac7c 100644
--- a/polygerrit-ui/app/elements/change/gr-file-list-header/gr-file-list-header_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-file-list-header/gr-file-list-header_test.ts
@@ -308,16 +308,6 @@
       await element.updateComplete;
     });
 
-    test('patch specific elements', async () => {
-      element.editMode = true;
-      await element.updateComplete;
-      assert.isFalse(Boolean(query(element, '#diffPrefsContainer')));
-
-      element.editMode = false;
-      await element.updateComplete;
-      assert.isTrue(Boolean(query(element, '#diffPrefsContainer')));
-    });
-
     test('edit-controls visibility', async () => {
       element.editMode = false;
       await element.updateComplete;
diff --git a/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list.ts b/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list.ts
index 4e146da..681bc79 100644
--- a/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list.ts
+++ b/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list.ts
@@ -6,6 +6,8 @@
 import '../../../styles/gr-a11y-styles';
 import '../../../styles/shared-styles';
 import '../../diff/gr-diff-host/gr-diff-host';
+import '../../diff/gr-diff-lean-viewer/gr-diff-lean-viewer';
+import type {GrDiffLeanViewer} from '../../diff/gr-diff-lean-viewer/gr-diff-lean-viewer';
 import '../../diff/gr-diff-markdown-viewer/gr-diff-markdown-viewer';
 import type {GrDiffMarkdownViewer} from '../../diff/gr-diff-markdown-viewer/gr-diff-markdown-viewer';
 import '../../diff/gr-diff-preferences-dialog/gr-diff-preferences-dialog';
@@ -44,7 +46,12 @@
   PatchRange,
   RevisionPatchSetNum,
 } from '../../../types/common';
-import {isMarkdownDiff} from '../../../utils/diff-util';
+import {
+  canBlameFile,
+  computeBlameToggleLabel,
+  isLeanDiff,
+  isMarkdownDiff,
+} from '../../../utils/diff-util';
 import {DiffInfo, DiffPreferencesInfo} from '../../../types/diff';
 import {GrDiffHost} from '../../diff/gr-diff-host/gr-diff-host';
 import {GrDiffPreferencesDialog} from '../../diff/gr-diff-preferences-dialog/gr-diff-preferences-dialog';
@@ -60,6 +67,7 @@
 import {checksModelToken, RunResult} from '../../../models/checks/checks-model';
 import {changeModelToken} from '../../../models/change/change-model';
 import {filesModelToken} from '../../../models/change/files-model';
+import {configModelToken} from '../../../models/config/config-model';
 import {ShortcutController} from '../../lit/shortcut-controller';
 import {
   css,
@@ -281,6 +289,24 @@
 
   // Private but used in tests.
   @state()
+  richLeanFiles: Set<string> = new Set();
+
+  /** Paths of expanded files that currently show blame for the left side. */
+  // Private but used in tests.
+  @state()
+  blameFiles: Set<string> = new Set();
+
+  /** Paths of expanded files whose diff host is loading blame. */
+  @state()
+  private blameLoadingHosts: Map<string, GrDiffHost> = new Map();
+
+  // Whether the server allows to show blame information.
+  // Private but used in tests.
+  @state()
+  allowBlame = false;
+
+  // Private but used in tests.
+  @state()
   showSizeBars = true;
 
   // For merge commits vs Auto Merge, an extra file row is shown detailing the
@@ -339,6 +365,8 @@
 
   private readonly getViewModel = resolve(this, changeViewModelToken);
 
+  private readonly getConfigModel = resolve(this, configModelToken);
+
   // private but used in test
   fileCursor = new GrCursorManager();
 
@@ -526,23 +554,35 @@
           margin-left: var(--spacing-s);
           width: 1.9em;
         }
-        .richMarkdownToggle {
+        .richMarkdownToggle,
+        .richLeanToggle,
+        .blameToggle {
           align-items: center;
           display: inline-flex;
           margin-left: var(--spacing-xs);
           vertical-align: middle;
           white-space: nowrap;
+        }
+        .richMarkdownToggle,
+        .richLeanToggle {
           opacity: 0;
         }
         .row:hover .richMarkdownToggle,
         .row:focus-within .richMarkdownToggle,
-        .row.expanded .richMarkdownToggle {
+        .row.expanded .richMarkdownToggle,
+        .row:hover .richLeanToggle,
+        .row:focus-within .richLeanToggle,
+        .row.expanded .richLeanToggle {
           opacity: 100;
         }
-        .richMarkdownToggle gr-button {
+        .richMarkdownToggle gr-button,
+        .richLeanToggle gr-button,
+        .blameToggle gr-button {
           --gr-button-padding: 0 var(--spacing-s);
         }
-        .richMarkdownToggle gr-icon {
+        .richMarkdownToggle gr-icon,
+        .richLeanToggle gr-icon,
+        .blameToggle gr-icon {
           font-size: 16px;
           margin-right: var(--spacing-xs);
         }
@@ -715,10 +755,14 @@
           .fullFileName {
             display: none;
           }
-          .richMarkdownToggle .richToggleLabel {
+          .richMarkdownToggle .richToggleLabel,
+          .richLeanToggle .richToggleLabel,
+          .blameToggle .blameToggleLabel {
             display: none;
           }
-          .richMarkdownToggle gr-icon {
+          .richMarkdownToggle gr-icon,
+          .richLeanToggle gr-icon,
+          .blameToggle gr-icon {
             margin-right: 0;
           }
         }
@@ -968,15 +1012,37 @@
       () => this.getChangeModel().basePatchNum$,
       x => (this.basePatchNum = x)
     );
+    subscribe(
+      this,
+      () => this.getConfigModel().serverConfig$,
+      serverConfig => {
+        this.allowBlame = serverConfig?.change.allow_blame ?? false;
+      }
+    );
   }
 
   override willUpdate(changedProperties: PropertyValues): void {
     if (
       changedProperties.has('patchNum') ||
-      changedProperties.has('basePatchNum')
+      changedProperties.has('basePatchNum') ||
+      changedProperties.has('changeNum')
     ) {
-      this.resetFileState();
-      this.collapseAllDiffs();
+      if (
+        changedProperties.get('patchNum') !== undefined ||
+        changedProperties.get('basePatchNum') !== undefined ||
+        changedProperties.get('changeNum') !== undefined
+      ) {
+        this.diffsByPath.clear();
+        this.richLeanFiles = new Set();
+        this.richMarkdownFiles = new Set();
+      }
+      if (
+        changedProperties.has('patchNum') ||
+        changedProperties.has('basePatchNum')
+      ) {
+        this.resetFileState();
+        this.collapseAllDiffs();
+      }
     }
     if (
       changedProperties.has('diffPrefs') ||
@@ -1259,10 +1325,21 @@
               ></gr-diff-markdown-viewer>
             `
           )}
-          <div ?hidden=${this.isShowingRichMarkdown(file.__path)}>
+          ${when(
+            this.isShowingRichLean(file.__path),
+            () => html`
+              <gr-diff-lean-viewer
+                .diff=${this.getDiffForPath(file.__path)}
+                .path=${file.__path}
+                .patchRange=${this.patchRange}
+                .loggedIn=${this.loggedIn}
+              ></gr-diff-lean-viewer>
+            `
+          )}
+          <div ?hidden=${this.isShowingRichDiff(file.__path)}>
             <gr-diff-host
-              ?hidden=${this.isShowingRichMarkdown(file.__path)}
-              ?disabledThreads=${this.isShowingRichMarkdown(file.__path)}
+              ?hidden=${this.isShowingRichDiff(file.__path)}
+              ?disabledThreads=${this.isShowingRichDiff(file.__path)}
               ?noAutoRender=${true}
               ?showLoadFailure=${true}
               .changeNum=${this.changeNum}
@@ -1272,11 +1349,18 @@
               .path=${file.__path}
               .projectName=${this.change?.project}
               ?noRenderOnPrefsChange=${true}
+              @is-blame-loaded-changed=${(e: ValueChangedEvent<boolean>) =>
+                this.onIsBlameLoadedChanged(
+                  e.currentTarget as GrDiffHost,
+                  e.detail.value
+                )}
               @diff-changed=${(e: CustomEvent<{value?: DiffInfo}>) => {
                 if (e.detail.value) {
                   this.diffsByPath.set(file.__path, e.detail.value);
-                  this.requestUpdate();
+                } else {
+                  this.diffsByPath.delete(file.__path);
                 }
+                this.requestUpdate();
               }}
             ></gr-diff-host>
           </div>
@@ -1427,6 +1511,7 @@
           ></gr-copy-clipboard>
         </a>
         ${this.renderRichMarkdownToggle(file)}
+        ${this.renderRichLeanToggle(file)} ${this.renderBlameToggle(file)}
         ${when(
           file.diffs_too_expensive_to_compute,
           () => html`
@@ -1565,7 +1650,14 @@
         For example, without a nested div screen readers pronounce the
         "Commit message" row content with incorrect column headers.
         -->
-      <div class=${this.computeClass('', file.__path)}>
+      <div
+        class=${this.computeClass(
+          '',
+          file.__path,
+          /* showForCommitMessage */ false,
+          file.status
+        )}
+      >
         ${when(
           file.diffs_too_expensive_to_compute,
           () => html`
@@ -1688,6 +1780,30 @@
     return this.richMarkdownFiles.has(path);
   }
 
+  private isEligibleForRichLean(
+    path?: string,
+    file?: NormalizedFileInfo
+  ): boolean {
+    if (!path) return false;
+    const diff = this.diffsByPath.get(path);
+    const resolvedFile = file ?? this.files.find(f => f.__path === path);
+    return (
+      isLeanDiff(path, diff) &&
+      !resolvedFile?.binary &&
+      !resolvedFile?.diffs_too_expensive_to_compute &&
+      !diff?.binary
+    );
+  }
+
+  isShowingRichLean(path?: string): boolean {
+    if (!path || !this.isEligibleForRichLean(path)) return false;
+    return this.richLeanFiles.has(path);
+  }
+
+  private isShowingRichDiff(path?: string): boolean {
+    return this.isShowingRichMarkdown(path) || this.isShowingRichLean(path);
+  }
+
   async toggleRichMarkdown(path: string, e?: Event) {
     if (e) {
       e.stopPropagation();
@@ -1763,6 +1879,159 @@
     `;
   }
 
+  async toggleRichLean(path: string, e?: Event) {
+    if (e) {
+      e.stopPropagation();
+      e.preventDefault();
+    }
+    const isRich = this.richLeanFiles.has(path);
+    if (isRich) {
+      const viewers = Array.from(
+        this.shadowRoot?.querySelectorAll<GrDiffLeanViewer>(
+          'gr-diff-lean-viewer'
+        ) ?? []
+      );
+      const viewer = viewers.find(v => v.path === path);
+      await viewer?.autoSaveDrafts();
+    } else {
+      const diffHosts = Array.from(
+        this.shadowRoot?.querySelectorAll<GrDiffHost>('gr-diff-host') ?? []
+      );
+      const diffHost = this.findDiffByPath(path, diffHosts);
+      await diffHost?.autoSaveDrafts();
+    }
+    const newSet = new Set(this.richLeanFiles);
+    if (newSet.has(path)) {
+      newSet.delete(path);
+    } else {
+      if (!this.isEligibleForRichLean(path)) return;
+      newSet.add(path);
+      if (!this.isFileExpanded(path)) {
+        const newExpanded = new Set(this.expandedFiles);
+        newExpanded.add(path);
+        this.expandedFiles = newExpanded;
+      }
+    }
+    this.richLeanFiles = newSet;
+  }
+
+  private renderRichLeanToggle(file: NormalizedFileInfo) {
+    if (!this.isEligibleForRichLean(file.__path, file)) {
+      return nothing;
+    }
+    const isRich = this.isShowingRichLean(file.__path);
+    return html`
+      <div class="richLeanToggle">
+        <gr-tooltip-content
+          has-tooltip
+          title=${isRich ? 'View source diff' : 'View rich rendered Lean diff'}
+        >
+          <gr-button
+            link
+            class="toggleRichLean"
+            @click=${(e: MouseEvent) => this.toggleRichLean(file.__path, e)}
+          >
+            <gr-icon icon=${isRich ? 'code' : 'preview'} filled></gr-icon>
+            <span class="richToggleLabel"
+              >${isRich ? 'Source diff' : 'Rich diff'}</span
+            >
+          </gr-button>
+        </gr-tooltip-content>
+      </div>
+    `;
+  }
+
+  /** Only expanded files have a diff host that can load the blame. */
+  private canBlame(file: NormalizedFileInfo) {
+    return (
+      canBlameFile(
+        this.allowBlame,
+        file.__path,
+        file,
+        this.diffsByPath.get(file.__path)
+      ) &&
+      this.isFileExpanded(file.__path) &&
+      !this.isShowingRichDiff(file.__path)
+    );
+  }
+
+  /**
+   * Shows or hides blame information of the given expanded file, as in the
+   * diff view.
+   */
+  async toggleBlame(path: string, e?: Event) {
+    if (e) {
+      e.stopPropagation();
+      e.preventDefault();
+    }
+    if (this.blameLoadingHosts.has(path)) return;
+    const host = this.findDiffByPath(path, this.diffs);
+    if (!host) return;
+    if (this.blameFiles.has(path)) {
+      host.clearBlame();
+      return;
+    }
+    this.blameLoadingHosts = new Map(this.blameLoadingHosts).set(path, host);
+    try {
+      await host.loadBlame();
+    } catch {
+      // gr-diff-host has already shown an alert.
+    } finally {
+      // The file may have been collapsed and re-expanded meanwhile, with the
+      // new host loading blame on its own.
+      if (this.blameLoadingHosts.get(path) === host) {
+        const newLoading = new Map(this.blameLoadingHosts);
+        newLoading.delete(path);
+        this.blameLoadingHosts = newLoading;
+      }
+    }
+  }
+
+  private onIsBlameLoadedChanged(host: GrDiffHost, loaded: boolean) {
+    const path = host.path;
+    // Ignore discarded hosts, e.g. a blame request resolving after its file
+    // was collapsed (and possibly re-expanded with a new host).
+    if (!path || this.findDiffByPath(path, this.diffs) !== host) return;
+    if (this.blameFiles.has(path) === loaded) return;
+    const newSet = new Set(this.blameFiles);
+    if (loaded) {
+      newSet.add(path);
+    } else {
+      newSet.delete(path);
+    }
+    this.blameFiles = newSet;
+  }
+
+  private renderBlameToggle(file: NormalizedFileInfo) {
+    if (!this.canBlame(file)) return nothing;
+    const path = file.__path;
+    const isLoading = this.blameLoadingHosts.has(path);
+    const isLoaded = this.blameFiles.has(path);
+    const label = computeBlameToggleLabel(isLoading, isLoaded);
+    let tooltip =
+      'Show blame, linking each line to the change that last modified it';
+    if (isLoading) {
+      tooltip = label;
+    } else if (isLoaded) {
+      tooltip = 'Hide blame';
+    }
+    return html`
+      <div class="blameToggle">
+        <gr-tooltip-content has-tooltip title=${tooltip}>
+          <gr-button
+            link
+            class="toggleBlame"
+            ?disabled=${isLoading}
+            @click=${(e: MouseEvent) => this.toggleBlame(path, e)}
+          >
+            <gr-icon icon="history"></gr-icon>
+            <span class="blameToggleLabel">${label}</span>
+          </gr-button>
+        </gr-tooltip-content>
+      </div>
+    `;
+  }
+
   private renderShowHide(file: NormalizedFileInfo) {
     const expanded = this.isFileExpanded(file.__path);
     return html` <div class="show-hide" role="gridcell">
@@ -2354,17 +2623,19 @@
   private handleNewComment() {
     this.classList.remove('hideComments');
     const viewers = Array.from(
-      this.shadowRoot?.querySelectorAll<GrDiffMarkdownViewer>(
-        'gr-diff-markdown-viewer'
-      ) ?? []
+      this.shadowRoot?.querySelectorAll<
+        GrDiffMarkdownViewer | GrDiffLeanViewer
+      >('gr-diff-markdown-viewer, gr-diff-lean-viewer') ?? []
     );
-    const viewerWithSelection = viewers.find(v => v.hasActiveSelection());
-    if (viewerWithSelection) {
-      viewerWithSelection.createCommentFromSelectionOrHover();
+    const targetViewer =
+      viewers.find(v => v.hasActiveSelection()) ??
+      viewers.find(v => v.hasHoverTarget());
+    if (targetViewer) {
+      targetViewer.createCommentFromSelectionOrHover();
       return;
     }
     const currentPath = this.files[this.fileCursor.index]?.__path;
-    if (currentPath && this.isShowingRichMarkdown(currentPath)) {
+    if (currentPath && this.isShowingRichDiff(currentPath)) {
       const currentViewer = viewers.find(v => v.path === currentPath);
       if (currentViewer) {
         currentViewer.createCommentFromSelectionOrHover();
@@ -2523,11 +2794,17 @@
   }
 
   // Private but used in tests.
-  computeClass(baseClass = '', path?: string, showForCommitMessage = false) {
+  computeClass(
+    baseClass = '',
+    path?: string,
+    showForCommitMessage = false,
+    status?: FileInfoStatus
+  ) {
     const classes = [baseClass];
     if (
-      !(showForCommitMessage && path === SpecialFilePath.COMMIT_MESSAGE) &&
-      isMagicPath(path)
+      (!(showForCommitMessage && path === SpecialFilePath.COMMIT_MESSAGE) &&
+        isMagicPath(path)) ||
+      status === FileInfoStatus.UNMODIFIED
     ) {
       classes.push('invisible');
     }
@@ -2666,6 +2943,17 @@
         newPaths.push(path);
       }
     }
+    // Collapsed diffs are discarded, so they don't show or load blame anymore.
+    const blameFiles = [...this.blameFiles].filter(p => this.isFileExpanded(p));
+    if (blameFiles.length !== this.blameFiles.size) {
+      this.blameFiles = new Set(blameFiles);
+    }
+    const blameLoading = [...this.blameLoadingHosts].filter(([p]) =>
+      this.isFileExpanded(p)
+    );
+    if (blameLoading.length !== this.blameLoadingHosts.size) {
+      this.blameLoadingHosts = new Map(blameLoading);
+    }
 
     // Required so that the newly created diff view is included in this.diffs.
     await this.updateComplete;
diff --git a/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list_test.ts b/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list_test.ts
index bcf103b..c72920b 100644
--- a/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list_test.ts
@@ -18,9 +18,11 @@
   waitEventLoop,
   waitUntil,
 } from '../../../test/test-utils';
+import type {GrDiffLeanViewer} from '../../diff/gr-diff-lean-viewer/gr-diff-lean-viewer';
 import type {GrDiffMarkdownViewer} from '../../diff/gr-diff-markdown-viewer/gr-diff-markdown-viewer';
 import {
   BasePatchSetNum,
+  BlameInfo,
   CommitId,
   EDIT,
   FIRST_PARENT,
@@ -33,6 +35,7 @@
 } from '../../../types/common';
 import {createCommentThreads} from '../../../utils/comment-util';
 import {
+  createBlame,
   createChangeComments,
   createCommit,
   createDiff,
@@ -42,6 +45,7 @@
 import {
   createDefaultDiffPrefs,
   DiffViewMode,
+  FileInfoStatus,
   SpecialFilePath,
 } from '../../../constants/constants';
 import {
@@ -504,11 +508,11 @@
         queryAndAssert<GrButton>(
           element,
           '#incrementButton'
-        ).textContent!.trim(),
+        ).textContent.trim(),
         'Show 50 More'
       );
       assert.equal(
-        queryAndAssert<GrButton>(element, '#showAllButton').textContent!.trim(),
+        queryAndAssert<GrButton>(element, '#showAllButton').textContent.trim(),
         'Show All 250 Files'
       );
 
@@ -1424,7 +1428,7 @@
       const renderSpy = sinon.spy(element, 'renderInOrder');
 
       assert.equal(
-        queryAndAssert<GrIcon>(element, 'gr-icon').icon,
+        queryAndAssert<GrIcon>(element, 'gr-icon.show-hide-icon').icon,
         'expand_more'
       );
       assert.equal(element.expandedFiles.size, 0);
@@ -1434,7 +1438,7 @@
       await waitEventLoop();
 
       assert.equal(
-        queryAndAssert<GrIcon>(element, 'gr-icon').icon,
+        queryAndAssert<GrIcon>(element, 'gr-icon.show-hide-icon').icon,
         'expand_less'
       );
 
@@ -1446,7 +1450,7 @@
       await waitEventLoop();
 
       assert.equal(
-        queryAndAssert<GrIcon>(element, 'gr-icon').icon,
+        queryAndAssert<GrIcon>(element, 'gr-icon.show-hide-icon').icon,
         'expand_more'
       );
       assert.equal(renderSpy.callCount, 1);
@@ -1671,7 +1675,7 @@
         const message = queryAndAssert<HTMLSpanElement>(
           element,
           '.cleanlyMergedText'
-        ).textContent!.trim();
+        ).textContent.trim();
         assert.equal(message, '1 file merged cleanly in Parent 1');
       });
 
@@ -1686,7 +1690,7 @@
         const message = queryAndAssert(
           element,
           '.cleanlyMergedText'
-        ).textContent!.trim();
+        ).textContent.trim();
         assert.equal(message, '2 files merged cleanly in Parent 1');
       });
 
@@ -1800,6 +1804,26 @@
           ' May include files outside of this change, also virtual or generated files.'
       );
     });
+
+    test('should hide stats column for unmodified files', async () => {
+      element.files = [
+        ...createFiles(1, {lines_inserted: 5}),
+        ...createFiles(1, {status: FileInfoStatus.UNMODIFIED}),
+      ];
+      await element.updateComplete;
+
+      const fileRows = queryAll<HTMLDivElement>(element, '.file-row');
+      assert.equal(fileRows.length, 2);
+
+      const modifiedStatsContent = queryAndAssert(fileRows[0], '.stats > div');
+      assert.isFalse(modifiedStatsContent.classList.contains('invisible'));
+
+      const unmodifiedStatsContent = queryAndAssert(
+        fileRows[1],
+        '.stats > div'
+      );
+      assert.isTrue(unmodifiedStatsContent.classList.contains('invisible'));
+    });
   });
 
   suite('diff url file list', () => {
@@ -2394,6 +2418,15 @@
         'invisible'
       );
       assert.equal(element.computeClass('', 'file.java'), '');
+      assert.equal(
+        element.computeClass(
+          '',
+          'file.java',
+          /* showForCommitMessage */ false,
+          FileInfoStatus.UNMODIFIED
+        ),
+        'invisible'
+      );
     });
   });
 
@@ -2550,4 +2583,381 @@
       assert.equal(getComputedStyle(label).display, 'none');
     });
   });
+
+  suite('rich lean diff', () => {
+    setup(async () => {
+      stubRestApi('getDiffComments').returns(Promise.resolve({}));
+      stubRestApi('getDiffDrafts').returns(Promise.resolve({}));
+      stubRestApi('getAccountCapabilities').returns(Promise.resolve({}));
+      stubElement('gr-diff-host', 'reload').callsFake(() => Promise.resolve());
+      stubElement('gr-diff-host', 'prefetchDiff').callsFake(() => {});
+
+      element = await fixture(html`<gr-file-list></gr-file-list>`);
+      element.numFilesShown = 5;
+      element.files = [
+        normalize({}, 'BoundedLattice.lean'),
+        normalize({}, 'file.ts'),
+      ];
+      await element.updateComplete;
+    });
+
+    test('toggle button rendered only for lean files', () => {
+      const rows = queryAll(element, '.file-row');
+      assert.equal(rows.length, 2);
+
+      const leanToggle = rows[0].querySelector('.toggleRichLean');
+      assert.isOk(leanToggle);
+
+      const nonLeanToggle = rows[1].querySelector('.toggleRichLean');
+      assert.isNotOk(nonLeanToggle);
+    });
+
+    test('clicking toggleRichLean expands file and enables rich mode', async () => {
+      assert.isFalse(element.isFileExpanded('BoundedLattice.lean'));
+      assert.isFalse(element.isShowingRichLean('BoundedLattice.lean'));
+
+      await element.toggleRichLean('BoundedLattice.lean');
+      await element.updateComplete;
+
+      assert.isTrue(element.isFileExpanded('BoundedLattice.lean'));
+      assert.isTrue(element.isShowingRichLean('BoundedLattice.lean'));
+
+      const viewer = query(element, 'gr-diff-lean-viewer');
+      assert.isOk(viewer);
+
+      // Toggle off
+      await element.toggleRichLean('BoundedLattice.lean');
+      await element.updateComplete;
+
+      assert.isFalse(element.isShowingRichLean('BoundedLattice.lean'));
+      const viewerAfter = query(element, 'gr-diff-lean-viewer');
+      assert.isNotOk(viewerAfter);
+    });
+
+    test('handleNewComment delegates to lean viewer when viewer has active selection', async () => {
+      element.loggedIn = true;
+      await element.toggleRichLean('BoundedLattice.lean');
+      await element.updateComplete;
+
+      const viewer = queryAndAssert<GrDiffLeanViewer>(
+        element,
+        'gr-diff-lean-viewer'
+      );
+      assert.isTrue(viewer.loggedIn);
+
+      sinon.stub(viewer, 'hasActiveSelection').returns(true);
+      const commentSpy = sinon.spy(viewer, 'createCommentFromSelectionOrHover');
+
+      // eslint-disable-next-line @typescript-eslint/no-explicit-any
+      (element as any).handleNewComment();
+
+      assert.isTrue(commentSpy.calledOnce);
+    });
+
+    test('c and C shortcuts delegate to lean viewer when cursor is on rich lean file', async () => {
+      element.loggedIn = true;
+      await element.toggleRichLean('BoundedLattice.lean');
+      await element.updateComplete;
+
+      const viewer = queryAndAssert<GrDiffLeanViewer>(
+        element,
+        'gr-diff-lean-viewer'
+      );
+      const commentSpy = sinon.spy(viewer, 'createCommentFromSelectionOrHover');
+
+      element.fileCursor.setCursorAtIndex(0);
+      assert.equal(
+        element.files[element.fileCursor.index].__path,
+        'BoundedLattice.lean'
+      );
+
+      pressKey(element, 'c');
+      assert.isTrue(commentSpy.calledOnce);
+
+      pressKey(element, 'C');
+      assert.isTrue(commentSpy.calledTwice);
+    });
+
+    test('toggling rich to source flushes drafts for matching lean viewer', async () => {
+      element.files = [
+        normalize({}, 'BoundedLattice.lean'),
+        normalize({}, 'Proofs.lean'),
+      ];
+      await element.updateComplete;
+
+      await element.toggleRichLean('BoundedLattice.lean');
+      await element.toggleRichLean('Proofs.lean');
+      await element.updateComplete;
+
+      const viewers = Array.from(
+        queryAll<GrDiffLeanViewer>(element, 'gr-diff-lean-viewer')
+      );
+      assert.equal(viewers.length, 2);
+
+      const soundnessViewer = viewers.find(
+        v => v.path === 'BoundedLattice.lean'
+      )!;
+      const proofsViewer = viewers.find(v => v.path === 'Proofs.lean')!;
+
+      const soundnessSaveSpy = sinon.spy(soundnessViewer, 'autoSaveDrafts');
+      const proofsSaveSpy = sinon.spy(proofsViewer, 'autoSaveDrafts');
+
+      await element.toggleRichLean('Proofs.lean');
+      await element.updateComplete;
+
+      assert.isFalse(soundnessSaveSpy.called);
+      assert.isTrue(proofsSaveSpy.calledOnce);
+    });
+
+    test('hides toggleRichLean for binary or diffs_too_expensive_to_compute lean files', async () => {
+      element.files = [
+        normalize({}, 'Normal.lean'),
+        normalize({binary: true}, 'Binary.lean'),
+        normalize({diffs_too_expensive_to_compute: true}, 'Huge.lean'),
+      ];
+      await element.updateComplete;
+
+      const rows = queryAll(element, '.file-row');
+      assert.equal(rows.length, 3);
+      assert.isOk(rows[0].querySelector('.toggleRichLean'));
+      assert.isNotOk(rows[1].querySelector('.toggleRichLean'));
+      assert.isNotOk(rows[2].querySelector('.toggleRichLean'));
+    });
+
+    test('clears richLeanFiles and diffsByPath when patchNum changes', async () => {
+      element.patchNum = 1 as RevisionPatchSetNum;
+      await element.updateComplete;
+
+      await element.toggleRichLean('BoundedLattice.lean');
+      await element.updateComplete;
+      assert.isTrue(element.isShowingRichLean('BoundedLattice.lean'));
+
+      element.patchNum = 2 as RevisionPatchSetNum;
+      await element.updateComplete;
+
+      assert.isFalse(element.isShowingRichLean('BoundedLattice.lean'));
+      assert.isNotOk(query(element, 'gr-diff-lean-viewer'));
+    });
+
+    test('handleNewComment routes to hovered lean viewer when no selection is active', async () => {
+      element.loggedIn = true;
+      element.files = [normalize({}, 'A.lean'), normalize({}, 'B.lean')];
+      await element.updateComplete;
+
+      await element.toggleRichLean('A.lean');
+      await element.toggleRichLean('B.lean');
+      await element.updateComplete;
+
+      const viewers = Array.from(
+        queryAll<GrDiffLeanViewer>(element, 'gr-diff-lean-viewer')
+      );
+      const viewerA = viewers.find(v => v.path === 'A.lean')!;
+      const viewerB = viewers.find(v => v.path === 'B.lean')!;
+
+      sinon.stub(viewerA, 'hasActiveSelection').returns(false);
+      sinon.stub(viewerB, 'hasActiveSelection').returns(false);
+      sinon.stub(viewerA, 'hasHoverTarget').returns(false);
+      sinon.stub(viewerB, 'hasHoverTarget').returns(true);
+
+      const spyA = sinon.spy(viewerA, 'createCommentFromSelectionOrHover');
+      const spyB = sinon.spy(viewerB, 'createCommentFromSelectionOrHover');
+
+      // eslint-disable-next-line @typescript-eslint/no-explicit-any
+      (element as any).handleNewComment();
+
+      assert.isFalse(spyA.called);
+      assert.isTrue(spyB.calledOnce);
+    });
+
+    test('content-type-only Lean files mount viewer when toggled and binary diff revokes rich Lean eligibility', async () => {
+      element.files = [
+        normalize({}, 'LeanSpecNoExt'),
+        normalize({}, 'CollapsedBinary.lean'),
+      ];
+      await element.updateComplete;
+
+      // 1. Expand extensionless file whose diff reports `text/x-lean`
+      element.expandedFiles = new Set(['LeanSpecNoExt']);
+      await element.updateComplete;
+      const diffHosts = Array.from(
+        queryAll<GrDiffHost>(element, 'gr-diff-host')
+      );
+      const specHost = diffHosts.find(h => h.path === 'LeanSpecNoExt')!;
+      assert.isDefined(specHost);
+      specHost.dispatchEvent(
+        new CustomEvent('diff-changed', {
+          detail: {
+            value: {
+              ...createDiff(),
+              meta_b: {
+                name: 'LeanSpecNoExt',
+                content_type: 'text/x-lean',
+                lines: 1,
+              },
+              content: [{ab: ['theorem ok : True := trivial']}],
+            },
+          },
+        })
+      );
+      await element.updateComplete;
+
+      const rows = Array.from(queryAll(element, '.file-row'));
+      assert.isOk(rows[0].querySelector('.toggleRichLean'));
+
+      await element.toggleRichLean('LeanSpecNoExt');
+      await element.updateComplete;
+      assert.isTrue(element.isShowingRichLean('LeanSpecNoExt'));
+      const viewers = Array.from(
+        queryAll<GrDiffLeanViewer>(element, 'gr-diff-lean-viewer')
+      );
+      assert.isDefined(viewers.find(v => v.path === 'LeanSpecNoExt'));
+
+      // 2. Collapsed `.lean` row toggled into rich mode whose diff later reports
+      // `binary: true` must hide toggle, flip `isShowingRichLean` to false, and unmount viewer.
+      await element.toggleRichLean('CollapsedBinary.lean');
+      await element.updateComplete;
+      assert.isTrue(element.isShowingRichLean('CollapsedBinary.lean'));
+
+      const updatedHosts = Array.from(
+        queryAll<GrDiffHost>(element, 'gr-diff-host')
+      );
+      const binaryHost = updatedHosts.find(
+        h => h.path === 'CollapsedBinary.lean'
+      )!;
+      assert.isDefined(binaryHost);
+      binaryHost.dispatchEvent(
+        new CustomEvent('diff-changed', {
+          detail: {
+            value: {
+              ...createDiff(),
+              binary: true,
+              content: [],
+            },
+          },
+        })
+      );
+      await element.updateComplete;
+
+      assert.isFalse(element.isShowingRichLean('CollapsedBinary.lean'));
+      assert.isNotOk(rows[1].querySelector('.toggleRichLean'));
+      const remainingViewers = Array.from(
+        queryAll<GrDiffLeanViewer>(element, 'gr-diff-lean-viewer')
+      );
+      assert.isUndefined(
+        remainingViewers.find(v => v.path === 'CollapsedBinary.lean')
+      );
+    });
+  });
+
+  suite('blame', () => {
+    let getBlameStub: sinon.SinonStub;
+
+    setup(async () => {
+      stubRestApi('getDiffComments').returns(Promise.resolve({}));
+      stubRestApi('getDiffDrafts').returns(Promise.resolve({}));
+      stubRestApi('getAccountCapabilities').returns(Promise.resolve({}));
+      stubElement('gr-diff-host', 'reload').callsFake(() => Promise.resolve());
+      stubElement('gr-diff-host', 'prefetchDiff').callsFake(() => {});
+      getBlameStub = stubRestApi('getBlame').resolves([createBlame()]);
+
+      element = await fixture(html`<gr-file-list></gr-file-list>`);
+      element.allowBlame = true;
+      element.numFilesShown = 5;
+      element.changeNum = 42 as NumericChangeId;
+      element.basePatchNum = PARENT;
+      element.patchNum = 2 as RevisionPatchSetNum;
+      element.files = [
+        normalize({}, 'modified.ts'),
+        normalize({status: FileInfoStatus.ADDED}, 'added.ts'),
+        normalize({binary: true}, 'image.png'),
+      ];
+      await element.updateComplete;
+    });
+
+    async function expand(...paths: string[]) {
+      element.expandedFiles = new Set(paths);
+      await element.updateComplete;
+      await element.filesExpandedPromise;
+    }
+
+    test('toggle rendered only for expanded files with a left side', async () => {
+      assert.isNotOk(query(element, '.toggleBlame'));
+
+      await expand('modified.ts', 'added.ts', 'image.png');
+      const rows = queryAll(element, '.file-row');
+      assert.isOk(rows[0].querySelector('.toggleBlame'));
+      assert.isNotOk(rows[1].querySelector('.toggleBlame'));
+      assert.isNotOk(rows[2].querySelector('.toggleBlame'));
+
+      element.allowBlame = false;
+      await element.updateComplete;
+      assert.isNotOk(query(element, '.toggleBlame'));
+    });
+
+    test('toggle loads and hides blame', async () => {
+      await expand('modified.ts');
+
+      await element.toggleBlame('modified.ts');
+      await element.updateComplete;
+
+      assert.isTrue(getBlameStub.calledWithExactly(42, 2, 'modified.ts', true));
+      const diffHost = queryAndAssert<GrDiffHost>(element, 'gr-diff-host');
+      assert.isOk(diffHost.blame);
+      assert.isTrue(element.blameFiles.has('modified.ts'));
+      const toggle = queryAndAssert<GrButton>(element, '.toggleBlame');
+      assert.include(toggle.textContent, 'Hide Blame');
+
+      await element.toggleBlame('modified.ts');
+      await element.updateComplete;
+
+      assert.isNull(diffHost.blame);
+      assert.isFalse(element.blameFiles.has('modified.ts'));
+      assert.include(toggle.textContent, 'Show Blame');
+    });
+
+    test('collapsing file drops blame state', async () => {
+      await expand('modified.ts');
+      await element.toggleBlame('modified.ts');
+      assert.isTrue(element.blameFiles.has('modified.ts'));
+
+      element.collapseAllDiffs();
+      await element.updateComplete;
+      await element.filesExpandedPromise;
+
+      assert.isFalse(element.blameFiles.has('modified.ts'));
+    });
+
+    test('blame resolving after collapse and re-expand is ignored', async () => {
+      const oldBlame = mockPromise<BlameInfo[]>();
+      getBlameStub.returns(oldBlame);
+      await expand('modified.ts');
+      const oldToggled = element.toggleBlame('modified.ts');
+
+      await expand();
+      await expand('modified.ts');
+      const toggle = queryAndAssert<GrButton>(element, '.toggleBlame');
+      assert.isFalse(toggle.disabled);
+      assert.include(toggle.textContent, 'Show Blame');
+
+      const newBlame = mockPromise<BlameInfo[]>();
+      getBlameStub.returns(newBlame);
+      const newToggled = element.toggleBlame('modified.ts');
+      oldBlame.resolve([createBlame()]);
+      await oldToggled;
+      await element.updateComplete;
+
+      // The old request neither shows blame nor ends the new one's loading.
+      assert.isFalse(element.blameFiles.has('modified.ts'));
+      assert.isTrue(toggle.disabled);
+      assert.include(toggle.textContent, 'Loading blame');
+
+      newBlame.resolve([createBlame()]);
+      await newToggled;
+      await element.updateComplete;
+
+      assert.isTrue(element.blameFiles.has('modified.ts'));
+      assert.isFalse(toggle.disabled);
+      assert.include(toggle.textContent, 'Hide Blame');
+    });
+  });
 });
diff --git a/polygerrit-ui/app/elements/change/gr-flows/gr-create-flow.ts b/polygerrit-ui/app/elements/change/gr-flows/gr-create-flow.ts
index b400a9a..208e709 100644
--- a/polygerrit-ui/app/elements/change/gr-flows/gr-create-flow.ts
+++ b/polygerrit-ui/app/elements/change/gr-flows/gr-create-flow.ts
@@ -42,6 +42,7 @@
 import {SuggestionProvider} from '../../core/gr-search-autocomplete/gr-search-autocomplete';
 import {when} from 'lit/directives/when.js';
 import {ifDefined} from 'lit/directives/if-defined.js';
+import {keyed} from 'lit/directives/keyed.js';
 import {MdOutlinedTextField} from '@material/web/textfield/outlined-text-field.js';
 import {
   computeFlowString,
@@ -1099,28 +1100,34 @@
           `
         )}
       </md-outlined-select>
-      <md-outlined-select
-        class="vote-parameter-input"
-        label="Value"
-        value=${this.selectedValueForVote ?? ''}
-        @change=${(e: Event) => {
-          // TODO: Remove the reading from attribute
-          // For some reason in the test, the value is only read from the attribute and not from the value property
-          this.selectedValueForVote =
-            ((e.target as HTMLSelectElement).value ||
-              (e.target as HTMLSelectElement).getAttribute('value')) ??
-            '';
-          this.updateCurrentParameterForVote();
-        }}
-      >
-        ${labelValues.map(
-          val => html`
-            <md-select-option value=${val}>
-              <div slot="headline">${val}</div>
-            </md-select-option>
-          `
-        )}
-      </md-outlined-select>
+      ${keyed(
+        this.selectedLabelForVote,
+        html`<md-outlined-select
+          class="vote-parameter-input"
+          label="Value"
+          value=${this.selectedValueForVote ?? ''}
+          @change=${(e: Event) => {
+            // TODO: Remove the reading from attribute
+            // For some reason in the test, the value is only read from the attribute and not from the value property
+            this.selectedValueForVote =
+              ((e.target as HTMLSelectElement).value ||
+                (e.target as HTMLSelectElement).getAttribute('value')) ??
+              '';
+            this.updateCurrentParameterForVote();
+          }}
+        >
+          ${labelValues.map(
+            val => html`
+              <md-select-option
+                ?selected=${val === this.selectedValueForVote}
+                value=${val}
+              >
+                <div slot="headline">${val}</div>
+              </md-select-option>
+            `
+          )}
+        </md-outlined-select>`
+      )}
     `;
   }
 
diff --git a/polygerrit-ui/app/elements/change/gr-flows/gr-create-flow_test.ts b/polygerrit-ui/app/elements/change/gr-flows/gr-create-flow_test.ts
index 02c88e1..d84e09b 100644
--- a/polygerrit-ui/app/elements/change/gr-flows/gr-create-flow_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-flows/gr-create-flow_test.ts
@@ -13,12 +13,7 @@
   queryAndAssert,
   stubRestApi,
 } from '../../../test/test-utils';
-import {
-  AccountId,
-  EmailAddress,
-  NumericChangeId,
-  RepoName,
-} from '../../../types/common';
+import {AccountId, EmailAddress, RepoName} from '../../../types/common';
 import {GrButton} from '../../shared/gr-button/gr-button';
 import {GrAutocomplete} from '../../shared/gr-autocomplete/gr-autocomplete';
 import {GrSearchAutocomplete} from '../../core/gr-search-autocomplete/gr-search-autocomplete';
@@ -32,7 +27,7 @@
 import {testResolver} from '../../../test/common-test-setup';
 import {MdOutlinedTextField} from '@material/web/textfield/outlined-text-field';
 import {getAppContext} from '../../../services/app-context';
-import {FlowActionInfo, RevisionPatchSetNum} from '../../../api/rest-api';
+import {FlowActionInfo} from '../../../api/rest-api';
 import {MdOutlinedSelect} from '@material/web/select/outlined-select';
 import {GrDialog} from '../../shared/gr-dialog/gr-dialog';
 
@@ -58,7 +53,7 @@
       'https://gerrit-review.googlesource.com/c/plugins/code-owners/+/441321';
     element = await fixture<GrCreateFlow>(
       html`<gr-create-flow
-        .changeNum=${123 as NumericChangeId}
+        .changeNum=${123}
         .hostUrl=${hostUrl}
       ></gr-create-flow>`
     );
@@ -893,6 +888,14 @@
             '+1': 'Verified',
           },
         },
+        {
+          name: 'Commit-Queue',
+          values: {
+            ' 0': 'Not ready',
+            '+1': 'Dry run',
+            '+2': 'Commit',
+          },
+        },
       ];
       await element.updateComplete;
     });
@@ -937,6 +940,54 @@
       assert.equal(element['currentParameter'], 'Verified-1');
     });
 
+    test('selects correct option when switching label and picking last value', async () => {
+      const actionInput = queryAndAssert<MdOutlinedSelect>(
+        element,
+        'md-outlined-select[label="Action"]'
+      );
+      actionInput.value = 'vote';
+      actionInput.dispatchEvent(new Event('change'));
+      await element.updateComplete;
+
+      let voteParamInputs = queryAll<MdOutlinedSelect>(
+        element,
+        '.vote-parameter-input'
+      );
+      const labelSelect = voteParamInputs[0];
+
+      labelSelect.setAttribute('value', 'Commit-Queue');
+      labelSelect.value = 'Commit-Queue';
+      labelSelect.dispatchEvent(new Event('input', {bubbles: true}));
+      labelSelect.dispatchEvent(new Event('change', {bubbles: true}));
+      await element.updateComplete;
+
+      assert.equal(element['selectedLabelForVote'], 'Commit-Queue');
+      assert.equal(element['selectedValueForVote'], ' 0');
+      assert.equal(element['currentParameter'], 'Commit-Queue+0');
+
+      voteParamInputs = queryAll<MdOutlinedSelect>(
+        element,
+        '.vote-parameter-input'
+      );
+      const valueSelect = voteParamInputs[1];
+      await valueSelect.updateComplete;
+      assert.isTrue(valueSelect.options[0].selected);
+      assert.isFalse(valueSelect.options[2].selected);
+
+      valueSelect.setAttribute('value', '+2');
+      valueSelect.value = '+2';
+      valueSelect.dispatchEvent(
+        new Event('input', {bubbles: true, composed: true})
+      );
+      valueSelect.dispatchEvent(
+        new Event('change', {bubbles: true, composed: true})
+      );
+      await element.updateComplete;
+
+      assert.equal(element['selectedValueForVote'], '+2');
+      assert.equal(element['currentParameter'], 'Commit-Queue+2');
+    });
+
     test('updates parameter when value is changed', async () => {
       const actionInput = queryAndAssert<MdOutlinedSelect>(
         element,
@@ -1116,7 +1167,7 @@
           Verified: ['-1', ' 0', '+1'],
         },
         revisions: {
-          a: createRevision(1 as RevisionPatchSetNum),
+          a: createRevision(1),
         },
       });
       await element.updateComplete;
@@ -1148,7 +1199,7 @@
           'A-Label': [' 0'],
         },
         revisions: {
-          a: createRevision(1 as RevisionPatchSetNum),
+          a: createRevision(1),
         },
       });
       await element.updateComplete;
diff --git a/polygerrit-ui/app/elements/change/gr-flows/gr-flow-rule_test.ts b/polygerrit-ui/app/elements/change/gr-flows/gr-flow-rule_test.ts
index 72fb4f6..ec52f0b 100644
--- a/polygerrit-ui/app/elements/change/gr-flows/gr-flow-rule_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-flows/gr-flow-rule_test.ts
@@ -10,7 +10,7 @@
 import {FlowStageState} from '../../../api/rest-api';
 import {stubRestApi} from '../../../test/test-utils';
 import {createAccountDetailWithId} from '../../../test/test-data-generators';
-import {EmailAddress, UserId} from '../../../types/common';
+import {EmailAddress} from '../../../types/common';
 
 suite('gr-flow-rule tests', () => {
   let element: GrFlowRule;
@@ -110,12 +110,8 @@
       email: 'user@example.com' as EmailAddress,
     };
     const getAccountDetailsStub = stubRestApi('getAccountDetails');
-    getAccountDetailsStub
-      .withArgs('user@example.com' as UserId)
-      .resolves(account);
-    getAccountDetailsStub
-      .withArgs('not-found@example.com' as UserId)
-      .resolves(undefined);
+    getAccountDetailsStub.withArgs('user@example.com').resolves(account);
+    getAccountDetailsStub.withArgs('not-found@example.com').resolves(undefined);
 
     element.action = 'add_reviewer';
     element.parameters = [
@@ -129,12 +125,8 @@
     await new Promise(resolve => setTimeout(resolve, 0));
     await element.updateComplete;
 
-    assert.isTrue(
-      getAccountDetailsStub.calledWith('user@example.com' as UserId)
-    );
-    assert.isTrue(
-      getAccountDetailsStub.calledWith('not-found@example.com' as UserId)
-    );
+    assert.isTrue(getAccountDetailsStub.calledWith('user@example.com'));
+    assert.isTrue(getAccountDetailsStub.calledWith('not-found@example.com'));
     // getAccountDetails should not be called for 'not-an-email'
     assert.equal(getAccountDetailsStub.callCount, 2);
 
diff --git a/polygerrit-ui/app/elements/change/gr-flows/gr-flows_screenshot_test.ts b/polygerrit-ui/app/elements/change/gr-flows/gr-flows_screenshot_test.ts
index b71d56e..54c8eb6 100644
--- a/polygerrit-ui/app/elements/change/gr-flows/gr-flows_screenshot_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-flows/gr-flows_screenshot_test.ts
@@ -78,7 +78,7 @@
 
     setChangeWithUploader(changeModel, 1 as AccountId);
     userModel.setState({
-      account: createAccountDetailWithId(1 as AccountId),
+      account: createAccountDetailWithId(1),
       accountLoaded: true,
     });
 
@@ -88,7 +88,7 @@
     const flows: FlowInfo[] = [
       {
         uuid: 'flow-12345678-90ab-cdef-1234-567890abcdef',
-        owner: createAccountDetailWithId(1 as AccountId),
+        owner: createAccountDetailWithId(1),
         created: '2025-02-09 10:00:00.000000000' as Timestamp,
         last_evaluated: '2025-02-09 10:05:00.000000000' as Timestamp,
         stages: [
@@ -184,7 +184,7 @@
 
   test('cannot create flow (not uploader)', async () => {
     userModel.setState({
-      account: createAccountDetailWithId(2 as AccountId),
+      account: createAccountDetailWithId(2),
       accountLoaded: true,
     });
     await element.updateComplete;
@@ -206,7 +206,7 @@
         ...originalFlows,
         {
           uuid: 'flow-87654321-cdef-90ab-5678-abcdef123456',
-          owner: createAccountDetailWithId(1 as AccountId),
+          owner: createAccountDetailWithId(1),
           created: '2025-02-10 10:00:00.000000000' as Timestamp,
           last_evaluated: undefined,
           stages: [
diff --git a/polygerrit-ui/app/elements/change/gr-flows/gr-flows_test.ts b/polygerrit-ui/app/elements/change/gr-flows/gr-flows_test.ts
index dd6085d..3da56ee 100644
--- a/polygerrit-ui/app/elements/change/gr-flows/gr-flows_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-flows/gr-flows_test.ts
@@ -71,7 +71,7 @@
     await element.updateComplete;
     setChangeWithOwner(changeModel, 123 as AccountId);
     userModel.setState({
-      account: createAccountDetailWithId(123 as AccountId),
+      account: createAccountDetailWithId(123),
       accountLoaded: true,
     });
     await element.updateComplete;
diff --git a/polygerrit-ui/app/elements/change/gr-included-in-dialog/gr-included-in-dialog_test.ts b/polygerrit-ui/app/elements/change/gr-included-in-dialog/gr-included-in-dialog_test.ts
index fce2e2c6..ce9b797 100644
--- a/polygerrit-ui/app/elements/change/gr-included-in-dialog/gr-included-in-dialog_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-included-in-dialog/gr-included-in-dialog_test.ts
@@ -6,7 +6,7 @@
 import '../../../test/common-test-setup';
 import './gr-included-in-dialog';
 import {GrIncludedInDialog} from './gr-included-in-dialog';
-import {BranchName, IncludedInInfo, TagName} from '../../../types/common';
+import {BranchName, TagName} from '../../../types/common';
 import {queryAndAssert} from '../../../test/test-utils';
 import {assert, fixture, html} from '@open-wc/testing';
 import {MdOutlinedTextField} from '@material/web/textfield/outlined-text-field';
@@ -46,7 +46,7 @@
   });
 
   test('computeGroups', () => {
-    element.includedIn = {branches: [], tags: []} as IncludedInInfo;
+    element.includedIn = {branches: [], tags: []};
     element.filterText = '';
     assert.deepEqual(element.computeGroups(), []);
 
@@ -99,7 +99,7 @@
     filterInput.dispatchEvent(
       new Event('input', {bubbles: true, composed: true})
     );
-    element.includedIn = {branches: [], tags: []} as IncludedInInfo;
+    element.includedIn = {branches: [], tags: []};
     element.includedIn.branches.push(
       'master' as BranchName,
       'stable-3.2' as BranchName
diff --git a/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row_test.ts b/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row_test.ts
index b4f73a9..d84d95b 100644
--- a/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row_test.ts
@@ -98,11 +98,11 @@
     await element.updateComplete;
 
     assert.strictEqual(element.selectedValue, '-1');
-    assert.strictEqual(element.selectedItem!.textContent!.trim(), '-1');
+    assert.strictEqual(element.selectedItem!.textContent.trim(), '-1');
     const selectedValueLabel = element.shadowRoot!.querySelector(
       '#selectedValueLabel'
     );
-    assert.strictEqual(selectedValueLabel!.textContent!.trim(), 'bad');
+    assert.strictEqual(selectedValueLabel!.textContent.trim(), 'bad');
     const detail = labelsChangedHandler.args[0][0].detail;
     assert.equal(detail.name, 'Verified');
     assert.equal(detail.value, '-1');
@@ -170,11 +170,11 @@
   test('correct item is selected', () => {
     // 1 should be the value of the selected item
     assert.strictEqual(element.labelSelector!.selected, '+1');
-    assert.strictEqual(element.selectedItem!.textContent!.trim(), '+1');
+    assert.strictEqual(element.selectedItem!.textContent.trim(), '+1');
     const selectedValueLabel = element.shadowRoot!.querySelector(
       '#selectedValueLabel'
     );
-    assert.strictEqual(selectedValueLabel!.textContent!.trim(), 'good');
+    assert.strictEqual(selectedValueLabel!.textContent.trim(), 'good');
     checkAriaCheckedValid();
   });
 
diff --git a/polygerrit-ui/app/elements/change/gr-message/gr-message_test.ts b/polygerrit-ui/app/elements/change/gr-message/gr-message_test.ts
index 6fa6587..8380282 100644
--- a/polygerrit-ui/app/elements/change/gr-message/gr-message_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-message/gr-message_test.ts
@@ -813,8 +813,7 @@
           comments: [
             {
               ...createComment(),
-              change_message_id:
-                '6a07f64a82f96e7337ca5f7f84cfc73abf8ac2a3' as ChangeMessageId,
+              change_message_id: '6a07f64a82f96e7337ca5f7f84cfc73abf8ac2a3',
               patch_set: 1 as RevisionPatchSetNum,
               id: 'e365b138_bed65caa' as UrlEncodedCommentId,
               updated: '2020-05-15 13:35:56.000000000' as Timestamp,
diff --git a/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list.ts b/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list.ts
index 65fc242..d79f516 100644
--- a/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list.ts
+++ b/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list.ts
@@ -548,6 +548,7 @@
         acc[val] = (acc[val] || 0) + 1;
         return acc;
       },
+      // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
       {all: this.combinedMessages.length} as TagsCountReportInfo
     );
     this.reporting.reportInteraction('messages-count', tagsCounted);
diff --git a/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list_test.ts b/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list_test.ts
index 8ec1bde..0019501 100644
--- a/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list_test.ts
@@ -60,7 +60,7 @@
 };
 
 const randomMessage = function (params?: Partial<ChangeMessageInfo>) {
-  params = params || ({} as ChangeMessageInfo);
+  params = params || {};
   const author1 = {
     _account_id: 1115495 as AccountId,
     name: 'Andrew Bonventre',
@@ -305,7 +305,7 @@
           date: '2016-09-28 13:36:33.000000000' as Timestamp,
           author,
           id: '8c19ccc949c6d482b061be6a28e10782abf0e7af' as ChangeMessageId,
-        } as CombinedMessage,
+        },
         {
           _index: 6,
           _revision_number: 4 as PatchSetNum,
@@ -313,7 +313,7 @@
           date: '2016-09-28 13:36:33.000000000' as Timestamp,
           author,
           id: 'e7bfdbc842f6b6d8064bc68e0f52b673f40c0ca5' as ChangeMessageId,
-        } as CombinedMessage
+        }
       );
       element.messages = messages;
       await element.updateComplete;
diff --git a/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list.ts b/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list.ts
index 2a8adb3..4fe6a0d 100644
--- a/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list.ts
+++ b/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list.ts
@@ -284,6 +284,8 @@
           <gr-stack-diff-dialog
             id="stackDiffDialog"
             .repo=${this.change?.project}
+            .change=${this.change}
+            .patchNum=${this.latestPatchNum}
             .relatedChanges=${this.relatedChanges}
           ></gr-stack-diff-dialog>
         `
diff --git a/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list_test.ts b/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list_test.ts
index e0263be..57784ce 100644
--- a/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list_test.ts
@@ -16,7 +16,14 @@
   createRevision,
   createSubmittedTogetherInfo,
 } from '../../../test/test-data-generators';
-import {query, queryAndAssert, waitEventLoop} from '../../../test/test-utils';
+import {
+  query,
+  queryAndAssert,
+  stubFlags,
+  waitEventLoop,
+} from '../../../test/test-utils';
+import {KnownExperimentId} from '../../../services/flags/flags';
+import {GrStackDiffDialog} from './gr-stack-diff-dialog';
 import {
   ChangeId,
   ChangeInfo,
@@ -670,4 +677,61 @@
       );
     });
   });
+
+  suite('stack diff button and dialog', () => {
+    let element: GrRelatedChangesList;
+
+    setup(async () => {
+      stubFlags('isEnabled')
+        .withArgs(KnownExperimentId.STACK_DIFF)
+        .returns(true);
+      element = await fixture(
+        html`<gr-related-changes-list></gr-related-changes-list>`
+      );
+    });
+
+    test('renders button and passes change, patchNum, and relatedChanges to dialog', async () => {
+      const change = {
+        ...createParsedChange(),
+        revisions: {
+          r1: {...createRevision(), _number: 1 as PatchSetNumber},
+        },
+        current_revision: 'r1' as CommitId,
+      };
+      element.change = change;
+      element.latestPatchNum = 1 as PatchSetNumber;
+      element.relatedChanges = [
+        {
+          ...createRelatedChangeAndCommitInfo(),
+          commit: {
+            ...createCommitInfoWithRequiredCommit('r2'),
+            parents: [{commit: 'r1' as CommitId, subject: 'Current change'}],
+          },
+        },
+        {
+          ...createRelatedChangeAndCommitInfo(),
+          commit: {
+            ...createCommitInfoWithRequiredCommit('r1'),
+            parents: [{commit: 'base-parent' as CommitId, subject: 'Base'}],
+          },
+        },
+      ];
+      await element.updateComplete;
+
+      const button = queryAndAssert<HTMLElement>(
+        element,
+        '#openStackDiffButton'
+      );
+      assert.isOk(button);
+
+      const dialog = queryAndAssert<GrStackDiffDialog>(
+        element,
+        '#stackDiffDialog'
+      );
+      assert.isOk(dialog);
+      assert.strictEqual(dialog.change, change);
+      assert.equal(dialog.patchNum, 1);
+      assert.strictEqual(dialog.relatedChanges, element.relatedChanges);
+    });
+  });
 });
diff --git a/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-stack-diff-dialog.ts b/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-stack-diff-dialog.ts
index e79549d..6d4e539 100644
--- a/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-stack-diff-dialog.ts
+++ b/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-stack-diff-dialog.ts
@@ -3,8 +3,9 @@
  * Copyright 2026 Google LLC
  * SPDX-License-Identifier: Apache-2.0
  */
-import {css, html, LitElement, nothing, TemplateResult} from 'lit';
+import {css, html, LitElement, nothing, PropertyValues} from 'lit';
 import {customElement, property, query, state} from 'lit/decorators.js';
+import {when} from 'lit/directives/when.js';
 import {sharedStyles} from '../../../styles/shared-styles';
 import {modalStyles} from '../../../styles/gr-modal-styles';
 import {getAppContext} from '../../../services/app-context';
@@ -14,9 +15,11 @@
 import {
   CommitId,
   FileNameToFileInfoMap,
+  PatchSetNumber,
   RelatedChangeAndCommitInfo,
   RepoName,
 } from '../../../types/common';
+import {ParsedChangeInfo} from '../../../types/types';
 import {DiffInfo, DiffPreferencesInfo} from '../../../types/diff';
 import {GrSyntaxLayerWorker} from '../../../embed/diff/gr-syntax-layer/gr-syntax-layer-worker';
 import {highlightServiceToken} from '../../../services/highlight/highlight-service';
@@ -25,6 +28,8 @@
 import '@material/web/select/select-option';
 import '../../../embed/diff/gr-diff/gr-diff';
 import {computeTruncatedPath} from '../../../utils/path-list-util';
+import {getRevisionKey} from '../../../utils/change-util';
+import {Interaction, Timing} from '../../../constants/reporting';
 
 @customElement('gr-stack-diff-dialog')
 export class GrStackDiffDialog extends LitElement {
@@ -34,6 +39,12 @@
   @property({type: String})
   repo?: RepoName;
 
+  @property({type: Object})
+  change?: ParsedChangeInfo;
+
+  @property({type: String})
+  patchNum?: PatchSetNumber;
+
   @property({type: Array})
   relatedChanges: RelatedChangeAndCommitInfo[] = [];
 
@@ -70,13 +81,25 @@
 
   private readonly restApiService = getAppContext().restApiService;
 
+  // private but used in tests
+  readonly reporting = getAppContext().reportingService;
+
   private readonly getUserModel = resolve(this, userModelToken);
 
   private readonly syntaxLayer = new GrSyntaxLayerWorker(
     resolve(this, highlightServiceToken),
-    () => getAppContext().reportingService
+    () => this.reporting
   );
 
+  /**
+   * Derived from `relatedChanges`, `change` and `patchNum`. Computing them
+   * requires walking the commit graph, and they are used while rendering every
+   * option of the pickers, so they are cached until their inputs change.
+   */
+  private parentMap?: Map<CommitId, CommitId[]>;
+
+  private connectedRevisions?: Set<CommitId>;
+
   constructor() {
     super();
     subscribe(
@@ -240,9 +263,17 @@
             transform: rotate(360deg);
           }
         }
+        .error-container {
+          display: flex;
+          flex-direction: column;
+          align-items: center;
+          justify-content: center;
+          width: 100%;
+          padding: var(--spacing-xl);
+          gap: var(--spacing-m);
+        }
         .error-message {
           color: var(--error-text-color);
-          padding: var(--spacing-xl);
           text-align: center;
         }
         footer {
@@ -256,6 +287,17 @@
     ];
   }
 
+  override willUpdate(changedProperties: PropertyValues) {
+    if (
+      changedProperties.has('relatedChanges') ||
+      changedProperties.has('change') ||
+      changedProperties.has('patchNum')
+    ) {
+      this.parentMap = undefined;
+      this.connectedRevisions = undefined;
+    }
+  }
+
   async open() {
     if (!this.dialog) {
       return;
@@ -267,6 +309,13 @@
     this.files = {};
 
     this.initializeCommitIds();
+    const connectedCount = this.getConnectedChanges().length;
+    this.reporting.reportInteraction(Interaction.STACK_DIFF_DIALOG_OPENED, {
+      relatedChangesCount: this.relatedChanges.length,
+      connectedChangesCount: connectedCount,
+      hasIndirectRelations:
+        connectedCount > 0 && connectedCount < this.relatedChanges.length,
+    });
     await this.loadDiffFileList();
   }
 
@@ -277,15 +326,188 @@
     this.dialog.close();
   }
 
-  private initializeCommitIds() {
-    if (this.relatedChanges.length === 0) {
-      return;
+  /** Maps each commit of the relation chain to the commits of its parents. */
+  private getParentMap(): Map<CommitId, CommitId[]> {
+    if (!this.parentMap) {
+      this.parentMap = new Map(
+        this.relatedChanges.map(
+          c =>
+            [c.commit.commit, (c.commit.parents ?? []).map(p => p.commit)] as [
+              CommitId,
+              CommitId[]
+            ]
+        )
+      );
     }
-    const oldestChange = this.relatedChanges[this.relatedChanges.length - 1];
-    if (oldestChange.commit.parents && oldestChange.commit.parents.length > 0) {
-      this.baseCommitId = oldestChange.commit.parents[0].commit;
+    return this.parentMap;
+  }
+
+  /** The commit that is currently shown on the change page. */
+  private getCurrentRevision(): CommitId | undefined {
+    if (!this.change) return undefined;
+    const revision = this.patchNum
+      ? getRevisionKey(this.change, this.patchNum)
+      : this.change.current_revision;
+    return revision as CommitId | undefined;
+  }
+
+  /**
+   * Commits of the relation chain that the current change is connected to,
+   * i.e. its direct ancestors and descendants.
+   *
+   * Changes that are only related through an older patchset ("indirect
+   * relations") are not part of this set. Diffing them against a commit of
+   * this chain is rejected by the backend, because base and target must be in
+   * an ancestor/descendant relationship.
+   */
+  // private but used in tests
+  getConnectedRevisions(): Set<CommitId> {
+    if (!this.connectedRevisions) {
+      this.connectedRevisions = this.computeConnectedRevisions();
     }
-    this.targetCommitId = this.relatedChanges[0].commit.commit;
+    return this.connectedRevisions;
+  }
+
+  private computeConnectedRevisions(): Set<CommitId> {
+    const connected = new Set<CommitId>();
+    const revision = this.getCurrentRevision();
+    if (!revision) return connected;
+    connected.add(revision);
+
+    // Walk up the parents of the current change to collect its ancestors. Only
+    // commits of the relation chain are added, so that chains branching off
+    // the same root parent are not considered connected below.
+    const parentMap = this.getParentMap();
+    const ancestors = [revision];
+    while (ancestors.length > 0) {
+      for (const parent of parentMap.get(ancestors.pop()!) ?? []) {
+        if (parentMap.has(parent) && !connected.has(parent)) {
+          connected.add(parent);
+          ancestors.push(parent);
+        }
+      }
+    }
+
+    // relatedChanges is sorted from newest to oldest, so iterating backwards
+    // visits a commit only after its parents and collects all descendants.
+    for (let i = this.relatedChanges.length - 1; i >= 0; i--) {
+      const commit = this.relatedChanges[i].commit;
+      if ((commit.parents ?? []).some(p => connected.has(p.commit))) {
+        connected.add(commit.commit);
+      }
+    }
+    return connected;
+  }
+
+  // private but used in tests
+  getConnectedChanges(): RelatedChangeAndCommitInfo[] {
+    const connected = this.getConnectedRevisions();
+    return this.relatedChanges.filter(c => connected.has(c.commit.commit));
+  }
+
+  // private but used in tests
+  isIndirectRelation(change: RelatedChangeAndCommitInfo): boolean {
+    const connected = this.getConnectedRevisions();
+    return connected.size > 0 && !connected.has(change.commit.commit);
+  }
+
+  // private but used in tests
+  isAncestor(ancestorSha?: CommitId, descendantSha?: CommitId): boolean {
+    if (!ancestorSha || !descendantSha) return false;
+    if (ancestorSha === descendantSha) return true;
+
+    const parentMap = this.getParentMap();
+    const visited = new Set<CommitId>([descendantSha]);
+    const queue = [descendantSha];
+    while (queue.length > 0) {
+      for (const parent of parentMap.get(queue.pop()!) ?? []) {
+        if (parent === ancestorSha) return true;
+        if (!visited.has(parent)) {
+          visited.add(parent);
+          queue.push(parent);
+        }
+      }
+    }
+    return false;
+  }
+
+  /**
+   * Walks down the chain of the given target commit and returns the commit
+   * that the chain is based on, so that base and target are guaranteed to be
+   * in an ancestor/descendant relationship.
+   */
+  // private but used in tests
+  findValidBaseForTarget(target: CommitId): CommitId {
+    const parentMap = this.getParentMap();
+    let current = target;
+    while (parentMap.has(current)) {
+      const parents = parentMap.get(current)!;
+      const inChainParent = parents.find(p => parentMap.has(p));
+      // The oldest commit of the chain, or the root parent it is based on.
+      if (!inChainParent) return parents[0] ?? current;
+      current = inChainParent;
+    }
+    return current;
+  }
+
+  /** Returns the newest descendant of the given base commit. */
+  // private but used in tests
+  findValidTargetForBase(base: CommitId): CommitId | undefined {
+    const descendant = this.relatedChanges.find(
+      c => c.commit.commit !== base && this.isAncestor(base, c.commit.commit)
+    );
+    if (descendant) return descendant.commit.commit;
+    return this.getParentMap().has(base) ? base : undefined;
+  }
+
+  /** The commit that the chain of the current change is based on. */
+  private getConnectedRootParent(): CommitId | undefined {
+    const connectedChanges = this.getConnectedChanges();
+    const oldest = connectedChanges[connectedChanges.length - 1];
+    const parent = oldest?.commit.parents?.[0]?.commit;
+    return parent && !this.getParentMap().has(parent) ? parent : undefined;
+  }
+
+  /**
+   * Commits that changes of the relation chain are based on, but that are not
+   * part of the chain themselves. The root parent of the connected chain comes
+   * first, such that it is offered as the default base.
+   */
+  // private but used in tests
+  getBaseParents(): CommitId[] {
+    const parentMap = this.getParentMap();
+    const roots = new Set<CommitId>();
+    const connectedRoot = this.getConnectedRootParent();
+    if (connectedRoot) roots.add(connectedRoot);
+    for (const change of this.relatedChanges) {
+      const parents = change.commit.parents ?? [];
+      if (!parents.some(p => parentMap.has(p.commit))) {
+        const rootParent = parents[0]?.commit;
+        if (rootParent) roots.add(rootParent);
+      }
+    }
+    return [...roots];
+  }
+
+  // private but used in tests
+  initializeCommitIds() {
+    // Prefer the chain that the current change is part of. Diffing across two
+    // divergent chains is rejected by the backend with HTTP 400.
+    const connectedChanges = this.getConnectedChanges();
+    const chain =
+      connectedChanges.length > 0 ? connectedChanges : this.relatedChanges;
+    if (chain.length === 0) return;
+
+    const oldest = chain[chain.length - 1].commit;
+    this.baseCommitId = oldest.parents?.[0]?.commit ?? oldest.commit;
+    this.targetCommitId = chain[0].commit.commit;
+  }
+
+  // private but used in tests
+  resetToConnectedChain() {
+    this.reporting.reportInteraction(Interaction.STACK_DIFF_RESET_CHAIN);
+    this.initializeCommitIds();
+    this.loadDiffFileList();
   }
 
   private async loadDiffFileList() {
@@ -295,37 +517,62 @@
     }
     this.loading = true;
     this.error = undefined;
+    const timer = this.reporting.getTimer(Timing.STACK_DIFF_LOAD);
     try {
       const files = await this.restApiService.getProjectCommitDiff(
         repo,
         this.targetCommitId,
         this.baseCommitId
       );
-      const rest = {...(files ?? {})};
+      if (!files) {
+        this.files = {};
+        this.selectedFile = undefined;
+        this.fileDiff = undefined;
+        this.error = 'Failed to load project commit diff';
+        timer.end({success: false});
+        return;
+      }
+      const rest = {...files};
       delete rest['/COMMIT_MSG'];
       this.files = rest;
 
       const filePaths = Object.keys(this.files);
+      let fileDiffLoaded = true;
       if (filePaths.length > 0) {
-        await this.selectFile(filePaths[0]);
+        fileDiffLoaded = await this.selectFile(filePaths[0]);
       } else {
         this.selectedFile = undefined;
         this.fileDiff = undefined;
       }
+      timer.end({
+        success: fileDiffLoaded,
+        fileCount: filePaths.length,
+      });
     } catch (e) {
-      this.error =
-        'Failed to load project commit diff: ' + (e as Error).message;
+      const errorMessage = e instanceof Error ? e.message : String(e);
+      this.error = 'Failed to load project commit diff: ' + errorMessage;
+      timer.end({success: false});
     } finally {
       this.loading = false;
     }
   }
 
-  private async selectFile(path: string) {
+  // private but used in template
+  async handleFileClick(path: string) {
+    this.reporting.reportInteraction(Interaction.STACK_DIFF_FILE_SELECTED, {
+      status: this.files[path]?.status || 'M',
+    });
+    await this.selectFile(path);
+  }
+
+  private async selectFile(path: string): Promise<boolean> {
     this.selectedFile = path;
     if (!this.repo || !this.baseCommitId || !this.targetCommitId) {
-      return;
+      return false;
     }
     this.loadingDiff = true;
+    this.fileDiff = undefined;
+    const timer = this.reporting.getTimer(Timing.STACK_DIFF_FILE_LOAD);
     try {
       const diff = await this.restApiService.getProjectCommitFileDiff(
         this.repo,
@@ -336,28 +583,64 @@
       if (diff) {
         this.syntaxLayer.process(diff);
         this.fileDiff = diff;
+        timer.end({success: true});
+        return true;
+      } else {
+        this.error = 'Failed to load file diff';
+        timer.end({success: false});
+        return false;
       }
     } catch (e) {
-      this.error = 'Failed to load file diff: ' + (e as Error).message;
+      const errorMessage = e instanceof Error ? e.message : String(e);
+      this.error = 'Failed to load file diff: ' + errorMessage;
+      timer.end({success: false});
+      return false;
     } finally {
       this.loadingDiff = false;
     }
   }
 
   // private but used in template
-  handleBaseChange(e: Event) {
+  async handleBaseChange(e: Event) {
     const select = e.target as HTMLSelectElement;
     this.baseCommitId = ((select.value || select.getAttribute('value')) ??
       '') as CommitId;
-    this.loadDiffFileList();
+    let autoAdjusted = false;
+    if (
+      this.targetCommitId &&
+      !this.isAncestor(this.baseCommitId, this.targetCommitId)
+    ) {
+      const validTarget = this.findValidTargetForBase(this.baseCommitId);
+      if (validTarget) {
+        this.targetCommitId = validTarget;
+        autoAdjusted = true;
+      }
+    }
+    this.reporting.reportInteraction(Interaction.STACK_DIFF_RANGE_CHANGED, {
+      changed: 'base',
+      autoAdjusted,
+    });
+    await this.loadDiffFileList();
   }
 
   // private but used in template
-  handleTargetChange(e: Event) {
+  async handleTargetChange(e: Event) {
     const select = e.target as HTMLSelectElement;
     this.targetCommitId = ((select.value || select.getAttribute('value')) ??
       '') as CommitId;
-    this.loadDiffFileList();
+    let autoAdjusted = false;
+    if (
+      this.baseCommitId &&
+      !this.isAncestor(this.baseCommitId, this.targetCommitId)
+    ) {
+      this.baseCommitId = this.findValidBaseForTarget(this.targetCommitId);
+      autoAdjusted = true;
+    }
+    this.reporting.reportInteraction(Interaction.STACK_DIFF_RANGE_CHANGED, {
+      changed: 'target',
+      autoAdjusted,
+    });
+    await this.loadDiffFileList();
   }
 
   override render() {
@@ -407,47 +690,43 @@
 
   // private but used in template
   renderBaseOptions() {
-    const options: TemplateResult[] = [];
-    if (this.relatedChanges.length > 0) {
-      const oldestChange = this.relatedChanges[this.relatedChanges.length - 1];
-      if (
-        oldestChange.commit.parents &&
-        oldestChange.commit.parents.length > 0
-      ) {
-        const parentSha = oldestChange.commit.parents[0].commit;
-        options.push(html`
-          <md-select-option .value=${parentSha}>
-            <div slot="headline">
-              Base Parent (${parentSha.substring(0, 7)})
-            </div>
-          </md-select-option>
-        `);
-      }
-    }
-
-    for (const change of this.relatedChanges) {
-      const sha = change.commit.commit;
-      const subject = change.commit.subject;
-      options.push(html`
-        <md-select-option .value=${sha}>
-          <div slot="headline">[${sha.substring(0, 7)}] ${subject}</div>
-        </md-select-option>
-      `);
-    }
-    return options;
+    const connectedRoot = this.getConnectedRootParent();
+    return [
+      ...this.getBaseParents().map(sha =>
+        this.renderOption(
+          sha,
+          `Base Parent (${sha.substring(0, 7)})`,
+          !!connectedRoot && sha !== connectedRoot
+        )
+      ),
+      ...this.relatedChanges.map(change => this.renderChangeOption(change)),
+    ];
   }
 
   // private but used in template
   renderTargetOptions() {
-    return this.relatedChanges.map(change => {
-      const sha = change.commit.commit;
-      const subject = change.commit.subject;
-      return html`
-        <md-select-option .value=${sha}>
-          <div slot="headline">[${sha.substring(0, 7)}] ${subject}</div>
-        </md-select-option>
-      `;
-    });
+    return this.relatedChanges.map(change => this.renderChangeOption(change));
+  }
+
+  private renderChangeOption(change: RelatedChangeAndCommitInfo) {
+    const sha = change.commit.commit;
+    return this.renderOption(
+      sha,
+      `[${sha.substring(0, 7)}] ${change.commit.subject}`,
+      this.isIndirectRelation(change)
+    );
+  }
+
+  /**
+   * Indirect relations are marked, because they are based on an older patchset
+   * and thus diff against a different chain than the current change.
+   */
+  private renderOption(value: CommitId, label: string, isIndirect: boolean) {
+    return html`
+      <md-select-option .value=${value}>
+        <div slot="headline">${label}${isIndirect ? ' (indirect)' : ''}</div>
+      </md-select-option>
+    `;
   }
 
   // private but used in template
@@ -465,7 +744,23 @@
       `;
     }
     if (this.error) {
-      return html` <div class="error-message">${this.error}</div> `;
+      return html`
+        <div class="error-container">
+          <div class="error-message">${this.error}</div>
+          ${when(
+            this.getConnectedChanges().length > 0,
+            () => html`
+              <gr-button
+                id="resetChainButton"
+                link
+                @click=${this.resetToConnectedChain}
+              >
+                Reset to connected chain
+              </gr-button>
+            `
+          )}
+        </div>
+      `;
     }
 
     const filePaths = Object.keys(this.files);
@@ -476,7 +771,7 @@
           return html`
             <div
               class="file-row ${this.selectedFile === path ? 'selected' : ''}"
-              @click=${() => this.selectFile(path)}
+              @click=${() => this.handleFileClick(path)}
             >
               <span class="status ${fileInfo.status || 'M'}"
                 >${fileInfo.status || 'M'}</span
diff --git a/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-stack-diff-dialog_test.ts b/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-stack-diff-dialog_test.ts
index d965ba3..ca663e8 100644
--- a/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-stack-diff-dialog_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-stack-diff-dialog_test.ts
@@ -7,19 +7,47 @@
 import './gr-stack-diff-dialog';
 import {assert, fixture, html} from '@open-wc/testing';
 import {GrStackDiffDialog} from './gr-stack-diff-dialog';
-import {queryAndAssert, stubRestApi} from '../../../test/test-utils';
-import {CommitId, RepoName} from '../../../types/common';
+import {
+  query,
+  queryAndAssert,
+  stubRestApi,
+  waitUntil,
+} from '../../../test/test-utils';
+import {
+  CommitId,
+  PatchSetNumber,
+  RelatedChangeAndCommitInfo,
+  RepoName,
+} from '../../../types/common';
 import {FileInfoStatus} from '../../../api/rest-api';
 import {DiffInfo} from '../../../types/diff';
 import {
   createCommitInfoWithRequiredCommit,
+  createParsedChange,
   createRelatedChangeAndCommitInfo,
+  createRevision,
 } from '../../../test/test-data-generators';
+import {Interaction, Timing} from '../../../constants/reporting';
+import {Timer} from '../../../services/gr-reporting/gr-reporting';
 import * as sinon from 'sinon';
 
+function relatedChange(sha: string, ...parentShas: string[]) {
+  return {
+    ...createRelatedChangeAndCommitInfo(),
+    commit: {
+      ...createCommitInfoWithRequiredCommit(sha),
+      subject: `Change ${sha}`,
+      parents: parentShas.map(parentSha => {
+        return {commit: parentSha as CommitId, subject: `Parent ${parentSha}`};
+      }),
+    },
+  };
+}
+
 suite('gr-stack-diff-dialog tests', () => {
   let element: GrStackDiffDialog;
   let getProjectCommitDiffStub: sinon.SinonStub;
+  let getProjectCommitFileDiffStub: sinon.SinonStub;
 
   setup(async () => {
     getProjectCommitDiffStub = stubRestApi('getProjectCommitDiff').resolves({
@@ -32,7 +60,9 @@
       },
     });
 
-    stubRestApi('getProjectCommitFileDiff').resolves({
+    getProjectCommitFileDiffStub = stubRestApi(
+      'getProjectCommitFileDiff'
+    ).resolves({
       meta_a: {
         name: 'foo/bar.ts',
         content_type: 'text/typescript',
@@ -55,7 +85,7 @@
         ...createRelatedChangeAndCommitInfo(),
         commit: {
           ...createCommitInfoWithRequiredCommit(
-            'abcdefabcdef1234567890abcdefabcdef123456' as CommitId
+            'abcdefabcdef1234567890abcdefabcdef123456'
           ),
           subject: 'Related change 1',
           parents: [
@@ -101,4 +131,418 @@
 
     assert.isTrue(getProjectCommitDiffStub.calledOnce);
   });
+
+  suite('smart relation chain handling', () => {
+    setup(async () => {
+      element.change = {
+        ...createParsedChange(),
+        revisions: {
+          'current-sha': {...createRevision(), _number: 1 as PatchSetNumber},
+        },
+        current_revision: 'current-sha' as CommitId,
+      };
+      element.patchNum = 1 as PatchSetNumber;
+      // Sorted from newest to oldest, like the REST API returns it.
+      element.relatedChanges = [
+        // Indirect relation: branched off an older patchset, so it is based on
+        // a commit that is not part of the current chain.
+        relatedChange('indirect-sha', 'indirect-base-sha'),
+        relatedChange('child-sha', 'current-sha'),
+        relatedChange('current-sha', 'connected-base-sha'),
+      ];
+      await element.updateComplete;
+    });
+
+    test('open initializes to connected chain, skipping indirect relations', async () => {
+      await element.open();
+      await element.updateComplete;
+
+      // Target should be the top of the connected chain (child-sha), NOT indirect-sha
+      assert.equal(element.targetCommitId, 'child-sha');
+      // Base should be the base parent of the connected chain (connected-base-sha)
+      assert.equal(element.baseCommitId, 'connected-base-sha');
+    });
+
+    test('options render indirect labels and all root parents', async () => {
+      await element.open();
+      await element.updateComplete;
+
+      const baseParents = element.getBaseParents();
+      assert.deepEqual(baseParents, [
+        'connected-base-sha' as CommitId,
+        'indirect-base-sha' as CommitId,
+      ]);
+
+      const baseOptions = element.renderBaseOptions();
+      // Should have 2 base parents + 3 changes = 5 options
+      assert.equal(baseOptions.length, 5);
+
+      // Indirect relations should be identified correctly
+      assert.isTrue(element.isIndirectRelation(element.relatedChanges[0]));
+      assert.isFalse(element.isIndirectRelation(element.relatedChanges[1]));
+      assert.isFalse(element.isIndirectRelation(element.relatedChanges[2]));
+    });
+
+    test('auto-adjusts base when target is changed to indirect relation', async () => {
+      await element.open();
+      await element.updateComplete;
+      assert.equal(element.baseCommitId, 'connected-base-sha');
+      assert.equal(element.targetCommitId, 'child-sha');
+
+      const targetSelect = queryAndAssert<HTMLElement & {value: string}>(
+        element,
+        '#targetSelect'
+      );
+      targetSelect.value = 'indirect-sha';
+      targetSelect.dispatchEvent(new CustomEvent('change'));
+      await element.updateComplete;
+
+      assert.equal(element.targetCommitId, 'indirect-sha');
+      // Base should have auto-adjusted to indirect-base-sha
+      assert.equal(element.baseCommitId, 'indirect-base-sha');
+    });
+
+    test('auto-adjusts target when base is changed to divergent chain', async () => {
+      await element.open();
+      await element.updateComplete;
+
+      // Start by selecting indirect chain
+      const targetSelect = queryAndAssert<HTMLElement & {value: string}>(
+        element,
+        '#targetSelect'
+      );
+      targetSelect.value = 'indirect-sha';
+      targetSelect.dispatchEvent(new CustomEvent('change'));
+      await element.updateComplete;
+      assert.equal(element.baseCommitId, 'indirect-base-sha');
+      assert.equal(element.targetCommitId, 'indirect-sha');
+
+      // Now switch base to connected chain
+      const baseSelect = queryAndAssert<HTMLElement & {value: string}>(
+        element,
+        '#baseSelect'
+      );
+      baseSelect.value = 'connected-base-sha';
+      baseSelect.dispatchEvent(new CustomEvent('change'));
+      await element.updateComplete;
+
+      assert.equal(element.baseCommitId, 'connected-base-sha');
+      // Target should have auto-adjusted to child-sha
+      assert.equal(element.targetCommitId, 'child-sha');
+    });
+
+    test('renders reset button on error and restores connected chain', async () => {
+      await element.open();
+      await element.updateComplete;
+
+      getProjectCommitDiffStub.rejects(
+        new Error('Commits are not in ancestor/descendant relationship')
+      );
+
+      // Trigger a reload that causes an error
+      const targetSelect = queryAndAssert<HTMLElement & {value: string}>(
+        element,
+        '#targetSelect'
+      );
+      targetSelect.value = 'indirect-sha';
+      targetSelect.dispatchEvent(new CustomEvent('change'));
+      await waitUntil(() => !!query(element, '#resetChainButton'));
+
+      const resetBtn = queryAndAssert<HTMLElement>(
+        element,
+        '#resetChainButton'
+      );
+      assert.isOk(resetBtn);
+
+      // Reset stub to succeed
+      getProjectCommitDiffStub.resolves({'foo/bar.ts': {lines_inserted: 1}});
+      resetBtn.click();
+      await waitUntil(() => element.targetCommitId === 'child-sha');
+      await element.updateComplete;
+
+      assert.equal(element.targetCommitId, 'child-sha');
+      assert.equal(element.baseCommitId, 'connected-base-sha');
+    });
+  });
+
+  suite('connected chain detection', () => {
+    function setChain(relatedChanges: RelatedChangeAndCommitInfo[]) {
+      element.change = {
+        ...createParsedChange(),
+        revisions: {
+          'current-sha': {...createRevision(), _number: 1 as PatchSetNumber},
+        },
+        current_revision: 'current-sha' as CommitId,
+      };
+      element.patchNum = 1 as PatchSetNumber;
+      element.relatedChanges = relatedChanges;
+      return element.updateComplete;
+    }
+
+    test('indirect relation sorted below the current change is not connected', async () => {
+      // The indirect relation is older than the current change, so it cannot
+      // be detected by position in the list alone.
+      await setChain([
+        relatedChange('child-sha', 'current-sha'),
+        relatedChange('current-sha', 'ancestor-sha'),
+        relatedChange('ancestor-sha', 'root-sha'),
+        relatedChange('stale-sha', 'other-root-sha'),
+      ]);
+
+      assert.deepEqual([...element.getConnectedRevisions()].sort(), [
+        'ancestor-sha',
+        'child-sha',
+        'current-sha',
+      ]);
+    });
+
+    test('chain branching off the same root parent is not connected', async () => {
+      await setChain([
+        relatedChange('sibling-sha', 'root-sha'),
+        relatedChange('current-sha', 'root-sha'),
+      ]);
+
+      // Both chains share the root parent, but they are not ancestors of each
+      // other, so diffing them would be rejected by the backend.
+      assert.deepEqual([...element.getConnectedRevisions()], ['current-sha']);
+      assert.isFalse(
+        element.isAncestor('sibling-sha' as CommitId, 'current-sha' as CommitId)
+      );
+    });
+
+    test('connected revisions are empty without a current change', async () => {
+      element.change = undefined;
+      element.relatedChanges = [relatedChange('a-sha', 'b-sha')];
+      await element.updateComplete;
+
+      assert.equal(element.getConnectedRevisions().size, 0);
+      // Without a connected chain nothing is marked as indirect.
+      assert.isFalse(element.isIndirectRelation(element.relatedChanges[0]));
+    });
+
+    test('handles cascading merge commits where chain link is second parent', async () => {
+      // Simulates cascading branch merges (e.g. stable-3.13 -> stable-3.14 ->
+      // stable-3.15 -> master) where parents[0] is the target branch tip and
+      // parents[1] is the parent change in the relation chain.
+      await setChain([
+        relatedChange('merge-into-master', 'master-tip', 'current-sha'),
+        relatedChange('current-sha', 'stable-3.15-tip', 'merge-into-3.14'),
+        relatedChange('merge-into-3.14', 'stable-3.14-tip', 'stable-3.13-tip'),
+      ]);
+
+      assert.deepEqual([...element.getConnectedRevisions()].sort(), [
+        'current-sha',
+        'merge-into-3.14',
+        'merge-into-master',
+      ]);
+
+      // Only the root of the chain (merge-into-3.14's first parent) should be
+      // listed as a base parent, not the first parents of intermediate merges.
+      assert.deepEqual(element.getBaseParents(), [
+        'stable-3.14-tip' as CommitId,
+      ]);
+
+      // Walking down from the top merge commit follows the in-chain second
+      // parents down to the root parent of the chain.
+      assert.equal(
+        element.findValidBaseForTarget('merge-into-master' as CommitId),
+        'stable-3.14-tip' as CommitId
+      );
+    });
+  });
+
+  suite('reporting', () => {
+    let reportInteractionStub: sinon.SinonStub;
+    let getTimerStub: sinon.SinonStub;
+    let loadTimerEndStub: sinon.SinonStub;
+    let fileLoadTimerEndStub: sinon.SinonStub;
+
+    setup(async () => {
+      reportInteractionStub = sinon.stub(
+        element.reporting,
+        'reportInteraction'
+      );
+      loadTimerEndStub = sinon.stub();
+      fileLoadTimerEndStub = sinon.stub();
+      getTimerStub = sinon
+        .stub(element.reporting, 'getTimer')
+        .callsFake((name: string) => {
+          const endStub =
+            name === Timing.STACK_DIFF_LOAD
+              ? loadTimerEndStub
+              : fileLoadTimerEndStub;
+          const timer: Timer = {
+            reset: () => timer,
+            end: details => {
+              endStub(details);
+              return timer;
+            },
+            withMaximum: () => timer,
+          };
+          return timer;
+        });
+
+      element.change = {
+        ...createParsedChange(),
+        revisions: {
+          'current-sha': {...createRevision(), _number: 1 as PatchSetNumber},
+        },
+        current_revision: 'current-sha' as CommitId,
+      };
+      element.patchNum = 1 as PatchSetNumber;
+      element.relatedChanges = [
+        relatedChange('indirect-sha', 'indirect-base-sha'),
+        relatedChange('child-sha', 'current-sha'),
+        relatedChange('current-sha', 'connected-base-sha'),
+      ];
+      await element.updateComplete;
+    });
+
+    test('open reports dialog opened interaction and load timings', async () => {
+      await element.open();
+      await element.updateComplete;
+
+      assert.isTrue(
+        reportInteractionStub.calledOnceWithExactly(
+          Interaction.STACK_DIFF_DIALOG_OPENED,
+          {
+            relatedChangesCount: 3,
+            connectedChangesCount: 2,
+            hasIndirectRelations: true,
+          }
+        )
+      );
+      assert.isTrue(getTimerStub.calledWithExactly(Timing.STACK_DIFF_LOAD));
+      assert.isTrue(
+        getTimerStub.calledWithExactly(Timing.STACK_DIFF_FILE_LOAD)
+      );
+      assert.isTrue(
+        loadTimerEndStub.calledWithExactly({
+          success: true,
+          fileCount: 1,
+        })
+      );
+      assert.isTrue(
+        fileLoadTimerEndStub.calledWithExactly({
+          success: true,
+        })
+      );
+    });
+
+    test('initial file diff failure reports STACK_DIFF_LOAD success false', async () => {
+      getProjectCommitFileDiffStub.rejects(new Error('File diff failed'));
+
+      await element.open();
+      await element.updateComplete;
+
+      assert.isTrue(
+        fileLoadTimerEndStub.calledWithExactly({
+          success: false,
+        })
+      );
+      assert.isTrue(
+        loadTimerEndStub.calledWithExactly({
+          success: false,
+          fileCount: 1,
+        })
+      );
+    });
+
+    test('undefined REST response sets error and reports failure timing', async () => {
+      getProjectCommitDiffStub.resolves(undefined);
+
+      await element.open();
+      await element.updateComplete;
+
+      assert.isTrue(
+        loadTimerEndStub.calledWithExactly({
+          success: false,
+        })
+      );
+      assert.isDefined(query(element, '.error-message'));
+    });
+
+    test('changing range reports interaction with autoAdjusted flag', async () => {
+      await element.open();
+      await element.updateComplete;
+      reportInteractionStub.resetHistory();
+      loadTimerEndStub.resetHistory();
+
+      const targetSelect = queryAndAssert<HTMLElement & {value: string}>(
+        element,
+        '#targetSelect'
+      );
+      targetSelect.value = 'indirect-sha';
+      targetSelect.dispatchEvent(new CustomEvent('change'));
+      await waitUntil(() => loadTimerEndStub.called);
+      await element.updateComplete;
+
+      assert.isTrue(
+        reportInteractionStub.calledOnceWithExactly(
+          Interaction.STACK_DIFF_RANGE_CHANGED,
+          {
+            changed: 'target',
+            autoAdjusted: true,
+          }
+        )
+      );
+    });
+
+    test('clicking file row reports file selected interaction', async () => {
+      await element.open();
+      await element.updateComplete;
+      reportInteractionStub.resetHistory();
+      fileLoadTimerEndStub.resetHistory();
+
+      const fileRow = queryAndAssert<HTMLElement>(element, '.file-row');
+      fileRow.click();
+      await waitUntil(() => fileLoadTimerEndStub.called);
+      await element.updateComplete;
+
+      assert.isTrue(
+        reportInteractionStub.calledOnceWithExactly(
+          Interaction.STACK_DIFF_FILE_SELECTED,
+          {
+            status: FileInfoStatus.ADDED,
+          }
+        )
+      );
+    });
+
+    test('error and reset chain report failure timing and reset interaction', async () => {
+      await element.open();
+      await element.updateComplete;
+      reportInteractionStub.resetHistory();
+      loadTimerEndStub.resetHistory();
+
+      getProjectCommitDiffStub.rejects(new Error('Backend failure'));
+      const targetSelect = queryAndAssert<HTMLElement & {value: string}>(
+        element,
+        '#targetSelect'
+      );
+      targetSelect.value = 'indirect-sha';
+      targetSelect.dispatchEvent(new CustomEvent('change'));
+      await waitUntil(() => !!query(element, '#resetChainButton'));
+
+      assert.isTrue(
+        loadTimerEndStub.calledWithExactly({
+          success: false,
+        })
+      );
+
+      reportInteractionStub.resetHistory();
+      loadTimerEndStub.resetHistory();
+      getProjectCommitDiffStub.resolves({'foo/bar.ts': {lines_inserted: 1}});
+      queryAndAssert<HTMLElement>(element, '#resetChainButton').click();
+      await waitUntil(
+        () => element.targetCommitId === 'child-sha' && loadTimerEndStub.called
+      );
+
+      assert.isTrue(
+        reportInteractionStub.calledWithExactly(
+          Interaction.STACK_DIFF_RESET_CHAIN
+        )
+      );
+    });
+  });
 });
diff --git a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.ts b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.ts
index cdcd85d..1483890 100644
--- a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.ts
+++ b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.ts
@@ -366,12 +366,6 @@
   @state()
   isOwner = false;
 
-  @state()
-  private draggedAccount: AccountInfo | null = null;
-
-  @state()
-  private draggedFrom: GrAccountList | null = null;
-
   private readonly restApiService: RestApiService =
     getAppContext().restApiService;
 
@@ -398,10 +392,6 @@
       modalStyles,
       materialStyles,
       css`
-        gr-account-list.drag-over {
-          background-color: var(--table-header-background-color);
-          outline: 2px dashed var(--border-color);
-        }
         :host {
           background-color: var(--dialog-background-color);
           display: block;
@@ -770,6 +760,27 @@
       const reviewer = e.detail.reviewer;
       this.reviewersList?.removeAccount(reviewer);
     });
+
+    // Plugins on reply-reviewers that render their own gr-account-list (for
+    // example, queuing deferred reviewers into a Gerrit Flow on send rather
+    // than adding them to #reviewers immediately) still need to mark the reply
+    // dialog as mutated so the Send button is enabled when only the plugin's
+    // account list changes.
+    this.addEventListener('accounts-changed', (e: Event) => {
+      if (!this.isFromReplyReviewersPlugin(e)) return;
+      const value = (e as CustomEvent<{value?: (AccountInfo | GroupInfo)[]}>)
+        .detail?.value;
+      if (Array.isArray(value) && value.length === 0) {
+        this.reviewersMutated = this.hasBuiltInReviewerMutations();
+      } else {
+        this.reviewersMutated = true;
+      }
+    });
+
+    this.addEventListener('account-text-changed', (e: Event) => {
+      if (!this.isFromReplyReviewersPlugin(e)) return;
+      this.handleAccountTextEntry();
+    });
   }
 
   override willUpdate(changedProperties: PropertyValues) {
@@ -866,10 +877,6 @@
           .chipDraggable=${true}
           @account-added=${this.handleAccountAdded}
           @accounts-changed=${this.handleReviewersChanged}
-          @account-drag-start=${this.handleAccountDragStart}
-          @dragover=${this.handleDragOver}
-          @dragleave=${this.handleDragLeave}
-          @drop=${this.handleDrop}
           .removableValues=${this.change?.removable_reviewers}
           .filter=${this.filterReviewerSuggestion}
           .pendingConfirmation=${this.reviewerPendingConfirmation}
@@ -900,10 +907,6 @@
           .chipDraggable=${true}
           @account-added=${this.handleAccountAdded}
           @accounts-changed=${this.handleCcsChanged}
-          @account-drag-start=${this.handleAccountDragStart}
-          @dragover=${this.handleDragOver}
-          @dragleave=${this.handleDragLeave}
-          @drop=${this.handleDrop}
           .filter=${this.filterCCSuggestion}
           .pendingConfirmation=${this.ccPendingConfirmation}
           @pending-confirmation-changed=${this.handleCcsConfirmationChanged}
@@ -1399,81 +1402,6 @@
     }
   }
 
-  private handleAccountDragStart(e: CustomEvent<{account: AccountInfo}>) {
-    const account = e.detail.account;
-    if (!account) return;
-
-    this.draggedAccount = account;
-    this.draggedFrom = e.currentTarget as GrAccountList;
-  }
-
-  private handleDragOver(e: DragEvent) {
-    e.preventDefault();
-    e.stopPropagation();
-    if (e.dataTransfer) {
-      e.dataTransfer.dropEffect = 'move';
-    }
-    const list = e.currentTarget as GrAccountList;
-    if (this.draggedFrom && this.draggedFrom !== list) {
-      list.classList.add('drag-over');
-    }
-  }
-
-  private handleDragLeave(e: DragEvent) {
-    e.preventDefault();
-    e.stopPropagation();
-    const list = e.currentTarget as GrAccountList;
-    list.classList.remove('drag-over');
-  }
-
-  private handleDrop(e: DragEvent) {
-    e.preventDefault();
-    e.stopPropagation();
-    const dropTarget = e.currentTarget as GrAccountList;
-    dropTarget.classList.remove('drag-over');
-
-    if (!this.draggedAccount || !this.draggedFrom) {
-      return;
-    }
-    if (this.draggedFrom === dropTarget) {
-      this.draggedAccount = null;
-      this.draggedFrom = null;
-      return;
-    }
-
-    const accountToMove = this.draggedAccount;
-    const targetIsCcs = dropTarget.id === 'ccs';
-
-    if (targetIsCcs) {
-      this.reviewers = this.reviewers.filter(
-        r => getUserId(r) !== getUserId(accountToMove)
-      );
-      if (!this.ccs.find(cc => getUserId(cc) === getUserId(accountToMove))) {
-        this.ccs = [...this.ccs, accountToMove];
-        this.reviewersMutated = true;
-      }
-    } else {
-      this.ccs = this.ccs.filter(
-        cc => getUserId(cc) !== getUserId(accountToMove)
-      );
-      if (
-        !this.reviewers.find(r => getUserId(r) === getUserId(accountToMove))
-      ) {
-        this.reviewers = [...this.reviewers, accountToMove];
-        this.reviewersMutated = true;
-      }
-    }
-
-    const moveFrom = targetIsCcs ? 'reviewers' : 'CCs';
-    const moveTo = targetIsCcs ? 'CCs' : 'reviewers';
-    const id = accountToMove.name || getUserId(accountToMove);
-    const message = `${id} moved from ${moveFrom} to ${moveTo}.`;
-    fireAlert(this, message);
-
-    this.draggedAccount = null;
-    this.draggedFrom = null;
-  }
-
   getUnresolvedPatchsetLevelClass(patchsetLevelDraftIsResolved: boolean) {
     return patchsetLevelDraftIsResolved ? 'resolved' : 'unresolved';
   }
@@ -1546,136 +1474,141 @@
 
     this.disabled = true;
 
-    const reason = getReplyByReason(this.account, this.serverConfig);
+    try {
+      const reason = getReplyByReason(this.account, this.serverConfig);
 
-    reviewInput.ignore_automatic_attention_set_rules = true;
-    reviewInput.add_to_attention_set = [];
-    const allAccounts = this.allAccounts();
+      reviewInput.ignore_automatic_attention_set_rules = true;
+      reviewInput.add_to_attention_set = [];
+      const allAccounts = this.allAccounts();
 
-    const newAttentionSetAdditions: AccountInfo[] = Array.from(
-      this.newAttentionSet
-    )
-      .filter(user => !this.currentAttentionSet.has(user))
-      .map(user => allAccounts.find(a => getUserId(a) === user))
-      .filter(isDefined);
-
-    const newAttentionSetUsers = (
-      await Promise.all(
-        newAttentionSetAdditions.map(a =>
-          this.getAccountsModel().fillDetails(a)
-        )
+      const newAttentionSetAdditions: AccountInfo[] = Array.from(
+        this.newAttentionSet
       )
-    ).filter(isDefined);
+        .filter(user => !this.currentAttentionSet.has(user))
+        .map(user => allAccounts.find(a => getUserId(a) === user))
+        .filter(isDefined);
 
-    for (const user of newAttentionSetUsers) {
-      const reason =
-        getMentionedReason(
-          this.draftCommentThreads,
-          this.account,
-          user,
-          this.serverConfig
-        ) ?? '';
-      reviewInput.add_to_attention_set.push({user: getUserId(user), reason});
-    }
-    reviewInput.remove_from_attention_set = [];
-    for (const user of this.currentAttentionSet) {
-      if (!this.newAttentionSet.has(user)) {
-        reviewInput.remove_from_attention_set.push({user, reason});
+      const newAttentionSetUsers = (
+        await Promise.all(
+          newAttentionSetAdditions.map(a =>
+            this.getAccountsModel().fillDetails(a)
+          )
+        )
+      ).filter(isDefined);
+
+      for (const user of newAttentionSetUsers) {
+        const reason =
+          getMentionedReason(
+            this.draftCommentThreads,
+            this.account,
+            user,
+            this.serverConfig
+          ) ?? '';
+        reviewInput.add_to_attention_set.push({user: getUserId(user), reason});
       }
-    }
-    this.reportAttentionSetChanges(
-      this.attentionExpanded,
-      reviewInput.add_to_attention_set,
-      reviewInput.remove_from_attention_set
-    );
-
-    if (this.patchsetLevelGrComment) {
-      this.patchsetLevelGrComment.disableAutoSaving = true;
-      await this.restApiService.awaitPendingDiffDrafts();
-      const comment =
-        await this.patchsetLevelGrComment.convertToCommentInputAndOrDiscard();
-      if (comment && comment.path && comment.message) {
-        reviewInput.comments ??= {};
-        reviewInput.comments[comment.path] ??= [];
-        reviewInput.comments[comment.path].push(comment);
+      reviewInput.remove_from_attention_set = [];
+      for (const user of this.currentAttentionSet) {
+        if (!this.newAttentionSet.has(user)) {
+          reviewInput.remove_from_attention_set.push({user, reason});
+        }
       }
-    }
+      this.reportAttentionSetChanges(
+        this.attentionExpanded,
+        reviewInput.add_to_attention_set,
+        reviewInput.remove_from_attention_set
+      );
 
-    assertIsDefined(this.change, 'change');
-    reviewInput.reviewers = this.computeReviewers();
-    this.reportStartReview(reviewInput);
+      if (this.patchsetLevelGrComment) {
+        this.patchsetLevelGrComment.disableAutoSaving = true;
+        await this.restApiService.awaitPendingDiffDrafts();
+        const comment =
+          await this.patchsetLevelGrComment.convertToCommentInputAndOrDiscard();
+        if (comment && comment.path && comment.message) {
+          reviewInput.comments ??= {};
+          reviewInput.comments[comment.path] ??= [];
+          reviewInput.comments[comment.path].push(comment);
+        }
+      }
 
-    const errFn = (r?: Response | null) => this.handle400Error(r);
-    if (
-      !(await this.getPluginLoader().jsApiService.handleBeforeReplySent(
-        this.change,
-        reviewInput
-      ))
-    )
+      assertIsDefined(this.change, 'change');
+      reviewInput.reviewers = this.computeReviewers();
+      this.reportStartReview(reviewInput);
+
+      const errFn = (r?: Response | null) => this.handle400Error(r);
+      if (
+        !(await this.getPluginLoader().jsApiService.handleBeforeReplySent(
+          this.change,
+          reviewInput
+        ))
+      ) {
+        return;
+      }
+      // ChangeModel will be updated once the reply returns at which point the
+      // timer will be ended.
+      this.reporting.time(Timing.SEND_REPLY);
+      this.getNavigation().blockNavigation('sending review');
+      const networkTimer = this.reporting.getTimer('SendReply - network');
+      await this.saveReview(reviewInput, errFn)
+        .then(result => {
+          networkTimer.end();
+
+          // change-info is not set only if request resulted in error.
+          if (!result?.change_info) {
+            return;
+          }
+
+          // saveReview response don't contain revision information, if the
+          // newer patchset was uploaded in the meantime, we should reload.
+          const reloadRequired =
+            result.change_info.current_revision_number !==
+            this.change?.current_revision_number;
+          // Update the state right away to update comments, even if the full
+          // reload is scheduled right after.
+          const updatedChange = {
+            ...result.change_info,
+            revisions: this.change?.revisions,
+            current_revision: this.change?.current_revision,
+            current_revision_number: this.change?.current_revision_number,
+          };
+          const parseTimer = this.reporting.getTimer('SendReply - parse');
+          this.getChangeModel().updateStateChange(
+            GrReviewerUpdatesParser.parse(updatedChange as ChangeViewChangeInfo)
+          );
+          parseTimer.end();
+          if (reloadRequired) {
+            fireReload(this);
+          } else {
+            // Only reload submittability if the full reload is not triggered, to
+            // avoid duplicate requests.
+            this.getChangeModel().reloadSubmittability();
+          }
+
+          this.patchsetLevelDraftMessage = '';
+          this.includeComments = true;
+          fireNoBubble(this, 'send', {});
+          fireIronAnnounce(this, 'Reply sent');
+          const pluginAfterTimer = this.reporting.getTimer(
+            'SendReply - pluginAfter'
+          );
+          this.getPluginLoader().jsApiService.handleReplySent();
+          pluginAfterTimer.end();
+        })
+        .finally(async () => {
+          this.getNavigation().releaseNavigation('sending review');
+          // The request finished and reloads if necessary are asynchronously
+          // scheduled.
+          this.reporting.timeEnd(Timing.SEND_REPLY);
+          if (this.autosubmitChecked) {
+            await this.getFlowsModel().createAutosubmitFlow();
+          }
+        });
       return;
-    // ChangeModel will be updated once the reply returns at which point the
-    // timer will be ended.
-    this.reporting.time(Timing.SEND_REPLY);
-    this.getNavigation().blockNavigation('sending review');
-    const networkTimer = this.reporting.getTimer('SendReply - network');
-    return this.saveReview(reviewInput, errFn)
-      .then(result => {
-        networkTimer.end();
-
-        // change-info is not set only if request resulted in error.
-        if (!result?.change_info) {
-          return;
-        }
-
-        // saveReview response don't contain revision information, if the
-        // newer patchset was uploaded in the meantime, we should reload.
-        const reloadRequired =
-          result.change_info.current_revision_number !==
-          this.change?.current_revision_number;
-        // Update the state right away to update comments, even if the full
-        // reload is scheduled right after.
-        const updatedChange = {
-          ...result.change_info,
-          revisions: this.change?.revisions,
-          current_revision: this.change?.current_revision,
-          current_revision_number: this.change?.current_revision_number,
-        };
-        const parseTimer = this.reporting.getTimer('SendReply - parse');
-        this.getChangeModel().updateStateChange(
-          GrReviewerUpdatesParser.parse(updatedChange as ChangeViewChangeInfo)
-        );
-        parseTimer.end();
-        if (reloadRequired) {
-          fireReload(this);
-        } else {
-          // Only reload submittability if the full reload is not triggered, to
-          // avoid duplicate requests.
-          this.getChangeModel().reloadSubmittability();
-        }
-
-        this.patchsetLevelDraftMessage = '';
-        this.includeComments = true;
-        fireNoBubble(this, 'send', {});
-        fireIronAnnounce(this, 'Reply sent');
-        const pluginAfterTimer = this.reporting.getTimer(
-          'SendReply - pluginAfter'
-        );
-        this.getPluginLoader().jsApiService.handleReplySent();
-        pluginAfterTimer.end();
-      })
-      .finally(async () => {
-        this.getNavigation().releaseNavigation('sending review');
-        this.disabled = false;
-        if (this.patchsetLevelGrComment) {
-          this.patchsetLevelGrComment.disableAutoSaving = false;
-        }
-        // The request finished and reloads if necessary are asynchronously
-        // scheduled.
-        this.reporting.timeEnd(Timing.SEND_REPLY);
-        if (this.autosubmitChecked) {
-          await this.getFlowsModel().createAutosubmitFlow();
-        }
-      });
+    } finally {
+      this.disabled = false;
+      if (this.patchsetLevelGrComment) {
+        this.patchsetLevelGrComment.disableAutoSaving = false;
+      }
+    }
   }
 
   private reportStartReview(reviewInput: ReviewInput) {
@@ -2185,6 +2118,28 @@
     this.reviewersMutated = true;
   }
 
+  private isFromReplyReviewersPlugin(e: Event): boolean {
+    const path = e.composedPath();
+    if (this.reviewersList && path.includes(this.reviewersList)) {
+      return false;
+    }
+    return path.some(
+      target =>
+        target instanceof HTMLElement &&
+        target.tagName === 'GR-ENDPOINT-DECORATOR' &&
+        target.getAttribute('name') === 'reply-reviewers'
+    );
+  }
+
+  private hasBuiltInReviewerMutations(): boolean {
+    return (
+      this.computeReviewers().length > 0 ||
+      this.mentionedUsers.length > 0 ||
+      Boolean(this.reviewersList?.entry?.getText()?.length) ||
+      Boolean(this.ccsList?.entry?.getText()?.length)
+    );
+  }
+
   private alreadyExists(ccs: AccountInput[], user: AccountInfoInput) {
     return ccs
       .filter(cc => isAccount(cc))
diff --git a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog_test.ts b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog_test.ts
index dd168b3..cf80905 100644
--- a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog_test.ts
@@ -79,6 +79,7 @@
 import {changeModelToken} from '../../../models/change/change-model';
 import {GrAccountLabel} from '../../shared/gr-account-label/gr-account-label';
 import {userModelToken} from '../../../models/user/user-model';
+import {pluginLoaderToken} from '../../shared/gr-js-api-interface/gr-plugin-loader';
 import {MdCheckbox} from '@material/web/checkbox/checkbox';
 import {GrAutosubmitCheckbox} from '../../shared/gr-autosubmit-checkbox/gr-autosubmit-checkbox';
 
@@ -1670,6 +1671,45 @@
     assert.isFalse(filter({group: cc2} as Suggestion));
   });
 
+  test('can delete a reviewer and add them back via autocomplete suggestions', async () => {
+    const reviewer: AccountInfo = {
+      _account_id: 77 as AccountId,
+      name: 'Alice Reviewer',
+      email: 'alice@example.com' as EmailAddress,
+    };
+    element.change = {
+      ...change,
+      reviewers: {
+        [ReviewerState.REVIEWER]: [reviewer],
+        [ReviewerState.CC]: [],
+      },
+      removable_reviewers: [reviewer],
+    };
+    await element.updateComplete;
+
+    const reviewersList = queryAndAssert<GrAccountList>(element, '#reviewers');
+    assert.deepEqual(element.reviewers, [reviewer]);
+
+    // Delete the reviewer from the reply dialog.
+    reviewersList.removeAccount(reviewer);
+    await element.updateComplete;
+    assert.deepEqual(element.reviewers, []);
+
+    // Even when backend suggest_reviewers returns [], the locally removed
+    // reviewer is suggested when typing their name/email and can be added back.
+    const suggestions = await reviewersList.getSuggestions('alice');
+    assert.equal(suggestions.length, 1);
+    assert.deepEqual(suggestions[0].value, {
+      account: reviewer,
+      count: 1,
+    });
+
+    reviewersList.addAccountItem(suggestions[0].value!);
+    await element.updateComplete;
+    assert.deepEqual(element.reviewers, [reviewer]);
+    assert.deepEqual(element.computeReviewers(), []);
+  });
+
   test('focusOn', async () => {
     await element.updateComplete;
     const chooseFocusTargetSpy = sinon.spy(element, 'chooseFocusTarget');
@@ -2928,7 +2968,7 @@
 
     test('mentioned user in resolved draft is added to CC', async () => {
       const account = {
-        ...createAccountWithEmail('abcd@def.com' as EmailAddress),
+        ...createAccountWithEmail('abcd@def.com'),
         _account_id: 1234 as AccountId,
         registered_on: '2015-03-12 18:32:08.000000000' as Timestamp,
       };
@@ -2961,7 +3001,7 @@
 
     test('mentioned user in unresolved draft is added to CC and AttentionSet', async () => {
       const account = {
-        ...createAccountWithEmail('abcd@def.com' as EmailAddress),
+        ...createAccountWithEmail('abcd@def.com'),
         _account_id: 1234 as AccountId,
         registered_on: '2015-03-12 18:32:08.000000000' as Timestamp,
       };
@@ -3000,7 +3040,7 @@
     test('mention user can be manually removed from attention set', async () => {
       stubRestApi('getAccountDetails').returns(
         Promise.resolve({
-          ...createAccountWithEmail('abcd@def.com' as EmailAddress),
+          ...createAccountWithEmail('abcd@def.com'),
           _account_id: 1234 as AccountId,
           registered_on: '2015-03-12 18:32:08.000000000' as Timestamp,
         })
@@ -3063,7 +3103,7 @@
 
     test('mention user who is already CCed', async () => {
       const account = {
-        ...createAccountWithEmail('abcd@def.com' as EmailAddress),
+        ...createAccountWithEmail('abcd@def.com'),
         _account_id: 1234 as AccountId,
         registered_on: '2015-03-12 18:32:08.000000000' as Timestamp,
       };
@@ -3100,7 +3140,7 @@
 
     test('mention user who is already a reviewer', async () => {
       const account = {
-        ...createAccountWithEmail('abcd@def.com' as EmailAddress),
+        ...createAccountWithEmail('abcd@def.com'),
         _account_id: 1234 as AccountId,
         registered_on: '2015-03-12 18:32:08.000000000' as Timestamp,
       };
@@ -3156,4 +3196,90 @@
     assert.isOk(warning);
     assert.include(warning.textContent, 'Change has already been merged');
   });
+
+  test('marks reviewersMutated on reply-reviewers plugin accounts-changed and account-text-changed', () => {
+    const reviewersEndpoint = queryAndAssert(
+      element,
+      'gr-endpoint-decorator[name="reply-reviewers"]'
+    );
+    const bottomEndpoint = queryAndAssert(
+      element,
+      'gr-endpoint-decorator[name="reply-bottom"]'
+    );
+    element.reviewersMutated = false;
+
+    // Events from other endpoints (e.g. reply-bottom) should be ignored.
+    bottomEndpoint.dispatchEvent(
+      new CustomEvent('accounts-changed', {
+        detail: {value: [makeAccount()]},
+        bubbles: true,
+        composed: true,
+      })
+    );
+    assert.isFalse(element.reviewersMutated);
+
+    bottomEndpoint.dispatchEvent(
+      new CustomEvent('account-text-changed', {bubbles: true, composed: true})
+    );
+    assert.isFalse(element.reviewersMutated);
+
+    // Adding an account in a reply-reviewers plugin marks reviewersMutated.
+    reviewersEndpoint.dispatchEvent(
+      new CustomEvent('accounts-changed', {
+        detail: {value: [makeAccount()]},
+        bubbles: true,
+        composed: true,
+      })
+    );
+    assert.isTrue(element.reviewersMutated);
+
+    // Removing all plugin accounts resets reviewersMutated when no built-in
+    // reviewer/CC mutations exist.
+    reviewersEndpoint.dispatchEvent(
+      new CustomEvent('accounts-changed', {
+        detail: {value: []},
+        bubbles: true,
+        composed: true,
+      })
+    );
+    assert.isFalse(element.reviewersMutated);
+
+    // Typing into a reply-reviewers plugin entry marks reviewersMutated.
+    reviewersEndpoint.dispatchEvent(
+      new CustomEvent('account-text-changed', {bubbles: true, composed: true})
+    );
+    assert.isTrue(element.reviewersMutated);
+  });
+
+  test('send resets disabled when handleBeforeReplySent returns false or throws', async () => {
+    const handleBeforeReplySentStub = sinon
+      .stub(
+        testResolver(pluginLoaderToken).jsApiService,
+        'handleBeforeReplySent'
+      )
+      .resolves(false);
+    const saveReviewStub = sinon.stub(element, 'saveReview');
+
+    await element.send(false, false);
+
+    assert.isFalse(element.disabled);
+    if (element.patchsetLevelGrComment) {
+      assert.isFalse(element.patchsetLevelGrComment.disableAutoSaving);
+    }
+    assert.isFalse(saveReviewStub.called);
+
+    handleBeforeReplySentStub.rejects(new Error('plugin error'));
+    let caughtError: Error | undefined;
+    try {
+      await element.send(false, false);
+    } catch (err) {
+      caughtError = err as Error;
+    }
+    assert.isDefined(caughtError);
+    assert.isFalse(element.disabled);
+    if (element.patchsetLevelGrComment) {
+      assert.isFalse(element.patchsetLevelGrComment.disableAutoSaving);
+    }
+    assert.isFalse(saveReviewStub.called);
+  });
 });
diff --git a/polygerrit-ui/app/elements/change/gr-submit-requirement-hovercard/gr-submit-requirement-hovercard.ts b/polygerrit-ui/app/elements/change/gr-submit-requirement-hovercard/gr-submit-requirement-hovercard.ts
index 9ed3848..f9207a0 100644
--- a/polygerrit-ui/app/elements/change/gr-submit-requirement-hovercard/gr-submit-requirement-hovercard.ts
+++ b/polygerrit-ui/app/elements/change/gr-submit-requirement-hovercard/gr-submit-requirement-hovercard.ts
@@ -6,6 +6,8 @@
 import {css, html, LitElement} from 'lit';
 import {customElement, property} from 'lit/decorators.js';
 import {join} from 'lit/directives/join.js';
+import '../../plugins/gr-endpoint-decorator/gr-endpoint-decorator';
+import '../../plugins/gr-endpoint-param/gr-endpoint-param';
 import '../../shared/gr-button/gr-button';
 import '../../shared/gr-icon/gr-icon';
 import '../../shared/gr-label-info/gr-label-info';
@@ -31,6 +33,7 @@
 import {getAppContext} from '../../../services/app-context';
 import {assertIsDefined} from '../../../utils/common-util';
 import {fireReload} from '../../../utils/event-util';
+import {charsOnly} from '../../../utils/string-util';
 import {submitRequirementsStyles} from '../../../styles/gr-submit-requirements-styles';
 import {
   atomizeExpression,
@@ -111,6 +114,15 @@
           display: flex;
           align-items: flex-start;
         }
+        div.section.description {
+          display: none;
+        }
+        div.section.description:has(
+            gr-formatted-text,
+            gr-endpoint-decorator > :not(gr-endpoint-param):not([hidden])
+          ) {
+          display: flex;
+        }
         .sectionContent {
           flex: 1;
           min-width: 0;
@@ -198,27 +210,60 @@
   }
 
   private renderDescription() {
-    let description = this.requirement?.description;
-    if (this.requirement?.status === SubmitRequirementStatus.ERROR) {
-      const error_message = getRequirementErrorMessage(this.requirement);
-      if (error_message) {
-        description = error_message;
+    if (!this.requirement) return;
+    if (this.requirement.status === SubmitRequirementStatus.ERROR) {
+      const errorMessage = getRequirementErrorMessage(this.requirement);
+      if (errorMessage) {
+        return html`<div class="section description">
+          <div class="sectionIcon">
+            <gr-icon icon="description"></gr-icon>
+          </div>
+          <div class="sectionContent">
+            <gr-formatted-text
+              .markdown=${true}
+              .content=${errorMessage}
+            ></gr-formatted-text>
+          </div>
+        </div>`;
       }
     }
-    if (!description) return;
+    const description = this.requirement.description;
+    const endpointName = this.computeDescriptionEndpointName(
+      this.requirement.name
+    );
     return html`<div class="section description">
       <div class="sectionIcon">
         <gr-icon icon="description"></gr-icon>
       </div>
       <div class="sectionContent">
-        <gr-formatted-text
-          .markdown=${true}
-          .content=${description}
-        ></gr-formatted-text>
+        <gr-endpoint-decorator name=${endpointName}>
+          <gr-endpoint-param
+            name="change"
+            .value=${this.change}
+          ></gr-endpoint-param>
+          <gr-endpoint-param
+            name="requirement"
+            .value=${this.requirement}
+          ></gr-endpoint-param>
+          ${description
+            ? html`<gr-formatted-text
+                .markdown=${true}
+                .content=${description}
+              ></gr-formatted-text>`
+            : ''}
+        </gr-endpoint-decorator>
       </div>
     </div>`;
   }
 
+  // not private for tests
+  computeDescriptionEndpointName(requirementName: string) {
+    // remove class name annotation after ~
+    const name = requirementName.split('~')[0];
+    const normalizedName = charsOnly(name).toLowerCase();
+    return `submit-requirement-hovercard-description-${normalizedName}`;
+  }
+
   private renderLabelSection() {
     if (!this.requirement) return;
     const requirementLabels = extractAssociatedLabels(this.requirement, {
diff --git a/polygerrit-ui/app/elements/change/gr-submit-requirement-hovercard/gr-submit-requirement-hovercard_test.ts b/polygerrit-ui/app/elements/change/gr-submit-requirement-hovercard/gr-submit-requirement-hovercard_test.ts
index 09c8b38..a8dc49d 100644
--- a/polygerrit-ui/app/elements/change/gr-submit-requirement-hovercard/gr-submit-requirement-hovercard_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-submit-requirement-hovercard/gr-submit-requirement-hovercard_test.ts
@@ -20,7 +20,11 @@
 import {ParsedChangeInfo} from '../../../types/types';
 import {query, queryAndAssert, stubRestApi} from '../../../test/test-utils';
 import {GrButton} from '../../shared/gr-button/gr-button';
-import {ChangeStatus, SubmitRequirementResultInfo} from '../../../api/rest-api';
+import {
+  ChangeStatus,
+  SubmitRequirementResultInfo,
+  SubmitRequirementStatus,
+} from '../../../api/rest-api';
 
 suite('gr-submit-requirement-hovercard tests', () => {
   let element: GrSubmitRequirementHovercard;
@@ -68,6 +72,19 @@
               </div>
             </div>
           </div>
+          <div class="section description">
+            <div class="sectionIcon">
+              <gr-icon icon="description"></gr-icon>
+            </div>
+            <div class="sectionContent">
+              <gr-endpoint-decorator
+                name="submit-requirement-hovercard-description-verified"
+              >
+                <gr-endpoint-param name="change"></gr-endpoint-param>
+                <gr-endpoint-param name="requirement"></gr-endpoint-param>
+              </gr-endpoint-decorator>
+            </div>
+          </div>
           <div class="button">
             <gr-button
               aria-disabled="false"
@@ -83,6 +100,11 @@
         </div>
       `
     );
+    const descriptionSection = queryAndAssert<HTMLElement>(
+      element,
+      '.section.description'
+    );
+    assert.equal(getComputedStyle(descriptionSection).display, 'none');
   });
 
   test('renders conditions after click', async () => {
@@ -121,6 +143,19 @@
               </div>
             </div>
           </div>
+          <div class="section description">
+            <div class="sectionIcon">
+              <gr-icon icon="description"></gr-icon>
+            </div>
+            <div class="sectionContent">
+              <gr-endpoint-decorator
+                name="submit-requirement-hovercard-description-verified"
+              >
+                <gr-endpoint-param name="change"></gr-endpoint-param>
+                <gr-endpoint-param name="requirement"></gr-endpoint-param>
+              </gr-endpoint-decorator>
+            </div>
+          </div>
           <div class="button">
             <gr-button
               aria-disabled="false"
@@ -223,7 +258,13 @@
               <gr-icon icon="description"></gr-icon>
             </div>
             <div class="sectionContent">
-              <gr-formatted-text></gr-formatted-text>
+              <gr-endpoint-decorator
+                name="submit-requirement-hovercard-description-verified"
+              >
+                <gr-endpoint-param name="change"></gr-endpoint-param>
+                <gr-endpoint-param name="requirement"></gr-endpoint-param>
+                <gr-formatted-text></gr-formatted-text>
+              </gr-endpoint-decorator>
             </div>
           </div>
           <div class="button">
@@ -243,6 +284,79 @@
     );
   });
 
+  test('computeDescriptionEndpointName', () => {
+    assert.equal(
+      element.computeDescriptionEndpointName('Verified'),
+      'submit-requirement-hovercard-description-verified'
+    );
+    assert.equal(
+      element.computeDescriptionEndpointName('Coverage-Over-70p'),
+      'submit-requirement-hovercard-description-coverageoverp'
+    );
+    assert.equal(
+      element.computeDescriptionEndpointName(
+        'Code-Owners~CodeOwnersSubmitRule'
+      ),
+      'submit-requirement-hovercard-description-codeowners'
+    );
+  });
+
+  test('renders error status description without endpoint decorator', async () => {
+    const errorRequirement: SubmitRequirementResultInfo = {
+      ...createSubmitRequirementResultInfo(),
+      status: SubmitRequirementStatus.ERROR,
+      submittability_expression_result: {
+        ...createSubmitRequirementExpressionInfo(),
+        error_message: 'Evaluation error message',
+      },
+    };
+    const element = await fixture<GrSubmitRequirementHovercard>(
+      html`<gr-submit-requirement-hovercard
+        .requirement=${errorRequirement}
+        .change=${createChange()}
+        .account=${createAccountWithId()}
+      ></gr-submit-requirement-hovercard>`
+    );
+    const descriptionSection = queryAndAssert<HTMLElement>(
+      element,
+      '.section.description'
+    );
+    assert.notEqual(getComputedStyle(descriptionSection).display, 'none');
+    assert.isUndefined(query(descriptionSection, 'gr-endpoint-decorator'));
+    const formattedText = queryAndAssert<HTMLElement & {content?: string}>(
+      descriptionSection,
+      'gr-formatted-text'
+    );
+    assert.equal(formattedText.content, 'Evaluation error message');
+  });
+
+  test('falls through to endpoint decorator when error status has no error_message', async () => {
+    const errorRequirementNoMessage: SubmitRequirementResultInfo = {
+      ...createSubmitRequirementResultInfo(),
+      status: SubmitRequirementStatus.ERROR,
+      description: 'Static description on errored requirement',
+    };
+    const element = await fixture<GrSubmitRequirementHovercard>(
+      html`<gr-submit-requirement-hovercard
+        .requirement=${errorRequirementNoMessage}
+        .change=${createChange()}
+        .account=${createAccountWithId()}
+      ></gr-submit-requirement-hovercard>`
+    );
+    const decorator = queryAndAssert(
+      element,
+      '.section.description gr-endpoint-decorator'
+    );
+    const formattedText = queryAndAssert<HTMLElement & {content?: string}>(
+      decorator,
+      'gr-formatted-text'
+    );
+    assert.equal(
+      formattedText.content,
+      'Static description on errored requirement'
+    );
+  });
+
   suite('quick approve label', () => {
     const submitRequirement: SubmitRequirementResultInfo = {
       ...createSubmitRequirementResultInfo(),
diff --git a/polygerrit-ui/app/elements/change/gr-submit-requirements/gr-submit-requirements_test.ts b/polygerrit-ui/app/elements/change/gr-submit-requirements/gr-submit-requirements_test.ts
index 8f55c29..9f83dd0 100644
--- a/polygerrit-ui/app/elements/change/gr-submit-requirements/gr-submit-requirements_test.ts
+++ b/polygerrit-ui/app/elements/change/gr-submit-requirements/gr-submit-requirements_test.ts
@@ -8,6 +8,7 @@
 import {html} from 'lit';
 import './gr-submit-requirements';
 import {GrSubmitRequirements} from './gr-submit-requirements';
+import {GrVoteChip} from '../../shared/gr-vote-chip/gr-vote-chip';
 import {
   createAccountWithIdNameAndEmail,
   createApproval,
@@ -362,4 +363,94 @@
       'submit-requirement-codeowners'
     );
   });
+
+  test('renders AI sparkle icon in votes area when vote is_ai', async () => {
+    element.disableEndpoints = true;
+    const modifiedChange: ParsedChangeInfo = {
+      ...change,
+      labels: {
+        Verified: {
+          ...createDetailedLabelInfo(),
+          all: [
+            {
+              ...createApproval(),
+              value: 2,
+              is_ai: true,
+            },
+          ],
+        },
+      },
+    };
+    element.change = modifiedChange;
+    await element.updateComplete;
+
+    const voteChip = element.shadowRoot?.querySelector<GrVoteChip>(
+      '.votes-cell gr-vote-chip'
+    );
+    assert.isOk(voteChip);
+    await voteChip.updateComplete;
+    assert.isNotNull(voteChip.shadowRoot?.querySelector('gr-icon.ai-icon'));
+  });
+
+  test('renders AI sparkle icon for stacked votes only when all are is_ai', async () => {
+    element.disableEndpoints = true;
+    const modifiedChange: ParsedChangeInfo = {
+      ...change,
+      labels: {
+        Verified: {
+          ...createDetailedLabelInfo(),
+          all: [
+            {
+              ...createApproval(),
+              value: 2,
+              is_ai: true,
+            },
+            {
+              ...createApproval(),
+              value: 2,
+              is_ai: true,
+            },
+          ],
+        },
+      },
+    };
+    element.change = modifiedChange;
+    await element.updateComplete;
+
+    let voteChip = element.shadowRoot?.querySelector<GrVoteChip>(
+      '.votes-cell gr-vote-chip'
+    );
+    assert.isOk(voteChip);
+    await voteChip.updateComplete;
+    assert.isNotNull(voteChip.shadowRoot?.querySelector('gr-icon.ai-icon'));
+
+    // Mix a non-AI +2 vote into the stack -> should NOT render AI sparkle
+    element.change = {
+      ...modifiedChange,
+      labels: {
+        Verified: {
+          ...createDetailedLabelInfo(),
+          all: [
+            {
+              ...createApproval(),
+              value: 2,
+              is_ai: true,
+            },
+            {
+              ...createApproval(),
+              value: 2,
+            },
+          ],
+        },
+      },
+    };
+    await element.updateComplete;
+
+    voteChip = element.shadowRoot?.querySelector<GrVoteChip>(
+      '.votes-cell gr-vote-chip'
+    );
+    assert.isOk(voteChip);
+    await voteChip.updateComplete;
+    assert.isNull(voteChip.shadowRoot?.querySelector('gr-icon.ai-icon'));
+  });
 });
diff --git a/polygerrit-ui/app/elements/chat-panel/chat-panel_screenshot_test.ts b/polygerrit-ui/app/elements/chat-panel/chat-panel_screenshot_test.ts
index 62ba102..7e70469 100644
--- a/polygerrit-ui/app/elements/chat-panel/chat-panel_screenshot_test.ts
+++ b/polygerrit-ui/app/elements/chat-panel/chat-panel_screenshot_test.ts
@@ -396,7 +396,8 @@
     await visualDiffDarkTheme(element, 'chat-panel-history-scrolling');
   });
 
-  test('chat mode with models menu open', async () => {
+  // Flaky due to md-menu (500ms) + md-focus-ring (600ms) animation timing race.
+  test.skip('chat mode with models menu open', async () => {
     chatModel.updateState({
       ...chatModel.getState(),
       models: {
diff --git a/polygerrit-ui/app/elements/chat-panel/chat-panel_test.ts b/polygerrit-ui/app/elements/chat-panel/chat-panel_test.ts
index 84a2052..96ee776 100644
--- a/polygerrit-ui/app/elements/chat-panel/chat-panel_test.ts
+++ b/polygerrit-ui/app/elements/chat-panel/chat-panel_test.ts
@@ -128,7 +128,7 @@
     const policy = element.shadowRoot!.querySelector('.ai-policy');
     assert.isOk(policy);
     assert.include(
-      policy.textContent!,
+      policy.textContent,
       'Review agent may display inaccurate info'
     );
     const link = policy.querySelector('a');
diff --git a/polygerrit-ui/app/elements/chat-panel/citations-box_test.ts b/polygerrit-ui/app/elements/chat-panel/citations-box_test.ts
index 09b1192..afda124 100644
--- a/polygerrit-ui/app/elements/chat-panel/citations-box_test.ts
+++ b/polygerrit-ui/app/elements/chat-panel/citations-box_test.ts
@@ -8,7 +8,6 @@
 import {
   ChatModel,
   chatModelToken,
-  GeminiMessage,
   Turn,
   UserType,
 } from '../../models/chat/chat-model';
@@ -37,7 +36,7 @@
         regenerationIndex: 0,
         references: [],
         citations,
-      } as GeminiMessage,
+      },
     };
   }
 
@@ -179,7 +178,7 @@
       '.citations-summary-message'
     );
     assert.isOk(summary);
-    assert.include(summary.textContent!, '2 citations');
+    assert.include(summary.textContent, '2 citations');
 
     const items = element.shadowRoot?.querySelectorAll('.citation-item');
     assert.isOk(items);
diff --git a/polygerrit-ui/app/elements/chat-panel/message-actions.ts b/polygerrit-ui/app/elements/chat-panel/message-actions.ts
index 86f6980..a6cfa87 100644
--- a/polygerrit-ui/app/elements/chat-panel/message-actions.ts
+++ b/polygerrit-ui/app/elements/chat-panel/message-actions.ts
@@ -86,6 +86,7 @@
         ?hidden=${!this.isLatest}
         .text=${this.getGeminiMessageText()}
         hideInput
+        multiline
         .smallIcon=${false}
         buttonTitle="Copy response to clipboard"
         copyTargetName="Response"
diff --git a/polygerrit-ui/app/elements/chat-panel/message-actions_test.ts b/polygerrit-ui/app/elements/chat-panel/message-actions_test.ts
index c70c976..acc4b37 100644
--- a/polygerrit-ui/app/elements/chat-panel/message-actions_test.ts
+++ b/polygerrit-ui/app/elements/chat-panel/message-actions_test.ts
@@ -5,10 +5,10 @@
  */
 import '../../test/common-test-setup';
 import {assert, fixture, html} from '@open-wc/testing';
+import sinon from 'sinon';
 import {
   ChatModel,
   chatModelToken,
-  GeminiMessage,
   ResponsePartType,
   Turn,
   UniqueTurnId,
@@ -47,7 +47,7 @@
         regenerationIndex: 0,
         references: [],
         citations: [],
-      } as GeminiMessage,
+      },
     };
   }
 
@@ -87,6 +87,7 @@
           class="copy-button"
           copytargetname="Response"
           hideinput=""
+          multiline=""
         >
         </gr-copy-clipboard>
         <md-icon-button
@@ -113,6 +114,7 @@
           copytargetname="Response"
           hidden=""
           hideinput=""
+          multiline=""
         >
         </gr-copy-clipboard>
         <md-icon-button
@@ -146,11 +148,18 @@
   });
 
   test('copy clipboard has correct text', async () => {
-    const turn = createTurn('another message');
+    const clipboardStub = sinon
+      .stub(navigator.clipboard, 'writeText')
+      .returns(Promise.resolve());
+    const turn = createTurn('line 1\nline 2');
     chatModel.updateState({...chatModel.getState(), turns: [turn]});
     await element.updateComplete;
     const copy = element.shadowRoot?.querySelector('gr-copy-clipboard');
     assert.isOk(copy);
-    assert.equal(copy?.text, 'another message');
+    await copy.updateComplete;
+    assert.isTrue(copy.multiline);
+    copy.shadowRoot?.querySelector<HTMLElement>('.copyToClipboard')?.click();
+    assert.equal(copy.text, 'line 1\nline 2');
+    assert.isTrue(clipboardStub.calledOnceWithExactly('line 1\nline 2'));
   });
 });
diff --git a/polygerrit-ui/app/elements/chat-panel/prompt-box.ts b/polygerrit-ui/app/elements/chat-panel/prompt-box.ts
index 933c1db..b784b09 100644
--- a/polygerrit-ui/app/elements/chat-panel/prompt-box.ts
+++ b/polygerrit-ui/app/elements/chat-panel/prompt-box.ts
@@ -17,8 +17,13 @@
   ContextItem,
   ContextItemType,
   ModelInfo,
+  ModelsLoadingErrorName,
 } from '../../api/ai-code-review';
-import {chatModelToken, Turn} from '../../models/chat/chat-model';
+import {
+  chatModelToken,
+  ModelsLoadingError,
+  Turn,
+} from '../../models/chat/chat-model';
 import {changeModelToken} from '../../models/change/change-model';
 import {
   contextItemEquals,
@@ -29,7 +34,9 @@
 import {ParsedChangeInfo} from '../../types/types';
 import {debounce, DelayedTask} from '../../utils/async-util';
 import {fire} from '../../utils/event-util';
+import {generateAbsoluteUrl} from '../../utils/url-util';
 import {subscribe} from '../lit/subscription-controller';
+import {createSettingsUrl} from '../../models/views/settings';
 import {materialStyles} from '../../styles/gr-material-styles';
 
 const MAX_VISIBLE_CONTEXT_ITEMS_COLLAPSED = 3;
@@ -50,7 +57,7 @@
   @property({type: String})
   disabledMessage = 'Review Agent is disabled.';
 
-  @state() modelLoadingError?: string;
+  @state() modelsLoadingError?: ModelsLoadingError;
 
   @state() selectedModel?: ModelInfo;
 
@@ -98,7 +105,7 @@
     subscribe(
       this,
       () => this.getChatModel().modelsLoadingError$,
-      x => (this.modelLoadingError = x)
+      x => (this.modelsLoadingError = x)
     );
     subscribe(
       this,
@@ -161,18 +168,13 @@
     return this.turns[this.turns.length - 1];
   }
 
-  private get hasModelLoadingError(): boolean {
-    return this.modelLoadingError !== undefined;
-  }
-
   get chatInputDisabledText() {
-    if (this.hasModelLoadingError) {
-      // getModels() rejected: show the provider's reason, or a generic
-      // message if it rejected without one.
-      return (
-        this.modelLoadingError ||
-        'Failed to load models. Please reload the page.'
-      );
+    if (this.modelsLoadingError) {
+      const {name, message} = this.modelsLoadingError;
+      if (name && message) {
+        return message;
+      }
+      return 'Failed to load models. Please reload the page.';
     }
     if (!this.selectedModel) {
       return 'Loading models...';
@@ -381,14 +383,36 @@
     // This Change is implicitly added to the context, so we don't need to add it.
     // The chip makes it clear to the user that it is already in the context.
     if (!this.change) return nothing;
-    const changeContextItem: ContextItem = {
-      type_id: 'gerrit_change',
-      // Don't include link in the chip since it's already on the change page.
-      link: '',
-      title: 'This Change',
-      identifier: this.change.id,
-      tooltip: 'File diffs (against base), commit message, and comments.',
-    };
+    let changeContextItem: ContextItem;
+    if (this.modelsLoadingError) {
+      switch (this.modelsLoadingError.name) {
+        case ModelsLoadingErrorName.MISSING_API_TOKEN:
+          changeContextItem = {
+            type_id: 'gerrit_change',
+            link: generateAbsoluteUrl(createSettingsUrl()),
+            title: 'Set up token',
+            identifier: this.change.id,
+            tooltip: this.modelsLoadingError.message,
+          };
+          break;
+        case ModelsLoadingErrorName.AI_PROVIDERS_LOADING:
+        default:
+          // The chat cannot be used: show no chip, only the error message.
+          return nothing;
+      }
+    } else if (this.selectedModel) {
+      changeContextItem = {
+        type_id: 'gerrit_change',
+        // Don't include link in the chip since it's already on the change page.
+        link: '',
+        title: 'This Change',
+        identifier: this.change.id,
+        tooltip: 'File diffs (against base), commit message, and comments.',
+      };
+    } else {
+      // getModels() has not completed yet.
+      return nothing;
+    }
     return html`
       <context-chip
         class="this-change-context"
diff --git a/polygerrit-ui/app/elements/chat-panel/prompt-box_test.ts b/polygerrit-ui/app/elements/chat-panel/prompt-box_test.ts
index ba7a969..61f5fa8 100644
--- a/polygerrit-ui/app/elements/chat-panel/prompt-box_test.ts
+++ b/polygerrit-ui/app/elements/chat-panel/prompt-box_test.ts
@@ -10,7 +10,6 @@
 import {
   ChatModel,
   chatModelToken,
-  ChatState,
   UserType,
 } from '../../models/chat/chat-model';
 import {testResolver} from '../../test/common-test-setup';
@@ -19,7 +18,9 @@
 import {ChangeModel, changeModelToken} from '../../models/change/change-model';
 import {ParsedChangeInfo} from '../../types/types';
 import sinon from 'sinon';
-import {ContextItem} from '../../api/ai-code-review';
+import {ContextItem, ModelsLoadingErrorName} from '../../api/ai-code-review';
+import {ContextChip} from './context-chip';
+import {createSettingsUrl} from '../../models/views/settings';
 
 suite('prompt-box tests', () => {
   let element: PromptBox;
@@ -87,7 +88,10 @@
       ...chatModel.getState(),
       // getModels() clears the models when it rejects, so no model is selected.
       models: undefined,
-      modelsLoadingError: providerError,
+      modelsLoadingError: {
+        message: providerError,
+        name: ModelsLoadingErrorName.AI_PROVIDERS_LOADING,
+      },
     });
     await element.updateComplete;
     assert.equal(element.chatInputDisabledText, providerError);
@@ -98,7 +102,28 @@
       ...chatModel.getState(),
       // getModels() rejected without a message (empty string).
       models: undefined,
-      modelsLoadingError: '',
+      modelsLoadingError: {
+        message: '',
+        name: ModelsLoadingErrorName.AI_PROVIDERS_LOADING,
+      },
+    });
+    await element.updateComplete;
+    assert.equal(
+      element.chatInputDisabledText,
+      'Failed to load models. Please reload the page.'
+    );
+  });
+
+  test('chatInputDisabledText hides message of unknown error', async () => {
+    chatModel.updateState({
+      ...chatModel.getState(),
+      // getModels() rejected with an error whose name is not a
+      // ModelsLoadingErrorName, so the chat model did not keep the name.
+      models: undefined,
+      modelsLoadingError: {
+        message: "Cannot read properties of undefined (reading 'x')",
+        name: undefined,
+      },
     });
     await element.updateComplete;
     assert.equal(
@@ -118,6 +143,73 @@
     assert.equal(element.chatInputDisabledText, 'Loading models...');
   });
 
+  test('change chip shows This Change without link normally', () => {
+    const chip = element.shadowRoot!.querySelector<ContextChip>(
+      '.this-change-context'
+    );
+    assert.equal(chip?.contextItem?.title, 'This Change');
+    assert.equal(chip?.contextItem?.link, '');
+  });
+
+  test('change chip is hidden while models are loading', async () => {
+    chatModel.updateState({
+      ...chatModel.getState(),
+      // No models yet and no error: getModels() is still in flight.
+      models: undefined,
+      modelsLoadingError: undefined,
+    });
+    await element.updateComplete;
+    assert.isNull(element.shadowRoot!.querySelector('.this-change-context'));
+  });
+
+  test('change chip shows Set up token when API token is missing', async () => {
+    chatModel.updateState({
+      ...chatModel.getState(),
+      models: undefined,
+      modelsLoadingError: {
+        message: 'No API token configured. Add one in Settings.',
+        name: ModelsLoadingErrorName.MISSING_API_TOKEN,
+      },
+    });
+    await element.updateComplete;
+    const chip = element.shadowRoot!.querySelector<ContextChip>(
+      '.this-change-context'
+    );
+    assert.equal(chip?.contextItem?.title, 'Set up token');
+    assert.equal(
+      chip?.contextItem?.link,
+      `${window.location.origin}${createSettingsUrl()}`
+    );
+  });
+
+  test('change chip is hidden when AI providers fail to load', async () => {
+    chatModel.updateState({
+      ...chatModel.getState(),
+      models: undefined,
+      modelsLoadingError: {
+        message: 'Failed to load the AI providers.',
+        name: ModelsLoadingErrorName.AI_PROVIDERS_LOADING,
+      },
+    });
+    await element.updateComplete;
+    assert.isNull(element.shadowRoot!.querySelector('.this-change-context'));
+  });
+
+  test('change chip is hidden on unknown model-loading error', async () => {
+    chatModel.updateState({
+      ...chatModel.getState(),
+      // getModels() rejected with an error whose name is not a
+      // ModelsLoadingErrorName, so the chat model did not keep the name.
+      models: undefined,
+      modelsLoadingError: {
+        message: "Cannot read properties of undefined (reading 'x')",
+        name: undefined,
+      },
+    });
+    await element.updateComplete;
+    assert.isNull(element.shadowRoot!.querySelector('.this-change-context'));
+  });
+
   test('updates userInput on input', async () => {
     const promptInput = element.shadowRoot?.querySelector('#promptInput');
     assert.isOk(promptInput);
@@ -347,7 +439,7 @@
           },
         },
       ],
-    } as Partial<ChatState>);
+    });
     await element.updateComplete;
     assert.equal(element.chatInputDisabledText, 'Thinking ...');
   });
diff --git a/polygerrit-ui/app/elements/chat-panel/splash-page-action.ts b/polygerrit-ui/app/elements/chat-panel/splash-page-action.ts
index 5313f38..0e5be02 100644
--- a/polygerrit-ui/app/elements/chat-panel/splash-page-action.ts
+++ b/polygerrit-ui/app/elements/chat-panel/splash-page-action.ts
@@ -3,23 +3,20 @@
  * Copyright 2025 Google LLC
  * SPDX-License-Identifier: Apache-2.0
  */
+import '@material/web/chips/assist-chip.js';
 import '@material/web/iconbutton/icon-button.js';
 import '@material/web/progress/circular-progress.js';
-
 import {css, html, LitElement, nothing} from 'lit';
 import {customElement, property, query, state} from 'lit/decorators.js';
 import {classMap} from 'lit/directives/class-map.js';
 import {when} from 'lit/directives/when.js';
 import {ifDefined} from 'lit/directives/if-defined.js';
-
 import '../shared/gr-icon/gr-icon';
 import '../shared/gr-button/gr-button';
 import '../shared/gr-tooltip-content/gr-tooltip-content';
-
 import {Action, ContextItemType} from '../../api/ai-code-review';
 import {chatModelToken} from '../../models/chat/chat-model';
 import {parseLink} from '../../models/chat/context-item-util';
-
 import {resolve} from '../../models/dependency';
 import {isDefined} from '../../types/types';
 import {fireAlert} from '../../utils/event-util';
diff --git a/polygerrit-ui/app/elements/checks/gr-checks-action_test.ts b/polygerrit-ui/app/elements/checks/gr-checks-action_test.ts
index 1ed783c..53d1853 100644
--- a/polygerrit-ui/app/elements/checks/gr-checks-action_test.ts
+++ b/polygerrit-ui/app/elements/checks/gr-checks-action_test.ts
@@ -7,7 +7,6 @@
 import '../../test/common-test-setup';
 import './gr-checks-action';
 import {GrChecksAction} from './gr-checks-action';
-import {Action} from '../../api/checks';
 
 suite('gr-checks-action', () => {
   let element: GrChecksAction;
@@ -15,7 +14,7 @@
   setup(async () => {
     element = await fixture<GrChecksAction>(
       html`<gr-checks-action
-        .action=${{name: 'test-action'} as Action}
+        .action=${{name: 'test-action'}}
       ></gr-checks-action>`
     );
   });
diff --git a/polygerrit-ui/app/elements/checks/gr-checks-patchset-select.ts b/polygerrit-ui/app/elements/checks/gr-checks-patchset-select.ts
new file mode 100644
index 0000000..6365904
--- /dev/null
+++ b/polygerrit-ui/app/elements/checks/gr-checks-patchset-select.ts
@@ -0,0 +1,235 @@
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import '../shared/gr-button/gr-button';
+import '../shared/gr-dropdown-list/gr-dropdown-list';
+import '../shared/gr-tooltip-content/gr-tooltip-content';
+import {css, html, LitElement} from 'lit';
+import {customElement, property, state} from 'lit/decorators.js';
+import {classMap} from 'lit/directives/class-map.js';
+import {when} from 'lit/directives/when.js';
+import {CheckRun, checksModelToken} from '../../models/checks/checks-model';
+import {
+  ALL_ATTEMPTS,
+  AttemptChoice,
+  attemptChoiceLabel,
+  isAttemptChoice,
+  LATEST_ATTEMPT,
+  sortAttemptChoices,
+  stringToAttemptChoice,
+} from '../../models/checks/checks-util';
+import {changeModelToken} from '../../models/change/change-model';
+import {resolve} from '../../models/dependency';
+import {PatchSetNumber} from '../../types/common';
+import {assert, assertIsDefined, unique} from '../../utils/common-util';
+import {subscribe} from '../lit/subscription-controller';
+import {DropdownItem} from '../shared/gr-dropdown-list/gr-dropdown-list';
+
+/**
+ * Below this width the selector switches to its compact layout, because the
+ * full trigger texts and the "Go To Latest Patchset" button do not fit.
+ */
+const MIN_FULL_WIDTH_PX = 160;
+
+/**
+ * Lets the user choose the patchset and the attempt that the Checks tab shows
+ * runs and results for.
+ */
+@customElement('gr-checks-patchset-select')
+export class GrChecksPatchsetSelect extends LitElement {
+  /**
+   * Compact layout for narrow containers such as the collapsed runs panel: The
+   * patchset dropdown has a short trigger text, the attempt dropdown is not
+   * rendered, and "Go To Latest Patchset" is shortened to "Latest".
+   *
+   * The compact layout is also used when the available width is too small
+   * for the full layout, see `narrow`.
+   */
+  @property({type: Boolean})
+  compact = false;
+
+  /** Whether the available width is below `MIN_FULL_WIDTH_PX`. */
+  @state()
+  narrow = false;
+
+  @state()
+  runs: CheckRun[] = [];
+
+  @state()
+  checksPatchsetNumber: PatchSetNumber | undefined = undefined;
+
+  @state()
+  latestPatchsetNumber: PatchSetNumber | undefined = undefined;
+
+  @state()
+  selectedAttempt: AttemptChoice = LATEST_ATTEMPT;
+
+  private readonly getChangeModel = resolve(this, changeModelToken);
+
+  private readonly getChecksModel = resolve(this, checksModelToken);
+
+  constructor() {
+    super();
+    subscribe(
+      this,
+      () => this.getChecksModel().allRunsSelectedPatchset$,
+      x => (this.runs = x)
+    );
+    subscribe(
+      this,
+      () => this.getChecksModel().checksSelectedPatchsetNumber$,
+      x => (this.checksPatchsetNumber = x)
+    );
+    subscribe(
+      this,
+      () => this.getChecksModel().checksSelectedAttemptNumber$,
+      x => (this.selectedAttempt = x)
+    );
+    subscribe(
+      this,
+      () => this.getChangeModel().latestPatchNum$,
+      x => (this.latestPatchsetNumber = x)
+    );
+    // The host is a block level flex container, so its width is the width
+    // that is available, regardless of the content being rendered. The update
+    // is deferred, because re-rendering changes the height of the host, which
+    // must not happen while resize observations are being delivered.
+    new ResizeObserver(entries => {
+      const width = entries[entries.length - 1].contentRect.width;
+      requestAnimationFrame(() => {
+        this.narrow = width > 0 && width < MIN_FULL_WIDTH_PX;
+      });
+    }).observe(this);
+  }
+
+  private isCompact() {
+    return this.compact || this.narrow;
+  }
+
+  static override get styles() {
+    return css`
+      :host {
+        display: flex;
+        flex-wrap: wrap;
+        align-items: center;
+        gap: var(--spacing-s) var(--spacing-m);
+      }
+      gr-dropdown-list {
+        border: 1px solid var(--border-color);
+        border-radius: var(--border-radius);
+        padding: 0 var(--spacing-m);
+      }
+      gr-dropdown-list.compact {
+        padding: 0 var(--spacing-xs);
+      }
+      gr-button {
+        --gr-button-padding: var(--spacing-s) var(--spacing-m);
+      }
+      gr-button.compact {
+        --gr-button-padding: var(--spacing-s) var(--spacing-xs);
+      }
+    `;
+  }
+
+  override render() {
+    const compact = this.isCompact();
+    const attemptItems = this.createAttemptDropdownItems();
+    const notLatest =
+      !!this.checksPatchsetNumber &&
+      this.checksPatchsetNumber !== this.latestPatchsetNumber;
+    return html`
+      <gr-dropdown-list
+        class=${classMap({patchsetSelect: true, compact})}
+        value=${(this.checksPatchsetNumber || this.latestPatchsetNumber) ?? 0}
+        .items=${this.createPatchsetDropdownItems()}
+        @value-change=${this.onPatchsetSelected}
+      ></gr-dropdown-list>
+      ${when(
+        !compact && attemptItems.length > 0,
+        () => html`<gr-dropdown-list
+          class="attemptSelect"
+          value=${this.selectedAttempt ?? 0}
+          .items=${attemptItems}
+          @value-change=${this.onAttemptSelected}
+        ></gr-dropdown-list>`
+      )}
+      ${when(notLatest, () => this.renderGoToLatest(compact))}
+    `;
+  }
+
+  private renderGoToLatest(compact: boolean) {
+    if (!compact) {
+      return html`<gr-button
+        class="goToLatest"
+        link
+        @click=${this.goToLatestPatchset}
+        >Go To Latest Patchset</gr-button
+      >`;
+    }
+    return html`<gr-tooltip-content has-tooltip title="Go To Latest Patchset">
+      <gr-button
+        class="goToLatest compact"
+        link
+        aria-label="Go To Latest Patchset"
+        @click=${this.goToLatestPatchset}
+        >Latest</gr-button
+      >
+    </gr-tooltip-content>`;
+  }
+
+  private onAttemptSelected(e: CustomEvent<{value: string | undefined}>) {
+    const attempt = stringToAttemptChoice(e.detail.value);
+    assertIsDefined(attempt, `unexpected attempt choice ${e.detail.value}`);
+    this.getChecksModel().updateStateSetAttempt(attempt);
+  }
+
+  private onPatchsetSelected(e: CustomEvent<{value: string}>) {
+    const patchset = Number(e.detail.value) as PatchSetNumber;
+    assert(Number.isInteger(patchset), `patchset must be integer: ${patchset}`);
+    this.getChecksModel().updateStateSetPatchset(patchset);
+  }
+
+  private goToLatestPatchset() {
+    assertIsDefined(this.latestPatchsetNumber, 'latestPatchsetNumber');
+    this.getChecksModel().updateStateSetPatchset(this.latestPatchsetNumber);
+  }
+
+  private createAttemptDropdownItems() {
+    if (this.runs.every(run => run.isSingleAttempt)) return [];
+    const attempts: AttemptChoice[] = this.runs
+      .map(run => run.attempt ?? 0)
+      .filter(isAttemptChoice)
+      .filter(unique);
+    attempts.push(LATEST_ATTEMPT);
+    attempts.push(ALL_ATTEMPTS);
+    const items: DropdownItem[] = attempts.sort(sortAttemptChoices).map(a => {
+      return {
+        value: a,
+        text: attemptChoiceLabel(a),
+      };
+    });
+    return items;
+  }
+
+  private createPatchsetDropdownItems() {
+    if (!this.latestPatchsetNumber) return [];
+    return Array.from(Array(this.latestPatchsetNumber), (_, i) => {
+      assertIsDefined(this.latestPatchsetNumber, 'latestPatchsetNumber');
+      const index = this.latestPatchsetNumber - i;
+      const postfix = index === this.latestPatchsetNumber ? ' (latest)' : '';
+      return {
+        value: `${index}`,
+        text: `Patchset ${index}${postfix}`,
+        triggerText: this.isCompact() ? `PS ${index}` : undefined,
+      };
+    });
+  }
+}
+
+declare global {
+  interface HTMLElementTagNameMap {
+    'gr-checks-patchset-select': GrChecksPatchsetSelect;
+  }
+}
diff --git a/polygerrit-ui/app/elements/checks/gr-checks-patchset-select_test.ts b/polygerrit-ui/app/elements/checks/gr-checks-patchset-select_test.ts
new file mode 100644
index 0000000..e867c29
--- /dev/null
+++ b/polygerrit-ui/app/elements/checks/gr-checks-patchset-select_test.ts
@@ -0,0 +1,144 @@
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import '../../test/common-test-setup';
+import './gr-checks-patchset-select';
+import {GrChecksPatchsetSelect} from './gr-checks-patchset-select';
+import {html} from 'lit';
+import {assert, fixture, waitUntil} from '@open-wc/testing';
+import {checksModelToken} from '../../models/checks/checks-model';
+import {setAllcheckRuns} from '../../test/test-data-generators';
+import {resolve} from '../../models/dependency';
+import {assertIsDefined, queryAndAssert} from '../../utils/common-util';
+import {GrDropdownList} from '../shared/gr-dropdown-list/gr-dropdown-list';
+import {PatchSetNumber} from '../../types/common';
+
+suite('gr-checks-patchset-select test', () => {
+  let element: GrChecksPatchsetSelect;
+
+  setup(async () => {
+    element = await fixture<GrChecksPatchsetSelect>(
+      html`<gr-checks-patchset-select></gr-checks-patchset-select>`
+    );
+    setAllcheckRuns(resolve(element, checksModelToken)());
+    await element.updateComplete;
+  });
+
+  test('renders', async () => {
+    assert.shadowDom.equal(
+      element,
+      /* HTML */ `
+        <gr-dropdown-list class="patchsetSelect" value="0"> </gr-dropdown-list>
+        <gr-dropdown-list class="attemptSelect" value="latest">
+        </gr-dropdown-list>
+      `
+    );
+  });
+
+  test('renders compact', async () => {
+    element.compact = true;
+    await element.updateComplete;
+    assert.shadowDom.equal(
+      element,
+      /* HTML */ `
+        <gr-dropdown-list class="compact patchsetSelect" value="0">
+        </gr-dropdown-list>
+      `
+    );
+  });
+
+  test('renders go to latest patchset', async () => {
+    element.latestPatchsetNumber = 2 as PatchSetNumber;
+    element.checksPatchsetNumber = 1 as PatchSetNumber;
+    await element.updateComplete;
+    assert.shadowDom.equal(
+      element,
+      /* HTML */ `
+        <gr-dropdown-list class="patchsetSelect" value="1"> </gr-dropdown-list>
+        <gr-dropdown-list class="attemptSelect" value="latest">
+        </gr-dropdown-list>
+        <gr-button
+          aria-disabled="false"
+          class="goToLatest"
+          link=""
+          role="button"
+          tabindex="0"
+        >
+          Go To Latest Patchset
+        </gr-button>
+      `
+    );
+  });
+
+  test('renders compact go to latest patchset', async () => {
+    element.compact = true;
+    element.latestPatchsetNumber = 2 as PatchSetNumber;
+    element.checksPatchsetNumber = 1 as PatchSetNumber;
+    await element.updateComplete;
+    assert.shadowDom.equal(
+      element,
+      /* HTML */ `
+        <gr-dropdown-list class="compact patchsetSelect" value="1">
+        </gr-dropdown-list>
+        <gr-tooltip-content has-tooltip="" title="Go To Latest Patchset">
+          <gr-button
+            aria-disabled="false"
+            aria-label="Go To Latest Patchset"
+            class="compact goToLatest"
+            link=""
+            role="button"
+            tabindex="0"
+          >
+            Latest
+          </gr-button>
+        </gr-tooltip-content>
+      `
+    );
+    const patchsetDropdown = queryAndAssert<GrDropdownList>(
+      element,
+      'gr-dropdown-list.patchsetSelect'
+    );
+    assert.deepEqual(patchsetDropdown.items?.[0], {
+      value: '2',
+      text: 'Patchset 2 (latest)',
+      triggerText: 'PS 2',
+    });
+  });
+
+  test('switches to compact when narrow', async () => {
+    element.style.width = '100px';
+    await waitUntil(() => element.narrow);
+    await element.updateComplete;
+    queryAndAssert(element, 'gr-dropdown-list.compact');
+
+    element.style.width = '400px';
+    await waitUntil(() => !element.narrow);
+  });
+
+  test('attempt dropdown items', async () => {
+    const attemptDropdown = queryAndAssert<GrDropdownList>(
+      element,
+      'gr-dropdown-list.attemptSelect'
+    );
+    assertIsDefined(attemptDropdown.items);
+    assert.equal(attemptDropdown.items.length, 42);
+    assert.deepEqual(attemptDropdown.items[0], {
+      text: 'Latest Attempt',
+      value: 'latest',
+    });
+    assert.deepEqual(attemptDropdown.items[1], {
+      text: 'All Attempts',
+      value: 'all',
+    });
+    assert.deepEqual(attemptDropdown.items[2], {
+      text: 'Attempt 0',
+      value: 0,
+    });
+    assert.deepEqual(attemptDropdown.items[41], {
+      text: 'Attempt 40',
+      value: 40,
+    });
+  });
+});
diff --git a/polygerrit-ui/app/elements/checks/gr-checks-results.ts b/polygerrit-ui/app/elements/checks/gr-checks-results.ts
index 219d0c0..ce5682c 100644
--- a/polygerrit-ui/app/elements/checks/gr-checks-results.ts
+++ b/polygerrit-ui/app/elements/checks/gr-checks-results.ts
@@ -36,7 +36,6 @@
   ALL_ATTEMPTS,
   allResults,
   AttemptChoice,
-  attemptChoiceLabel,
   computeIsExpandable,
   createFixAction,
   createGetAiFixAction,
@@ -44,7 +43,6 @@
   hasCompletedWithoutResults,
   iconFor,
   iconForLink,
-  isAttemptChoice,
   isCategory,
   LATEST_ATTEMPT,
   otherPrimaryLinks,
@@ -52,11 +50,9 @@
   reportAiAgentGetAIFix,
   reportAiAgentSuggestionCopy,
   secondaryLinks,
-  sortAttemptChoices,
-  stringToAttemptChoice,
   tooltipForLink,
 } from '../../models/checks/checks-util';
-import {assert, assertIsDefined, unique} from '../../utils/common-util';
+import {assertIsDefined} from '../../utils/common-util';
 import {modifierPressed, whenVisible} from '../../utils/dom-util';
 import {durationString} from '../../utils/date-util';
 import {charsOnly} from '../../utils/string-util';
@@ -76,7 +72,7 @@
 } from '../../utils/label-util';
 import {subscribe} from '../lit/subscription-controller';
 import {fontStyles} from '../../styles/gr-font-styles';
-import {fire, fireAlert} from '../../utils/event-util';
+import {fire} from '../../utils/event-util';
 import {resolve} from '../../models/dependency';
 import {checksModelToken} from '../../models/checks/checks-model';
 import {Interaction} from '../../constants/reporting';
@@ -84,7 +80,6 @@
 import {changeModelToken} from '../../models/change/change-model';
 import {getAppContext} from '../../services/app-context';
 import {when} from 'lit/directives/when.js';
-import {DropdownItem} from '../shared/gr-dropdown-list/gr-dropdown-list';
 import './gr-checks-attempt';
 import './gr-checks-fix-preview';
 import {changeViewModelToken} from '../../models/views/change';
@@ -624,7 +619,7 @@
       getAppContext().flagsService.isEnabled(
         KnownExperimentId.ML_SUGGESTED_EDIT_GET_FIX
       ) &&
-      this.getSuggestionsService()?.isGeneratedSuggestedFixEnabled(
+      this.getSuggestionsService()?.isRequestAiFixEnabled(
         this.result?.codePointers?.[0]?.path
       ) &&
       this.isOwner &&
@@ -697,7 +692,7 @@
     if (!this.suggestion) return nothing;
     return html`<gr-checks-fix-preview
       .fixSuggestionInfos=${[this.suggestion]}
-      .patchSet=${this.result?.patchset as PatchSetNumber | undefined}
+      .patchSet=${this.result?.patchset}
     ></gr-checks-fix-preview>`;
   }
 
@@ -709,7 +704,7 @@
     reportAiAgentGetAIFix(this.reporting, this.result);
     let suggestion: FixSuggestionInfo | undefined;
     try {
-      suggestion = await this.getSuggestionsService().generateSuggestedFix({
+      suggestion = await this.getSuggestionsService().requestAiFix({
         prompt: this.result.message,
         patchsetNumber: this.result.patchset as RevisionPatchSetNum,
         filePath: codePointer.path,
@@ -719,10 +714,7 @@
     } finally {
       this.suggestionLoading = false;
     }
-    if (!suggestion) {
-      fireAlert(this, 'No suitable AI fix could be found');
-      return;
-    }
+    if (!suggestion) return;
     suggestion.description =
       ReportSource.GET_AI_FIX_FOR_CHECK + ' ' + suggestion.description;
     this.suggestion = suggestion;
@@ -895,7 +887,7 @@
     return html`
       <gr-checks-fix-preview
         .fixSuggestionInfos=${fixSuggestionInfos}
-        .patchSet=${this.result?.patchset as PatchSetNumber | undefined}
+        .patchSet=${this.result?.patchset}
       ></gr-checks-fix-preview>
     `;
   }
@@ -1098,11 +1090,6 @@
           justify-content: space-between;
           align-items: flex-end;
         }
-        .headerTopRow gr-dropdown-list {
-          border: 1px solid var(--border-color);
-          border-radius: var(--border-radius);
-          padding: 0 var(--spacing-m);
-        }
         .headerTopRow h2 {
           display: inline-block;
         }
@@ -1122,23 +1109,10 @@
         .headerBottomRow {
           margin-top: var(--spacing-s);
         }
-        .headerTopRow .right,
         .headerBottomRow .right {
           display: flex;
           align-items: center;
         }
-        .headerTopRow .right .goToLatest {
-          display: none;
-        }
-        .notLatest .headerTopRow .right .goToLatest {
-          display: block;
-        }
-        .headerTopRow .right > * {
-          margin-left: var(--spacing-m);
-        }
-        .headerTopRow .right .goToLatest gr-button {
-          --gr-button-padding: var(--spacing-s) var(--spacing-m);
-        }
         .headerBottomRow gr-icon {
           color: var(--link-color);
         }
@@ -1321,7 +1295,6 @@
         !!this.checksPatchsetNumber &&
         this.checksPatchsetNumber !== this.latestPatchsetNumber,
     };
-    const attemptItems = this.createAttemptDropdownItems();
     return html`
       <div class=${classMap(headerClasses)}>
         <div class="headerTopRow">
@@ -1332,28 +1305,6 @@
               <span class="loadingSpin"></span>
             </div>
           </div>
-          <div class="right">
-            <div class="goToLatest">
-              <gr-button @click=${this.goToLatestPatchset} link
-                >Go To Latest Patchset</gr-button
-              >
-            </div>
-            ${when(
-              attemptItems.length > 0,
-              () => html` <gr-dropdown-list
-                value=${this.selectedAttempt ?? 0}
-                .items=${attemptItems}
-                @value-change=${this.onAttemptSelected}
-              ></gr-dropdown-list>`
-            )}
-            <gr-dropdown-list
-              value=${(this.checksPatchsetNumber ||
-                this.latestPatchsetNumber) ??
-              0}
-              .items=${this.createPatchsetDropdownItems()}
-              @value-change=${this.onPatchsetSelected}
-            ></gr-dropdown-list>
-          </div>
         </div>
         <div class="headerBottomRow">
           <div class="left">${this.renderFilter()}</div>
@@ -1474,53 +1425,6 @@
     ></gr-checks-action>`;
   }
 
-  private onAttemptSelected(e: CustomEvent<{value: string | undefined}>) {
-    const attempt = stringToAttemptChoice(e.detail.value);
-    assertIsDefined(attempt, `unexpected attempt choice ${e.detail.value}`);
-    this.getChecksModel().updateStateSetAttempt(attempt);
-  }
-
-  private onPatchsetSelected(e: CustomEvent<{value: string}>) {
-    const patchset = Number(e.detail.value) as PatchSetNumber;
-    assert(Number.isInteger(patchset), `patchset must be integer: ${patchset}`);
-    this.getChecksModel().updateStateSetPatchset(patchset);
-  }
-
-  private goToLatestPatchset() {
-    assertIsDefined(this.latestPatchsetNumber, 'latestPatchsetNumber');
-    this.getChecksModel().updateStateSetPatchset(this.latestPatchsetNumber);
-  }
-
-  private createAttemptDropdownItems() {
-    if (this.runs.every(run => run.isSingleAttempt)) return [];
-    const attempts: AttemptChoice[] = this.runs
-      .map(run => run.attempt ?? 0)
-      .filter(isAttemptChoice)
-      .filter(unique);
-    attempts.push(LATEST_ATTEMPT);
-    attempts.push(ALL_ATTEMPTS);
-    const items: DropdownItem[] = attempts.sort(sortAttemptChoices).map(a => {
-      return {
-        value: a,
-        text: attemptChoiceLabel(a),
-      };
-    });
-    return items;
-  }
-
-  private createPatchsetDropdownItems() {
-    if (!this.latestPatchsetNumber) return [];
-    return Array.from(Array(this.latestPatchsetNumber), (_, i) => {
-      assertIsDefined(this.latestPatchsetNumber, 'latestPatchsetNumber');
-      const index = this.latestPatchsetNumber - i;
-      const postfix = index === this.latestPatchsetNumber ? ' (latest)' : '';
-      return {
-        value: `${index}`,
-        text: `Patchset ${index}${postfix}`,
-      };
-    });
-  }
-
   isRunSelected(run: {checkName: string}) {
     return this.selectedRuns.size === 0 || this.selectedRuns.has(run.checkName);
   }
diff --git a/polygerrit-ui/app/elements/checks/gr-checks-results_test.ts b/polygerrit-ui/app/elements/checks/gr-checks-results_test.ts
index 9324c74..ff79f77 100644
--- a/polygerrit-ui/app/elements/checks/gr-checks-results_test.ts
+++ b/polygerrit-ui/app/elements/checks/gr-checks-results_test.ts
@@ -21,11 +21,10 @@
 } from '../../test/test-data-generators';
 import {resolve} from '../../models/dependency';
 import {createLabelInfo} from '../../test/test-data-generators';
-import {assertIsDefined, query, queryAndAssert} from '../../utils/common-util';
+import {query, queryAndAssert} from '../../utils/common-util';
 import {stubFlags} from '../../test/test-utils';
 import {Interaction} from '../../constants/reporting';
 import {FixId, NumericChangeId, PatchSetNumber} from '../../api/rest-api';
-import {GrDropdownList} from '../shared/gr-dropdown-list/gr-dropdown-list';
 import {getAppContext} from '../../services/app-context';
 import {suggestionsServiceToken} from '../../services/suggestions/suggestions-service';
 import {testResolver} from '../../test/common-test-setup';
@@ -155,10 +154,8 @@
     const checksModel = testResolver(checksModelToken);
     checksModel.changeNum = 123 as NumericChangeId;
     const suggestionsService = testResolver(suggestionsServiceToken);
-    sinon
-      .stub(suggestionsService, 'isGeneratedSuggestedFixEnabled')
-      .returns(true);
-    sinon.stub(suggestionsService, 'generateSuggestedFix').resolves({
+    sinon.stub(suggestionsService, 'isRequestAiFixEnabled').returns(true);
+    sinon.stub(suggestionsService, 'requestAiFix').resolves({
       description: 'AI suggested fix',
       replacements: [],
       fix_id: '1' as FixId,
@@ -202,7 +199,7 @@
         conversationId: 'test-conv',
         turnIndex: 1,
       }),
-    } as RunResult;
+    };
     await element.updateComplete;
 
     const containerTr = queryAndAssert(element, 'tr.container');
@@ -442,31 +439,6 @@
     await element.updateComplete;
   });
 
-  test('attempt dropdown items', async () => {
-    const attemptDropdown = queryAndAssert<GrDropdownList>(
-      element,
-      'gr-dropdown-list'
-    );
-    assertIsDefined(attemptDropdown.items);
-    assert.equal(attemptDropdown.items.length, 42);
-    assert.deepEqual(attemptDropdown.items[0], {
-      text: 'Latest Attempt',
-      value: 'latest',
-    });
-    assert.deepEqual(attemptDropdown.items[1], {
-      text: 'All Attempts',
-      value: 'all',
-    });
-    assert.deepEqual(attemptDropdown.items[2], {
-      text: 'Attempt 0',
-      value: 0,
-    });
-    assert.deepEqual(attemptDropdown.items[41], {
-      text: 'Attempt 40',
-      value: 40,
-    });
-  });
-
   test('renders', async () => {
     assert.shadowDom.equal(
       element,
@@ -480,13 +452,6 @@
                 <span class="loadingSpin"> </span>
               </div>
             </div>
-            <div class="right">
-              <div class="goToLatest">
-                <gr-button link=""> Go To Latest Patchset </gr-button>
-              </div>
-              <gr-dropdown-list value="latest"> </gr-dropdown-list>
-              <gr-dropdown-list value="0"> </gr-dropdown-list>
-            </div>
           </div>
           <div class="headerBottomRow">
             <div class="left">
diff --git a/polygerrit-ui/app/elements/checks/gr-checks-runs.ts b/polygerrit-ui/app/elements/checks/gr-checks-runs.ts
index 15f4bd4..1ec1bef 100644
--- a/polygerrit-ui/app/elements/checks/gr-checks-runs.ts
+++ b/polygerrit-ui/app/elements/checks/gr-checks-runs.ts
@@ -10,6 +10,7 @@
 import {css, html, LitElement, nothing, PropertyValues} from 'lit';
 import {customElement, property, query, state} from 'lit/decorators.js';
 import './gr-checks-attempt';
+import './gr-checks-patchset-select';
 import {Action, Link, RunStatus} from '../../api/checks';
 import {sharedStyles} from '../../styles/shared-styles';
 import {
@@ -549,6 +550,13 @@
           --gr-button-padding: var(--spacing-s) var(--spacing-m);
           white-space: nowrap;
         }
+        gr-checks-patchset-select {
+          margin-top: var(--spacing-m);
+        }
+        :host([collapsed]) gr-checks-patchset-select {
+          pointer-events: auto;
+          cursor: default;
+        }
         .title gr-button.expandButton {
           --gr-button-padding: var(--spacing-xs) var(--spacing-s);
         }
@@ -656,6 +664,13 @@
         <div class="flex-space"></div>
         ${this.renderTitleButtons()} ${this.renderCollapseButton()}
       </h2>
+      <gr-checks-patchset-select
+        ?compact=${this.collapsed}
+        @click=${(e: Event) => {
+          // Changing the patchset should not expand the collapsed panel.
+          if (this.collapsed) e.stopPropagation();
+        }}
+      ></gr-checks-patchset-select>
       ${this.renderErrors()} ${this.renderSignIn()} ${this.renderZeroState()}
       <input
         id="filterInput"
diff --git a/polygerrit-ui/app/elements/checks/gr-checks-runs_test.ts b/polygerrit-ui/app/elements/checks/gr-checks-runs_test.ts
index 7fe60a9..17efc60 100644
--- a/polygerrit-ui/app/elements/checks/gr-checks-runs_test.ts
+++ b/polygerrit-ui/app/elements/checks/gr-checks-runs_test.ts
@@ -59,6 +59,7 @@
             </gr-button>
           </gr-tooltip-content>
         </h2>
+        <gr-checks-patchset-select></gr-checks-patchset-select>
         <div class="error">
           <div class="left">
             <gr-icon filled="" icon="error"> </gr-icon>
@@ -135,6 +136,7 @@
             </gr-button>
           </gr-tooltip-content>
         </h2>
+        <gr-checks-patchset-select compact=""></gr-checks-patchset-select>
         <div class="error">
           <div class="left">
             <gr-icon filled="" icon="error"> </gr-icon>
diff --git a/polygerrit-ui/app/elements/checks/gr-diff-check-result.ts b/polygerrit-ui/app/elements/checks/gr-diff-check-result.ts
index c9d3b1a..4713d95 100644
--- a/polygerrit-ui/app/elements/checks/gr-diff-check-result.ts
+++ b/polygerrit-ui/app/elements/checks/gr-diff-check-result.ts
@@ -34,13 +34,8 @@
   ReportSource,
   suggestionsServiceToken,
 } from '../../services/suggestions/suggestions-service';
-import {
-  FixSuggestionInfo,
-  PatchSetNumber,
-  RevisionPatchSetNum,
-} from '../../api/rest-api';
+import {FixSuggestionInfo, RevisionPatchSetNum} from '../../api/rest-api';
 import {when} from 'lit/directives/when.js';
-import {fireAlert} from '../../utils/event-util';
 
 @customElement('gr-diff-check-result')
 export class GrDiffCheckResult extends LitElement {
@@ -290,7 +285,7 @@
     if (!this.suggestion) return nothing;
     return html`<gr-checks-fix-preview
       .fixSuggestionInfos=${[this.suggestion]}
-      .patchSet=${this.result?.patchset as PatchSetNumber | undefined}
+      .patchSet=${this.result?.patchset}
     ></gr-checks-fix-preview>`;
   }
 
@@ -333,7 +328,7 @@
       return false;
     }
     if (
-      !this.getSuggestionsService()?.isGeneratedSuggestedFixEnabled(
+      !this.getSuggestionsService()?.isRequestAiFixEnabled(
         this.result?.codePointers?.[0].path
       )
     ) {
@@ -437,7 +432,7 @@
     reportAiAgentGetAIFix(this.reporting, this.result);
     let suggestion: FixSuggestionInfo | undefined;
     try {
-      suggestion = await this.getSuggestionsService().generateSuggestedFix({
+      suggestion = await this.getSuggestionsService().requestAiFix({
         prompt: this.result.message,
         patchsetNumber: this.result.patchset as RevisionPatchSetNum,
         filePath: codePointer.path,
@@ -447,10 +442,7 @@
     } finally {
       this.suggestionLoading = false;
     }
-    if (!suggestion) {
-      fireAlert(this, 'No suitable AI fix could be found');
-      return;
-    }
+    if (!suggestion) return;
     suggestion.description =
       ReportSource.GET_AI_FIX_FOR_CHECK + ' ' + suggestion.description;
     this.suggestion = suggestion;
diff --git a/polygerrit-ui/app/elements/checks/gr-diff-check-result_test.ts b/polygerrit-ui/app/elements/checks/gr-diff-check-result_test.ts
index 71085f2..22f7514 100644
--- a/polygerrit-ui/app/elements/checks/gr-diff-check-result_test.ts
+++ b/polygerrit-ui/app/elements/checks/gr-diff-check-result_test.ts
@@ -28,6 +28,7 @@
   let element: GrDiffCheckResult;
 
   let reportingStub: sinon.SinonStub;
+  let requestAiFixStub: sinon.SinonStub;
   let suggestionsService: SuggestionsService;
 
   setup(async () => {
@@ -39,11 +40,9 @@
     const checksModel = testResolver(checksModelToken);
     checksModel.changeNum = 123 as NumericChangeId;
 
-    sinon
-      .stub(suggestionsService, 'isGeneratedSuggestedFixEnabled')
-      .returns(true);
+    sinon.stub(suggestionsService, 'isRequestAiFixEnabled').returns(true);
     stubFlags('isEnabled').returns(true);
-    sinon.stub(suggestionsService, 'generateSuggestedFix').resolves({
+    requestAiFixStub = sinon.stub(suggestionsService, 'requestAiFix').resolves({
       description: 'AI suggested fix',
       fix_id: '1' as FixId,
       replacements: [
@@ -198,6 +197,21 @@
         )
       );
     });
+
+    test('stays collapsed without alert when requestAiFix resolves undefined', async () => {
+      requestAiFixStub.resolves(undefined);
+      const alertSpy = sinon.spy();
+      element.addEventListener('show-alert', alertSpy);
+
+      queryAndAssert<GrButton>(element, '#aiFixBtn').click();
+      await waitUntil(() => requestAiFixStub.calledOnce);
+      await element.updateComplete;
+
+      assert.isFalse(element.isExpanded);
+      assert.isFalse(element.suggestionLoading);
+      assert.isUndefined(element.suggestion);
+      assert.isFalse(alertSpy.called);
+    });
   });
   test('reports AI_AGENT_SUGGESTION_TO_COMMENT when please-fix clicked', async () => {
     element.result = {
diff --git a/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header.ts b/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header.ts
index 8c6078b..6332262 100644
--- a/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header.ts
+++ b/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header.ts
@@ -218,6 +218,10 @@
 
   override connectedCallback() {
     super.connectedCallback();
+    document.documentElement.style.setProperty(
+      '--default-header-icon',
+      `url("${getBaseUrl()}/diffy.png")`
+    );
     document.addEventListener('click', this.handleBodyClick);
     this.loadAccount();
   }
@@ -273,34 +277,30 @@
           line-height: calc(var(--header-title-font-size) * 1.2);
           text-decoration: none;
           display: block;
-          flex: 1 1 auto;
-          flex-grow: 0;
-          justify-content: center;
-          overflow: hidden;
+          flex: 0 1 auto;
+          width: fit-content;
           max-width: 30%;
-          text-decoration: none;
+          overflow: hidden;
+          cursor: pointer;
         }
         .bigTitle:hover {
-          text-decoration: underline;
+          text-decoration: none;
         }
-        .mobileTitleWrapper {
-          position: absolute;
-          left: 100px;
-          right: 100px;
-          overflow: hidden;
-          display: flex;
-          justify-content: center;
+        .bigTitle:hover .titleText::after {
+          text-decoration: underline;
         }
         .titleText {
           display: flex;
           align-items: center;
+          width: max-content;
+          max-width: 100%;
           min-width: 0;
           overflow: hidden;
         }
         .titleText::before {
           --icon-width: var(--header-icon-width, var(--header-icon-size, 0));
           --icon-height: var(--header-icon-height, var(--header-icon-size, 0));
-          background-image: var(--header-icon);
+          background-image: var(--header-icon, var(--default-header-icon));
           background-size: var(--icon-width) var(--icon-height);
           background-repeat: no-repeat;
           content: '';
@@ -322,7 +322,7 @@
           white-space: nowrap;
           overflow: hidden;
           text-overflow: ellipsis;
-          flex: 1;
+          flex: 0 1 auto;
           min-width: 0;
         }
 
@@ -455,7 +455,7 @@
             font-weight: var(--font-weight-h3);
             line-height: var(--line-height-h3);
             min-width: 0;
-            max-width: unset;
+            max-width: 100%;
           }
           .titleText::before {
             --icon-width: var(
@@ -466,7 +466,10 @@
               --header-icon-height,
               var(--header-mobile-icon-size, var(--header-icon-size, 0))
             );
-            background-image: var(--header-mobile-icon, var(--header-icon));
+            background-image: var(
+              --header-mobile-icon,
+              var(--header-icon, var(--default-header-icon))
+            );
             background-size: var(--mobile-icon-width, var(--icon-width))
               var(--mobile-icon-height, var(--icon-height));
             width: var(--mobile-icon-width, var(--icon-width));
@@ -514,9 +517,20 @@
             z-index: 200;
             box-shadow: var(--header-box-shadow);
           }
-          .nav-header {
+          nav .nav-header {
             display: flex;
             align-items: center;
+            min-height: 54px;
+          }
+          /* shrink-to-fit when short -> centered by wrapper; shrinks -> ellipsis when long */
+          .mobileTitleWrapper {
+            flex: 1 1 0;
+            min-width: 0;
+            max-width: 100%;
+            margin-left: 5px;
+          }
+          .mobileRightItems {
+            flex: 0 0 auto;
           }
           .hamburger {
             display: inline-block;
@@ -700,7 +714,7 @@
       <nav class="hideOnDesktop">
         ${when(
           this.mobileSearch,
-          () => html` <div class="nav-header">
+          () => html`<div class="nav-header">
             <md-icon-button
               touch-target="none"
               aria-label="Back"
@@ -714,12 +728,8 @@
               id="search"
               .verticalOffset=${40}
             ></gr-smart-search>
-          </div>`
-        )}
-        ${when(
-          !this.mobileSearch,
-          () => html`
-            <div class="nav-header">
+          </div>`,
+          () => html`<div class="nav-header">
               <md-icon-button
                 touch-target="none"
                 aria-label="${!this.hamburgerClose
@@ -800,8 +810,7 @@
                   class="modelBackground"
                   @click=${() => this.handleSidebar()}
                 ></div>`
-              : nothing}
-          `
+              : nothing}`
         )}
       </nav>
     `;
@@ -983,7 +992,6 @@
     return Promise.all([
       this.restApiService.getAccount(),
       this.restApiService.getTopMenus(),
-      this.getPluginLoader().awaitPluginsLoaded(),
     ]).then(result => {
       const account = result[0];
       this.account = account;
@@ -991,19 +999,26 @@
       this.loading = false;
       this.topMenus = result[1];
 
-      return getAdminLinks(
-        account,
-        () =>
-          this.restApiService.getAccountCapabilities().then(capabilities => {
-            if (!capabilities) {
-              throw new Error('getAccountCapabilities returns undefined');
-            }
-            return capabilities;
-          }),
-        () => this.getPluginLoader().jsApiService.getAdminMenuLinks()
-      ).then(res => {
-        this.adminLinks = res.links;
-      });
+      return this.getPluginLoader()
+        .awaitPluginsLoaded()
+        .catch(() => {})
+        .then(() =>
+          getAdminLinks(
+            account,
+            () =>
+              this.restApiService
+                .getAccountCapabilities()
+                .then(capabilities => {
+                  if (!capabilities) {
+                    throw new Error('getAccountCapabilities returns undefined');
+                  }
+                  return capabilities;
+                }),
+            () => this.getPluginLoader().jsApiService.getAdminMenuLinks()
+          ).then(res => {
+            this.adminLinks = res.links;
+          })
+        );
     });
   }
 
diff --git a/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header_screenshot_test.ts b/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header_screenshot_test.ts
new file mode 100644
index 0000000..00c0737
--- /dev/null
+++ b/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header_screenshot_test.ts
@@ -0,0 +1,135 @@
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import '../../../test/common-test-setup';
+import './gr-main-header';
+import {fixture, html} from '@open-wc/testing';
+import {setViewport} from '@web/test-runner-commands';
+// Until https://github.com/modernweb-dev/web/issues/2804 is fixed
+// @ts-ignore
+import {visualDiff} from '@web/test-runner-visual-regression';
+import {GrMainHeader} from './gr-main-header';
+import {
+  stubElement,
+  stubRestApi,
+  visualDiffDarkTheme,
+} from '../../../test/test-utils';
+
+suite('gr-main-header screenshot tests', () => {
+  let element: GrMainHeader;
+
+  setup(async () => {
+    await setViewport({width: 1200, height: 100});
+    stubRestApi('probePath').returns(Promise.resolve(false));
+    stubElement('gr-main-header', 'loadAccount').callsFake(() =>
+      Promise.resolve()
+    );
+    await Promise.all(
+      ['/diffy.png', '/gerrit_icon.png'].map(
+        src =>
+          new Promise<void>((resolve, reject) => {
+            const img = new Image();
+            img.onload = () => resolve();
+            img.onerror = () => reject(new Error(`Failed to load ${src}`));
+            img.src = src;
+          })
+      )
+    );
+    element = await fixture<GrMainHeader>(
+      html`<gr-main-header
+        style="display: block; background: var(--header-background, var(--header-background-color, #eee));"
+      ></gr-main-header>`
+    );
+    element.loginUrl = '/login';
+    await element.updateComplete;
+  });
+
+  test('header screenshot', async () => {
+    await visualDiff(element, 'gr-main-header');
+    await visualDiffDarkTheme(element, 'gr-main-header');
+  });
+
+  test('header screenshot with custom icon override', async () => {
+    const customThemeEl = document.createElement('style');
+    customThemeEl.textContent =
+      'html { --header-icon: url("/gerrit_icon.png"); }';
+    document.head.appendChild(customThemeEl);
+    try {
+      await visualDiff(element, 'gr-main-header-custom-icon');
+      await visualDiffDarkTheme(element, 'gr-main-header-custom-icon');
+    } finally {
+      customThemeEl.remove();
+    }
+  });
+
+  test('screenshot with custom title override', async () => {
+    const customThemeEl = document.createElement('style');
+    customThemeEl.textContent =
+      'html { --header-title-content: "Gerrit Testing"; }';
+    document.head.appendChild(customThemeEl);
+    try {
+      await visualDiff(element, 'gr-main-header-custom-title');
+      await visualDiffDarkTheme(element, 'gr-main-header-custom-title');
+    } finally {
+      customThemeEl.remove();
+    }
+  });
+
+  test('screenshot with long custom title override shows elipsis', async () => {
+    const customThemeEl = document.createElement('style');
+    customThemeEl.textContent =
+      'html { --header-title-content: "Gerrit Testing Testing Testing Testing Testing"; }';
+    document.head.appendChild(customThemeEl);
+    try {
+      await visualDiff(element, 'gr-main-header-long-custom-title-elipsis');
+      await visualDiffDarkTheme(
+        element,
+        'gr-main-header-long-custom-title-elipsis'
+      );
+    } finally {
+      customThemeEl.remove();
+    }
+  });
+
+  test('mobile header screenshot', async () => {
+    await setViewport({width: 390, height: 900});
+    await visualDiff(element, 'gr-main-header-mobile');
+    await visualDiffDarkTheme(element, 'gr-main-header-mobile');
+  });
+
+  test('mobile header screenshot with custom title override', async () => {
+    await setViewport({width: 390, height: 900});
+    const customThemeEl = document.createElement('style');
+    customThemeEl.textContent =
+      'html { --header-title-content: "Gerrit Testing"; }';
+    document.head.appendChild(customThemeEl);
+    try {
+      await visualDiff(element, 'gr-main-header-mobile-custom-title');
+      await visualDiffDarkTheme(element, 'gr-main-header-mobile-custom-title');
+    } finally {
+      customThemeEl.remove();
+    }
+  });
+
+  test('mobile header screenshot with long custom title override shows elipsis', async () => {
+    await setViewport({width: 390, height: 900});
+    const customThemeEl = document.createElement('style');
+    customThemeEl.textContent =
+      'html { --header-title-content: "Gerrit Testing Testing Testing Testing Testing"; }';
+    document.head.appendChild(customThemeEl);
+    try {
+      await visualDiff(
+        element,
+        'gr-main-header-mobile-long-custom-title-elipsis'
+      );
+      await visualDiffDarkTheme(
+        element,
+        'gr-main-header-mobile-long-custom-title-elipsis'
+      );
+    } finally {
+      customThemeEl.remove();
+    }
+  });
+});
diff --git a/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header_test.ts b/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header_test.ts
index 04d4e84..bc0504a 100644
--- a/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header_test.ts
+++ b/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header_test.ts
@@ -7,6 +7,7 @@
 import {
   isHidden,
   query,
+  queryAndAssert,
   stubElement,
   stubRestApi,
 } from '../../../test/test-utils';
@@ -697,4 +698,51 @@
     assert.equal(element.registerText, 'Sign up');
     assert.isTrue(isHidden(query(element, '.registerDiv')));
   });
+
+  test('sets --default-header-icon with base url', async () => {
+    assert.equal(
+      document.documentElement.style.getPropertyValue('--default-header-icon'),
+      'url("/diffy.png")'
+    );
+
+    const originalCanonicalPath = window.CANONICAL_PATH;
+    window.CANONICAL_PATH = '/r';
+    try {
+      await fixture<GrMainHeader>(html`<gr-main-header></gr-main-header>`);
+      assert.equal(
+        document.documentElement.style.getPropertyValue(
+          '--default-header-icon'
+        ),
+        'url("/r/diffy.png")'
+      );
+    } finally {
+      window.CANONICAL_PATH = originalCanonicalPath;
+    }
+  });
+
+  test('allows overriding --header-icon via theme stylesheet', () => {
+    const titleText = queryAndAssert(element, '.titleText');
+    assert.include(
+      getComputedStyle(titleText, '::before').backgroundImage,
+      '/diffy.png'
+    );
+
+    const customThemeEl = document.createElement('style');
+    customThemeEl.textContent = 'html { --header-icon: url("/custom.png"); }';
+    document.head.appendChild(customThemeEl);
+    try {
+      assert.include(
+        getComputedStyle(titleText, '::before').backgroundImage,
+        '/custom.png'
+      );
+
+      customThemeEl.textContent = 'html { --header-icon: none; }';
+      assert.equal(
+        getComputedStyle(titleText, '::before').backgroundImage,
+        'none'
+      );
+    } finally {
+      customThemeEl.remove();
+    }
+  });
 });
diff --git a/polygerrit-ui/app/elements/core/gr-router/gr-router.ts b/polygerrit-ui/app/elements/core/gr-router/gr-router.ts
index 665273e..920852e 100644
--- a/polygerrit-ui/app/elements/core/gr-router/gr-router.ts
+++ b/polygerrit-ui/app/elements/core/gr-router/gr-router.ts
@@ -1347,7 +1347,7 @@
       loading: false,
     };
     // Note that router model view must be updated before view models.
-    this.setState(state as AppElementParams);
+    this.setState(state);
     this.searchViewModel.updateState(state);
   }
 
@@ -1362,7 +1362,7 @@
       loading: false,
     };
     // Note that router model view must be updated before view models.
-    this.setState(state as AppElementParams);
+    this.setState(state);
     this.searchViewModel.updateState(state);
   }
 
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host.ts b/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host.ts
index 8dcdc63..7790a67 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host.ts
+++ b/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host.ts
@@ -335,6 +335,14 @@
   // further ones that were requested within a animation-frame).
   private reloadPromise?: DelayedPromise<void>;
 
+  /**
+   * Monotonically incremented whenever a new reload is scheduled, navigation
+   * inputs (`path`, `changeNum`, `patchRange`) change, or the element
+   * disconnects. Prevents in-flight `reloadInternal()` calls from emitting
+   * stale `diff-changed` events after being superseded.
+   */
+  private reloadGeneration = 0;
+
   private readonly getBrowserModel = resolve(this, browserModelToken);
 
   private readonly getCommentsModel = resolve(this, commentsModelToken);
@@ -492,6 +500,7 @@
   }
 
   override disconnectedCallback() {
+    this.reloadGeneration++;
     if (this.reloadPromise) {
       this.reloadPromise.cancel();
       this.reloadPromise = undefined;
@@ -507,6 +516,22 @@
   protected override willUpdate(changedProperties: PropertyValues) {
     // Important to call as this will call render, see LitElement.
     super.willUpdate(changedProperties);
+    const prevPatchRange = changedProperties.get('patchRange') as
+      | PatchRange
+      | undefined;
+    const patchRangeChanged =
+      prevPatchRange !== undefined &&
+      (prevPatchRange.basePatchNum !== this.patchRange?.basePatchNum ||
+        prevPatchRange.patchNum !== this.patchRange?.patchNum);
+    if (
+      (changedProperties.has('path') &&
+        changedProperties.get('path') !== undefined) ||
+      (changedProperties.has('changeNum') &&
+        changedProperties.get('changeNum') !== undefined) ||
+      patchRangeChanged
+    ) {
+      this.reloadGeneration++;
+    }
     if (
       changedProperties.has('changeComments') ||
       changedProperties.has('patchRange') ||
@@ -682,9 +707,10 @@
     this.layersComputedWithPlugins = true;
   }
 
-  async initLayers() {
+  async initLayers(reloadId = this.reloadGeneration) {
     const preferencesPromise = this.restApiService.getPreferences();
     const prefs = await preferencesPromise;
+    if (reloadId !== this.reloadGeneration) return;
     this.enableTokenHighlight = this.calculateEnableTokenHighlight(prefs);
 
     assertIsDefined(this.path, 'path');
@@ -696,7 +722,7 @@
     // We kick off fetching the data here, but we don't return the promise,
     // so awaiting initLayers() will not wait for coverage data to be
     // completely loaded.
-    noAwait(this.getCoverageData());
+    noAwait(this.getCoverageData(reloadId));
   }
 
   /**
@@ -704,7 +730,8 @@
    * signal to report metrics event that started on location change.
    */
   reload(shouldReportMetric?: boolean): Promise<void> {
-    this.reloadPromise = debounceP(
+    this.reloadGeneration++;
+    const reloadPromise = debounceP(
       this.reloadPromise,
       async () => {
         try {
@@ -721,15 +748,19 @@
             );
           }
         } finally {
-          this.reloadPromise = undefined;
+          if (this.reloadPromise === reloadPromise) {
+            this.reloadPromise = undefined;
+          }
         }
       },
       0
     );
-    return this.reloadPromise;
+    this.reloadPromise = reloadPromise;
+    return reloadPromise;
   }
 
   async reloadInternal(shouldReportMetric?: boolean) {
+    const reloadId = ++this.reloadGeneration;
     this.reporting.time(Timing.DIFF_TOTAL);
     this.reporting.time(Timing.DIFF_LOAD);
     this.grDiffKey++;
@@ -748,15 +779,21 @@
       // so we have to wait on plugins being loaded before we can initialize
       // layers and proceed to rendering. OTOH we want to fetch diffs and diff
       // assets in parallel.
-      const layerPromise = this.initLayers();
+      const layerPromise = this.initLayers(reloadId);
+      // Avoid unhandled rejections if a superseded reload exits early before
+      // awaiting `layerPromise` (e.g. if `path` is cleared during teardown).
+      layerPromise.catch(() => {});
       const diff = await this.getDiff();
+      if (reloadId !== this.reloadGeneration) return;
       this.loadedWhitespaceLevel = whitespaceLevel;
       this.reportDiff(diff);
 
-      await this.loadDiffAssets(diff);
+      await this.loadDiffAssets(diff, reloadId);
+      if (reloadId !== this.reloadGeneration) return;
       // Only now we are awaiting layers (and plugin loading), which was kicked
       // off above.
       await layerPromise;
+      if (reloadId !== this.reloadGeneration) return;
 
       // Not waiting for coverage ranges intentionally as
       // plugin loading should not block the content rendering
@@ -771,6 +808,7 @@
       const syntaxLayerPromise = this.syntaxLayer.process(diff);
       syntaxLayerPromise.catch(() => {});
       await waitForEventOnce(this, 'render');
+      if (reloadId !== this.reloadGeneration) return;
       this.subscribeToChecks();
       this.reporting.timeEnd(Timing.DIFF_CONTENT, this.timingDetails());
 
@@ -782,8 +820,10 @@
 
       this.reporting.time(Timing.DIFF_SYNTAX);
       await syntaxLayerPromise;
+      if (reloadId !== this.reloadGeneration) return;
       this.reporting.timeEnd(Timing.DIFF_SYNTAX, this.timingDetails());
     } catch (e: unknown) {
+      if (reloadId !== this.reloadGeneration) return;
       if (e instanceof Response) {
         this.handleGetDiffError(e);
       } else if (e instanceof Error) {
@@ -796,7 +836,9 @@
         );
       }
     } finally {
-      this.reporting.timeEnd(Timing.DIFF_TOTAL, this.timingDetails());
+      if (reloadId === this.reloadGeneration) {
+        this.reporting.timeEnd(Timing.DIFF_TOTAL, this.timingDetails());
+      }
     }
   }
 
@@ -957,7 +999,7 @@
     `;
   }
 
-  private async getCoverageData() {
+  private async getCoverageData(reloadId = this.reloadGeneration) {
     assertIsDefined(this.changeNum, 'changeNum');
     assertIsDefined(this.change, 'change');
     assertIsDefined(this.path, 'path');
@@ -977,6 +1019,7 @@
     // startup, and coordinating incoming coverage providers with the reloading
     // process seems to be complex enough to avoid it for the time being.
     await this.getPluginLoader().awaitPluginsLoaded();
+    if (reloadId !== this.reloadGeneration) return;
     const plugins =
       this.getPluginLoader().pluginsModel.getState().coveragePlugins;
     const providers = plugins.map(p => p.provider);
@@ -989,6 +1032,7 @@
           patchNum,
           change
         );
+        if (reloadId !== this.reloadGeneration) return;
         assertIsDefined(this.patchRange, 'patchRange');
         if (
           !coverageRanges ||
@@ -1196,14 +1240,16 @@
     }
   }
 
-  private loadDiffAssets(diff?: DiffInfo) {
+  private loadDiffAssets(diff?: DiffInfo, reloadId = this.reloadGeneration) {
     if (isImageDiff(diff)) {
       // diff! is justified, because isImageDiff() returns false otherwise
       return this.getImages(diff!).then(images => {
+        if (reloadId !== this.reloadGeneration) return;
         this.baseImage = images.baseImage ?? undefined;
         this.revisionImage = images.revisionImage ?? undefined;
       });
     } else {
+      if (reloadId !== this.reloadGeneration) return Promise.resolve();
       this.baseImage = undefined;
       this.revisionImage = undefined;
       return Promise.resolve();
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host_screenshot_test.ts b/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host_screenshot_test.ts
index 81484e8..4c69898 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host_screenshot_test.ts
+++ b/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host_screenshot_test.ts
@@ -16,7 +16,7 @@
   createChange,
   createPatchRange,
 } from '../../../test/test-data-generators';
-import {EDIT, NumericChangeId} from '../../../types/common';
+import {EDIT} from '../../../types/common';
 import {DiffInfo, DiffViewMode} from '../../../api/diff';
 
 suite('gr-diff-host screenshot tests', () => {
@@ -78,7 +78,7 @@
 
     stubRestApi('getDiff').resolves(diff);
     element = await fixture<GrDiffHost>(html`<gr-diff-host
-      .changeNum=${42 as NumericChangeId}
+      .changeNum=${42}
       .path=${'sample.ts'}
       .change=${createChange()}
       .patchRange=${{
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host_test.ts b/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host_test.ts
index 0022d8c..07815d4 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host_test.ts
+++ b/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host_test.ts
@@ -89,7 +89,7 @@
   setup(async () => {
     stubRestApi('getAccount').callsFake(() => Promise.resolve(account));
     element = await fixture(html`<gr-diff-host
-      .changeNum=${123 as NumericChangeId}
+      .changeNum=${123}
       .path=${'some/path'}
       .file=${{path: 'some/path'}}
       .change=${createChange()}
@@ -2250,5 +2250,210 @@
       assert.isTrue(timeEndStub.calledBefore(reloadStub));
       assert.isTrue(reloadStub.calledBefore(onCompleteSpy));
     });
+
+    test('superseded reloadInternal ignores late getDiff resolution and emits no stale diff-changed', async () => {
+      const diffAPromise = mockPromise<DiffInfo>();
+      const diffBPromise = mockPromise<DiffInfo>();
+      const diffA: DiffInfo = {
+        ...createDiff(),
+        meta_b: {name: 'A.lean', content_type: 'text/x-lean', lines: 1},
+        content: [{ab: ['theorem from_a : True := trivial']}],
+      };
+      const diffB: DiffInfo = {
+        ...createDiff(),
+        meta_b: {name: 'B.lean', content_type: 'text/x-lean', lines: 1},
+        content: [{ab: ['theorem from_b : True := trivial']}],
+      };
+      getDiffRestApiStub.callsFake((_c, _base, _patch, path) => {
+        if (path === 'A.lean') return diffAPromise;
+        if (path === 'B.lean') return diffBPromise;
+        return Promise.resolve(createDiff());
+      });
+
+      const diffChangedEvents: Array<DiffInfo | undefined> = [];
+      element.addEventListener('diff-changed', (e: Event) => {
+        diffChangedEvents.push(
+          (e as CustomEvent<{value: DiffInfo | undefined}>).detail.value
+        );
+      });
+
+      element.changeNum = 42 as NumericChangeId;
+      element.change = createChange();
+      element.patchRange = createPatchRange();
+      element.path = 'A.lean';
+      await element.updateComplete;
+
+      const reloadA = element.reloadInternal();
+
+      // Navigate to B.lean and start a new reload while A.lean's getDiff is in flight.
+      element.path = 'B.lean';
+      await element.updateComplete;
+      const reloadB = element.reloadInternal();
+
+      // A.lean resolves late: must be ignored.
+      diffAPromise.resolve(diffA);
+      await reloadA;
+      assert.isUndefined(element.diff);
+      assert.isFalse(diffChangedEvents.includes(diffA));
+
+      // B.lean resolves: must populate element.diff.
+      diffBPromise.resolve(diffB);
+      await reloadB;
+      assert.equal(element.diff, diffB);
+    });
+
+    test('superseded reload does not clear newer reloadPromise so waitForReloadToRender waits for active reload', async () => {
+      const diffAPromise = mockPromise<DiffInfo>();
+      const diffBPromise = mockPromise<DiffInfo>();
+      const diffA: DiffInfo = {
+        ...createDiff(),
+        meta_b: {name: 'A.lean', content_type: 'text/x-lean', lines: 1},
+        content: [{ab: ['theorem from_a : True := trivial']}],
+      };
+      const diffB: DiffInfo = {
+        ...createDiff(),
+        meta_b: {name: 'B.lean', content_type: 'text/x-lean', lines: 1},
+        content: [{ab: ['theorem from_b : True := trivial']}],
+      };
+      getDiffRestApiStub.callsFake((_c, _base, _patch, path) => {
+        if (path === 'A.lean') return diffAPromise;
+        if (path === 'B.lean') return diffBPromise;
+        return Promise.resolve(createDiff());
+      });
+
+      element.changeNum = 42 as NumericChangeId;
+      element.change = createChange();
+      element.patchRange = createPatchRange();
+      element.prefs = createDefaultDiffPrefs();
+      element.path = 'A.lean';
+      await element.updateComplete;
+
+      // Flush reload A's debounce timer without awaiting completion so
+      // reloadInternal('A.lean') is actively in-flight awaiting diffAPromise.
+      const reloadAPromise = element.reload();
+      // @ts-expect-error flushing private reloadPromise without awaiting completion
+      void element.reloadPromise?.flush();
+      await Promise.resolve();
+
+      // Start reload B while reload A is still blocked on diffAPromise.
+      element.path = 'B.lean';
+      const reloadBPromise = element.reload();
+      // @ts-expect-error flushing private reloadPromise without awaiting completion
+      void element.reloadPromise?.flush();
+      await Promise.resolve();
+
+      // Superseded reload A resolves first; its finally block must NOT wipe out
+      // reload B's active reloadPromise.
+      diffAPromise.resolve(diffA);
+      await reloadAPromise;
+
+      let waitResolved = false;
+      const waitPromise = element.waitForReloadToRender().then(() => {
+        waitResolved = true;
+      });
+      await Promise.resolve();
+      await element.updateComplete;
+      assert.isFalse(waitResolved);
+
+      diffBPromise.resolve(diffB);
+      await waitPromise;
+      await reloadBPromise;
+      assert.isTrue(waitResolved);
+      assert.equal(element.diff, diffB);
+    });
+
+    test('superseded initLayers and loadDiffAssets ignore stale writes and avoid unhandled rejection when path clears', async () => {
+      const prefsAPromise = mockPromise<undefined>();
+      const diffAPromise = mockPromise<DiffInfo>();
+      const diffBPromise = mockPromise<DiffInfo>();
+      const imagesAPromise = mockPromise<{
+        baseImage: Base64ImageFile;
+        revisionImage: Base64ImageFile;
+      }>();
+      const imageA: DiffInfo = {
+        ...createDiff(),
+        meta_a: {name: 'a.png', content_type: 'image/png', lines: 0},
+        meta_b: {name: 'a.png', content_type: 'image/png', lines: 0},
+        content: [],
+      };
+      const textB: DiffInfo = {
+        ...createDiff(),
+        meta_b: {name: 'b.ts', content_type: 'text/typescript', lines: 1},
+        content: [{ab: ['export const b = 1;']}],
+      };
+
+      const prefsStub = stubRestApi('getPreferences');
+      let prefsCalls = 0;
+      prefsStub.callsFake(() => {
+        prefsCalls++;
+        return prefsCalls === 1 ? prefsAPromise : Promise.resolve(undefined);
+      });
+      getDiffRestApiStub.callsFake((_c, _base, _patch, path) => {
+        if (path === 'a.png') return diffAPromise;
+        if (path === 'b.ts') return diffBPromise;
+        return Promise.resolve(createDiff());
+      });
+      stubRestApi('getImagesForDiff').returns(imagesAPromise);
+
+      element.changeNum = 42 as NumericChangeId;
+      element.change = createChange();
+      element.patchRange = createPatchRange();
+      element.path = 'a.png';
+      await element.updateComplete;
+
+      // Case 1: Slow loadDiffAssets on reload A resolves after reload B takes over.
+      const reloadA = element.reloadInternal();
+      diffAPromise.resolve(imageA);
+      prefsAPromise.resolve(undefined);
+      await Promise.resolve();
+
+      element.path = 'b.ts';
+      await element.updateComplete;
+      const reloadB = element.reloadInternal();
+      diffBPromise.resolve(textB);
+      await reloadB;
+      // @ts-expect-error reading private baseImage
+      assert.isUndefined(element.baseImage);
+      // @ts-expect-error reading private revisionImage
+      assert.isUndefined(element.revisionImage);
+
+      const staleImg = {
+        type: 'image/png',
+        body: 'abc',
+        _expectedType: 'image/png',
+      } as unknown as Base64ImageFile;
+      imagesAPromise.resolve({baseImage: staleImg, revisionImage: staleImg});
+      await reloadA;
+      // @ts-expect-error reading private baseImage
+      assert.isUndefined(element.baseImage);
+      // @ts-expect-error reading private revisionImage
+      assert.isUndefined(element.revisionImage);
+
+      // Case 2: initLayers in-flight when reload is superseded and path becomes undefined.
+      const slowPrefsPromise = mockPromise<undefined>();
+      const diffCPromise = mockPromise<DiffInfo>();
+      getDiffRestApiStub.callsFake(() => diffCPromise);
+      prefsStub.returns(slowPrefsPromise);
+      element.path = 'a.png';
+      const reloadC = element.reloadInternal();
+      // Clear path and supersede reloadC before resolving slowPrefsPromise/diffCPromise.
+      element.path = undefined;
+      // @ts-expect-error setting private coverageRanges and reloadGeneration
+      element.coverageRanges = [
+        {
+          type: CoverageType.COVERED,
+          side: Side.RIGHT,
+          code_range: {start_line: 1, end_line: 1},
+        },
+      ];
+      // @ts-expect-error bumping private reloadGeneration
+      element.reloadGeneration++;
+      diffCPromise.resolve(textB);
+      slowPrefsPromise.resolve(undefined);
+      await reloadC;
+      // Stale initLayers must neither throw assertIsDefined(this.path) nor clobber coverageRanges.
+      // @ts-expect-error reading private coverageRanges
+      assert.equal(element.coverageRanges.length, 1);
+    });
   });
 });
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-lean-viewer/gr-diff-lean-viewer.ts b/polygerrit-ui/app/elements/diff/gr-diff-lean-viewer/gr-diff-lean-viewer.ts
new file mode 100644
index 0000000..0e28f68
--- /dev/null
+++ b/polygerrit-ui/app/elements/diff/gr-diff-lean-viewer/gr-diff-lean-viewer.ts
@@ -0,0 +1,2944 @@
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import {
+  css,
+  html,
+  LitElement,
+  nothing,
+  PropertyValues,
+  TemplateResult,
+} from 'lit';
+import {customElement, property, query, state} from 'lit/decorators.js';
+import {classMap} from 'lit/directives/class-map.js';
+import {ifDefined} from 'lit/directives/if-defined.js';
+import {when} from 'lit/directives/when.js';
+import '../../shared/gr-button/gr-button';
+import '../../shared/gr-icon/gr-icon';
+import '../../shared/gr-comment-thread/gr-comment-thread';
+import type {GrCommentThread} from '../../shared/gr-comment-thread/gr-comment-thread';
+import {DiffInfo} from '../../../types/diff';
+import {CommentSide, DiffViewMode, Side} from '../../../constants/constants';
+import {
+  CommentThread,
+  DraftInfo,
+  EDIT,
+  PARENT,
+  PatchRange,
+  PatchSetNum,
+  RevisionPatchSetNum,
+} from '../../../types/common';
+import {resolve} from '../../../models/dependency';
+import {browserModelToken} from '../../../models/browser/browser-model';
+import {commentsModelToken} from '../../../models/comments/comments-model';
+import {userModelToken} from '../../../models/user/user-model';
+import {ChangeComments} from '../gr-comment-api/gr-comment-api';
+import {subscribe} from '../../lit/subscription-controller';
+import {createNew} from '../../../utils/comment-util';
+import {
+  getParentIndex,
+  isAParent,
+  isMergeParent,
+} from '../../../utils/patch-set-util';
+import {assertIsDefined} from '../../../utils/common-util';
+import {countLines} from '../../../utils/diff-util';
+import {fire, fireAlert} from '../../../utils/event-util';
+import {
+  getThreadDiffSide,
+  reconstructFileContent,
+  renderInlineMarkdown,
+} from '../gr-diff-markdown-viewer/markdown-diff-util';
+import {
+  AlignedLeanRow,
+  AlignedLeanRowWithThreads,
+  alignLeanBlocks,
+  attachThreadsToLeanRows,
+  computeBlockCommentDepths,
+  computeLeanSummary,
+  formatLineRange,
+  highlightLeanLine,
+  LeanAlignedCodeLine,
+  LeanAlignedField,
+  LeanBlock,
+  LeanCodeLine,
+  LeanDeclarationDetails,
+  LeanDeclarationDiffData,
+  LeanDeclKind,
+  LeanDiffSummary,
+  LeanFileCounts,
+  LeanHighlightOptions,
+  LeanInductiveCtor,
+  LeanStructureField,
+  parseLeanBlocks,
+  renderMarkdownContent,
+} from './lean-diff-util';
+
+const PROOF_COLLAPSIBLE_KINDS = new Set<LeanDeclKind>([
+  'theorem',
+  'lemma',
+  'example',
+]);
+
+@customElement('gr-diff-lean-viewer')
+export class GrDiffLeanViewer extends LitElement {
+  @property({type: Object}) diff?: DiffInfo;
+
+  @property({type: String}) path?: string;
+
+  @property({type: Object}) patchRange?: PatchRange;
+
+  @property({type: Array}) threads?: CommentThread[];
+
+  @property({type: String}) viewMode: DiffViewMode = DiffViewMode.SIDE_BY_SIDE;
+
+  @property({type: Boolean}) loggedIn = false;
+
+  @property({type: Boolean}) collapseProofs = false;
+
+  @state() alignedRows: AlignedLeanRow[] = [];
+
+  @state() summary?: LeanDiffSummary;
+
+  @state() private internalThreads: CommentThread[] = [];
+
+  @state() private changeComments?: ChangeComments;
+
+  /**
+   * Per-row manual proof collapse overrides keyed by `row.rowKey`.
+   * Cleared whenever the global `collapseProofs` toggle is clicked.
+   */
+  @state() private proofCollapseOverrides = new Map<string, boolean>();
+
+  @query('#selection-action-box')
+  private selectionActionBox?: HTMLElement;
+
+  private selectionActionBoxVisible = false;
+
+  private selectionBoxPositionBelow = false;
+
+  private selectionBoxTop = 0;
+
+  private selectionBoxLeft = 0;
+
+  private selectedSide?: Side;
+
+  private selectedLine?: number;
+
+  private hoveredSide?: Side;
+
+  private hoveredLine?: number;
+
+  private readonly getBrowserModel = resolve(this, browserModelToken);
+
+  private readonly getCommentsModel = resolve(this, commentsModelToken);
+
+  private readonly getUserModel = resolve(this, userModelToken);
+
+  constructor() {
+    super();
+    subscribe(
+      this,
+      () => this.getBrowserModel().diffViewMode$,
+      mode => {
+        if (mode) this.viewMode = mode;
+      }
+    );
+    subscribe(
+      this,
+      () => this.getCommentsModel().changeComments$,
+      changeComments => {
+        this.changeComments = changeComments;
+        this.updateInternalThreads();
+      }
+    );
+    subscribe(
+      this,
+      () => this.getUserModel().loggedIn$,
+      loggedIn => {
+        this.loggedIn = loggedIn;
+      }
+    );
+  }
+
+  override connectedCallback() {
+    super.connectedCallback();
+    document.addEventListener('selectionchange', this.handleSelectionChange);
+    window.addEventListener('keydown', this.handleKeyDown);
+  }
+
+  override disconnectedCallback() {
+    super.disconnectedCallback();
+    document.removeEventListener('selectionchange', this.handleSelectionChange);
+    window.removeEventListener('keydown', this.handleKeyDown);
+  }
+
+  get effectiveThreads(): CommentThread[] {
+    return this.threads ?? this.internalThreads;
+  }
+
+  get filePath(): string | undefined {
+    return this.path ?? this.diff?.meta_b?.name ?? this.diff?.meta_a?.name;
+  }
+
+  private updateInternalThreads() {
+    if (!this.changeComments || !this.patchRange || !this.filePath) {
+      this.internalThreads = [];
+      return;
+    }
+    const basePath =
+      this.diff?.meta_a?.name && this.diff.meta_a.name !== this.filePath
+        ? this.diff.meta_a.name
+        : undefined;
+    this.internalThreads = this.changeComments.getThreadsBySideForFile(
+      {path: this.filePath, basePath},
+      this.patchRange
+    );
+  }
+
+  static override get styles() {
+    return [
+      css`
+        :host {
+          display: block;
+          position: relative;
+          background-color: var(--view-background-color, #ffffff);
+          color: var(--primary-text-color, #202124);
+          font-family: var(--font-family, Roboto, sans-serif);
+          font-size: var(--font-size-normal, 14px);
+          line-height: var(--line-height-normal, 1.5);
+        }
+
+        /* Summary & Soundness Hygiene Toolbar */
+        .lean-summary-bar {
+          display: flex;
+          flex-wrap: wrap;
+          align-items: center;
+          justify-content: space-between;
+          gap: var(--spacing-s, 8px);
+          padding: var(--spacing-s, 8px) var(--spacing-m, 12px);
+          background-color: var(--background-color-secondary, #f8f9fa);
+          border-bottom: 1px solid var(--border-color, #e0e0e0);
+          font-size: var(--font-size-small, 12px);
+        }
+        .summary-left,
+        .summary-right {
+          display: flex;
+          flex-wrap: wrap;
+          align-items: center;
+          gap: var(--spacing-s, 8px);
+        }
+        .lean-lang-pill {
+          display: inline-flex;
+          align-items: center;
+          gap: 4px;
+          padding: 2px 8px;
+          border-radius: 12px;
+          background-color: var(--info-background, #e8f0fe);
+          color: var(--info-foreground, #174ea6);
+          font-weight: var(--font-weight-bold, 600);
+          letter-spacing: 0.2px;
+        }
+        .lean-lang-pill gr-icon {
+          --gr-icon-size: 14px;
+          color: inherit;
+        }
+        .hygiene-pill {
+          display: inline-flex;
+          align-items: center;
+          gap: 4px;
+          padding: 2px 8px;
+          border-radius: 12px;
+          font-weight: var(--font-weight-bold, 600);
+        }
+        .hygiene-pill gr-icon {
+          --gr-icon-size: 14px;
+          color: inherit;
+        }
+        .hygiene-pill.verified {
+          background-color: var(--success-background, #e6f4ea);
+          color: var(--success-foreground, #137333);
+        }
+        .hygiene-pill.error {
+          background-color: var(--error-background, #fce8e6);
+          color: var(--error-foreground, #c5221f);
+        }
+        .hygiene-pill.warning {
+          background-color: var(--warning-background, #fef7e0);
+          color: var(--warning-foreground, #b06000);
+        }
+        .hygiene-pill.partial {
+          background-color: var(
+            --chip-background-color,
+            rgba(95, 99, 104, 0.12)
+          );
+          color: var(--deemphasized-text-color, #5f6368);
+        }
+        .summary-stats {
+          display: inline-flex;
+          flex-wrap: wrap;
+          align-items: center;
+          gap: 6px;
+          color: var(--deemphasized-text-color, #5f6368);
+        }
+        .summary-stat-sep {
+          opacity: 0.5;
+        }
+        .summary-deltas {
+          display: inline-flex;
+          align-items: center;
+          gap: 4px;
+          font-family: var(--monospace-font-family, 'Roboto Mono', monospace);
+          font-size: 11px;
+        }
+        .delta-add {
+          color: var(--positive-green-text-color, #188038);
+          font-weight: 600;
+        }
+        .delta-del {
+          color: var(--negative-red-text-color, #d93025);
+          font-weight: 600;
+        }
+        .delta-mod {
+          color: var(--link-color, #1a73e8);
+          font-weight: 600;
+        }
+        .proof-collapse-btn {
+          display: inline-flex;
+          align-items: center;
+          gap: 4px;
+          padding: 3px 10px;
+          border-radius: 14px;
+          border: 1px solid var(--border-color, #dadce0);
+          background-color: var(--background-color-primary, #ffffff);
+          color: var(--primary-text-color, #202124);
+          font-family: inherit;
+          font-size: var(--font-size-small, 12px);
+          font-weight: var(--font-weight-medium, 500);
+          cursor: pointer;
+        }
+        .proof-collapse-btn:hover {
+          background-color: var(
+            --hover-background-color,
+            rgba(26, 115, 232, 0.08)
+          );
+        }
+        .proof-collapse-btn gr-icon {
+          --gr-icon-size: 16px;
+          color: var(--deemphasized-text-color, #5f6368);
+        }
+
+        /* File-level threads */
+        .file-level-threads {
+          padding: var(--spacing-m, 12px) var(--spacing-l, 16px);
+          background-color: var(--background-color-secondary, #f8f9fa);
+          border-bottom: 1px solid var(--border-color, #e0e0e0);
+          display: flex;
+          flex-direction: column;
+          gap: var(--spacing-s, 8px);
+        }
+        .file-level-title {
+          font-size: var(--font-size-small, 12px);
+          font-weight: var(--font-weight-bold, 600);
+          color: var(--deemphasized-text-color, #5f6368);
+          text-transform: uppercase;
+        }
+
+        /* Side-by-side & Unified Grid Layout */
+        .column-headers {
+          display: grid;
+          grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
+          column-gap: var(--spacing-m, 12px);
+          padding: var(--spacing-xs, 4px) var(--spacing-m, 12px);
+          border-bottom: 1px solid var(--border-color, #e0e0e0);
+          background-color: var(--background-color-secondary, #f8f9fa);
+          color: var(--deemphasized-text-color, #5f6368);
+          font-size: var(--font-size-small, 12px);
+          font-weight: var(--font-weight-bold, 600);
+          text-transform: uppercase;
+          letter-spacing: 0.5px;
+        }
+        .diff-grid {
+          display: grid;
+          grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
+          column-gap: var(--spacing-m, 12px);
+          row-gap: var(--spacing-s, 8px);
+          padding: var(--spacing-m, 12px);
+        }
+        .diff-cell {
+          position: relative;
+          min-width: 0;
+          overflow-wrap: break-word;
+          padding: var(--spacing-xs, 4px) var(--spacing-s, 8px);
+          border-left: 3px solid transparent;
+          box-sizing: border-box;
+          display: flex;
+          flex-direction: column;
+        }
+        .diff-cell.empty {
+          background-color: var(--diff-blank-background-color, transparent);
+          min-height: 20px;
+        }
+        .diff-cell.added,
+        .diff-cell.modified-right {
+          border-left-color: var(--positive-green-text-color, #2da44e);
+          background-color: var(--light-add-highlight-color, #e6ffec);
+          border-radius: 0 6px 6px 0;
+        }
+        .diff-cell.deleted,
+        .diff-cell.modified-left {
+          border-left-color: var(--negative-red-text-color, #cf222e);
+          background-color: var(--light-remove-highlight-color, #ffebe9);
+          border-radius: 0 6px 6px 0;
+        }
+        .unified-container {
+          box-sizing: border-box;
+          max-width: 100%;
+          padding: var(--spacing-m, 12px) var(--spacing-l, 16px);
+        }
+        .unified-block {
+          position: relative;
+          border-left: 3px solid transparent;
+          box-sizing: border-box;
+          margin-bottom: var(--spacing-s, 8px);
+          overflow-wrap: break-word;
+          padding: var(--spacing-xs, 4px) var(--spacing-s, 8px);
+          display: flex;
+          flex-direction: column;
+        }
+        .unified-block.added {
+          border-left-color: var(--positive-green-text-color, #2da44e);
+          background-color: var(--light-add-highlight-color, #e6ffec);
+          border-radius: 0 6px 6px 0;
+        }
+        .unified-block.deleted {
+          border-left-color: var(--negative-red-text-color, #cf222e);
+          background-color: var(--light-remove-highlight-color, #ffebe9);
+          border-radius: 0 6px 6px 0;
+        }
+        .unified-block.unchanged {
+          border-left-color: transparent;
+        }
+
+        /* Hover Comment Button & Selection Popover */
+        .cell-action-bar {
+          position: absolute;
+          top: 6px;
+          right: 10px;
+          z-index: 10;
+          pointer-events: none;
+        }
+        .add-comment-btn {
+          pointer-events: auto;
+          opacity: 0;
+          visibility: hidden;
+          transition: opacity 0.15s ease-in-out;
+          background-color: var(--background-color-primary, #ffffff);
+          color: var(--primary-text-color, #202124);
+          border: 1px solid var(--border-color, #dadce0);
+          border-radius: 16px;
+          padding: 2px 8px;
+          font-size: var(--font-size-small, 12px);
+          font-weight: var(--font-weight-medium, 500);
+          box-shadow: var(--elevation-level-1, 0 1px 3px rgba(60, 64, 67, 0.3));
+          display: inline-flex;
+          align-items: center;
+          gap: 4px;
+          cursor: pointer;
+          user-select: none;
+          line-height: 18px;
+        }
+        .add-comment-btn gr-icon {
+          --gr-icon-size: 16px;
+          color: var(--primary-text-color, #202124);
+        }
+        .diff-cell:hover .add-comment-btn,
+        .unified-block:hover .add-comment-btn {
+          opacity: 1;
+          visibility: visible;
+        }
+        .add-comment-btn:hover {
+          background: linear-gradient(
+              var(--hover-background-color, rgba(161, 194, 250, 0.2)),
+              var(--hover-background-color, rgba(161, 194, 250, 0.2))
+            ),
+            var(--background-color-primary, #ffffff);
+          box-shadow: var(--elevation-level-2, 0 2px 6px rgba(60, 64, 67, 0.3));
+        }
+        .selection-action-box {
+          position: absolute;
+          z-index: 500;
+          transform: translate(-50%, -100%);
+          margin-top: -6px;
+        }
+        .selection-action-box.below {
+          transform: translate(-50%, 0);
+          margin-top: 6px;
+        }
+        .selection-comment-btn {
+          background-color: var(--background-color-primary, #ffffff);
+          color: var(--primary-text-color, #202124);
+          border: 1px solid var(--border-color, #dadce0);
+          border-radius: 16px;
+          padding: 4px 12px;
+          font-size: var(--font-size-small, 12px);
+          font-weight: var(--font-weight-medium, 500);
+          box-shadow: var(--elevation-level-2, 0 2px 6px rgba(60, 64, 67, 0.3));
+          display: inline-flex;
+          align-items: center;
+          gap: 6px;
+          cursor: pointer;
+          white-space: nowrap;
+          user-select: none;
+        }
+        .selection-comment-btn gr-icon {
+          --gr-icon-size: 16px;
+          color: var(--primary-text-color, #202124);
+        }
+        .comment-thread {
+          display: block;
+          max-width: 100%;
+        }
+        .cell-content {
+          min-width: 0;
+        }
+        .threads-container {
+          margin-top: var(--spacing-s, 8px);
+          padding-top: var(--spacing-xs, 4px);
+          display: flex;
+          flex-direction: column;
+          gap: var(--spacing-s, 8px);
+        }
+
+        /* Module Docstring Card */
+        .lean-module-doc {
+          background-color: var(--background-color-primary, #ffffff);
+          border: 1px solid var(--border-color, #e0e0e0);
+          border-left: 3px solid var(--link-color, #1a73e8);
+          border-radius: 6px;
+          padding: var(--spacing-m, 12px) var(--spacing-l, 16px);
+        }
+        .lean-module-doc-header {
+          display: flex;
+          align-items: center;
+          justify-content: space-between;
+          margin-bottom: var(--spacing-xs, 4px);
+          font-size: 11px;
+          font-weight: var(--font-weight-bold, 600);
+          text-transform: uppercase;
+          letter-spacing: 0.4px;
+          color: var(--deemphasized-text-color, #5f6368);
+        }
+
+        /* Section Banner */
+        .lean-section-banner {
+          display: flex;
+          align-items: center;
+          justify-content: space-between;
+          gap: var(--spacing-s, 8px);
+          padding: var(--spacing-xs, 4px) var(--spacing-s, 8px);
+          margin-top: var(--spacing-xs, 4px);
+          border-bottom: 2px solid var(--border-color, #dadce0);
+        }
+        .lean-section-banner h3 {
+          margin: 0;
+          font-size: 14px;
+          font-weight: var(--font-weight-bold, 600);
+          color: var(--primary-text-color, #202124);
+        }
+
+        /* Imports, Directives, Comments */
+        .lean-strip-block {
+          background-color: var(--background-color-primary, #ffffff);
+          border: 1px solid var(--border-color, #e0e0e0);
+          border-radius: 6px;
+          overflow: hidden;
+        }
+        .lean-strip-block.comment {
+          background-color: var(--background-color-secondary, #f8f9fa);
+          border-style: dashed;
+        }
+        .lean-strip-block.license {
+          opacity: 0.82;
+          font-size: 11px;
+        }
+
+        /* Declaration Card */
+        .lean-decl-card {
+          background-color: var(--background-color-primary, #ffffff);
+          border: 1px solid var(--border-color, #dadce0);
+          border-radius: 6px;
+          overflow: hidden;
+          box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
+        }
+        .lean-decl-card.cat-theorem {
+          border-top: 2px solid var(--info-foreground, #1a73e8);
+        }
+        .lean-decl-card.cat-type {
+          border-top: 2px solid var(--syntax-keyword-color, #9e0069);
+        }
+        .lean-decl-card.cat-def {
+          border-top: 2px solid var(--deemphasized-text-color, #5f6368);
+        }
+        .lean-decl-card.cat-instance {
+          border-top: 2px solid var(--success-foreground, #188038);
+        }
+        .lean-decl-card.cat-axiom {
+          border-top: 2px solid var(--error-foreground, #c5221f);
+        }
+        .lean-decl-card.has-hygiene-alert {
+          border-color: var(--error-foreground, #d93025);
+        }
+        .lean-decl-card.compact {
+          border-top-width: 1px;
+          box-shadow: none;
+          padding: 2px 0;
+        }
+        .lean-decl-header {
+          display: flex;
+          flex-wrap: wrap;
+          align-items: center;
+          justify-content: space-between;
+          gap: 6px;
+          padding: 6px 10px;
+          background-color: var(--background-color-secondary, #f8f9fa);
+          border-bottom: 1px solid var(--border-color, #e0e0e0);
+        }
+        .lean-decl-header-main {
+          display: flex;
+          flex-wrap: wrap;
+          align-items: center;
+          gap: 6px;
+          min-width: 0;
+        }
+        .lean-decl-header-meta {
+          display: flex;
+          align-items: center;
+          gap: 6px;
+          flex-shrink: 0;
+        }
+        .lean-kind-badge {
+          display: inline-flex;
+          align-items: center;
+          gap: 3px;
+          padding: 1px 7px;
+          border-radius: 10px;
+          font-family: var(--monospace-font-family, 'Roboto Mono', monospace);
+          font-size: 11px;
+          font-weight: var(--font-weight-bold, 600);
+          line-height: 16px;
+          letter-spacing: 0.1px;
+        }
+        .lean-kind-badge gr-icon {
+          --gr-icon-size: 13px;
+          color: inherit;
+        }
+        .lean-kind-badge.cat-theorem {
+          background-color: var(--info-background, #e8f0fe);
+          color: var(--info-foreground, #174ea6);
+        }
+        .lean-kind-badge.cat-type {
+          background-color: rgba(158, 0, 105, 0.12);
+          color: var(--syntax-keyword-color, #9e0069);
+        }
+        .lean-kind-badge.cat-def {
+          background-color: var(--background-color-tertiary, #eceff1);
+          color: var(--primary-text-color, #202124);
+        }
+        .lean-kind-badge.cat-instance {
+          background-color: var(--success-background, #e6f4ea);
+          color: var(--success-foreground, #137333);
+        }
+        .lean-kind-badge.cat-axiom {
+          background-color: var(--error-background, #fce8e6);
+          color: var(--error-foreground, #c5221f);
+        }
+        .lean-decl-name {
+          font-family: var(--monospace-font-family, 'Roboto Mono', monospace);
+          font-size: 13px;
+          font-weight: var(--font-weight-bold, 600);
+          color: var(--primary-text-color, #202124);
+          word-break: break-word;
+        }
+        .lean-meta-chip,
+        .lean-attr-chip,
+        .lean-strategy-chip {
+          display: inline-flex;
+          align-items: center;
+          padding: 0 6px;
+          border-radius: 4px;
+          font-family: var(--monospace-font-family, 'Roboto Mono', monospace);
+          font-size: 11px;
+          line-height: 17px;
+        }
+        .lean-meta-chip {
+          background-color: var(--background-color-tertiary, #eceff1);
+          color: var(--deemphasized-text-color, #5f6368);
+        }
+        .lean-attr-chip {
+          background-color: var(--background-color-primary, #ffffff);
+          border: 1px solid var(--border-color, #dadce0);
+          color: var(--syntax-attr-color, #219);
+        }
+        .lean-strategy-chip {
+          background-color: var(--background-color-primary, #ffffff);
+          border: 1px solid var(--border-color, #dadce0);
+          color: var(--deemphasized-text-color, #5f6368);
+        }
+        .lean-strategy-chip.decide {
+          background-color: var(--success-background, #e6f4ea);
+          border-color: transparent;
+          color: var(--success-foreground, #137333);
+        }
+        .lean-hygiene-badge {
+          display: inline-flex;
+          align-items: center;
+          gap: 3px;
+          padding: 1px 6px;
+          border-radius: 10px;
+          font-family: var(--monospace-font-family, 'Roboto Mono', monospace);
+          font-size: 11px;
+          font-weight: 700;
+        }
+        .lean-hygiene-badge gr-icon {
+          --gr-icon-size: 13px;
+          color: inherit;
+        }
+        .lean-hygiene-badge.error {
+          background-color: var(--error-background, #fce8e6);
+          color: var(--error-foreground, #c5221f);
+        }
+        .lean-hygiene-badge.warning {
+          background-color: var(--warning-background, #fef7e0);
+          color: var(--warning-foreground, #b06000);
+        }
+        .lean-line-range {
+          font-family: var(--monospace-font-family, 'Roboto Mono', monospace);
+          font-size: 11px;
+          color: var(--deemphasized-text-color, #5f6368);
+          white-space: nowrap;
+        }
+
+        /* Docstring inside Declaration Card */
+        .lean-decl-doc {
+          padding: 8px 12px;
+          background-color: var(--background-color-primary, #ffffff);
+          border-bottom: 1px solid var(--border-color, #e0e0e0);
+          font-size: 13px;
+          color: var(--primary-text-color, #202124);
+        }
+        .lean-decl-doc > :last-child {
+          margin-bottom: 0;
+        }
+
+        /* Signature Box */
+        .lean-decl-signature {
+          padding: 4px 0;
+          background-color: var(--background-color-primary, #ffffff);
+        }
+        .lean-decl-signature.has-body {
+          border-bottom: 1px solid var(--border-color, #e0e0e0);
+        }
+
+        /* Collapsible Proof Bar & Body */
+        .lean-proof-bar {
+          display: flex;
+          align-items: center;
+          justify-content: space-between;
+          width: 100%;
+          box-sizing: border-box;
+          padding: 4px 10px;
+          border: none;
+          background-color: var(--background-color-secondary, #f8f9fa);
+          color: var(--deemphasized-text-color, #5f6368);
+          font-family: inherit;
+          font-size: 11px;
+          font-weight: var(--font-weight-medium, 500);
+          cursor: pointer;
+          text-align: left;
+        }
+        .lean-proof-bar:hover {
+          background-color: var(
+            --hover-background-color,
+            rgba(26, 115, 232, 0.08)
+          );
+          color: var(--primary-text-color, #202124);
+        }
+        .lean-proof-bar-left {
+          display: inline-flex;
+          align-items: center;
+          gap: 4px;
+        }
+        .lean-proof-bar gr-icon {
+          --gr-icon-size: 16px;
+          color: inherit;
+        }
+        .lean-proof-changed-pill {
+          padding: 0 6px;
+          border-radius: 8px;
+          background-color: var(--info-background, #e8f0fe);
+          color: var(--info-foreground, #174ea6);
+          font-size: 10px;
+          font-weight: 600;
+        }
+        .lean-body-section {
+          padding: 4px 0;
+          background-color: var(--background-color-primary, #ffffff);
+        }
+
+        /* Code Lines with Clickable Line Numbers */
+        .lean-code-lines {
+          font-family: var(--monospace-font-family, 'Roboto Mono', monospace);
+          font-size: var(--font-size-code, 12px);
+          line-height: 1.48;
+        }
+        .lean-code-line {
+          display: grid;
+          grid-template-columns: 44px minmax(0, 1fr);
+          align-items: baseline;
+          min-height: 19px;
+        }
+        .lean-code-line:hover {
+          background-color: var(
+            --hover-background-color,
+            rgba(161, 194, 250, 0.14)
+          );
+        }
+        .lean-code-line.line-added {
+          background-color: var(--light-add-highlight-color, #d8fed8);
+        }
+        .lean-code-line.line-deleted {
+          background-color: var(--light-remove-highlight-color, #ffebee);
+        }
+        .lean-code-line.line-placeholder {
+          background-color: var(
+            --diff-blank-background-color,
+            rgba(0, 0, 0, 0.03)
+          );
+          user-select: none;
+        }
+        .lean-line-num {
+          border: none;
+          background: transparent;
+          color: var(--deemphasized-text-color, #5f6368);
+          font-family: var(--monospace-font-family, 'Roboto Mono', monospace);
+          font-size: 11px;
+          text-align: right;
+          padding: 0 8px 0 4px;
+          cursor: pointer;
+          user-select: none;
+          opacity: 0.72;
+          line-height: inherit;
+        }
+        .lean-line-num:hover {
+          opacity: 1;
+          color: var(--link-color, #1a73e8);
+          text-decoration: underline;
+        }
+        .lean-line-num.placeholder {
+          cursor: default;
+          pointer-events: none;
+        }
+        .lean-code-text {
+          white-space: pre-wrap;
+          overflow-wrap: break-word;
+          padding: 0 10px 0 4px;
+          min-width: 0;
+        }
+
+        /* Structure Fields & Inductive Constructors Tables */
+        .lean-fields-table {
+          width: 100%;
+          border-collapse: collapse;
+          margin: 0;
+          font-size: var(--font-size-code, 12px);
+        }
+        .lean-fields-table th {
+          background-color: var(--background-color-secondary, #f8f9fa);
+          color: var(--deemphasized-text-color, #5f6368);
+          font-size: 11px;
+          font-weight: var(--font-weight-bold, 600);
+          text-transform: uppercase;
+          letter-spacing: 0.3px;
+          padding: 4px 8px;
+          border-top: none;
+          border-left: none;
+          border-right: none;
+          border-bottom: 1px solid var(--border-color, #e0e0e0);
+          text-align: left;
+        }
+        .lean-fields-table td {
+          padding: 4px 8px;
+          border-left: none;
+          border-right: none;
+          border-top: none;
+          border-bottom: 1px solid var(--border-color, #e0e0e0);
+          vertical-align: top;
+        }
+        .lean-fields-table tr:last-child td {
+          border-bottom: none;
+        }
+        .lean-fields-table tr.field-added td {
+          background-color: var(--light-add-highlight-color, #d8fed8);
+        }
+        .lean-fields-table tr.field-deleted td {
+          background-color: var(--light-remove-highlight-color, #ffebee);
+        }
+        .lean-fields-table tr.field-placeholder td {
+          background-color: var(
+            --diff-blank-background-color,
+            rgba(0, 0, 0, 0.03)
+          );
+          user-select: none;
+        }
+        .lean-field-line-col {
+          width: 36px;
+          padding-left: 2px !important;
+          padding-right: 4px !important;
+          text-align: right;
+        }
+        .lean-field-name {
+          font-family: var(--monospace-font-family, 'Roboto Mono', monospace);
+          font-weight: var(--font-weight-bold, 600);
+          color: var(--primary-text-color, #202124);
+          white-space: nowrap;
+        }
+        .lean-field-type {
+          font-family: var(--monospace-font-family, 'Roboto Mono', monospace);
+          white-space: normal;
+          overflow-wrap: break-word;
+        }
+        .lean-field-default {
+          color: var(--deemphasized-text-color, #5f6368);
+        }
+        .lean-field-notes {
+          font-family: var(--font-family, Roboto, sans-serif);
+          font-size: 12px;
+          color: var(--deemphasized-text-color, #5f6368);
+        }
+        .lean-field-notes p {
+          margin: 0;
+        }
+        .lean-deriving-row {
+          display: flex;
+          flex-wrap: wrap;
+          align-items: center;
+          gap: 6px;
+          padding: 5px 10px;
+          background-color: var(--background-color-secondary, #f8f9fa);
+          border-top: 1px solid var(--border-color, #e0e0e0);
+          font-family: var(--monospace-font-family, 'Roboto Mono', monospace);
+          font-size: 11px;
+        }
+        .lean-deriving-label {
+          color: var(--syntax-keyword-color, #9e0069);
+          font-weight: 600;
+        }
+        .lean-deriving-chip {
+          padding: 0 6px;
+          border-radius: 4px;
+          background-color: var(--background-color-primary, #ffffff);
+          border: 1px solid var(--border-color, #dadce0);
+          color: var(--syntax-type-color, #6d4c41);
+        }
+
+        /* Syntax Highlighting (Gerrit native theme tokens) */
+        .lean-tok-keyword {
+          color: var(--syntax-keyword-color, #9e0069);
+          font-weight: 500;
+        }
+        .lean-tok-tactic {
+          color: var(--syntax-built_in-color, #00599b);
+        }
+        .lean-tok-type {
+          color: var(--syntax-type-color, #6d4c41);
+        }
+        .lean-tok-comment {
+          color: var(--syntax-comment-color, #3f7f5f);
+          font-style: italic;
+        }
+        .lean-tok-string {
+          color: var(--syntax-string-color, #219161);
+        }
+        .lean-tok-number {
+          color: var(--syntax-number-color, #164);
+        }
+        .lean-tok-literal {
+          color: var(--syntax-literal-color, #219161);
+        }
+        .lean-tok-attribute {
+          color: var(--syntax-attr-color, #219);
+        }
+        .lean-tok-operator {
+          color: var(--syntax-meta-color, #6d4c41);
+        }
+        /* Lock fallback Unicode math operators to a single monospace cell so
+         * OS-dependent fallback glyph advance widths cannot shift column
+         * alignment across the remainder of a code line. */
+        .lean-tok-unicode-op {
+          display: inline-block;
+          width: 1ch;
+          text-align: center;
+        }
+        .lean-tok-bullet {
+          color: var(--link-color, #1a73e8);
+          font-weight: 700;
+        }
+        .lean-tok-sorry {
+          color: var(--error-foreground, #c5221f);
+          background-color: var(--error-background, #fce8e6);
+          border-radius: 3px;
+          padding: 0 4px;
+          font-weight: 700;
+        }
+
+        /* Intra-line Delta Highlights */
+        .diff-highlight-add,
+        ins {
+          background-color: var(--dark-add-highlight-color, #aaf2aa);
+          text-decoration: none;
+          border-radius: 3px;
+          padding: 0 2px;
+          box-decoration-break: clone;
+          -webkit-box-decoration-break: clone;
+        }
+        .diff-highlight-del,
+        del {
+          background-color: var(--dark-remove-highlight-color, #ffcdd2);
+          text-decoration: none;
+          border-radius: 3px;
+          padding: 0 2px;
+          box-decoration-break: clone;
+          -webkit-box-decoration-break: clone;
+        }
+
+        /* Markdown Typography for Module Docs & Docstrings */
+        .lean-md h1,
+        .lean-md h2,
+        .lean-md h3,
+        .lean-md h4,
+        .lean-md h5,
+        .lean-md h6 {
+          margin-top: 0;
+          margin-bottom: var(--spacing-xs, 4px);
+          color: var(--primary-text-color, #202124);
+        }
+        .lean-md h1 {
+          font-size: 1.35em;
+          border-bottom: 1px solid var(--border-color, #e0e0e0);
+          padding-bottom: 3px;
+        }
+        .lean-md h2 {
+          font-size: 1.18em;
+        }
+        .lean-md h3 {
+          font-size: 1.05em;
+        }
+        .lean-md p {
+          margin-top: 0;
+          margin-bottom: var(--spacing-xs, 4px);
+        }
+        .lean-md p:last-child {
+          margin-bottom: 0;
+        }
+        .lean-md a {
+          color: var(--link-color, #1a73e8);
+          text-decoration: underline;
+        }
+        .lean-md code,
+        .lean-section-banner code,
+        .lean-field-notes code {
+          font-family: var(--monospace-font-family, 'Roboto Mono', monospace);
+          font-size: 12px;
+          background-color: var(--background-color-secondary, #f1f3f4);
+          padding: 1px 4px;
+          border-radius: 3px;
+        }
+        .lean-md pre {
+          background-color: var(--background-color-secondary, #f8f9fa);
+          border: 1px solid var(--border-color, #e0e0e0);
+          border-radius: 4px;
+          padding: var(--spacing-s, 8px);
+          overflow-x: auto;
+          margin: 4px 0;
+        }
+        .lean-md pre code {
+          background-color: transparent;
+          padding: 0;
+          display: block;
+          white-space: pre-wrap;
+          overflow-wrap: break-word;
+        }
+        .lean-md ul,
+        .lean-md ol {
+          margin-top: 0;
+          margin-bottom: var(--spacing-xs, 4px);
+          padding-left: var(--spacing-xl, 24px);
+        }
+        .lean-md blockquote {
+          border-left: 3px solid var(--border-color, #d0d7de);
+          margin: 0 0 var(--spacing-xs, 4px) 0;
+          padding: 0 var(--spacing-m, 12px);
+          color: var(--deemphasized-text-color, #5f6368);
+        }
+        .lean-md table {
+          border-collapse: collapse;
+          width: 100%;
+          margin-bottom: var(--spacing-xs, 4px);
+        }
+        .lean-md th,
+        .lean-md td {
+          border: 1px solid var(--border-color, #e0e0e0);
+          padding: 4px 8px;
+          text-align: left;
+        }
+        .lean-md th {
+          background-color: var(--background-color-secondary, #f8f9fa);
+          font-weight: var(--font-weight-bold, 600);
+        }
+        .lean-md-subrow + .lean-md-subrow {
+          margin-top: 6px;
+        }
+        .lean-md-subrow.sub-added {
+          background-color: var(--light-add-highlight-color, #d8fed8);
+          border-radius: 3px;
+          padding: 2px 4px;
+        }
+        .lean-md-subrow.sub-deleted {
+          background-color: var(--light-remove-highlight-color, #ffebee);
+          border-radius: 3px;
+          padding: 2px 4px;
+        }
+        li.diff-list-item-placeholder,
+        li[aria-hidden='true'] {
+          visibility: hidden;
+          user-select: none;
+        }
+        .unified-block li.diff-list-item-placeholder,
+        .unified-block li[aria-hidden='true'],
+        .unified-block tr.diff-table-row-placeholder,
+        .unified-block tr[aria-hidden='true'],
+        .unified-block .lean-code-line.line-placeholder,
+        .unified-block tr.field-placeholder {
+          display: none;
+        }
+      `,
+    ];
+  }
+
+  override willUpdate(changedProperties: PropertyValues) {
+    if (changedProperties.has('diff')) {
+      this.recomputeAlignedRows();
+    }
+    if (
+      this.hasUpdated &&
+      (changedProperties.has('collapseProofs') ||
+        changedProperties.has('proofCollapseOverrides') ||
+        changedProperties.has('viewMode'))
+    ) {
+      if (this.hasActiveSelection()) {
+        this.clearSelection();
+      }
+      this.hideSelectionActionBox(true);
+      this.hoveredSide = undefined;
+      this.hoveredLine = undefined;
+    }
+    if (
+      changedProperties.has('changeComments') ||
+      changedProperties.has('patchRange') ||
+      changedProperties.has('path') ||
+      changedProperties.has('diff')
+    ) {
+      this.updateInternalThreads();
+    }
+  }
+
+  private recomputeAlignedRows() {
+    this.hideSelectionActionBox(true);
+    this.hoveredSide = undefined;
+    this.hoveredLine = undefined;
+    if (!this.diff) {
+      this.alignedRows = [];
+      this.summary = undefined;
+      this.proofCollapseOverrides = new Map();
+      return;
+    }
+    const textA = reconstructFileContent(this.diff, Side.LEFT);
+    const textB = reconstructFileContent(this.diff, Side.RIGHT);
+    const blocksA = parseLeanBlocks(textA);
+    const blocksB = parseLeanBlocks(textB);
+    this.alignedRows = alignLeanBlocks(blocksA, blocksB);
+    this.summary = computeLeanSummary(blocksA, blocksB, this.alignedRows);
+    this.proofCollapseOverrides = new Map();
+  }
+
+  private hasAnyCollapsibleProof(): boolean {
+    return this.alignedRows.some(row => {
+      const leftDecl = row.leftBlock?.decl;
+      const rightDecl = row.rightBlock?.decl;
+      return (
+        (leftDecl &&
+          PROOF_COLLAPSIBLE_KINDS.has(leftDecl.kind) &&
+          leftDecl.bodyLines.length > 0) ||
+        (rightDecl &&
+          PROOF_COLLAPSIBLE_KINDS.has(rightDecl.kind) &&
+          rightDecl.bodyLines.length > 0)
+      );
+    });
+  }
+
+  private isProofCollapsed(rowKey: string): boolean {
+    const override = this.proofCollapseOverrides.get(rowKey);
+    if (override !== undefined) return override;
+    return this.collapseProofs;
+  }
+
+  toggleAllProofs() {
+    this.collapseProofs = !this.collapseProofs;
+    this.proofCollapseOverrides = new Map();
+  }
+
+  private toggleRowProof(rowKey: string, e: Event) {
+    e.stopPropagation();
+    const next = new Map(this.proofCollapseOverrides);
+    next.set(rowKey, !this.isProofCollapsed(rowKey));
+    this.proofCollapseOverrides = next;
+  }
+
+  private canCommentOnPatchSetNum(patchNum: PatchSetNum) {
+    if (!this.loggedIn) {
+      fire(this, 'show-auth-required', {});
+      return false;
+    }
+    if (!this.patchRange) {
+      fireAlert(this, 'Cannot create comment. patchRange undefined.');
+      return false;
+    }
+
+    const isEdit = patchNum === EDIT;
+    const isEditBase = patchNum === PARENT && this.patchRange.patchNum === EDIT;
+
+    if (isEdit) {
+      fireAlert(this, 'You cannot comment on an edit.');
+      return false;
+    }
+    if (isEditBase) {
+      fireAlert(this, 'You cannot comment on the base patchset of an edit.');
+      return false;
+    }
+    return true;
+  }
+
+  private computeParentIndex() {
+    if (!this.patchRange) return null;
+    return isMergeParent(this.patchRange.basePatchNum)
+      ? getParentIndex(this.patchRange.basePatchNum)
+      : null;
+  }
+
+  private diffHasLines(side: Side): boolean {
+    if (!this.diff) return false;
+    const metaLines =
+      side === Side.LEFT ? this.diff.meta_a?.lines : this.diff.meta_b?.lines;
+    if (metaLines === 0) return false;
+    return countLines(this.diff, side) > 0;
+  }
+
+  createComment(side: Side, lineNum?: number) {
+    if (!this.patchRange) {
+      fireAlert(this, 'Cannot create comment. patchRange undefined.');
+      return;
+    }
+
+    const patchNum =
+      side === Side.LEFT && !isAParent(this.patchRange.basePatchNum)
+        ? this.patchRange.basePatchNum
+        : this.patchRange.patchNum;
+    const commentSide =
+      side === Side.LEFT && isAParent(this.patchRange.basePatchNum)
+        ? CommentSide.PARENT
+        : CommentSide.REVISION;
+
+    if (!this.canCommentOnPatchSetNum(patchNum)) return;
+    const path = this.filePath;
+    assertIsDefined(path, 'path');
+
+    const basePath = this.diff?.meta_a?.name;
+    const effectivePath =
+      basePath && side === Side.LEFT && commentSide === CommentSide.REVISION
+        ? basePath
+        : path;
+
+    let effectiveLine = lineNum;
+    if (effectiveLine === undefined) {
+      const fallbackRow = this.alignedRows.find(r =>
+        side === Side.LEFT
+          ? r.leftStartLine !== undefined
+          : r.rightStartLine !== undefined
+      );
+      effectiveLine =
+        side === Side.LEFT
+          ? fallbackRow?.leftStartLine
+          : fallbackRow?.rightStartLine ??
+            (this.diffHasLines(Side.RIGHT) ? 1 : undefined);
+    }
+
+    const parentIndex = this.computeParentIndex();
+    const draft: DraftInfo = {
+      ...createNew('', true),
+      patch_set: patchNum as RevisionPatchSetNum,
+      side: commentSide,
+      parent: parentIndex ?? undefined,
+      path: effectivePath,
+      line: typeof effectiveLine === 'number' ? effectiveLine : undefined,
+    };
+    this.getCommentsModel().addNewDraft(draft);
+  }
+
+  private handleCellMouseEnter(side: Side, lineNum?: number) {
+    this.hoveredSide = side;
+    this.hoveredLine = lineNum;
+  }
+
+  private handleLineMouseEnter(side: Side, lineNum?: number) {
+    if (lineNum !== undefined) {
+      this.hoveredSide = side;
+      this.hoveredLine = lineNum;
+    }
+  }
+
+  private handleCellMouseLeave() {
+    this.hoveredSide = undefined;
+    this.hoveredLine = undefined;
+  }
+
+  private hideSelectionActionBox(clearTarget = false) {
+    if (this.selectionActionBoxVisible) {
+      this.selectionActionBoxVisible = false;
+      if (this.selectionActionBox) {
+        this.selectionActionBox.style.display = 'none';
+      }
+    }
+    if (clearTarget) {
+      this.selectedSide = undefined;
+      this.selectedLine = undefined;
+    }
+  }
+
+  private clearSelection() {
+    (this.renderRoot as ShadowRoot)?.getSelection?.()?.removeAllRanges();
+    window.getSelection()?.removeAllRanges();
+    this.selectedSide = undefined;
+    this.selectedLine = undefined;
+  }
+
+  hasHoverTarget(): boolean {
+    return this.hoveredSide !== undefined;
+  }
+
+  private nodeToElement(node: Node | null): Element | null {
+    if (!node) return null;
+    return node.nodeType === Node.ELEMENT_NODE
+      ? (node as Element)
+      : node.parentElement;
+  }
+
+  private findInnerLineHost(el: Element | null, cell: Element): Element | null {
+    const host = el?.closest('[data-line]');
+    if (!host || host === cell || !cell.contains(host)) return null;
+    return host;
+  }
+
+  /**
+   * Returns true when `(endContainer, 0)` sits at or before the start of any
+   * selectable content inside `endHost` (for example, triple-clicking line N
+   * places `range.endContainer` on line N+1 or at offset 0 of line N+1's first
+   * code text node).
+   */
+  private isAtStartOfLineHost(endHost: Element, endContainer: Node): boolean {
+    if (endContainer === endHost) return true;
+    const codeText = endHost.querySelector('.lean-code-text');
+    const contentRoot = codeText ?? endHost;
+    if (endContainer === contentRoot) return true;
+    // If endContainer precedes contentRoot (e.g. inside the non-selectable line
+    // number button), no code text inside endHost was selected.
+    if (
+      !contentRoot.contains(endContainer) &&
+      Boolean(
+        endContainer.compareDocumentPosition(contentRoot) &
+          Node.DOCUMENT_POSITION_FOLLOWING
+      )
+    ) {
+      return true;
+    }
+    if (!contentRoot.contains(endContainer)) return false;
+    const probe = document.createRange();
+    probe.setStart(contentRoot, 0);
+    probe.setEnd(endContainer, 0);
+    return probe.toString().length === 0;
+  }
+
+  /**
+   * Walk backward in document order inside `cell` from `node` to locate the
+   * nearest preceding inner `[data-line]` host that is not before
+   * `rangeStartContainer`. Used when a selection ends at offset 0 of line N+1
+   * (e.g. triple-clicking line N) or at an element boundary after line N.
+   */
+  private findPreviousInnerLineHost(
+    node: Node,
+    cell: Element,
+    rangeStartContainer: Node
+  ): Element | null {
+    const walker = document.createTreeWalker(
+      cell,
+      NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_TEXT
+    );
+    walker.currentNode = node;
+    let prev = walker.previousNode();
+    while (prev) {
+      if (!prev.contains(node)) {
+        const host = this.findInnerLineHost(this.nodeToElement(prev), cell);
+        if (host) {
+          const isStrictlyBeforeStart =
+            !host.contains(rangeStartContainer) &&
+            Boolean(
+              host.compareDocumentPosition(rangeStartContainer) &
+                Node.DOCUMENT_POSITION_FOLLOWING
+            );
+          if (isStrictlyBeforeStart) return null;
+          return host;
+        }
+      }
+      prev = walker.previousNode();
+    }
+    return null;
+  }
+
+  // visible for testing
+  resolveRangeTarget(range: Range): {side: Side; line?: number} | null {
+    const startEl = this.nodeToElement(range.startContainer);
+    const endEl = this.nodeToElement(range.endContainer);
+    if (
+      !startEl ||
+      !endEl ||
+      !this.renderRoot.contains(startEl) ||
+      !this.renderRoot.contains(endEl)
+    ) {
+      return null;
+    }
+    const excludedSelector =
+      '.threads-container, .cell-action-bar, #selection-action-box';
+    if (startEl.closest(excludedSelector) || endEl.closest(excludedSelector)) {
+      return null;
+    }
+    const cellSelector = '.diff-cell[data-side], .unified-block[data-side]';
+    const startCell = startEl.closest(cellSelector);
+    const endCell = endEl.closest(cellSelector);
+    if (!startCell || !endCell || startCell !== endCell) {
+      return null;
+    }
+    const sideStr = endCell.getAttribute('data-side');
+    const side = sideStr === 'left' ? Side.LEFT : Side.RIGHT;
+
+    let innerLineHost: Element | null = null;
+    if (range.endOffset === 0 && range.startContainer !== range.endContainer) {
+      const endHost = this.findInnerLineHost(endEl, endCell);
+      if (
+        endHost &&
+        !endHost.contains(range.startContainer) &&
+        this.isAtStartOfLineHost(endHost, range.endContainer)
+      ) {
+        innerLineHost = this.findPreviousInnerLineHost(
+          endHost,
+          endCell,
+          range.startContainer
+        );
+      } else if (endHost) {
+        innerLineHost = endHost;
+      } else {
+        innerLineHost = this.findPreviousInnerLineHost(
+          range.endContainer,
+          endCell,
+          range.startContainer
+        );
+      }
+    } else if (
+      range.endContainer.nodeType === Node.ELEMENT_NODE &&
+      range.endOffset > 0
+    ) {
+      const prevChild = range.endContainer.childNodes[range.endOffset - 1];
+      if (prevChild) {
+        // TreeWalker.previousNode() steps before `prevChild` in pre-order,
+        // skipping its descendants. Descend to `prevChild`'s deepest lastChild
+        // first so containers like `.lean-body-section` or `<tbody>` resolve to
+        // the last selected `[data-line]` inside them.
+        let deepest: Node = prevChild;
+        while (deepest.lastChild) {
+          deepest = deepest.lastChild;
+        }
+        innerLineHost =
+          this.findInnerLineHost(this.nodeToElement(deepest), endCell) ??
+          this.findPreviousInnerLineHost(
+            deepest,
+            endCell,
+            range.startContainer
+          );
+      }
+    } else {
+      innerLineHost =
+        this.findInnerLineHost(endEl, endCell) ??
+        this.findPreviousInnerLineHost(
+          range.endContainer,
+          endCell,
+          range.startContainer
+        );
+    }
+
+    const lineHost =
+      innerLineHost ?? this.findInnerLineHost(startEl, endCell) ?? endCell;
+    const lineStr = lineHost.getAttribute('data-line');
+    const line = lineStr ? Number(lineStr) : undefined;
+    return {side, line: line !== undefined && !isNaN(line) ? line : undefined};
+  }
+
+  hasActiveSelection(): boolean {
+    const selection = this.getActiveSelection();
+    if (!selection || selection.isCollapsed || !selection.rangeCount) {
+      return false;
+    }
+    return this.resolveRangeTarget(selection.getRangeAt(0)) !== null;
+  }
+
+  private getActiveSelection(): Selection | null {
+    const shadowSelection = (this.renderRoot as ShadowRoot)?.getSelection?.();
+    if (
+      shadowSelection &&
+      !shadowSelection.isCollapsed &&
+      shadowSelection.rangeCount > 0
+    ) {
+      return shadowSelection;
+    }
+    const docSelection = window.getSelection();
+    if (
+      docSelection &&
+      !docSelection.isCollapsed &&
+      docSelection.rangeCount > 0
+    ) {
+      return docSelection;
+    }
+    return null;
+  }
+
+  private handleSelectionChange = () => {
+    const selection = this.getActiveSelection();
+    if (!selection || selection.isCollapsed || !selection.rangeCount) {
+      this.hideSelectionActionBox(true);
+      return;
+    }
+    const range = selection.getRangeAt(0);
+    const target = this.resolveRangeTarget(range);
+    if (!target) {
+      this.hideSelectionActionBox(true);
+      return;
+    }
+
+    const rangeRect = range.getBoundingClientRect();
+    if (rangeRect.width === 0 && rangeRect.height === 0) {
+      this.hideSelectionActionBox(true);
+      return;
+    }
+    const hostRect = this.getBoundingClientRect();
+
+    const spaceAbove = rangeRect.top - hostRect.top;
+    if (spaceAbove < 40) {
+      this.selectionBoxTop = rangeRect.bottom - hostRect.top + this.scrollTop;
+      this.selectionBoxPositionBelow = true;
+    } else {
+      this.selectionBoxTop = rangeRect.top - hostRect.top + this.scrollTop;
+      this.selectionBoxPositionBelow = false;
+    }
+    const rawLeft =
+      rangeRect.left - hostRect.left + rangeRect.width / 2 + this.scrollLeft;
+    this.selectionBoxLeft =
+      hostRect.width > 48
+        ? Math.min(Math.max(rawLeft, 24), hostRect.width - 24)
+        : rawLeft;
+    this.selectedSide = target.side;
+    this.selectedLine = target.line;
+    this.selectionActionBoxVisible = true;
+    if (this.selectionActionBox) {
+      this.selectionActionBox.style.display = 'block';
+      this.selectionActionBox.style.top = `${this.selectionBoxTop}px`;
+      this.selectionActionBox.style.left = `${this.selectionBoxLeft}px`;
+      this.selectionActionBox.classList.toggle(
+        'below',
+        this.selectionBoxPositionBelow
+      );
+    }
+  };
+
+  private handleSelectionCommentClick(e: Event) {
+    e.stopPropagation();
+    if (this.selectedSide !== undefined) {
+      this.createComment(this.selectedSide, this.selectedLine);
+      this.hideSelectionActionBox(false);
+      this.clearSelection();
+    }
+  }
+
+  private handleKeyDown = (e: KeyboardEvent) => {
+    if (e.defaultPrevented || e.repeat) return;
+    if (e.key === 'c' || e.key === 'C') {
+      if (e.ctrlKey || e.metaKey || e.altKey) {
+        return;
+      }
+      const path = e.composedPath();
+      const target = path[0] as HTMLElement | undefined;
+      if (
+        target?.tagName === 'INPUT' ||
+        target?.tagName === 'TEXTAREA' ||
+        target?.tagName === 'GR-TEXTAREA' ||
+        target?.isContentEditable ||
+        path.some(n => (n as Element)?.tagName === 'DIALOG')
+      ) {
+        return;
+      }
+      if (this.hasActiveSelection() || this.hoveredSide !== undefined) {
+        e.preventDefault();
+        e.stopPropagation();
+        e.stopImmediatePropagation();
+        this.createCommentFromSelectionOrHover();
+      }
+    }
+  };
+
+  createCommentFromSelectionOrHover() {
+    const selection = this.getActiveSelection();
+    if (selection && !selection.isCollapsed && selection.rangeCount > 0) {
+      const target = this.resolveRangeTarget(selection.getRangeAt(0));
+      if (target) {
+        this.createComment(target.side, target.line);
+        this.hideSelectionActionBox(false);
+        this.clearSelection();
+        return;
+      }
+    }
+    if (this.selectedSide !== undefined) {
+      this.createComment(this.selectedSide, this.selectedLine);
+      this.hideSelectionActionBox(false);
+      this.clearSelection();
+      return;
+    }
+    if (this.hoveredSide !== undefined) {
+      this.createComment(this.hoveredSide, this.hoveredLine);
+      return;
+    }
+    const firstRightRow = this.alignedRows.find(
+      r => r.rightStartLine !== undefined
+    );
+    if (firstRightRow) {
+      this.createComment(Side.RIGHT, firstRightRow.rightStartLine);
+      return;
+    }
+    const firstLeftRow = this.alignedRows.find(
+      r => r.leftStartLine !== undefined
+    );
+    if (firstLeftRow) {
+      this.createComment(Side.LEFT, firstLeftRow.leftStartLine);
+      return;
+    }
+    this.createComment(
+      Side.RIGHT,
+      this.diffHasLines(Side.RIGHT) ? 1 : undefined
+    );
+  }
+
+  async autoSaveDrafts(): Promise<void> {
+    const threadElements = Array.from(
+      this.shadowRoot?.querySelectorAll<GrCommentThread>('gr-comment-thread') ??
+        []
+    );
+    await Promise.all(threadElements.map(thread => thread.autoSave()));
+  }
+
+  override render() {
+    if (this.viewMode === DiffViewMode.UNIFIED) {
+      return this.renderUnifiedView();
+    }
+    return this.renderSideBySideView();
+  }
+
+  private getDeclCategory(kind: LeanDeclKind): string {
+    if (kind === 'theorem' || kind === 'lemma' || kind === 'example') {
+      return 'theorem';
+    }
+    if (
+      kind === 'structure' ||
+      kind === 'class' ||
+      kind === 'inductive' ||
+      kind === 'coinductive'
+    ) {
+      return 'type';
+    }
+    if (kind === 'instance') return 'instance';
+    if (kind === 'axiom') return 'axiom';
+    return 'def';
+  }
+
+  private formatPlural(count: number, singular: string, plural: string) {
+    return `${count} ${count === 1 ? singular : plural}`;
+  }
+
+  private get hasSkippedDiffChunks(): boolean {
+    return !!this.diff?.content?.some(c => Boolean(c.skip));
+  }
+
+  private renderSummaryBar() {
+    if (!this.summary || this.alignedRows.length === 0) return nothing;
+    const activeCounts: LeanFileCounts = this.summary.hasRevision
+      ? this.summary.revision
+      : this.summary.base;
+    const totalDecls =
+      activeCounts.theorems +
+      activeCounts.definitions +
+      activeCounts.types +
+      activeCounts.instances +
+      activeCounts.axioms;
+    const sorryTotal = activeCounts.sorryCount + activeCounts.admitCount;
+    const isPartialDiff = this.hasSkippedDiffChunks;
+    const isClean =
+      !isPartialDiff &&
+      sorryTotal === 0 &&
+      activeCounts.axioms === 0 &&
+      activeCounts.unsafeCount === 0 &&
+      activeCounts.nativeDecideCount === 0 &&
+      activeCounts.partialCount === 0 &&
+      activeCounts.theorems > 0;
+
+    const stats: string[] = [];
+    if (activeCounts.theorems > 0) {
+      stats.push(
+        this.formatPlural(activeCounts.theorems, 'theorem', 'theorems')
+      );
+    }
+    if (activeCounts.types > 0) {
+      stats.push(this.formatPlural(activeCounts.types, 'type', 'types'));
+    }
+    if (activeCounts.definitions > 0) {
+      stats.push(this.formatPlural(activeCounts.definitions, 'def', 'defs'));
+    }
+    if (activeCounts.instances > 0) {
+      stats.push(
+        this.formatPlural(activeCounts.instances, 'instance', 'instances')
+      );
+    }
+
+    const showDiffDeltas =
+      this.summary.hasBase &&
+      this.summary.hasRevision &&
+      (this.summary.addedDeclarations > 0 ||
+        this.summary.deletedDeclarations > 0 ||
+        this.summary.modifiedDeclarations > 0);
+    const hasCollapsible = this.hasAnyCollapsibleProof();
+
+    return html`
+      <div
+        class="lean-summary-bar"
+        role="status"
+        aria-label="Lean 4 Proof Summary"
+      >
+        <div class="summary-left">
+          <span class="lean-lang-pill">
+            <gr-icon icon="code"></gr-icon>
+            <span>Lean 4</span>
+          </span>
+          ${when(
+            isPartialDiff,
+            () => html`
+              <span
+                class="hygiene-pill partial"
+                title="Some unchanged lines were omitted from this diff; soundness summary only reflects visible chunks"
+              >
+                <gr-icon icon="info"></gr-icon>
+                <span>Partial diff</span>
+              </span>
+            `
+          )}
+          ${when(
+            isClean,
+            () => html`
+              <span
+                class="hygiene-pill verified"
+                title="No sorry, admit, axiom, native_decide, partial, or unsafe declarations detected"
+              >
+                <gr-icon icon="check_circle" filled></gr-icon>
+                <span>0 sorry</span>
+              </span>
+            `
+          )}
+          ${when(
+            sorryTotal > 0,
+            () => html`
+              <span
+                class="hygiene-pill error"
+                title="Contains incomplete proofs (sorry/admit)"
+              >
+                <gr-icon icon="error" filled></gr-icon>
+                <span>${sorryTotal} sorry</span>
+              </span>
+            `
+          )}
+          ${when(
+            activeCounts.axioms > 0,
+            () => html`
+              <span
+                class="hygiene-pill warning"
+                title="Introduces custom axioms"
+              >
+                <gr-icon icon="warning" filled></gr-icon>
+                <span
+                  >${this.formatPlural(
+                    activeCounts.axioms,
+                    'axiom',
+                    'axioms'
+                  )}</span
+                >
+              </span>
+            `
+          )}
+          ${when(
+            activeCounts.nativeDecideCount > 0,
+            () => html`
+              <span
+                class="hygiene-pill warning"
+                title="Uses native_decide (extends trusted computing base)"
+              >
+                <gr-icon icon="warning" filled></gr-icon>
+                <span>${activeCounts.nativeDecideCount} native_decide</span>
+              </span>
+            `
+          )}
+          ${when(
+            activeCounts.partialCount > 0,
+            () => html`
+              <span
+                class="hygiene-pill warning"
+                title="Contains partial definitions"
+              >
+                <gr-icon icon="warning" filled></gr-icon>
+                <span>${activeCounts.partialCount} partial</span>
+              </span>
+            `
+          )}
+          ${when(
+            activeCounts.unsafeCount > 0,
+            () => html`
+              <span
+                class="hygiene-pill error"
+                title="Contains unsafe declarations"
+              >
+                <gr-icon icon="error" filled></gr-icon>
+                <span>${activeCounts.unsafeCount} unsafe</span>
+              </span>
+            `
+          )}
+          ${when(
+            totalDecls > 0 && stats.length > 0,
+            () => html`
+              <span class="summary-stats">
+                ${stats.map(
+                  (stat, idx) => html`
+                    ${idx > 0
+                      ? html`<span class="summary-stat-sep">·</span>`
+                      : nothing}
+                    <span>${stat}</span>
+                  `
+                )}
+              </span>
+            `
+          )}
+          ${when(
+            showDiffDeltas,
+            () => html`
+              <span class="summary-deltas">
+                ${this.summary!.addedDeclarations > 0
+                  ? html`<span class="delta-add"
+                      >+${this.summary!.addedDeclarations}</span
+                    >`
+                  : nothing}
+                ${this.summary!.modifiedDeclarations > 0
+                  ? html`<span class="delta-mod"
+                      >~${this.summary!.modifiedDeclarations}</span
+                    >`
+                  : nothing}
+                ${this.summary!.deletedDeclarations > 0
+                  ? html`<span class="delta-del"
+                      >-${this.summary!.deletedDeclarations}</span
+                    >`
+                  : nothing}
+              </span>
+            `
+          )}
+        </div>
+        <div class="summary-right">
+          ${when(
+            hasCollapsible,
+            () => html`
+              <button
+                type="button"
+                class="proof-collapse-btn"
+                aria-pressed=${this.collapseProofs ? 'true' : 'false'}
+                @click=${() => this.toggleAllProofs()}
+              >
+                <gr-icon
+                  icon=${this.collapseProofs ? 'expand_more' : 'expand_less'}
+                ></gr-icon>
+                <span>
+                  ${this.collapseProofs ? 'Expand proofs' : 'Collapse proofs'}
+                </span>
+              </button>
+            `
+          )}
+        </div>
+      </div>
+    `;
+  }
+
+  private renderThread(thread: CommentThread, side?: Side) {
+    const diffSide = side ?? getThreadDiffSide(thread, this.patchRange);
+    const hasLineNumber = thread.line !== undefined && thread.line !== 'FILE';
+    return html`
+      <gr-comment-thread
+        class="comment-thread"
+        .rootId=${thread.rootId}
+        .thread=${thread}
+        .showFilePath=${hasLineNumber}
+        .showFileName=${false}
+        .showPatchset=${false}
+        .showPortedComment=${!!thread.ported}
+        diff-side=${diffSide}
+        line-num=${thread.line ?? 'FILE'}
+      >
+      </gr-comment-thread>
+    `;
+  }
+
+  private renderCommentButton(side: Side, lineNum?: number) {
+    if (lineNum === undefined) return nothing;
+    return html`
+      <div class="cell-action-bar">
+        <button
+          type="button"
+          class="add-comment-btn"
+          title="Add comment (line ${lineNum})"
+          aria-label="Add comment (line ${lineNum})"
+          @click=${(e: Event) => {
+            e.stopPropagation();
+            this.createComment(side, lineNum);
+          }}
+        >
+          <gr-icon icon="add_comment" filled></gr-icon>
+          <span>Comment</span>
+        </button>
+      </div>
+    `;
+  }
+
+  private renderSelectionActionBox() {
+    return html`
+      <div
+        id="selection-action-box"
+        class="selection-action-box ${this.selectionBoxPositionBelow
+          ? 'below'
+          : ''}"
+        style="display: ${this.selectionActionBoxVisible
+          ? 'block'
+          : 'none'}; top: ${this.selectionBoxTop}px; left: ${this
+          .selectionBoxLeft}px;"
+      >
+        <button
+          type="button"
+          class="selection-comment-btn"
+          @mousedown=${(e: MouseEvent) => {
+            e.preventDefault();
+          }}
+          @click=${this.handleSelectionCommentClick}
+        >
+          <gr-icon icon="add_comment" filled></gr-icon>
+          <span>Comment (c)</span>
+        </button>
+      </div>
+    `;
+  }
+
+  private renderLineNumberButton(side: Side, lineNum?: number) {
+    if (lineNum === undefined) {
+      return html`<span
+        class="lean-line-num placeholder"
+        aria-hidden="true"
+      ></span>`;
+    }
+    return html`
+      <button
+        type="button"
+        class="lean-line-num"
+        title="Add comment on line ${lineNum}"
+        aria-label="Add comment on line ${lineNum}"
+        @click=${(e: Event) => {
+          e.stopPropagation();
+          this.createComment(side, lineNum);
+        }}
+      >
+        ${lineNum}
+      </button>
+    `;
+  }
+
+  private renderStaticCodeLines(
+    lines: LeanCodeLine[],
+    side: Side,
+    inTacticContext = false,
+    options: LeanHighlightOptions = {}
+  ): TemplateResult {
+    const forceComment = Boolean(options.forceComment);
+    const depths = forceComment
+      ? undefined
+      : computeBlockCommentDepths(lines, options.initialBlockCommentDepth ?? 0)
+          .depths;
+    return html`
+      <div class="lean-code-lines">
+        ${lines.map(
+          (line, idx) => html`
+            <div
+              class="lean-code-line"
+              data-line=${line.lineNum}
+              @mouseenter=${() => this.handleLineMouseEnter(side, line.lineNum)}
+            >
+              ${this.renderLineNumberButton(side, line.lineNum)}
+              <span class="lean-code-text"
+                >${highlightLeanLine(line.text, inTacticContext, {
+                  initialBlockCommentDepth: depths ? depths[idx] : 0,
+                  forceComment,
+                })}</span
+              >
+            </div>
+          `
+        )}
+      </div>
+    `;
+  }
+
+  private renderAlignedCodeLines(
+    alignedLines: LeanAlignedCodeLine[],
+    side: Side
+  ): TemplateResult {
+    const isLeft = side === Side.LEFT;
+    return html`
+      <div class="lean-code-lines">
+        ${alignedLines.map(line => {
+          const codeLine = isLeft ? line.leftLine : line.rightLine;
+          const content = isLeft ? line.leftContent : line.rightContent;
+          const isPlaceholder = !codeLine;
+          const isLineDel =
+            isLeft && (line.status === 'deleted' || line.status === 'modified');
+          const isLineAdd =
+            !isLeft && (line.status === 'added' || line.status === 'modified');
+
+          const lineClasses = {
+            'lean-code-line': true,
+            'line-deleted': isLineDel,
+            'line-added': isLineAdd,
+            'line-placeholder': isPlaceholder,
+          };
+
+          if (isPlaceholder) {
+            return html`
+              <div class=${classMap(lineClasses)} aria-hidden="true">
+                ${this.renderLineNumberButton(side, undefined)}
+                <span class="lean-code-text">&nbsp;</span>
+              </div>
+            `;
+          }
+
+          return html`
+            <div
+              class=${classMap(lineClasses)}
+              data-line=${codeLine.lineNum}
+              @mouseenter=${() =>
+                this.handleLineMouseEnter(side, codeLine.lineNum)}
+            >
+              ${this.renderLineNumberButton(side, codeLine.lineNum)}
+              <span class="lean-code-text">${content ?? nothing}</span>
+            </div>
+          `;
+        })}
+      </div>
+    `;
+  }
+
+  private renderStaticFieldsTable(
+    fields: LeanStructureField[],
+    side: Side
+  ): TemplateResult {
+    const hasNotes = fields.some(f => !!f.comment);
+    return html`
+      <table class="lean-fields-table">
+        <thead>
+          <tr>
+            <th class="lean-field-line-col">#</th>
+            <th>Field</th>
+            <th>Type</th>
+            ${when(hasNotes, () => html`<th>Notes</th>`)}
+          </tr>
+        </thead>
+        <tbody>
+          ${fields.map(
+            field => html`
+              <tr
+                data-line=${field.lineNum}
+                @mouseenter=${() =>
+                  this.handleLineMouseEnter(side, field.lineNum)}
+              >
+                <td class="lean-field-line-col">
+                  ${this.renderLineNumberButton(side, field.lineNum)}
+                </td>
+                <td class="lean-field-name">${field.name}</td>
+                <td class="lean-field-type">
+                  ${highlightLeanLine(field.typeText)}${when(
+                    !!field.defaultValue,
+                    () => html`<span class="lean-field-default">
+                      := ${highlightLeanLine(field.defaultValue!)}</span
+                    >`
+                  )}
+                </td>
+                ${when(
+                  hasNotes,
+                  () => html`
+                    <td class="lean-field-notes">
+                      ${field.comment
+                        ? renderInlineMarkdown(field.comment)
+                        : nothing}
+                    </td>
+                  `
+                )}
+              </tr>
+            `
+          )}
+        </tbody>
+      </table>
+    `;
+  }
+
+  private renderAlignedFieldsTable(
+    alignedFields: LeanAlignedField[],
+    side: Side
+  ): TemplateResult {
+    const isLeft = side === Side.LEFT;
+    const hasNotes = alignedFields.some(
+      f => !!(f.leftField?.comment || f.rightField?.comment)
+    );
+    return html`
+      <table class="lean-fields-table">
+        <thead>
+          <tr>
+            <th class="lean-field-line-col">#</th>
+            <th>Field</th>
+            <th>Type</th>
+            ${when(hasNotes, () => html`<th>Notes</th>`)}
+          </tr>
+        </thead>
+        <tbody>
+          ${alignedFields.map(item => {
+            const field = isLeft ? item.leftField : item.rightField;
+            const typeHtml = isLeft ? item.leftTypeHtml : item.rightTypeHtml;
+            const commentHtml = isLeft
+              ? item.leftCommentHtml
+              : item.rightCommentHtml;
+            const isPlaceholder = !field;
+            const isDel =
+              isLeft &&
+              (item.status === 'deleted' || item.status === 'modified');
+            const isAdd =
+              !isLeft &&
+              (item.status === 'added' || item.status === 'modified');
+
+            const rowClasses = {
+              'field-deleted': isDel,
+              'field-added': isAdd,
+              'field-placeholder': isPlaceholder,
+            };
+
+            if (isPlaceholder) {
+              return html`
+                <tr class=${classMap(rowClasses)} aria-hidden="true">
+                  <td class="lean-field-line-col">&nbsp;</td>
+                  <td>&nbsp;</td>
+                  <td>&nbsp;</td>
+                  ${when(hasNotes, () => html`<td>&nbsp;</td>`)}
+                </tr>
+              `;
+            }
+
+            return html`
+              <tr
+                class=${classMap(rowClasses)}
+                data-line=${field.lineNum}
+                @mouseenter=${() =>
+                  this.handleLineMouseEnter(side, field.lineNum)}
+              >
+                <td class="lean-field-line-col">
+                  ${this.renderLineNumberButton(side, field.lineNum)}
+                </td>
+                <td class="lean-field-name">${field.name}</td>
+                <td class="lean-field-type">
+                  ${typeHtml ?? highlightLeanLine(field.typeText)}${when(
+                    !!field.defaultValue,
+                    () => html`<span class="lean-field-default">
+                      := ${highlightLeanLine(field.defaultValue!)}</span
+                    >`
+                  )}
+                </td>
+                ${when(
+                  hasNotes,
+                  () => html`
+                    <td class="lean-field-notes">${commentHtml ?? nothing}</td>
+                  `
+                )}
+              </tr>
+            `;
+          })}
+        </tbody>
+      </table>
+    `;
+  }
+
+  private renderStaticConstructorsTable(
+    ctors: LeanInductiveCtor[],
+    side: Side
+  ): TemplateResult {
+    const hasNotes = ctors.some(c => !!c.comment);
+    return html`
+      <table class="lean-fields-table">
+        <thead>
+          <tr>
+            <th class="lean-field-line-col">#</th>
+            <th>Constructor</th>
+            <th>Signature</th>
+            ${when(hasNotes, () => html`<th>Notes</th>`)}
+          </tr>
+        </thead>
+        <tbody>
+          ${ctors.map(
+            ctor => html`
+              <tr
+                data-line=${ctor.lineNum}
+                @mouseenter=${() =>
+                  this.handleLineMouseEnter(side, ctor.lineNum)}
+              >
+                <td class="lean-field-line-col">
+                  ${this.renderLineNumberButton(side, ctor.lineNum)}
+                </td>
+                <td class="lean-field-name">| ${ctor.name}</td>
+                <td class="lean-field-type">
+                  ${ctor.signatureText
+                    ? highlightLeanLine(ctor.signatureText)
+                    : nothing}
+                </td>
+                ${when(
+                  hasNotes,
+                  () => html`
+                    <td class="lean-field-notes">
+                      ${ctor.comment
+                        ? renderInlineMarkdown(ctor.comment)
+                        : nothing}
+                    </td>
+                  `
+                )}
+              </tr>
+            `
+          )}
+        </tbody>
+      </table>
+    `;
+  }
+
+  private renderDeclarationCard(
+    row: AlignedLeanRow,
+    block: LeanBlock,
+    side: Side,
+    declDiff?: LeanDeclarationDiffData
+  ): TemplateResult {
+    const decl: LeanDeclarationDetails = block.decl!;
+    const isLeft = side === Side.LEFT;
+    const category = this.getDeclCategory(decl.kind);
+    const hasHygieneAlert =
+      decl.hygiene.hasSorry ||
+      decl.hygiene.hasAdmit ||
+      decl.hygiene.isAxiom ||
+      decl.hygiene.isUnsafe;
+
+    // Compact 1-line constant definition (e.g. `def MAX_WEIGHT : Nat := 31`)
+    if (decl.isCompactDef && !declDiff) {
+      const lineNum = block.startLine;
+      return html`
+        <div
+          class="lean-decl-card compact cat-${category}"
+          data-line=${lineNum}
+          @mouseenter=${() => this.handleLineMouseEnter(side, lineNum)}
+        >
+          <div class="lean-code-lines">
+            <div class="lean-code-line" data-line=${lineNum}>
+              ${this.renderLineNumberButton(side, lineNum)}
+              <span class="lean-code-text"
+                >${highlightLeanLine(block.raw, false)}</span
+              >
+            </div>
+          </div>
+        </div>
+      `;
+    }
+
+    const isCollapsibleProof =
+      PROOF_COLLAPSIBLE_KINDS.has(decl.kind) &&
+      (declDiff ? declDiff.bodyLines.length > 0 : decl.bodyLines.length > 0);
+    const proofCollapsed =
+      isCollapsibleProof && this.isProofCollapsed(row.rowKey);
+
+    const hasFieldsBody = declDiff
+      ? !!declDiff.fields
+      : !!(decl.fields && decl.fields.length > 0);
+    const hasCtorsBody =
+      !declDiff && !!(decl.constructors && decl.constructors.length > 0);
+    const hasCodeBody =
+      !hasFieldsBody &&
+      !hasCtorsBody &&
+      (declDiff ? declDiff.bodyLines.length > 0 : decl.bodyLines.length > 0);
+    const hasBody = hasFieldsBody || hasCtorsBody || hasCodeBody;
+
+    const cardClasses = {
+      'lean-decl-card': true,
+      [`cat-${category}`]: true,
+      'has-hygiene-alert': hasHygieneAlert,
+    };
+
+    const docContent = declDiff
+      ? isLeft
+        ? declDiff.docLeftHtml
+        : declDiff.docRightHtml
+      : decl.docComment
+      ? renderMarkdownContent(decl.docComment)
+      : undefined;
+    const sigFinalCommentDepth = !declDiff
+      ? computeBlockCommentDepths(decl.signatureLines, 0).finalDepth
+      : 0;
+
+    return html`
+      <div class=${classMap(cardClasses)}>
+        <div class="lean-decl-header">
+          <div class="lean-decl-header-main">
+            <span class="lean-kind-badge cat-${category}">
+              ${when(
+                decl.hygiene.isAxiom,
+                () => html`<gr-icon icon="warning" filled></gr-icon>`
+              )}
+              <span>${decl.kind}</span>
+            </span>
+            ${when(
+              !!decl.name,
+              () => html`<span class="lean-decl-name">${decl.name}</span>`
+            )}
+            ${decl.modifiers.map(
+              mod => html`<span class="lean-meta-chip">${mod}</span>`
+            )}
+            ${decl.attributes.map(
+              attr => html`<span class="lean-attr-chip">${attr}</span>`
+            )}
+            ${when(
+              decl.proofStrategy === 'decide',
+              () => html`<span class="lean-strategy-chip decide">decide</span>`
+            )}
+            ${when(
+              decl.proofStrategy === 'tactic',
+              () => html`<span class="lean-strategy-chip">by tactic</span>`
+            )}
+            ${when(
+              decl.hygiene.hasSorry,
+              () => html`
+                <span class="lean-hygiene-badge error">
+                  <gr-icon icon="error" filled></gr-icon>
+                  <span>sorry</span>
+                </span>
+              `
+            )}
+            ${when(
+              decl.hygiene.hasAdmit,
+              () => html`
+                <span class="lean-hygiene-badge error">
+                  <gr-icon icon="error" filled></gr-icon>
+                  <span>admit</span>
+                </span>
+              `
+            )}
+            ${when(
+              decl.hygiene.hasNativeDecide,
+              () => html`
+                <span class="lean-hygiene-badge warning">
+                  <gr-icon icon="warning" filled></gr-icon>
+                  <span>native_decide</span>
+                </span>
+              `
+            )}
+            ${when(
+              decl.hygiene.isPartial,
+              () => html`
+                <span class="lean-hygiene-badge warning">
+                  <gr-icon icon="warning" filled></gr-icon>
+                  <span>partial</span>
+                </span>
+              `
+            )}
+            ${when(
+              decl.hygiene.isAxiom && decl.kind !== 'axiom',
+              () => html`
+                <span class="lean-hygiene-badge error">
+                  <gr-icon icon="error" filled></gr-icon>
+                  <span>axiom</span>
+                </span>
+              `
+            )}
+            ${when(
+              decl.hygiene.isUnsafe,
+              () => html`
+                <span class="lean-hygiene-badge error">
+                  <gr-icon icon="error" filled></gr-icon>
+                  <span>unsafe</span>
+                </span>
+              `
+            )}
+          </div>
+          <div class="lean-decl-header-meta">
+            <span class="lean-line-range"
+              >${formatLineRange(block.startLine, block.endLine)}</span
+            >
+          </div>
+        </div>
+
+        ${when(
+          !!docContent,
+          () => html`
+            <div
+              class="lean-decl-doc lean-md"
+              data-line=${ifDefined(decl.docStartLine ?? block.startLine)}
+              @mouseenter=${() =>
+                this.handleLineMouseEnter(
+                  side,
+                  decl.docStartLine ?? block.startLine
+                )}
+            >
+              ${docContent}
+            </div>
+          `
+        )}
+
+        <div class="lean-decl-signature ${hasBody ? 'has-body' : ''}">
+          ${declDiff
+            ? this.renderAlignedCodeLines(declDiff.signatureLines, side)
+            : this.renderStaticCodeLines(decl.signatureLines, side, false)}
+        </div>
+
+        ${when(
+          hasFieldsBody,
+          () => html`
+            <div class="lean-body-section">
+              ${declDiff?.fields
+                ? this.renderAlignedFieldsTable(declDiff.fields, side)
+                : this.renderStaticFieldsTable(decl.fields!, side)}
+            </div>
+          `
+        )}
+        ${when(
+          hasCtorsBody,
+          () => html`
+            <div class="lean-body-section">
+              ${this.renderStaticConstructorsTable(decl.constructors!, side)}
+            </div>
+          `
+        )}
+        ${when(
+          hasCodeBody && isCollapsibleProof,
+          () => html`
+            <button
+              type="button"
+              class="lean-proof-bar"
+              aria-expanded=${proofCollapsed ? 'false' : 'true'}
+              @click=${(e: Event) => this.toggleRowProof(row.rowKey, e)}
+            >
+              <span class="lean-proof-bar-left">
+                <gr-icon
+                  icon=${proofCollapsed ? 'chevron_right' : 'expand_more'}
+                ></gr-icon>
+                <span>
+                  ${proofCollapsed ? 'Show proof' : 'Proof'}
+                  (${this.formatPlural(decl.bodyLines.length, 'line', 'lines')})
+                </span>
+                ${when(
+                  proofCollapsed && !!declDiff?.bodyChanged,
+                  () =>
+                    html`<span class="lean-proof-changed-pill">modified</span>`
+                )}
+              </span>
+            </button>
+            ${when(
+              !proofCollapsed,
+              () => html`
+                <div class="lean-body-section">
+                  ${declDiff
+                    ? this.renderAlignedCodeLines(declDiff.bodyLines, side)
+                    : this.renderStaticCodeLines(
+                        decl.bodyLines,
+                        side,
+                        decl.isTacticProof,
+                        {initialBlockCommentDepth: sigFinalCommentDepth}
+                      )}
+                </div>
+              `
+            )}
+          `
+        )}
+        ${when(
+          hasCodeBody && !isCollapsibleProof,
+          () => html`
+            <div class="lean-body-section">
+              ${declDiff
+                ? this.renderAlignedCodeLines(declDiff.bodyLines, side)
+                : this.renderStaticCodeLines(
+                    decl.bodyLines,
+                    side,
+                    decl.isTacticProof,
+                    {initialBlockCommentDepth: sigFinalCommentDepth}
+                  )}
+            </div>
+          `
+        )}
+        ${when(
+          !!(decl.derivingClause && decl.derivingClause.length > 0),
+          () => html`
+            <div class="lean-deriving-row">
+              <span class="lean-deriving-label">deriving</span>
+              ${decl.derivingClause!.map(
+                cls => html`<span class="lean-deriving-chip">${cls}</span>`
+              )}
+            </div>
+          `
+        )}
+      </div>
+    `;
+  }
+
+  private renderBlock(
+    row: AlignedLeanRow,
+    block: LeanBlock,
+    side: Side
+  ): TemplateResult {
+    const isLeft = side === Side.LEFT;
+
+    if (block.type === 'module_doc') {
+      return html`
+        <div
+          class="lean-module-doc lean-md"
+          data-line=${block.startLine}
+          @mouseenter=${() => this.handleLineMouseEnter(side, block.startLine)}
+        >
+          <div class="lean-module-doc-header">
+            <span>Module Documentation</span>
+            <span class="lean-line-range"
+              >${formatLineRange(block.startLine, block.endLine)}</span
+            >
+          </div>
+          ${row.moduleDocRows
+            ? html`${row.moduleDocRows.map(sub => {
+                const subHtml = isLeft ? sub.leftHtml : sub.rightHtml;
+                if (!subHtml) return nothing;
+                const subCls = {
+                  'lean-md-subrow': true,
+                  'sub-deleted': isLeft && sub.status === 'deleted',
+                  'sub-added': !isLeft && sub.status === 'added',
+                };
+                return html`<div class=${classMap(subCls)}>${subHtml}</div>`;
+              })}`
+            : renderMarkdownContent(block.markdownContent ?? '')}
+        </div>
+      `;
+    }
+
+    if (block.type === 'section_banner') {
+      return html`
+        <div
+          class="lean-section-banner"
+          data-line=${block.startLine}
+          @mouseenter=${() => this.handleLineMouseEnter(side, block.startLine)}
+        >
+          ${row.bannerDiff
+            ? isLeft
+              ? row.bannerDiff.leftHtml
+              : row.bannerDiff.rightHtml
+            : html`<h3>
+                ${renderInlineMarkdown(block.markdownContent ?? '')}
+              </h3>`}
+          <span class="lean-line-range"
+            >${formatLineRange(block.startLine, block.endLine)}</span
+          >
+        </div>
+      `;
+    }
+
+    if (block.type === 'imports') {
+      return html`
+        <div class="lean-strip-block">
+          ${row.lineDiff
+            ? this.renderAlignedCodeLines(row.lineDiff, side)
+            : this.renderStaticCodeLines(block.importLines ?? [], side, false)}
+        </div>
+      `;
+    }
+
+    if (block.type === 'directive') {
+      return html`
+        <div class="lean-strip-block">
+          ${row.lineDiff
+            ? this.renderAlignedCodeLines(row.lineDiff, side)
+            : this.renderStaticCodeLines(
+                block.directiveLines ?? [],
+                side,
+                false
+              )}
+        </div>
+      `;
+    }
+
+    if (block.type === 'comment') {
+      const stripClasses = {
+        'lean-strip-block': true,
+        comment: true,
+        license: !!block.isLicenseHeader,
+      };
+      return html`
+        <div class=${classMap(stripClasses)}>
+          ${row.lineDiff
+            ? this.renderAlignedCodeLines(row.lineDiff, side)
+            : this.renderStaticCodeLines(
+                block.commentLines ?? [],
+                side,
+                false,
+                {forceComment: true}
+              )}
+        </div>
+      `;
+    }
+
+    if (block.type === 'declaration' && block.decl) {
+      return this.renderDeclarationCard(row, block, side, row.declDiff);
+    }
+
+    return html``;
+  }
+
+  private getAttachedThreads(): {
+    rowsWithThreads: AlignedLeanRowWithThreads[];
+    fileLevelThreads: CommentThread[];
+  } {
+    if (!this.diff) {
+      return {
+        rowsWithThreads: [],
+        fileLevelThreads: this.effectiveThreads.filter(
+          t => t.line === undefined || t.line === 'FILE'
+        ),
+      };
+    }
+    return attachThreadsToLeanRows(
+      this.alignedRows,
+      this.effectiveThreads,
+      this.patchRange
+    );
+  }
+
+  private renderSideBySideView() {
+    const {rowsWithThreads, fileLevelThreads} = this.getAttachedThreads();
+
+    return html`
+      ${this.renderSummaryBar()}
+      ${when(
+        fileLevelThreads.length > 0,
+        () => html`
+          <div class="file-level-threads">
+            <div class="file-level-title">File Comments</div>
+            ${fileLevelThreads.map(t => this.renderThread(t))}
+          </div>
+        `
+      )}
+      <div class="column-headers">
+        <div class="column-header left">Base</div>
+        <div class="column-header right">Revision</div>
+      </div>
+      <div class="diff-grid" role="region" aria-label="Rich Lean Diff">
+        ${rowsWithThreads.map(row => this.renderRow(row))}
+      </div>
+      ${this.renderSelectionActionBox()}
+    `;
+  }
+
+  private renderUnifiedView() {
+    const {rowsWithThreads, fileLevelThreads} = this.getAttachedThreads();
+
+    return html`
+      ${this.renderSummaryBar()}
+      ${when(
+        fileLevelThreads.length > 0,
+        () => html`
+          <div class="file-level-threads">
+            <div class="file-level-title">File Comments</div>
+            ${fileLevelThreads.map(t => this.renderThread(t))}
+          </div>
+        `
+      )}
+      <div class="unified-container" role="region" aria-label="Rich Lean Diff">
+        ${rowsWithThreads.map(row => this.renderUnifiedRow(row))}
+      </div>
+      ${this.renderSelectionActionBox()}
+    `;
+  }
+
+  private renderUnifiedRow(row: AlignedLeanRowWithThreads) {
+    if (row.status === 'unchanged') {
+      const block = row.rightBlock ?? row.leftBlock;
+      if (!block) return nothing;
+      const allThreads = [...row.leftThreads, ...row.rightThreads];
+      return html`
+        <div
+          class="unified-block unchanged"
+          data-side="right"
+          data-line=${ifDefined(row.rightStartLine)}
+          @mouseenter=${() =>
+            this.handleCellMouseEnter(Side.RIGHT, row.rightStartLine)}
+          @mouseleave=${() => this.handleCellMouseLeave()}
+        >
+          ${this.renderCommentButton(Side.RIGHT, row.rightStartLine)}
+          <div class="cell-content">
+            ${this.renderBlock(row, block, Side.RIGHT)}
+          </div>
+          ${when(
+            allThreads.length > 0,
+            () => html`
+              <div class="threads-container">
+                ${allThreads.map(t => this.renderThread(t))}
+              </div>
+            `
+          )}
+        </div>
+      `;
+    }
+
+    if (row.status === 'deleted' && row.leftBlock) {
+      return html`
+        <div
+          class="unified-block deleted"
+          data-side="left"
+          data-line=${ifDefined(row.leftStartLine)}
+          @mouseenter=${() =>
+            this.handleCellMouseEnter(Side.LEFT, row.leftStartLine)}
+          @mouseleave=${() => this.handleCellMouseLeave()}
+        >
+          ${this.renderCommentButton(Side.LEFT, row.leftStartLine)}
+          <div class="cell-content">
+            ${this.renderBlock(row, row.leftBlock, Side.LEFT)}
+          </div>
+          ${when(
+            row.leftThreads.length > 0,
+            () => html`
+              <div class="threads-container">
+                ${row.leftThreads.map(t => this.renderThread(t, Side.LEFT))}
+              </div>
+            `
+          )}
+        </div>
+      `;
+    }
+
+    if (row.status === 'added' && row.rightBlock) {
+      return html`
+        <div
+          class="unified-block added"
+          data-side="right"
+          data-line=${ifDefined(row.rightStartLine)}
+          @mouseenter=${() =>
+            this.handleCellMouseEnter(Side.RIGHT, row.rightStartLine)}
+          @mouseleave=${() => this.handleCellMouseLeave()}
+        >
+          ${this.renderCommentButton(Side.RIGHT, row.rightStartLine)}
+          <div class="cell-content">
+            ${this.renderBlock(row, row.rightBlock, Side.RIGHT)}
+          </div>
+          ${when(
+            row.rightThreads.length > 0,
+            () => html`
+              <div class="threads-container">
+                ${row.rightThreads.map(t => this.renderThread(t, Side.RIGHT))}
+              </div>
+            `
+          )}
+        </div>
+      `;
+    }
+
+    // modified: render deleted (base) then added (revision)
+    return html`
+      ${when(
+        !!row.leftBlock,
+        () => html`
+          <div
+            class="unified-block deleted"
+            data-side="left"
+            data-line=${ifDefined(row.leftStartLine)}
+            @mouseenter=${() =>
+              this.handleCellMouseEnter(Side.LEFT, row.leftStartLine)}
+            @mouseleave=${() => this.handleCellMouseLeave()}
+          >
+            ${this.renderCommentButton(Side.LEFT, row.leftStartLine)}
+            <div class="cell-content">
+              ${this.renderBlock(row, row.leftBlock!, Side.LEFT)}
+            </div>
+            ${when(
+              row.leftThreads.length > 0,
+              () => html`
+                <div class="threads-container">
+                  ${row.leftThreads.map(t => this.renderThread(t, Side.LEFT))}
+                </div>
+              `
+            )}
+          </div>
+        `
+      )}
+      ${when(
+        !!row.rightBlock,
+        () => html`
+          <div
+            class="unified-block added"
+            data-side="right"
+            data-line=${ifDefined(row.rightStartLine)}
+            @mouseenter=${() =>
+              this.handleCellMouseEnter(Side.RIGHT, row.rightStartLine)}
+            @mouseleave=${() => this.handleCellMouseLeave()}
+          >
+            ${this.renderCommentButton(Side.RIGHT, row.rightStartLine)}
+            <div class="cell-content">
+              ${this.renderBlock(row, row.rightBlock!, Side.RIGHT)}
+            </div>
+            ${when(
+              row.rightThreads.length > 0,
+              () => html`
+                <div class="threads-container">
+                  ${row.rightThreads.map(t => this.renderThread(t, Side.RIGHT))}
+                </div>
+              `
+            )}
+          </div>
+        `
+      )}
+    `;
+  }
+
+  private renderRow(row: AlignedLeanRowWithThreads) {
+    return html`${this.renderLeftCell(row)}${this.renderRightCell(row)}`;
+  }
+
+  private renderLeftCell(row: AlignedLeanRowWithThreads) {
+    const isDeleted = row.status === 'deleted';
+    const isModified = row.status === 'modified';
+    const isEmpty = row.status === 'added' || !row.leftBlock;
+
+    const classes = {
+      'diff-cell': true,
+      left: true,
+      deleted: isDeleted,
+      'modified-left': isModified,
+      empty: isEmpty,
+    };
+
+    return html`
+      <div
+        class=${classMap(classes)}
+        data-side="left"
+        data-line=${ifDefined(row.leftStartLine)}
+        @mouseenter=${() =>
+          !isEmpty && this.handleCellMouseEnter(Side.LEFT, row.leftStartLine)}
+        @mouseleave=${() => this.handleCellMouseLeave()}
+      >
+        ${when(!isEmpty, () =>
+          this.renderCommentButton(Side.LEFT, row.leftStartLine)
+        )}
+        <div class="cell-content">
+          ${when(!isEmpty, () =>
+            this.renderBlock(row, row.leftBlock!, Side.LEFT)
+          )}
+        </div>
+        ${when(
+          row.leftThreads.length > 0,
+          () => html`
+            <div class="threads-container">
+              ${row.leftThreads.map(t => this.renderThread(t, Side.LEFT))}
+            </div>
+          `
+        )}
+      </div>
+    `;
+  }
+
+  private renderRightCell(row: AlignedLeanRowWithThreads) {
+    const isAdded = row.status === 'added';
+    const isModified = row.status === 'modified';
+    const isEmpty = row.status === 'deleted' || !row.rightBlock;
+
+    const classes = {
+      'diff-cell': true,
+      right: true,
+      added: isAdded,
+      'modified-right': isModified,
+      empty: isEmpty,
+    };
+
+    return html`
+      <div
+        class=${classMap(classes)}
+        data-side="right"
+        data-line=${ifDefined(row.rightStartLine)}
+        @mouseenter=${() =>
+          !isEmpty && this.handleCellMouseEnter(Side.RIGHT, row.rightStartLine)}
+        @mouseleave=${() => this.handleCellMouseLeave()}
+      >
+        ${when(!isEmpty, () =>
+          this.renderCommentButton(Side.RIGHT, row.rightStartLine)
+        )}
+        <div class="cell-content">
+          ${when(!isEmpty, () =>
+            this.renderBlock(row, row.rightBlock!, Side.RIGHT)
+          )}
+        </div>
+        ${when(
+          row.rightThreads.length > 0,
+          () => html`
+            <div class="threads-container">
+              ${row.rightThreads.map(t => this.renderThread(t, Side.RIGHT))}
+            </div>
+          `
+        )}
+      </div>
+    `;
+  }
+}
+
+declare global {
+  interface HTMLElementTagNameMap {
+    'gr-diff-lean-viewer': GrDiffLeanViewer;
+  }
+}
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-lean-viewer/gr-diff-lean-viewer_screenshot_test.ts b/polygerrit-ui/app/elements/diff/gr-diff-lean-viewer/gr-diff-lean-viewer_screenshot_test.ts
new file mode 100644
index 0000000..58745ac
--- /dev/null
+++ b/polygerrit-ui/app/elements/diff/gr-diff-lean-viewer/gr-diff-lean-viewer_screenshot_test.ts
@@ -0,0 +1,356 @@
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import '../../../test/common-test-setup';
+import './gr-diff-lean-viewer';
+import {GrDiffLeanViewer} from './gr-diff-lean-viewer';
+import {fixture, html} from '@open-wc/testing';
+// Until https://github.com/modernweb-dev/web/issues/2804 is fixed
+// @ts-expect-error
+import {visualDiff} from '@web/test-runner-visual-regression';
+import {visualDiffDarkTheme} from '../../../test/test-utils';
+import {
+  createAccountWithIdNameAndEmail,
+  createComment,
+  createCommentThread,
+  createDiff,
+  createPatchRange,
+} from '../../../test/test-data-generators';
+import {DiffInfo, DiffViewMode} from '../../../api/diff';
+import {CommentSide} from '../../../constants/constants';
+import {
+  CommentThread,
+  RevisionPatchSetNum,
+  Timestamp,
+} from '../../../types/common';
+
+suite('gr-diff-lean-viewer screenshot tests', () => {
+  let element: GrDiffLeanViewer;
+
+  const latticeModifiedDiff: DiffInfo = {
+    ...createDiff(),
+    meta_a: {
+      name: 'formal/BoundedLattice.lean',
+      content_type: 'text/x-lean',
+      lines: 34,
+    },
+    meta_b: {
+      name: 'formal/BoundedLattice.lean',
+      content_type: 'text/x-lean',
+      lines: 45,
+    },
+    content: [
+      {
+        ab: [
+          'import Init',
+          '',
+          '/-!',
+          '# Mechanized Soundness Proof of Bounded Lattice Engine',
+          '',
+        ],
+      },
+      {
+        a: [
+          'This Lean 4 module mechanizes the lattice height (`H = 38`) and monotonicity of `BoundedLattice`.',
+        ],
+        b: [
+          'This self-contained Lean 4 module (zero `sorry` / `axiom` declarations) mechanizes the packed `CellState` bounded join-semilattice (`H = 54`) and monotonicity of **`BoundedLattice`**.',
+        ],
+      },
+      {
+        ab: [
+          '-/',
+          '',
+          'namespace BoundedLattice',
+          '',
+          '-- ============================================================================',
+          '-- Section 1: Packed `CellState` Bounded Join-Semilattice (`L`)',
+          '-- ============================================================================',
+          '',
+          '/-- Single-cell state in `BoundedLattice` packed across bits `[19:0]` of a `UInt32`. -/',
+          'structure CellState where',
+          '  level    : Nat   -- `[2:0]` (`0..7`, `7 = MAX_LEVEL` is bottom)',
+        ],
+      },
+      {
+        a: ['  weight   : Nat   -- `[6:3]` (`0..15`, `15 = MAX_WEIGHT`)'],
+        b: [
+          '  weight   : Nat   -- `[7:3]` (`0..31`, `31 = MAX_WEIGHT` is bottom)',
+        ],
+      },
+      {
+        ab: [
+          '  priority : Nat   -- `[10:8]` (`0..7`, `7 = MAX_PRIORITY` is top)',
+        ],
+      },
+      {
+        b: ['  isPinned : Bool  -- `[11]` (`false` is bottom, `true` is top)'],
+      },
+      {
+        ab: [
+          '  flagBits : Nat   -- `[19:12]` (`0..0xff`, `0` is bottom)',
+          '  deriving DecidableEq, Repr',
+          '',
+          '/-- Bitwise subset characterization via `Nat.testBit`. -/',
+          'theorem maskSub_iff_testBit (a b : Nat) :',
+          '    maskSub a b ↔ ∀ i : Nat, a.testBit i = true → b.testBit i = true := by',
+        ],
+      },
+      {
+        a: ['  sorry'],
+        b: [
+          '  unfold maskSub',
+          '  constructor',
+          '  · intro h i ha',
+          '    have htb : (a &&& b).testBit i = a.testBit i := by rw [h]',
+          '    simp [ha] at htb',
+          '    exact htb',
+          '  · intro h',
+          '    apply Nat.eq_of_testBit_eq',
+          '    intro i',
+          '    simp only [Nat.testBit_and]',
+          '    cases ha : a.testBit i with',
+          '    | false => simp',
+          '    | true => exact h i ha',
+        ],
+      },
+    ],
+  };
+
+  const reviewerThread: CommentThread = createCommentThread([
+    {
+      ...createComment(),
+      author: createAccountWithIdNameAndEmail(2),
+      updated: '2026-11-13 18:30:00.000000000' as Timestamp,
+      line: 25,
+      message:
+        'Replacing `sorry` with `Nat.eq_of_testBit_eq` + `cases ha` is super clean and kernel-verifies instantly.',
+      patch_set: 1 as RevisionPatchSetNum,
+      side: CommentSide.REVISION,
+      unresolved: false,
+    },
+  ]);
+
+  setup(async () => {
+    element = await fixture<GrDiffLeanViewer>(
+      html`<gr-diff-lean-viewer
+        style="display: block; width: 1280px;"
+        .diff=${latticeModifiedDiff}
+        .path=${'formal/BoundedLattice.lean'}
+        .patchRange=${createPatchRange()}
+        .threads=${[reviewerThread]}
+      ></gr-diff-lean-viewer>`
+    );
+    await element.updateComplete;
+    await document.fonts?.ready;
+  });
+
+  test('side-by-side rich Lean 4 proof diff with structure table, sorry elimination, and inline comment', async () => {
+    await visualDiff(element, 'gr-diff-lean-viewer-proof-diff');
+    await visualDiffDarkTheme(element, 'gr-diff-lean-viewer-proof-diff');
+  });
+
+  test('unified added Lean 4 file excerpt from BoundedLattice.lean', async () => {
+    const addedLatticeDiff: DiffInfo = {
+      ...createDiff(),
+      meta_b: {
+        name: 'formal/BoundedLattice.lean',
+        content_type: 'text/x-lean',
+        lines: 34,
+      },
+      content: [
+        {
+          b: [
+            'import Init',
+            '',
+            '/-!',
+            '# Mechanized Soundness Proof of a Bounded Join-Semilattice Engine',
+            '',
+            '1. **Packed `CellState` Bounded Join-Semilattice (`Section 1`)**: models the 5-coordinate cell state (`H = 54`) and proves partial-order and join-semilattice laws.',
+            '2. **Monotone Weight Table (`Section 2`)**: kernel-checked via `decide` and `omega`.',
+            '-/',
+            '',
+            'namespace BoundedLattice',
+            '',
+            '-- ============================================================================',
+            '-- Section 1: Packed `CellState` Bounded Join-Semilattice (`L`)',
+            '-- ============================================================================',
+            '',
+            'def MAX_LEVEL : Nat := 7',
+            'def MAX_WEIGHT : Nat := 31',
+            'def MAX_HEIGHT : Nat := 54',
+            '',
+            '/-- Single-cell state in `BoundedLattice` packed across bits `[19:0]` of a `UInt32`. -/',
+            'structure CellState where',
+            '  level    : Nat   -- `[2:0]`   (`0..7`, `7 = MAX_LEVEL` is bottom, `0 = TOP_LEVEL` is top)',
+            '  weight   : Nat   -- `[7:3]`   (`0..31`, `31 = MAX_WEIGHT` is bottom, `0 = MIN_WEIGHT` is top)',
+            '  priority : Nat   -- `[10:8]`  (`0..7`, `0 = MIN_PRIORITY` is bottom, `7 = MAX_PRIORITY` is top)',
+            '  isPinned : Bool  -- `[11]`    (`false` is bottom, `true` is top)',
+            '  flagBits : Nat   -- `[19:12]` (`0..0xff`, `0` is bottom, `0xff` is top)',
+            '  deriving DecidableEq, Repr',
+            '',
+            '/-- Every `CellState` has lattice height at most `MAX_HEIGHT` (`54`). -/',
+            'theorem height_le_bound (s : CellState) : s.height ≤ MAX_HEIGHT := by',
+            '  unfold CellState.height MAX_HEIGHT MAX_LEVEL MAX_WEIGHT MAX_PRIORITY',
+            '  have h1 : 7 - Nat.min s.level 7 ≤ 7 := Nat.sub_le _ _',
+            '  have h2 : 31 - Nat.min s.weight 31 ≤ 31 := Nat.sub_le _ _',
+            '  have h3 : Nat.min s.priority 7 ≤ 7 := Nat.min_le_right _ _',
+            '  have h5 : bitCount 8 s.flagBits ≤ 8 := bitCount_le 8 s.flagBits',
+            '  cases s.isPinned <;> simp <;> omega',
+          ],
+        },
+      ],
+    };
+
+    element.diff = addedLatticeDiff;
+    element.viewMode = DiffViewMode.UNIFIED;
+    element.threads = [
+      createCommentThread([
+        {
+          ...createComment(),
+          author: createAccountWithIdNameAndEmail(2),
+          updated: '2026-11-13 18:35:00.000000000' as Timestamp,
+          line: 30,
+          message:
+            'Love that `height_le_bound` closes directly with `omega` after bounding each coordinate.',
+          patch_set: 1 as RevisionPatchSetNum,
+          side: CommentSide.REVISION,
+        },
+      ]),
+    ];
+    await element.updateComplete;
+    await document.fonts?.ready;
+
+    await visualDiff(element, 'gr-diff-lean-viewer-unified');
+    await visualDiffDarkTheme(element, 'gr-diff-lean-viewer-unified');
+  });
+
+  test('collapsed proofs specification view with soundness hygiene alerts', async () => {
+    element.diff = {
+      ...createDiff(),
+      meta_a: {name: 'Spec.lean', content_type: 'text/x-lean', lines: 20},
+      meta_b: {name: 'Spec.lean', content_type: 'text/x-lean', lines: 25},
+      content: [
+        {
+          ab: [
+            '/-- Monotonicity of the lookup `weightTable` function. -/',
+            'theorem weightTable_monotone (c x y : Nat) (h : x ≤ y) :',
+            '    weightTable c x ≤ weightTable c y := by',
+            '  decide',
+            '',
+            '/-- Unreachable subgraph vertices remain at lattice bottom under fixpoint iteration. -/',
+            'theorem unreachable_fixpoint_bot (G : DirectedGraph n) (S : Fin n → Bool) :',
+            '    Unreachable G S → ∀ v, S v = true → lfp G v = CellState.bot := by',
+          ],
+        },
+        {
+          a: ['  intro hunreach v hv', '  sorry'],
+          b: [
+            '  intro hunreach v hv',
+            '  apply iterStep_preserves_unreachable G S hunreach',
+            '  exact hv',
+          ],
+        },
+        {
+          b: [
+            '',
+            '/-- Draft lemma still awaiting mechanization. -/',
+            'theorem incremental_fixpoint_sound (G : DirectedGraph n) :',
+            '    fastFixpoint G = lfp G := by',
+            '  sorry',
+            '',
+            'axiom oracle_bound : ∀ n : Nat, n ≤ MAX_HEIGHT',
+          ],
+        },
+      ],
+    };
+    element.threads = [];
+    element.viewMode = DiffViewMode.SIDE_BY_SIDE;
+    element.collapseProofs = true;
+    await element.updateComplete;
+    await document.fonts?.ready;
+
+    await visualDiff(element, 'gr-diff-lean-viewer-collapsed-proofs');
+    await visualDiffDarkTheme(element, 'gr-diff-lean-viewer-collapsed-proofs');
+  });
+
+  test('official Lean 4 language constructs (extends, inductive, instance, mutual, termination_by, calc, raw strings)', async () => {
+    element.diff = {
+      ...createDiff(),
+      meta_a: {name: 'LangRef.lean', content_type: 'text/x-lean', lines: 28},
+      meta_b: {name: 'LangRef.lean', content_type: 'text/x-lean', lines: 42},
+      content: [
+        {
+          ab: [
+            'module',
+            '',
+            'public import Init.Core',
+            '',
+            'structure LabeledPoint extends Point where',
+            '  label : String := r#"origin "default""# -- raw string literal',
+            "  delim : Char := '\"' -- char literal containing double quote",
+            'deriving DecidableEq, Repr',
+            '',
+            'inductive Direction where',
+            '  | north | south | east | west -- inline enum constructors',
+            'deriving Repr, BEq',
+            '',
+            'mutual',
+            '  def isEven : Nat → Bool',
+            '    | 0 => true',
+            '    | n + 1 => isOdd n',
+            '',
+            '  def isOdd : Nat → Bool',
+            '    | 0 => false',
+            '    | n + 1 => isEven n',
+            'end',
+            '',
+            'instance (priority := high) : Add Point where',
+            '  add p q := ⟨p.x + q.x, p.y + q.y⟩',
+            '',
+          ],
+        },
+        {
+          a: [
+            'def ackermann (m n : Nat) : Nat :=',
+            '  match m, n with',
+            '  | 0, y => y + 1',
+            '  | x + 1, 0 => ackermann x 1',
+            '  | x + 1, y + 1 => ackermann x (ackermann (x + 1) y)',
+            'termination_by (m, n)',
+            'decreasing_by',
+            '  sorry',
+          ],
+          b: [
+            'def ackermann (m n : Nat) : Nat :=',
+            '  match m, n with',
+            '  | 0, y => y + 1',
+            '  | x + 1, 0 => ackermann x 1',
+            '  | x + 1, y + 1 => ackermann x (ackermann (x + 1) y)',
+            'termination_by (m, n)',
+            'decreasing_by',
+            '  all_goals simp_wf',
+            '  all_goals omega',
+            '',
+            '/-- Equational chain + targeted `conv` rewrite from the Lean 4 reference. -/',
+            'theorem add_comm_rhs (a b c : Nat) : a + (b + c) = a + (c + b) := by',
+            '  conv =>',
+            '    lhs',
+            '    arg 2',
+            '    rw [Nat.add_comm]',
+          ],
+        },
+      ],
+    };
+    element.threads = [];
+    element.viewMode = DiffViewMode.SIDE_BY_SIDE;
+    element.collapseProofs = false;
+    await element.updateComplete;
+    await document.fonts?.ready;
+
+    await visualDiff(element, 'gr-diff-lean-viewer-lean-lang-ref');
+    await visualDiffDarkTheme(element, 'gr-diff-lean-viewer-lean-lang-ref');
+  });
+});
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-lean-viewer/gr-diff-lean-viewer_test.ts b/polygerrit-ui/app/elements/diff/gr-diff-lean-viewer/gr-diff-lean-viewer_test.ts
new file mode 100644
index 0000000..0f7d935
--- /dev/null
+++ b/polygerrit-ui/app/elements/diff/gr-diff-lean-viewer/gr-diff-lean-viewer_test.ts
@@ -0,0 +1,1341 @@
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import {assert, fixture, html} from '@open-wc/testing';
+import '../../../test/common-test-setup';
+import './gr-diff-lean-viewer';
+import {GrDiffLeanViewer} from './gr-diff-lean-viewer';
+import type {GrCommentThread} from '../../shared/gr-comment-thread/gr-comment-thread';
+import {DiffInfo} from '../../../types/diff';
+import {CommentSide, DiffViewMode, Side} from '../../../constants/constants';
+import {
+  createAccountDetailWithId,
+  createComment,
+  createCommentThread,
+  createDiff,
+  createPatchRange,
+} from '../../../test/test-data-generators';
+import {testResolver} from '../../../test/common-test-setup';
+import {
+  CommentsModel,
+  commentsModelToken,
+} from '../../../models/comments/comments-model';
+import {UserModel, userModelToken} from '../../../models/user/user-model';
+import {
+  CommentThread,
+  DraftInfo,
+  EDIT,
+  PARENT,
+  RevisionPatchSetNum,
+} from '../../../types/common';
+import sinon from 'sinon';
+
+suite('gr-diff-lean-viewer tests', () => {
+  let element: GrDiffLeanViewer;
+  let commentsModel: CommentsModel;
+  let userModel: UserModel;
+
+  const sampleLeanDiff: DiffInfo = {
+    ...createDiff(),
+    meta_a: {name: 'Soundness.lean', content_type: 'text/x-lean', lines: 16},
+    meta_b: {name: 'Soundness.lean', content_type: 'text/x-lean', lines: 18},
+    content: [
+      {
+        ab: [
+          '/-!',
+          '# Bounded Lattice Soundness',
+          'Mechanized proofs with zero `sorry`.',
+          '-/',
+          '',
+          'structure CellState where',
+          '  level : Nat -- `[2:0]`',
+          '  weight : Nat -- `[7:3]`',
+          '  deriving DecidableEq, Repr',
+          '',
+          '/-- Reflexivity of `maskSub`. -/',
+          'theorem maskSub_refl (a : Nat) : (a &&& a) = a := by',
+        ],
+      },
+      {
+        a: ['  sorry'],
+        b: ['  apply Nat.eq_of_testBit_eq', '  intro i', '  simp'],
+      },
+    ],
+  };
+
+  setup(async () => {
+    commentsModel = testResolver(commentsModelToken);
+    userModel = testResolver(userModelToken);
+    userModel.setAccount(createAccountDetailWithId(1));
+
+    element = await fixture<GrDiffLeanViewer>(
+      html`<gr-diff-lean-viewer></gr-diff-lean-viewer>`
+    );
+  });
+
+  test('renders empty grid and hides summary bar when no diff is provided', () => {
+    const grid = element.shadowRoot!.querySelector('.diff-grid');
+    assert.isNotNull(grid);
+    assert.equal(grid.children.length, 0);
+    assert.isNull(element.shadowRoot!.querySelector('.lean-summary-bar'));
+  });
+
+  test('renders summary bar, hygiene verified pill, structures, and theorems side-by-side', async () => {
+    element.diff = sampleLeanDiff;
+    await element.updateComplete;
+
+    const summaryBar = element.shadowRoot!.querySelector('.lean-summary-bar');
+    assert.isNotNull(summaryBar);
+    assert.include(summaryBar.textContent, 'Lean 4');
+    assert.include(summaryBar.textContent, '0 sorry');
+    assert.include(summaryBar.textContent, '1 theorem');
+    assert.include(summaryBar.textContent, '1 type');
+
+    const verifiedPill = element.shadowRoot!.querySelector(
+      '.hygiene-pill.verified'
+    );
+    assert.isNotNull(verifiedPill);
+
+    const leftHeader = element.shadowRoot!.querySelector('.column-header.left');
+    const rightHeader = element.shadowRoot!.querySelector(
+      '.column-header.right'
+    );
+    assert.equal(leftHeader!.textContent.trim(), 'Base');
+    assert.equal(rightHeader!.textContent.trim(), 'Revision');
+
+    // Structure renders a structured field table + deriving chips
+    const fieldsTable = element.shadowRoot!.querySelector('.lean-fields-table');
+    assert.isNotNull(fieldsTable);
+    assert.include(fieldsTable.textContent, 'level');
+    assert.include(fieldsTable.textContent, 'weight');
+
+    const derivingChips = Array.from(
+      element.shadowRoot!.querySelectorAll('.lean-deriving-chip')
+    ).map(el => el.textContent.trim());
+    assert.include(derivingChips, 'DecidableEq');
+    assert.include(derivingChips, 'Repr');
+
+    // Left (base) theorem card displays sorry hygiene warning badge, right does not
+    const modifiedLeft = element.shadowRoot!.querySelector(
+      '.diff-cell.modified-left'
+    );
+    const modifiedRight = element.shadowRoot!.querySelector(
+      '.diff-cell.modified-right'
+    );
+    assert.isNotNull(modifiedLeft);
+    assert.isNotNull(modifiedRight);
+    assert.isNotNull(modifiedLeft.querySelector('.lean-hygiene-badge.error'));
+    assert.isNull(modifiedRight.querySelector('.lean-hygiene-badge.error'));
+  });
+
+  test('surfaces sorry, axiom, and partial warnings in summary bar when present in revision', async () => {
+    element.diff = {
+      ...createDiff(),
+      content: [
+        {
+          b: [
+            'axiom trust_me : False',
+            '',
+            'partial def spin (n : Nat) : Nat := spin (n + 1)',
+            '',
+            'theorem unfinished : True := by',
+            '  sorry',
+          ],
+        },
+      ],
+    };
+    await element.updateComplete;
+
+    assert.isNull(element.shadowRoot!.querySelector('.hygiene-pill.verified'));
+    const errorPills = Array.from(
+      element.shadowRoot!.querySelectorAll('.hygiene-pill.error')
+    ).map(el => el.textContent.trim());
+    const warningPills = Array.from(
+      element.shadowRoot!.querySelectorAll('.hygiene-pill.warning')
+    ).map(el => el.textContent.trim());
+
+    assert.isTrue(errorPills.some(t => t.includes('1 sorry')));
+    assert.isTrue(warningPills.some(t => t.includes('1 axiom')));
+    assert.isTrue(warningPills.some(t => t.includes('1 partial')));
+  });
+
+  test('renders official lean-lang.org constructs cleanly without false sorry alerts on raw strings, char quotes, or guillemets', async () => {
+    element.diff = {
+      ...createDiff(),
+      content: [
+        {
+          b: [
+            'module',
+            '',
+            'public import Init.Core',
+            '',
+            'structure Child extends Parent where',
+            "  quote : Char := '\"' -- double-quote literal",
+            '  rawNote : String := r#"never trigger "sorry" here"#',
+            'deriving Repr, BEq',
+            '',
+            'inductive Direction where',
+            '  | north | south | east | west',
+            'deriving Repr',
+            '',
+            'mutual',
+            '  def isEven : Nat → Bool',
+            '    | 0 => true',
+            '    | n + 1 => isOdd n',
+            '',
+            '  def isOdd : Nat → Bool',
+            '    | 0 => false',
+            '    | n + 1 => isEven n',
+            'end',
+            '',
+            'instance : Add Nat where',
+            '  add x y := x + y',
+            '',
+            'def ackermann (m n : Nat) : Nat :=',
+            '  match m, n with',
+            '  | 0, y => y + 1',
+            '  | x + 1, 0 => ackermann x 1',
+            '  | x + 1, y + 1 => ackermann x (ackermann (x + 1) y)',
+            'termination_by (m, n)',
+            'decreasing_by',
+            '  all_goals simp_wf',
+            '',
+            'theorem «1 + 1 = 2» : 1 + 1 = 2 := by',
+            '  calc',
+            '    1 + 1 = 2 := rfl',
+            '',
+            'def «sorry» : Nat := 0',
+          ],
+        },
+      ],
+    };
+    await element.updateComplete;
+
+    // Must show green verified `0 sorry` pill and ZERO error/warning hygiene pills
+    const verifiedPill = element.shadowRoot!.querySelector(
+      '.hygiene-pill.verified'
+    );
+    assert.isNotNull(verifiedPill);
+    assert.include(verifiedPill.textContent, '0 sorry');
+    assert.isNull(element.shadowRoot!.querySelector('.hygiene-pill.error'));
+    assert.isNull(element.shadowRoot!.querySelector('.hygiene-pill.warning'));
+
+    // Inline-pipe inductive renders all 4 constructors in the constructor table
+    const tables = Array.from(
+      element.shadowRoot!.querySelectorAll('.lean-fields-table')
+    );
+    assert.isAtLeast(tables.length, 2);
+    const ctorTable = tables[1];
+    assert.include(ctorTable.textContent, '| north');
+    assert.include(ctorTable.textContent, '| south');
+    assert.include(ctorTable.textContent, '| east');
+    assert.include(ctorTable.textContent, '| west');
+
+    // Summary stats include theorems, types, defs, and instances
+    const summaryText =
+      element.shadowRoot!.querySelector('.lean-summary-bar')!.textContent;
+    assert.include(summaryText, '1 theorem');
+    assert.include(summaryText, '2 types');
+    assert.include(summaryText, '1 instance');
+  });
+
+  test('surfaces unsafe, admit, and native_decide warnings in summary bar and declaration cards', async () => {
+    element.diff = {
+      ...createDiff(),
+      content: [
+        {
+          b: [
+            'unsafe def readMem (n : Nat) : Nat := n',
+            '',
+            'theorem skipped : False := by admit',
+            '',
+            'theorem fastCheck : 2 + 2 = 4 := by native_decide',
+          ],
+        },
+      ],
+    };
+    await element.updateComplete;
+
+    assert.isNull(element.shadowRoot!.querySelector('.hygiene-pill.verified'));
+    const errorPills = Array.from(
+      element.shadowRoot!.querySelectorAll('.hygiene-pill.error')
+    ).map(el => el.textContent.trim());
+    const warningPills = Array.from(
+      element.shadowRoot!.querySelectorAll('.hygiene-pill.warning')
+    ).map(el => el.textContent.trim());
+
+    assert.isTrue(errorPills.some(t => t.includes('1 sorry')));
+    assert.isTrue(errorPills.some(t => t.includes('1 unsafe')));
+    assert.isTrue(warningPills.some(t => t.includes('1 native_decide')));
+  });
+
+  test('renders unified diff mode correctly and toggles back to side-by-side', async () => {
+    element.diff = sampleLeanDiff;
+    element.viewMode = DiffViewMode.UNIFIED;
+    await element.updateComplete;
+
+    assert.isNotNull(element.shadowRoot!.querySelector('.unified-container'));
+    assert.isNull(element.shadowRoot!.querySelector('.column-headers'));
+    assert.isNotNull(
+      element.shadowRoot!.querySelector('.unified-block.unchanged')
+    );
+    assert.isNotNull(
+      element.shadowRoot!.querySelector('.unified-block.deleted')
+    );
+    assert.isNotNull(element.shadowRoot!.querySelector('.unified-block.added'));
+
+    element.viewMode = DiffViewMode.SIDE_BY_SIDE;
+    await element.updateComplete;
+    assert.isNull(element.shadowRoot!.querySelector('.unified-container'));
+    assert.isNotNull(element.shadowRoot!.querySelector('.diff-grid'));
+  });
+
+  test('collapses and expands proof bodies globally and per theorem', async () => {
+    element.diff = sampleLeanDiff;
+    await element.updateComplete;
+
+    const globalToggle = element.shadowRoot!.querySelector<HTMLButtonElement>(
+      '.proof-collapse-btn'
+    );
+    assert.isNotNull(globalToggle);
+    assert.include(globalToggle.textContent, 'Collapse proofs');
+
+    // Proof bodies are initially visible (in both left and right modified cells)
+    assert.isNotNull(
+      element.shadowRoot!.querySelector(
+        '.diff-cell.modified-right .lean-body-section'
+      )
+    );
+
+    // Collapse all proofs globally
+    globalToggle.click();
+    await element.updateComplete;
+    assert.isTrue(element.collapseProofs);
+    assert.include(globalToggle.textContent, 'Expand proofs');
+    assert.isNull(
+      element.shadowRoot!.querySelector(
+        '.diff-cell.modified-right .lean-body-section'
+      )
+    );
+    assert.isNotNull(
+      element.shadowRoot!.querySelector('.lean-proof-changed-pill')
+    );
+
+    // Click per-theorem proof bar to re-expand just this theorem
+    const rowProofBar = element.shadowRoot!.querySelector<HTMLButtonElement>(
+      '.diff-cell.modified-right .lean-proof-bar'
+    );
+    assert.isNotNull(rowProofBar);
+    rowProofBar.click();
+    await element.updateComplete;
+    assert.isNotNull(
+      element.shadowRoot!.querySelector(
+        '.diff-cell.modified-right .lean-body-section'
+      )
+    );
+  });
+
+  suite('comment threads rendering and creation', () => {
+    test('renders file-level and block-level threads in side-by-side mode', async () => {
+      const fileThread: CommentThread = createCommentThread([
+        {
+          ...createComment(),
+          line: undefined,
+          message: 'Overall formalization looks rock solid!',
+          patch_set: 1 as RevisionPatchSetNum,
+          side: CommentSide.REVISION,
+        },
+      ]);
+      const lineThread: CommentThread = createCommentThread([
+        {
+          ...createComment(),
+          line: 13,
+          message: 'Nice elimination of sorry via Nat.eq_of_testBit_eq.',
+          patch_set: 1 as RevisionPatchSetNum,
+          side: CommentSide.REVISION,
+        },
+      ]);
+
+      element.diff = sampleLeanDiff;
+      element.path = 'Soundness.lean';
+      element.patchRange = createPatchRange();
+      element.threads = [fileThread, lineThread];
+      await element.updateComplete;
+
+      const fileLevelContainer = element.shadowRoot!.querySelector(
+        '.file-level-threads'
+      );
+      assert.isNotNull(fileLevelContainer);
+      assert.equal(
+        fileLevelContainer.querySelectorAll('gr-comment-thread').length,
+        1
+      );
+
+      const blockThreads = element.shadowRoot!.querySelectorAll(
+        '.diff-grid gr-comment-thread'
+      );
+      assert.equal(blockThreads.length, 1);
+      assert.equal(blockThreads[0].getAttribute('line-num'), '13');
+    });
+
+    test('clicking a code line number creates a draft on that exact line', async () => {
+      const addNewDraftSpy = sinon.spy(commentsModel, 'addNewDraft');
+      element.diff = sampleLeanDiff;
+      element.path = 'Soundness.lean';
+      element.patchRange = createPatchRange();
+      element.loggedIn = true;
+      await element.updateComplete;
+
+      const line14Btn = element.shadowRoot!.querySelector<HTMLButtonElement>(
+        '.diff-cell.modified-right .lean-code-line[data-line="14"] .lean-line-num'
+      );
+      assert.isNotNull(line14Btn);
+      line14Btn.click();
+
+      assert.isTrue(addNewDraftSpy.calledOnce);
+      const draft: DraftInfo = addNewDraftSpy.firstCall.args[0];
+      assert.equal(draft.path, 'Soundness.lean');
+      assert.equal(draft.line, 14);
+      assert.equal(draft.side, CommentSide.REVISION);
+    });
+
+    test('supports commenting on left (PARENT) side and in unified view mode', async () => {
+      const addNewDraftSpy = sinon.spy(commentsModel, 'addNewDraft');
+      element.diff = sampleLeanDiff;
+      element.path = 'Soundness.lean';
+      element.patchRange = createPatchRange();
+      element.loggedIn = true;
+      await element.updateComplete;
+
+      // Click line 13 on the LEFT (Base) modified cell (`  sorry`)
+      const leftLine13Btn =
+        element.shadowRoot!.querySelector<HTMLButtonElement>(
+          '.diff-cell.modified-left .lean-code-line[data-line="13"] .lean-line-num'
+        );
+      assert.isNotNull(leftLine13Btn);
+      leftLine13Btn.click();
+
+      assert.isTrue(addNewDraftSpy.calledOnce);
+      const leftDraft: DraftInfo = addNewDraftSpy.firstCall.args[0];
+      assert.equal(leftDraft.line, 13);
+      assert.equal(leftDraft.side, CommentSide.PARENT);
+
+      // Switch to UNIFIED view and click a line number on the added block
+      element.viewMode = DiffViewMode.UNIFIED;
+      await element.updateComplete;
+
+      const unifiedLine14Btn =
+        element.shadowRoot!.querySelector<HTMLButtonElement>(
+          '.unified-block.added .lean-code-line[data-line="14"] .lean-line-num'
+        );
+      assert.isNotNull(unifiedLine14Btn);
+      unifiedLine14Btn.click();
+
+      assert.isTrue(addNewDraftSpy.calledTwice);
+      const unifiedDraft: DraftInfo = addNewDraftSpy.secondCall.args[0];
+      assert.equal(unifiedDraft.line, 14);
+      assert.equal(unifiedDraft.side, CommentSide.REVISION);
+    });
+
+    test('clicking hover Comment button creates a draft on the block start line', async () => {
+      const addNewDraftSpy = sinon.spy(commentsModel, 'addNewDraft');
+      element.diff = sampleLeanDiff;
+      element.path = 'Soundness.lean';
+      element.patchRange = createPatchRange();
+      element.loggedIn = true;
+      await element.updateComplete;
+
+      const addBtn = element.shadowRoot!.querySelector<HTMLButtonElement>(
+        '.diff-cell.modified-right .add-comment-btn'
+      );
+      assert.isNotNull(addBtn);
+      addBtn.click();
+
+      assert.isTrue(addNewDraftSpy.calledOnce);
+      const draft: DraftInfo = addNewDraftSpy.firstCall.args[0];
+      assert.equal(draft.path, 'Soundness.lean');
+      assert.equal(draft.line, 11);
+    });
+
+    test('pressing c while hovering a specific line comments on that exact line and ignores Ctrl+C', async () => {
+      const addNewDraftSpy = sinon.spy(commentsModel, 'addNewDraft');
+      element.diff = sampleLeanDiff;
+      element.path = 'Soundness.lean';
+      element.patchRange = createPatchRange();
+      element.loggedIn = true;
+      await element.updateComplete;
+
+      const line15 = element.shadowRoot!.querySelector<HTMLElement>(
+        '.diff-cell.modified-right .lean-code-line[data-line="15"]'
+      );
+      assert.isNotNull(line15);
+      line15.dispatchEvent(new MouseEvent('mouseenter', {bubbles: false}));
+
+      // Ctrl+C must be ignored (copy shortcut)
+      window.dispatchEvent(
+        new KeyboardEvent('keydown', {key: 'c', ctrlKey: true, bubbles: true})
+      );
+      assert.isFalse(addNewDraftSpy.called);
+
+      // Plain `c` creates a draft on hovered line 15
+      window.dispatchEvent(
+        new KeyboardEvent('keydown', {key: 'c', bubbles: true})
+      );
+      assert.isTrue(addNewDraftSpy.calledOnce);
+      assert.equal(addNewDraftSpy.firstCall.args[0].line, 15);
+    });
+
+    test('selecting text inside a multi-line proof creates draft on exact selected line', async () => {
+      const addNewDraftSpy = sinon.spy(commentsModel, 'addNewDraft');
+      element.diff = sampleLeanDiff;
+      element.path = 'Soundness.lean';
+      element.patchRange = createPatchRange();
+      element.loggedIn = true;
+      await element.updateComplete;
+
+      const line14Text = element.shadowRoot!.querySelector<HTMLElement>(
+        '.diff-cell.modified-right .lean-code-line[data-line="14"] .lean-code-text'
+      )!;
+      assert.isNotNull(line14Text);
+
+      const range = document.createRange();
+      range.selectNodeContents(line14Text);
+      const sel = window.getSelection()!;
+      sel.removeAllRanges();
+      sel.addRange(range);
+      document.dispatchEvent(new Event('selectionchange'));
+
+      assert.isTrue(element.hasActiveSelection());
+      element.createCommentFromSelectionOrHover();
+
+      assert.isTrue(addNewDraftSpy.calledOnce);
+      assert.equal(addNewDraftSpy.firstCall.args[0].line, 14);
+      assert.equal(addNewDraftSpy.firstCall.args[0].side, CommentSide.REVISION);
+    });
+
+    test('fires show-auth-required when logged out user attempts to comment', async () => {
+      const authSpy = sinon.spy();
+      element.addEventListener('show-auth-required', authSpy);
+      element.diff = sampleLeanDiff;
+      element.path = 'Soundness.lean';
+      element.patchRange = createPatchRange();
+      element.loggedIn = false;
+      await element.updateComplete;
+
+      element.createComment(Side.RIGHT, 12);
+      assert.isTrue(authSpy.calledOnce);
+    });
+
+    test('blocks commenting on EDIT patchset', async () => {
+      const alertSpy = sinon.spy();
+      element.addEventListener('show-alert', alertSpy);
+      element.diff = sampleLeanDiff;
+      element.path = 'Soundness.lean';
+      element.patchRange = {basePatchNum: PARENT, patchNum: EDIT};
+      element.loggedIn = true;
+      await element.updateComplete;
+
+      element.createComment(Side.RIGHT, 12);
+      assert.isTrue(alertSpy.calledOnce);
+      assert.include(alertSpy.firstCall.args[0].detail.message, 'edit');
+    });
+
+    test('autoSaveDrafts flushes all rendered gr-comment-thread elements', async () => {
+      const lineThread: CommentThread = createCommentThread([
+        {
+          ...createComment(),
+          line: 13,
+          message: 'Check lemma',
+          patch_set: 1 as RevisionPatchSetNum,
+          side: CommentSide.REVISION,
+        },
+      ]);
+      element.diff = sampleLeanDiff;
+      element.path = 'Soundness.lean';
+      element.patchRange = createPatchRange();
+      element.threads = [lineThread];
+      await element.updateComplete;
+
+      const threadEl =
+        element.shadowRoot!.querySelector<HTMLElement>('gr-comment-thread')!;
+      assert.isNotNull(threadEl);
+      // @ts-expect-error spying on GrCommentThread.autoSave
+      const autoSaveSpy = sinon.spy(threadEl, 'autoSave');
+      await element.autoSaveDrafts();
+      assert.isTrue(autoSaveSpy.calledOnce);
+    });
+  });
+
+  suite(
+    'adversarial XSS, class-hijacking, hygiene, and interaction hardening',
+    () => {
+      test('end-to-end Shadow DOM audit blocks XSS across module docs, docstrings, banners, fields, and code diffs', async () => {
+        element.diff = {
+          ...createDiff(),
+          meta_a: {name: 'Evil.lean', content_type: 'text/x-lean', lines: 20},
+          meta_b: {name: 'Evil.lean', content_type: 'text/x-lean', lines: 24},
+          content: [
+            {
+              a: [
+                '/-!',
+                '<script>window.__xss = 1</script>',
+                '[js](javascript:alert(1)) [proto](//evil.com) [bs](/\\evil.com)',
+                '-/',
+                '-- ========================================================',
+                '-- <img src=x onerror=alert(1)>',
+                '-- ========================================================',
+                'structure S where',
+                '  x : Nat -- <svg onload=alert(1)>',
+                'theorem t : True := by',
+                '  -- <scr',
+                '  trivial',
+              ],
+              b: [
+                '/-!',
+                '<svg onload="alert(1)"></svg>',
+                '<iframe src="javascript:alert(1)"></iframe>',
+                '<noscript><p title="</noscript><img src=x onerror=alert(1)>">',
+                '![img](javascript:alert(1))',
+                '[entity](&#106;avascript:alert(1)) [ctrl](java\tscript:alert(1))',
+                '[docs](https://lean-lang.org/doc/reference/latest/)',
+                '[rel](./Other.lean#L1)',
+                '-/',
+                '-- ========================================================',
+                '-- <script>alert(2)</script> Banner',
+                '-- ========================================================',
+                '/-- <style>body{display:none}</style> <math><mtext></mtext><img src=x onerror=alert(1)></math> -/',
+                'structure S where',
+                '  x : Nat -- <img src=x onerror=alert(1)> [bad](javascript:alert(1))',
+                'theorem t : True := by',
+                '  -- <script>alert(3)</script>',
+                '  trivial',
+              ],
+            },
+          ],
+        };
+        await element.updateComplete;
+
+        const grid = element.shadowRoot!.querySelector('.diff-grid')!;
+        assert.isNotNull(grid);
+
+        const forbiddenTags = [
+          'script',
+          'svg',
+          'iframe',
+          'img',
+          'object',
+          'embed',
+          'math',
+          'style',
+        ];
+        for (const tag of forbiddenTags) {
+          assert.isNull(
+            grid.querySelector(tag),
+            `Forbidden <${tag}> rendered in Shadow DOM`
+          );
+        }
+
+        for (const el of Array.from(grid.querySelectorAll('*'))) {
+          for (const attr of Array.from(el.attributes)) {
+            assert.isFalse(
+              attr.name.toLowerCase().startsWith('on'),
+              `Forbidden event handler attribute rendered: ${attr.name}`
+            );
+          }
+        }
+
+        const links = Array.from(grid.querySelectorAll('a'));
+        assert.isAtLeast(links.length, 4);
+        for (const a of links) {
+          const href = a.getAttribute('href') ?? '';
+          assert.isFalse(/^(javascript|data|vbscript|file):/i.test(href));
+          assert.isFalse(href.startsWith('//'));
+          assert.isFalse(href.includes('\\'));
+          assert.equal(a.getAttribute('rel'), 'noopener noreferrer');
+          if (href.startsWith('https://')) {
+            assert.equal(a.getAttribute('target'), '_blank');
+          }
+        }
+      });
+
+      test('fenced code block CSS class injection cannot hijack #selection-action-box or diff-cell side resolution', async () => {
+        const addNewDraftSpy = sinon.spy(commentsModel, 'addNewDraft');
+        element.diff = {
+          ...createDiff(),
+          meta_a: {name: 'Hijack.lean', content_type: 'text/x-lean', lines: 6},
+          meta_b: {name: 'Hijack.lean', content_type: 'text/x-lean', lines: 6},
+          content: [
+            {
+              a: [
+                '/-!',
+                '```lean selection-action-box diff-cell hygiene-pill verified',
+                'base_payload',
+                '```',
+                '-/',
+              ],
+              b: [
+                '/-!',
+                '```lean selection-action-box diff-cell hygiene-pill verified',
+                'rev_payload',
+                '```',
+                '-/',
+              ],
+            },
+          ],
+        };
+        element.path = 'Hijack.lean';
+        element.patchRange = createPatchRange();
+        element.loggedIn = true;
+        await element.updateComplete;
+
+        // `#selection-action-box` must resolve to the real popover div, never a <code> element
+        const actionBox = element.shadowRoot!.querySelector(
+          '#selection-action-box'
+        );
+        assert.isNotNull(actionBox);
+        assert.equal(actionBox.tagName, 'DIV');
+
+        const codeBlocks = Array.from(
+          element.shadowRoot!.querySelectorAll('.lean-module-doc pre code')
+        );
+        assert.isAtLeast(codeBlocks.length, 2);
+        for (const codeEl of codeBlocks) {
+          assert.equal(codeEl.className, 'language-lean');
+          assert.isFalse(codeEl.classList.contains('selection-action-box'));
+          assert.isFalse(codeEl.classList.contains('diff-cell'));
+          assert.isFalse(codeEl.classList.contains('hygiene-pill'));
+        }
+
+        // Selecting text inside the Base (left) fenced code block must still attribute to Side.LEFT (PARENT)
+        const leftCodeEl = element.shadowRoot!.querySelector<HTMLElement>(
+          '.diff-cell[data-side="left"] pre code'
+        )!;
+        assert.isNotNull(leftCodeEl);
+        const range = document.createRange();
+        range.selectNodeContents(leftCodeEl);
+        const sel = window.getSelection()!;
+        sel.removeAllRanges();
+        sel.addRange(range);
+        document.dispatchEvent(new Event('selectionchange'));
+
+        assert.isTrue(element.hasActiveSelection());
+        element.createCommentFromSelectionOrHover();
+        assert.isTrue(addNewDraftSpy.calledOnce);
+        assert.equal(addNewDraftSpy.firstCall.args[0].side, CommentSide.PARENT);
+      });
+
+      test('suppresses green verified badge for every soundness hygiene smuggling vector', async () => {
+        const smugglingPayloads = [
+          ['theorem t : 1 = 1 := by native_decide'],
+          ['partial def loop (n : Nat) : Nat := loop n'],
+          ['theorem t : False := sorryAx False false'],
+          ['theorem t : False := «sorryAx» False false'],
+          ['theorem t : True := Lean.ofReduceBool true rfl'],
+          ['/- Copyright -/ axiom backdoor : False'],
+          ['open Nat in theorem sneaky : False := by sorry'],
+          ['def s := s!"{\'"\'}"', 'theorem sneaky : False := by sorry'],
+          ['macro "cheat" : tactic => `(tactic| sorry)'],
+        ];
+
+        for (const lines of smugglingPayloads) {
+          element.diff = {
+            ...createDiff(),
+            content: [{b: lines}],
+          };
+          await element.updateComplete;
+          assert.isNull(
+            element.shadowRoot!.querySelector('.hygiene-pill.verified'),
+            `Green verified badge leaked for payload: ${lines.join('\\n')}`
+          );
+        }
+      });
+
+      test('keydown c only fires once when multiple viewers are mounted and ignores repeat/defaultPrevented/dialog/input', async () => {
+        const second = await fixture<GrDiffLeanViewer>(
+          html`<gr-diff-lean-viewer></gr-diff-lean-viewer>`
+        );
+        const addNewDraftSpy = sinon.spy(commentsModel, 'addNewDraft');
+        for (const v of [element, second]) {
+          v.diff = sampleLeanDiff;
+          v.path = 'Soundness.lean';
+          v.patchRange = createPatchRange();
+          v.loggedIn = true;
+          await v.updateComplete;
+        }
+
+        const line15 = element.shadowRoot!.querySelector<HTMLElement>(
+          '.diff-cell.modified-right .lean-code-line[data-line="15"]'
+        )!;
+        line15.dispatchEvent(new MouseEvent('mouseenter', {bubbles: false}));
+        assert.isTrue(element.hasHoverTarget());
+        assert.isFalse(second.hasHoverTarget());
+
+        // Repeat and defaultPrevented events must be ignored
+        window.dispatchEvent(
+          new KeyboardEvent('keydown', {key: 'c', repeat: true, bubbles: true})
+        );
+        const prevented = new KeyboardEvent('keydown', {
+          key: 'c',
+          cancelable: true,
+          bubbles: true,
+        });
+        prevented.preventDefault();
+        window.dispatchEvent(prevented);
+
+        // Events originating inside a <dialog> or <input> must be ignored
+        const dialog = document.createElement('dialog');
+        document.body.appendChild(dialog);
+        try {
+          dialog.dispatchEvent(
+            new KeyboardEvent('keydown', {key: 'c', bubbles: true})
+          );
+        } finally {
+          dialog.remove();
+        }
+        assert.isFalse(addNewDraftSpy.called);
+
+        // Plain c fires exactly ONCE on the hovered viewer
+        window.dispatchEvent(
+          new KeyboardEvent('keydown', {key: 'c', bubbles: true})
+        );
+        assert.isTrue(addNewDraftSpy.calledOnce);
+        assert.equal(addNewDraftSpy.firstCall.args[0].line, 15);
+      });
+
+      test('clears stale selection on diff/collapse changes, ignores selections in thread containers, and resolves end line', async () => {
+        const addNewDraftSpy = sinon.spy(commentsModel, 'addNewDraft');
+        const lineThread: CommentThread = createCommentThread([
+          {
+            ...createComment(),
+            line: 13,
+            message: 'Existing comment thread text',
+            patch_set: 1 as RevisionPatchSetNum,
+            side: CommentSide.REVISION,
+          },
+        ]);
+        element.diff = sampleLeanDiff;
+        element.path = 'Soundness.lean';
+        element.patchRange = createPatchRange();
+        element.threads = [lineThread];
+        element.loggedIn = true;
+        await element.updateComplete;
+
+        // Selection inside .threads-container must be ignored
+        const threadsContainer =
+          element.shadowRoot!.querySelector<HTMLElement>('.threads-container')!;
+        assert.isNotNull(threadsContainer);
+        const threadRange = document.createRange();
+        threadRange.selectNodeContents(threadsContainer);
+        const sel = window.getSelection()!;
+        sel.removeAllRanges();
+        sel.addRange(threadRange);
+        document.dispatchEvent(new Event('selectionchange'));
+        assert.isFalse(element.hasActiveSelection());
+
+        // Multi-line selection spanning lines 13..15 resolves to end line 15
+        const line13 = element.shadowRoot!.querySelector<HTMLElement>(
+          '.diff-cell.modified-right .lean-code-line[data-line="13"] .lean-code-text'
+        )!;
+        const line15 = element.shadowRoot!.querySelector<HTMLElement>(
+          '.diff-cell.modified-right .lean-code-line[data-line="15"] .lean-code-text'
+        )!;
+        const multiRange = document.createRange();
+        multiRange.setStart(line13, 0);
+        multiRange.setEnd(line15, line15.childNodes.length);
+        sel.removeAllRanges();
+        sel.addRange(multiRange);
+        document.dispatchEvent(new Event('selectionchange'));
+        assert.isTrue(element.hasActiveSelection());
+
+        element.createCommentFromSelectionOrHover();
+        assert.isTrue(addNewDraftSpy.calledOnce);
+        assert.equal(addNewDraftSpy.firstCall.args[0].line, 15);
+
+        // Re-select then collapse proofs → selection must be cleared
+        sel.removeAllRanges();
+        sel.addRange(multiRange);
+        document.dispatchEvent(new Event('selectionchange'));
+        assert.isTrue(element.hasActiveSelection());
+
+        element.collapseProofs = true;
+        await element.updateComplete;
+        assert.isFalse(element.hasActiveSelection());
+      });
+
+      test('passes basePath for renamed files and falls back to Side.LEFT for deleted files in unified mode', async () => {
+        const addNewDraftSpy = sinon.spy(commentsModel, 'addNewDraft');
+        const getThreadsStub = sinon.stub().returns([]);
+        // @ts-expect-error injecting minimal ChangeComments double
+        element.changeComments = {getThreadsBySideForFile: getThreadsStub};
+        element.patchRange = createPatchRange();
+        element.path = 'NewSoundness.lean';
+        element.diff = {
+          ...createDiff(),
+          meta_a: {
+            name: 'OldSoundness.lean',
+            content_type: 'text/x-lean',
+            lines: 2,
+          },
+          meta_b: {
+            name: 'NewSoundness.lean',
+            content_type: 'text/x-lean',
+            lines: 2,
+          },
+          content: [{ab: ['theorem t : True := by', '  trivial']}],
+        };
+        await element.updateComplete;
+
+        assert.isTrue(getThreadsStub.called);
+        const lastCallArgs = getThreadsStub.lastCall.args[0];
+        assert.equal(lastCallArgs.path, 'NewSoundness.lean');
+        assert.equal(lastCallArgs.basePath, 'OldSoundness.lean');
+
+        // Deleted file in unified mode: fallback comment goes to PARENT (Side.LEFT)
+        element.diff = {
+          ...createDiff(),
+          meta_a: {name: 'Deleted.lean', content_type: 'text/x-lean', lines: 2},
+          meta_b: undefined,
+          content: [{a: ['theorem removed : True := by', '  trivial']}],
+        };
+        element.path = 'Deleted.lean';
+        element.viewMode = DiffViewMode.UNIFIED;
+        element.loggedIn = true;
+        await element.updateComplete;
+
+        element.createCommentFromSelectionOrHover();
+        assert.isTrue(addNewDraftSpy.calledOnce);
+        assert.equal(addNewDraftSpy.firstCall.args[0].side, CommentSide.PARENT);
+        assert.equal(addNewDraftSpy.firstCall.args[0].line, 1);
+      });
+
+      test('toggling collapseProofs, per-row proof override, or viewMode clears selection box, selected target, and hover state', async () => {
+        const addNewDraftSpy = sinon.spy(commentsModel, 'addNewDraft');
+        element.diff = sampleLeanDiff;
+        element.path = 'Soundness.lean';
+        element.patchRange = createPatchRange();
+        element.loggedIn = true;
+        await element.updateComplete;
+
+        const selectLine15 = () => {
+          const line15 = element.shadowRoot!.querySelector<HTMLElement>(
+            '.diff-cell.modified-right .lean-code-line[data-line="15"] .lean-code-text'
+          )!;
+          const range = document.createRange();
+          range.selectNodeContents(line15);
+          const sel = window.getSelection()!;
+          sel.removeAllRanges();
+          sel.addRange(range);
+          document.dispatchEvent(new Event('selectionchange'));
+          line15
+            .closest('.lean-code-line')!
+            .dispatchEvent(new MouseEvent('mouseenter', {bubbles: false}));
+        };
+
+        // 1. Global collapseProofs clears selection box, selected target, and hover
+        selectLine15();
+        const box = element.shadowRoot!.querySelector<HTMLElement>(
+          '#selection-action-box'
+        )!;
+        assert.equal(box.style.display, 'block');
+        assert.isTrue(element.hasHoverTarget());
+
+        element.collapseProofs = true;
+        await element.updateComplete;
+
+        assert.equal(box.style.display, 'none');
+        assert.isFalse(element.hasHoverTarget());
+        // Must not create a draft on hidden proof line 15
+        element.createCommentFromSelectionOrHover();
+        assert.isTrue(addNewDraftSpy.calledOnce);
+        assert.notEqual(addNewDraftSpy.firstCall.args[0].line, 15);
+        addNewDraftSpy.resetHistory();
+
+        // 2. Per-row `.lean-proof-bar` toggle clears selection box and hover
+        element.collapseProofs = false;
+        await element.updateComplete;
+        selectLine15();
+        assert.equal(box.style.display, 'block');
+        assert.isTrue(element.hasHoverTarget());
+
+        const proofBar = element.shadowRoot!.querySelector<HTMLButtonElement>(
+          '.diff-cell.modified-right .lean-proof-bar'
+        )!;
+        proofBar.click();
+        await element.updateComplete;
+
+        assert.equal(box.style.display, 'none');
+        assert.isFalse(element.hasHoverTarget());
+        element.createCommentFromSelectionOrHover();
+        assert.isTrue(addNewDraftSpy.calledOnce);
+        assert.notEqual(addNewDraftSpy.firstCall.args[0].line, 15);
+        addNewDraftSpy.resetHistory();
+
+        // 3. Switching viewMode clears selection box and hover
+        proofBar.click();
+        await element.updateComplete;
+        selectLine15();
+        assert.equal(box.style.display, 'block');
+        assert.isTrue(element.hasHoverTarget());
+
+        element.viewMode = DiffViewMode.UNIFIED;
+        await element.updateComplete;
+
+        assert.equal(box.style.display, 'none');
+        assert.isFalse(element.hasHoverTarget());
+      });
+
+      test('resolveRangeTarget anchors accurately when drag ends on .line-placeholder or triple-click ends at offset 0 of next line', async () => {
+        const addNewDraftSpy = sinon.spy(commentsModel, 'addNewDraft');
+        element.diff = sampleLeanDiff;
+        element.path = 'Soundness.lean';
+        element.patchRange = createPatchRange();
+        element.loggedIn = true;
+        await element.updateComplete;
+
+        const sel = window.getSelection()!;
+
+        // 1. Drag starting on left line 13 (`sorry`) and ending on `.line-placeholder`
+        // (or on the enclosing `.lean-code-lines` container after placeholders)
+        // must anchor to line 13, not fall back to the card's startLine (11).
+        const leftLine13 = element.shadowRoot!.querySelector<HTMLElement>(
+          '.diff-cell.modified-left .lean-code-line[data-line="13"] .lean-code-text'
+        )!;
+        const leftPlaceholder = element.shadowRoot!.querySelector<HTMLElement>(
+          '.diff-cell.modified-left .lean-code-line.line-placeholder .lean-code-text'
+        )!;
+        const leftCodeLines = leftLine13.closest('.lean-code-lines')!;
+        assert.isNotNull(leftLine13);
+        assert.isNotNull(leftPlaceholder);
+
+        // Direct range ending inside `.line-placeholder` (element & text node).
+        const directPlaceholderRange = document.createRange();
+        directPlaceholderRange.setStart(leftLine13, 0);
+        directPlaceholderRange.setEnd(
+          leftPlaceholder,
+          leftPlaceholder.childNodes.length
+        );
+        assert.deepEqual(element.resolveRangeTarget(directPlaceholderRange), {
+          side: Side.LEFT,
+          line: 13,
+        });
+        if (leftPlaceholder.firstChild) {
+          const textPlaceholderRange = document.createRange();
+          textPlaceholderRange.setStart(leftLine13, 0);
+          textPlaceholderRange.setEnd(leftPlaceholder.firstChild, 1);
+          assert.deepEqual(element.resolveRangeTarget(textPlaceholderRange), {
+            side: Side.LEFT,
+            line: 13,
+          });
+        }
+
+        // Live browser selection ending at `.lean-code-lines` past placeholders.
+        const containerRange = document.createRange();
+        containerRange.setStart(leftLine13, 0);
+        containerRange.setEnd(leftCodeLines, leftCodeLines.childNodes.length);
+        sel.removeAllRanges();
+        sel.addRange(containerRange);
+        document.dispatchEvent(new Event('selectionchange'));
+        element.createCommentFromSelectionOrHover();
+
+        assert.isTrue(addNewDraftSpy.calledOnce);
+        assert.equal(addNewDraftSpy.firstCall.args[0].side, CommentSide.PARENT);
+        assert.equal(addNewDraftSpy.firstCall.args[0].line, 13);
+        addNewDraftSpy.resetHistory();
+
+        // 2. Triple-click on right line 13 where range.endContainer is line 14
+        // at offset 0 must anchor to line 13, not line 14.
+        const rightLine13 = element.shadowRoot!.querySelector<HTMLElement>(
+          '.diff-cell.modified-right .lean-code-line[data-line="13"] .lean-code-text'
+        )!;
+        const rightLine14 = element.shadowRoot!.querySelector<HTMLElement>(
+          '.diff-cell.modified-right .lean-code-line[data-line="14"]'
+        )!;
+        const tripleClickRange = document.createRange();
+        tripleClickRange.setStart(rightLine13, 0);
+        tripleClickRange.setEnd(rightLine14, 0);
+        sel.removeAllRanges();
+        sel.addRange(tripleClickRange);
+        document.dispatchEvent(new Event('selectionchange'));
+        element.createCommentFromSelectionOrHover();
+
+        assert.isTrue(addNewDraftSpy.calledOnce);
+        assert.equal(
+          addNewDraftSpy.firstCall.args[0].side,
+          CommentSide.REVISION
+        );
+        assert.equal(addNewDraftSpy.firstCall.args[0].line, 13);
+      });
+
+      test('suppresses green 0 sorry pill and shows Partial diff badge when diff has skip chunks', async () => {
+        element.diff = {
+          ...createDiff(),
+          meta_a: {name: 'Big.lean', content_type: 'text/x-lean', lines: 80},
+          meta_b: {name: 'Big.lean', content_type: 'text/x-lean', lines: 80},
+          content: [
+            {skip: 50},
+            {ab: ['theorem visible_ok : True := by', '  trivial']},
+          ],
+        };
+        await element.updateComplete;
+
+        assert.isNull(
+          element.shadowRoot!.querySelector('.hygiene-pill.verified')
+        );
+        const partialPill = element.shadowRoot!.querySelector(
+          '.hygiene-pill.partial'
+        );
+        assert.isNotNull(partialPill);
+        assert.include(partialPill.textContent, 'Partial diff');
+
+        // Visible sorry inside a partial diff is still surfaced alongside Partial diff
+        element.diff = {
+          ...createDiff(),
+          meta_a: {name: 'Big.lean', content_type: 'text/x-lean', lines: 80},
+          meta_b: {name: 'Big.lean', content_type: 'text/x-lean', lines: 80},
+          content: [
+            {skip: 50},
+            {b: ['theorem visible_bad : False := by', '  sorry']},
+          ],
+        };
+        await element.updateComplete;
+
+        assert.isNotNull(
+          element.shadowRoot!.querySelector('.hygiene-pill.partial')
+        );
+        const errorPill = element.shadowRoot!.querySelector(
+          '.hygiene-pill.error'
+        );
+        assert.isNotNull(errorPill);
+        assert.include(errorPill.textContent, '1 sorry');
+      });
+
+      test('shows line number header (showFilePath=true, showFileName=false) on inline comment threads only', async () => {
+        const lineThread: CommentThread = createCommentThread([
+          {
+            ...createComment(),
+            line: 15,
+            message: 'Proof line comment',
+            patch_set: 1 as RevisionPatchSetNum,
+            side: CommentSide.REVISION,
+          },
+        ]);
+        const fileThread: CommentThread = createCommentThread([
+          {
+            ...createComment(),
+            line: undefined,
+            message: 'File-level comment',
+            patch_set: 1 as RevisionPatchSetNum,
+            side: CommentSide.REVISION,
+          },
+        ]);
+        element.diff = sampleLeanDiff;
+        element.path = 'Soundness.lean';
+        element.patchRange = createPatchRange();
+        element.threads = [lineThread, fileThread];
+        await element.updateComplete;
+
+        const inlineThreadEl =
+          element.shadowRoot!.querySelector<GrCommentThread>(
+            '.threads-container gr-comment-thread'
+          )!;
+        assert.isNotNull(inlineThreadEl);
+        assert.isTrue(inlineThreadEl.showFilePath);
+        assert.isFalse(inlineThreadEl.showFileName);
+
+        const fileThreadEl = element.shadowRoot!.querySelector<GrCommentThread>(
+          '.file-level-threads gr-comment-thread'
+        )!;
+        assert.isNotNull(fileThreadEl);
+        assert.isFalse(fileThreadEl.showFilePath);
+        assert.isFalse(fileThreadEl.showFileName);
+      });
+
+      test('does not flash line-numbered threads under File Comments while diff is undefined and clears stale internalThreads', async () => {
+        const lineThread: CommentThread = createCommentThread([
+          {
+            ...createComment(),
+            line: 15,
+            message: 'Line thread waiting for diff',
+            patch_set: 1 as RevisionPatchSetNum,
+            side: CommentSide.REVISION,
+          },
+        ]);
+        const fileThread: CommentThread = {
+          ...createCommentThread([
+            {
+              ...createComment(),
+              line: undefined,
+              message: 'True file thread',
+              patch_set: 1 as RevisionPatchSetNum,
+              side: CommentSide.REVISION,
+            },
+          ]),
+          line: 'FILE',
+        };
+
+        element.diff = undefined;
+        element.path = 'Soundness.lean';
+        element.patchRange = createPatchRange();
+        element.threads = [lineThread, fileThread];
+        await element.updateComplete;
+
+        const fileLevelThreadEls = element.shadowRoot!.querySelectorAll(
+          '.file-level-threads gr-comment-thread'
+        );
+        assert.equal(fileLevelThreadEls.length, 1);
+        assert.equal(fileLevelThreadEls[0].getAttribute('line-num'), 'FILE');
+
+        // Also verified in unified mode
+        element.viewMode = DiffViewMode.UNIFIED;
+        await element.updateComplete;
+        assert.equal(
+          element.shadowRoot!.querySelectorAll(
+            '.file-level-threads gr-comment-thread'
+          ).length,
+          1
+        );
+
+        // Clearing path clears stale internalThreads instead of retaining previous file's threads
+        element.threads = undefined;
+        const getThreadsStub = sinon.stub().returns([fileThread]);
+        // @ts-expect-error injecting minimal ChangeComments double
+        element.changeComments = {getThreadsBySideForFile: getThreadsStub};
+        await element.updateComplete;
+        assert.equal(element.effectiveThreads.length, 1);
+
+        element.path = undefined;
+        await element.updateComplete;
+        assert.equal(element.effectiveThreads.length, 0);
+      });
+
+      test('renders static multi-line /- ... -/ comment blocks and declaration comments without false .lean-tok-sorry', async () => {
+        element.diff = {
+          ...createDiff(),
+          meta_a: {
+            name: 'Comments.lean',
+            content_type: 'text/x-lean',
+            lines: 7,
+          },
+          meta_b: {
+            name: 'Comments.lean',
+            content_type: 'text/x-lean',
+            lines: 7,
+          },
+          content: [
+            {
+              ab: [
+                '/-',
+                'All proofs below use zero sorry or admit.',
+                '-/',
+                'theorem clean : True := by /-',
+                '  never sorry here either',
+                '-/',
+                '  trivial',
+              ],
+            },
+          ],
+        };
+        await element.updateComplete;
+
+        assert.isNull(element.shadowRoot!.querySelector('.lean-tok-sorry'));
+        assert.isNotNull(
+          element.shadowRoot!.querySelector('.hygiene-pill.verified')
+        );
+      });
+
+      test('falls back to file-level comment on 0-byte added file or undefined diff, and line 1 only when right side has lines', async () => {
+        const addNewDraftSpy = sinon.spy(commentsModel, 'addNewDraft');
+        element.path = 'Empty.lean';
+        element.patchRange = createPatchRange();
+        element.loggedIn = true;
+
+        // Case 1: diff is still undefined when pressing 'c'
+        element.diff = undefined;
+        await element.updateComplete;
+        element.createCommentFromSelectionOrHover();
+        assert.equal(addNewDraftSpy.callCount, 1);
+        assert.isUndefined(addNewDraftSpy.lastCall.args[0].line);
+
+        // Case 2: 0-byte added Lean file (meta_b.lines === 0, content: [])
+        element.diff = {
+          ...createDiff(),
+          change_type: 'ADDED',
+          meta_b: {name: 'Empty.lean', content_type: 'text/x-lean', lines: 0},
+          content: [],
+        };
+        await element.updateComplete;
+        element.createCommentFromSelectionOrHover();
+        assert.equal(addNewDraftSpy.callCount, 2);
+        assert.isUndefined(addNewDraftSpy.lastCall.args[0].line);
+
+        // Also direct createComment(Side.RIGHT) without lineNum on 0-byte file
+        element.createComment(Side.RIGHT);
+        assert.equal(addNewDraftSpy.callCount, 3);
+        assert.isUndefined(addNewDraftSpy.lastCall.args[0].line);
+
+        // Case 3: Blank-lines-only Lean file has no parsed blocks, but Side.RIGHT has lines -> line 1
+        element.diff = {
+          ...createDiff(),
+          change_type: 'ADDED',
+          meta_b: {name: 'Blank.lean', content_type: 'text/x-lean', lines: 2},
+          content: [{b: ['', '']}],
+        };
+        await element.updateComplete;
+        element.createCommentFromSelectionOrHover();
+        assert.equal(addNewDraftSpy.callCount, 4);
+        assert.equal(addNewDraftSpy.lastCall.args[0].line, 1);
+      });
+
+      test('resolveRangeTarget descends prevChild to deepest lastChild when endContainer is an ancestor container', async () => {
+        element.diff = {
+          ...createDiff(),
+          meta_a: {
+            name: 'Ancestor.lean',
+            content_type: 'text/x-lean',
+            lines: 5,
+          },
+          meta_b: {
+            name: 'Ancestor.lean',
+            content_type: 'text/x-lean',
+            lines: 5,
+          },
+          content: [
+            {
+              ab: [
+                'theorem step_test : True := by',
+                '  have h1 : True := trivial',
+                '  have h2 : True := trivial',
+                '  exact h2',
+              ],
+            },
+          ],
+        };
+        element.viewMode = DiffViewMode.SIDE_BY_SIDE;
+        await element.updateComplete;
+
+        const rightCell = element.shadowRoot!.querySelector(
+          '.diff-cell[data-side="right"]'
+        )!;
+        const declCard = rightCell.querySelector('.lean-decl-card')!;
+        const bodySection = declCard.querySelector('.lean-body-section')!;
+        const bodyIdx = Array.from(declCard.childNodes).indexOf(bodySection);
+        assert.isAbove(bodyIdx, 0);
+
+        const firstLineText = rightCell.querySelector(
+          '.lean-code-line[data-line="2"] .lean-code-text'
+        )!;
+
+        // End range on `.lean-decl-card` right after `.lean-body-section`
+        // (`prevChild` = `.lean-body-section`, which has `[data-line="4"]` inside).
+        const range = document.createRange();
+        range.setStart(firstLineText.firstChild!, 0);
+        range.setEnd(declCard, bodyIdx + 1);
+
+        const target = element.resolveRangeTarget(range);
+        assert.deepEqual(target, {side: Side.RIGHT, line: 4});
+      });
+    }
+  );
+});
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-lean-viewer/lean-diff-util.ts b/polygerrit-ui/app/elements/diff/gr-diff-lean-viewer/lean-diff-util.ts
new file mode 100644
index 0000000..9e89891
--- /dev/null
+++ b/polygerrit-ui/app/elements/diff/gr-diff-lean-viewer/lean-diff-util.ts
@@ -0,0 +1,4578 @@
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import {html, TemplateResult} from 'lit';
+import {
+  AlignedDiffRow,
+  alignHomologousItems,
+  alignMarkdownTokens,
+  attachThreadsToRows,
+  computeLinearExactAnchors,
+  computeNormalizedEditDistance,
+  computeSequenceDiff,
+  DEFAULT_MAX_HOMOLOGOUS_DISTANCE,
+  DiffBlockStatus,
+  InlineDiffSegment,
+  parseMarkdownBlocks,
+  renderInlineMarkdown,
+  renderInlineTextDiff,
+  renderTokenToHtml,
+} from '../gr-diff-markdown-viewer/markdown-diff-util';
+import {CommentThread, PatchRange} from '../../../types/common';
+
+export type LeanBlockType =
+  | 'module_doc'
+  | 'section_banner'
+  | 'imports'
+  | 'directive'
+  | 'declaration'
+  | 'comment';
+
+export type LeanDeclKind =
+  | 'theorem'
+  | 'lemma'
+  | 'example'
+  | 'def'
+  | 'abbrev'
+  | 'structure'
+  | 'class'
+  | 'inductive'
+  | 'coinductive'
+  | 'instance'
+  | 'axiom'
+  | 'opaque';
+
+export type LeanProofStrategy = 'tactic' | 'decide' | 'term';
+
+export interface LeanCodeLine {
+  lineNum: number;
+  text: string;
+}
+
+export interface LeanStructureField {
+  name: string;
+  typeText: string;
+  defaultValue?: string;
+  comment?: string;
+  lineNum: number;
+  rawLine: string;
+}
+
+export interface LeanInductiveCtor {
+  name: string;
+  signatureText: string;
+  comment?: string;
+  lineNum: number;
+  rawLine: string;
+}
+
+export interface LeanDeclHygiene {
+  hasSorry: boolean;
+  hasAdmit: boolean;
+  isAxiom: boolean;
+  isPartial: boolean;
+  isUnsafe: boolean;
+  hasNativeDecide: boolean;
+}
+
+export interface LeanDeclarationDetails {
+  kind: LeanDeclKind;
+  name: string;
+  attributes: string[];
+  modifiers: string[];
+  docComment?: string;
+  docStartLine?: number;
+  docEndLine?: number;
+  signatureLines: LeanCodeLine[];
+  bodyLines: LeanCodeLine[];
+  isTacticProof: boolean;
+  proofStrategy?: LeanProofStrategy;
+  fields?: LeanStructureField[];
+  constructors?: LeanInductiveCtor[];
+  derivingClause?: string[];
+  isCompactDef: boolean;
+  hygiene: LeanDeclHygiene;
+}
+
+export interface LeanBlock {
+  id: string;
+  type: LeanBlockType;
+  raw: string;
+  startLine: number;
+  endLine: number;
+  /** Markdown content for `module_doc`, or extracted title for `section_banner`. */
+  markdownContent?: string;
+  /** Import lines for `imports`. */
+  importLines?: LeanCodeLine[];
+  /** Directive keyword + text for `directive` (e.g., namespace, end, open). */
+  directiveKind?: string;
+  directiveLines?: LeanCodeLine[];
+  /** Comment lines and license detection for `comment`. */
+  commentLines?: LeanCodeLine[];
+  isLicenseHeader?: boolean;
+  /** Structured declaration metadata for `declaration`. */
+  decl?: LeanDeclarationDetails;
+}
+
+export interface LeanAlignedCodeLine {
+  status: 'unchanged' | 'added' | 'deleted' | 'modified' | 'placeholder';
+  leftLine?: LeanCodeLine;
+  rightLine?: LeanCodeLine;
+  leftContent?: TemplateResult;
+  rightContent?: TemplateResult;
+}
+
+export interface LeanAlignedField {
+  status: 'unchanged' | 'added' | 'deleted' | 'modified';
+  leftField?: LeanStructureField;
+  rightField?: LeanStructureField;
+  leftTypeHtml?: TemplateResult;
+  rightTypeHtml?: TemplateResult;
+  leftCommentHtml?: TemplateResult;
+  rightCommentHtml?: TemplateResult;
+}
+
+export interface LeanDeclarationDiffData {
+  docLeftHtml?: TemplateResult;
+  docRightHtml?: TemplateResult;
+  docChanged: boolean;
+  signatureLines: LeanAlignedCodeLine[];
+  signatureChanged: boolean;
+  bodyLines: LeanAlignedCodeLine[];
+  bodyChanged: boolean;
+  fields?: LeanAlignedField[];
+  fieldsChanged: boolean;
+}
+
+export interface AlignedLeanRow extends AlignedDiffRow {
+  rowKey: string;
+  status: DiffBlockStatus;
+  leftBlock?: LeanBlock;
+  rightBlock?: LeanBlock;
+  moduleDocRows?: AlignedDiffRow[];
+  bannerDiff?: {leftHtml: TemplateResult; rightHtml: TemplateResult};
+  lineDiff?: LeanAlignedCodeLine[];
+  declDiff?: LeanDeclarationDiffData;
+}
+
+export interface AlignedLeanRowWithThreads extends AlignedLeanRow {
+  leftThreads: CommentThread[];
+  rightThreads: CommentThread[];
+}
+
+export interface LeanFileCounts {
+  theorems: number;
+  definitions: number;
+  types: number;
+  instances: number;
+  axioms: number;
+  sorryCount: number;
+  admitCount: number;
+  partialCount: number;
+  unsafeCount: number;
+  nativeDecideCount: number;
+}
+
+export interface LeanDiffSummary {
+  base: LeanFileCounts;
+  revision: LeanFileCounts;
+  hasBase: boolean;
+  hasRevision: boolean;
+  addedDeclarations: number;
+  deletedDeclarations: number;
+  modifiedDeclarations: number;
+}
+
+export type LeanTokenKind =
+  | 'plain'
+  | 'comment'
+  | 'string'
+  | 'keyword'
+  | 'tactic'
+  | 'sorry'
+  | 'type'
+  | 'operator'
+  | 'bullet'
+  | 'attribute'
+  | 'number'
+  | 'literal';
+
+export interface LeanHighlightToken {
+  text: string;
+  kind: LeanTokenKind;
+}
+
+const LEAN_DECL_KEYWORDS = new Set<LeanDeclKind>([
+  'theorem',
+  'lemma',
+  'example',
+  'def',
+  'abbrev',
+  'structure',
+  'class',
+  'inductive',
+  'coinductive',
+  'instance',
+  'axiom',
+  'opaque',
+]);
+
+const LEAN_MODIFIER_KEYWORDS = new Set([
+  'public',
+  'private',
+  'protected',
+  'noncomputable',
+  'partial',
+  'unsafe',
+  'scoped',
+  'local',
+  'nonrec',
+  'meta',
+]);
+
+const LEAN_DIRECTIVE_KEYWORDS = new Set([
+  'module',
+  'namespace',
+  'section',
+  'end',
+  'open',
+  'variable',
+  'variables',
+  'universe',
+  'universes',
+  'set_option',
+  'attribute',
+  'export',
+  'notation',
+  'infix',
+  'infixl',
+  'infixr',
+  'prefix',
+  'postfix',
+  'macro',
+  'macro_rules',
+  'syntax',
+  'elab',
+  'elab_rules',
+  'declare_syntax_cat',
+  'initialize',
+  'builtin_initialize',
+  'mutual',
+  'deriving',
+  '#check',
+  '#eval',
+  '#print',
+  '#reduce',
+  '#guard',
+  '#guard_msgs',
+  '#synth',
+  '#where',
+  '#exit',
+]);
+
+const LEAN_KEYWORDS = new Set([
+  'module',
+  'theorem',
+  'lemma',
+  'example',
+  'def',
+  'abbrev',
+  'structure',
+  'class',
+  'inductive',
+  'coinductive',
+  'instance',
+  'axiom',
+  'opaque',
+  'namespace',
+  'section',
+  'end',
+  'import',
+  'open',
+  'variable',
+  'variables',
+  'universe',
+  'universes',
+  'where',
+  'deriving',
+  'extends',
+  'public',
+  'private',
+  'protected',
+  'noncomputable',
+  'partial',
+  'unsafe',
+  'scoped',
+  'local',
+  'nonrec',
+  'meta',
+  'mutual',
+  'set_option',
+  'attribute',
+  'export',
+  'notation',
+  'infix',
+  'infixl',
+  'infixr',
+  'prefix',
+  'postfix',
+  'macro',
+  'macro_rules',
+  'syntax',
+  'elab',
+  'elab_rules',
+  'termination_by',
+  'decreasing_by',
+  'partial_fixpoint',
+  'coinductive_fixpoint',
+  'inductive_fixpoint',
+  'with',
+  'let',
+  'rec',
+  'in',
+  'if',
+  'then',
+  'else',
+  'match',
+  'fun',
+  'do',
+  'for',
+  'return',
+  'have',
+  'show',
+  'from',
+  'by',
+  'calc',
+  'conv',
+  'suffices',
+  'try',
+  'mut',
+  'unless',
+  'while',
+  'break',
+  'continue',
+  'nomatch',
+  'nofun',
+  'throw',
+  'catch',
+  'finally',
+  'forall',
+  'exists',
+  'at',
+  'using',
+]);
+
+const LEAN_TACTICS = new Set([
+  'intro',
+  'intros',
+  'rintro',
+  'rw',
+  'rewrite',
+  'simp',
+  'simp_all',
+  'simp_wf',
+  'dsimp',
+  'simpa',
+  'exact',
+  'apply',
+  'refine',
+  'constructor',
+  'cases',
+  'rcases',
+  'induction',
+  'obtain',
+  'choose',
+  'unfold',
+  'by_cases',
+  'by_contra',
+  'subst',
+  'omega',
+  'decide',
+  'rfl',
+  'contradiction',
+  'funext',
+  'ext',
+  'congr',
+  'ring',
+  'ring_nf',
+  'field_simp',
+  'linarith',
+  'nlinarith',
+  'lia',
+  'lra',
+  'positivity',
+  'aesop',
+  'norm_num',
+  'norm_cast',
+  'push_neg',
+  'split_ifs',
+  'fin_cases',
+  'interval_cases',
+  'gcongr',
+  'trivial',
+  'assumption',
+  'clear',
+  'rename_i',
+  'revert',
+  'generalize',
+  'specialize',
+  'use',
+  'left',
+  'right',
+  'split',
+  'exfalso',
+  'injection',
+  'change',
+  'set',
+  'grind',
+  'bv_decide',
+  'decreasing_tactic',
+  'decreasing_trivial',
+  'enter',
+  'lhs',
+  'rhs',
+  'arg',
+  'only',
+  'first',
+  'repeat',
+  'all_goals',
+  'any_goals',
+  'focus',
+  'next',
+  'case',
+  'done',
+  'tauto',
+  'itauto',
+  'ac_rfl',
+  'extract_lets',
+  'fun_prop',
+  'nontriviality',
+]);
+
+const UNAMBIGUOUS_TACTICS = new Set([
+  'decide',
+  'omega',
+  'rfl',
+  'simp_wf',
+  'all_goals',
+  'any_goals',
+  'bv_decide',
+  'decreasing_tactic',
+  'decreasing_trivial',
+]);
+
+const LEAN_SORRY_TOKENS = new Set([
+  'sorry',
+  'sorryAx',
+  'admit',
+  'native_decide',
+  'ofReduceBool',
+  'ofReduceNat',
+]);
+
+// Kernel soundness constant names that resolve to the exact same `Name` even
+// when wrapped in French guillemets (`«sorryAx»`, `Lean.«ofReduceBool»`).
+// Syntax keywords (`sorry`, `admit`, `native_decide`) are intentionally
+// excluded because guillemets escape them into ordinary user identifiers.
+const SOUNDNESS_GUILLEMET_NAMES = new Set([
+  'sorryAx',
+  'ofReduceBool',
+  'ofReduceNat',
+  'Lean.ofReduceBool',
+  'Lean.ofReduceNat',
+]);
+
+const LEAN_BUILTIN_TYPES = new Set([
+  'Prop',
+  'Type',
+  'Sort',
+  'Nat',
+  'Int',
+  'Bool',
+  'String',
+  'Char',
+  'Float',
+  'Float32',
+  'Unit',
+  'PUnit',
+  'Empty',
+  'PEmpty',
+  'Fin',
+  'List',
+  'Array',
+  'ByteArray',
+  'Vector',
+  'Subarray',
+  'Option',
+  'Except',
+  'ExceptT',
+  'StateM',
+  'ReaderM',
+  'Id',
+  'IO',
+  'Task',
+  'Thunk',
+  'Name',
+  'Expr',
+  'Decidable',
+  'DecidableEq',
+  'Repr',
+  'Hashable',
+  'Inhabited',
+  'Nonempty',
+  'ToString',
+  'LE',
+  'LT',
+  'BEq',
+  'Ord',
+  'Ordering',
+  'Eq',
+  'And',
+  'Or',
+  'Not',
+  'True',
+  'False',
+  'UInt8',
+  'UInt16',
+  'UInt32',
+  'UInt64',
+  'USize',
+  'Int8',
+  'Int16',
+  'Int32',
+  'Int64',
+  'ISize',
+  'BitVec',
+  'Prod',
+  'Sum',
+  'Subtype',
+  'Sigma',
+]);
+
+const LEAN_LITERALS = new Set(['true', 'false', 'none', 'some', 'nil', 'cons']);
+
+const UNICODE_OPERATORS = new Set([
+  '∀',
+  '∃',
+  'λ',
+  '→',
+  '←',
+  '↔',
+  '⇒',
+  '⇐',
+  '⇔',
+  '↦',
+  '≤',
+  '≥',
+  '≠',
+  '∧',
+  '∨',
+  '¬',
+  '⊢',
+  '⊥',
+  '⊤',
+  '⊔',
+  '⊓',
+  '∈',
+  '∉',
+  '⊆',
+  '⊇',
+  '⊂',
+  '⊃',
+  '∪',
+  '∩',
+  '∅',
+  '⟨',
+  '⟩',
+  '×',
+  '⊕',
+  '⊗',
+  '∘',
+  '▸',
+  '≡',
+  '≈',
+  '≃',
+  '≅',
+  '∣',
+  '∑',
+  '∏',
+  '∫',
+]);
+
+const MULTI_CHAR_OPERATORS = [
+  '<;>',
+  '<<<',
+  '>>>',
+  '|||',
+  '&&&',
+  '^^^',
+  ':=',
+  '=>',
+  '->',
+  '<-',
+  '<->',
+  '<=',
+  '>=',
+  '!=',
+  '==',
+  '&&',
+  '||',
+  '::',
+  '++',
+  '|>',
+  '<|',
+  '..',
+];
+
+const IDENT_START_RE = /[\p{L}_#]/u;
+const IDENT_PART_RE = /[\p{L}\p{N}_'?!₀-₉⁰-⁹ₐ-ₜᵢᵣᵤᵥ]/u;
+const LEAN_CONTENT_TOKEN_RE = /[\p{L}\p{N}_]/u;
+const LEAN_INTERP_STRING_PREFIXES = new Set(['s!', 'm!', 'f!']);
+const CHAR_LITERAL_RE =
+  /'(?:\\x[0-9a-fA-F]{2}|\\u[0-9a-fA-F]{4}|\\[^\n]|[^'\\\n])'/uy;
+const NUMBER_LITERAL_RE =
+  /(?:0[xX][0-9a-fA-F_]+|0[bB][01_]+|0[oO][0-7_]+|[0-9][0-9_]*(?:\.[0-9_]+)?)/y;
+
+function isLeanContentToken(tok: string): boolean {
+  return LEAN_CONTENT_TOKEN_RE.test(tok) || UNICODE_OPERATORS.has(tok);
+}
+
+function normalizeLeanSource(source: string): string {
+  return source.replace(/^\uFEFF/, '').replace(/\r\n?/g, '\n');
+}
+
+function isIdentStart(ch: string): boolean {
+  return IDENT_START_RE.test(ch);
+}
+
+function isIdentPart(ch: string): boolean {
+  return IDENT_PART_RE.test(ch);
+}
+
+function getCharAt(text: string, i: number): {ch: string; len: number} {
+  const cp = text.codePointAt(i);
+  if (cp === undefined) return {ch: '', len: 0};
+  return {ch: String.fromCodePoint(cp), len: cp > 0xffff ? 2 : 1};
+}
+
+function hasIdentPartBefore(text: string, i: number): boolean {
+  if (i <= 0) return false;
+  const prevCode = text.charCodeAt(i - 1);
+  if (
+    prevCode >= 0xdc00 &&
+    prevCode <= 0xdfff &&
+    i >= 2 &&
+    text.charCodeAt(i - 2) >= 0xd800 &&
+    text.charCodeAt(i - 2) <= 0xdbff
+  ) {
+    const cp = text.codePointAt(i - 2);
+    return cp !== undefined && isIdentPart(String.fromCodePoint(cp));
+  }
+  return isIdentPart(text[i - 1]);
+}
+
+/**
+ * Match a Lean 4 character literal (`'a'`, `'"'`, `'\''`, `'\n'`, `'\x41'`, `'\u0041'`, `'😀'`)
+ * at index `i`, ensuring prime suffixes on identifiers (`hlt'`, `x'`) are never misread.
+ */
+function matchCharLiteral(text: string, i: number): number {
+  if (text[i] !== "'" || hasIdentPartBefore(text, i)) return 0;
+  CHAR_LITERAL_RE.lastIndex = i;
+  const match = CHAR_LITERAL_RE.exec(text);
+  return match ? match[0].length : 0;
+}
+
+/**
+ * Match a Lean 4 raw string opener (`r"..."`, `r#"..."#`, `r##"..."##`) at index `i`.
+ */
+function matchRawStringOpen(
+  text: string,
+  i: number
+): {hashes: number; contentStart: number} | null {
+  if (text[i] !== 'r' || hasIdentPartBefore(text, i)) return null;
+  let hashes = 0;
+  while (i + 1 + hashes < text.length && text[i + 1 + hashes] === '#') {
+    hashes++;
+  }
+  if (text[i + 1 + hashes] === '"') {
+    return {hashes, contentStart: i + 2 + hashes};
+  }
+  return null;
+}
+
+/** Check whether `text` at index `i` closes a raw string with `hashes` trailing `#`s. */
+function matchRawStringCloseAt(
+  text: string,
+  i: number,
+  hashes: number
+): boolean {
+  if (text[i] !== '"') return false;
+  for (let k = 1; k <= hashes; k++) {
+    if (text[i + k] !== '#') return false;
+  }
+  return true;
+}
+
+/**
+ * Find the matching `]` for `[` at `openIdx`, respecting nested brackets,
+ * comments (`--` and nested `/- ... -/`), strings, raw strings, char literals,
+ * and guillemet identifiers.
+ */
+function findMatchingBracket(text: string, openIdx: number): number {
+  if (text[openIdx] !== '[') return -1;
+  let depth = 0;
+  let inString = false;
+  for (let i = openIdx; i < text.length; i++) {
+    const ch = text[i];
+    if (inString) {
+      if (ch === '\\') i++;
+      else if (ch === '"') inString = false;
+      continue;
+    }
+    if (ch === '-' && text[i + 1] === '-') {
+      const nl = text.indexOf('\n', i + 2);
+      if (nl < 0) return -1;
+      i = nl;
+      continue;
+    }
+    if (ch === '/' && text[i + 1] === '-') {
+      let cDepth = 1;
+      let j = i + 2;
+      while (j < text.length && cDepth > 0) {
+        if (text[j] === '/' && text[j + 1] === '-') {
+          cDepth++;
+          j += 2;
+        } else if (text[j] === '-' && text[j + 1] === '/') {
+          cDepth--;
+          j += 2;
+        } else {
+          j++;
+        }
+      }
+      i = j - 1;
+      continue;
+    }
+    const rawOpen = matchRawStringOpen(text, i);
+    if (rawOpen) {
+      let j = rawOpen.contentStart;
+      while (j < text.length) {
+        if (matchRawStringCloseAt(text, j, rawOpen.hashes)) {
+          j += rawOpen.hashes;
+          break;
+        }
+        j++;
+      }
+      i = j;
+      continue;
+    }
+    const charLen = matchCharLiteral(text, i);
+    if (charLen > 0) {
+      i += charLen - 1;
+      continue;
+    }
+    if (ch === '«') {
+      const closeGuillemet = text.indexOf('»', i + 1);
+      i = closeGuillemet >= 0 ? closeGuillemet : text.length - 1;
+      continue;
+    }
+    if (ch === '"') {
+      inString = true;
+      continue;
+    }
+    if (ch === '[') depth++;
+    else if (ch === ']') {
+      depth--;
+      if (depth === 0) return i;
+    }
+  }
+  return -1;
+}
+
+/**
+ * Incrementally scan a multi-line `@[...]` attribute in a single forward pass
+ * without re-concatenating or rescanning prior lines. Tracks nested brackets,
+ * block comments (`/- ... -/`), line comments (`--`), strings, raw strings,
+ * char literals, and guillemet identifiers across line boundaries.
+ */
+function findMultiLineAttributeEnd(
+  lines: string[],
+  startRow: number,
+  attrStartCol: number,
+  openBracketCol: number,
+  maxEndRow: number
+): {
+  closed: boolean;
+  endRow: number;
+  closeColExclusive: number;
+  text: string;
+  scannedLines: number;
+} {
+  let depth = 1;
+  let blockCommentDepth = 0;
+  let inString = false;
+  let rawStringHashes = -1;
+  let inGuillemet = false;
+  const limitRow = Math.min(lines.length - 1, maxEndRow);
+
+  for (let row = startRow; row <= limitRow; row++) {
+    const line = lines[row];
+    const len = line.length;
+    let c = row === startRow ? openBracketCol + 1 : 0;
+
+    while (c < len) {
+      const ch = line[c];
+      const next = c + 1 < len ? line[c + 1] : '';
+
+      if (blockCommentDepth > 0) {
+        if (ch === '/' && next === '-') {
+          blockCommentDepth++;
+          c += 2;
+        } else if (ch === '-' && next === '/') {
+          blockCommentDepth--;
+          c += 2;
+        } else {
+          c++;
+        }
+        continue;
+      }
+
+      if (rawStringHashes >= 0) {
+        if (matchRawStringCloseAt(line, c, rawStringHashes)) {
+          c += 1 + rawStringHashes;
+          rawStringHashes = -1;
+        } else {
+          c++;
+        }
+        continue;
+      }
+
+      if (inGuillemet) {
+        if (ch === '»') {
+          inGuillemet = false;
+        }
+        c++;
+        continue;
+      }
+
+      if (inString) {
+        if (ch === '\\' && c + 1 < len) {
+          c += 2;
+        } else if (ch === '"') {
+          inString = false;
+          c++;
+        } else {
+          c++;
+        }
+        continue;
+      }
+
+      if (ch === '-' && next === '-') {
+        break;
+      }
+
+      if (ch === '/' && next === '-') {
+        blockCommentDepth = 1;
+        c += 2;
+        continue;
+      }
+
+      const rawOpen = matchRawStringOpen(line, c);
+      if (rawOpen) {
+        rawStringHashes = rawOpen.hashes;
+        c = rawOpen.contentStart;
+        continue;
+      }
+
+      const charLen = matchCharLiteral(line, c);
+      if (charLen > 0) {
+        c += charLen;
+        continue;
+      }
+
+      if (ch === '«') {
+        inGuillemet = true;
+        c++;
+        continue;
+      }
+
+      if (ch === '"') {
+        inString = true;
+        c++;
+        continue;
+      }
+
+      if (ch === '[') {
+        depth++;
+      } else if (ch === ']') {
+        depth--;
+        if (depth === 0) {
+          const text =
+            row === startRow
+              ? line.slice(attrStartCol, c + 1)
+              : [
+                  lines[startRow].slice(attrStartCol),
+                  ...lines.slice(startRow + 1, row),
+                  line.slice(0, c + 1),
+                ].join('\n');
+          return {
+            closed: true,
+            endRow: row,
+            closeColExclusive: c + 1,
+            text,
+            scannedLines: row - startRow + 1,
+          };
+        }
+      }
+      c++;
+    }
+  }
+
+  return {
+    closed: false,
+    endRow: -1,
+    closeColExclusive: -1,
+    text: '',
+    scannedLines: Math.max(1, limitRow - startRow + 1),
+  };
+}
+
+/**
+ * Strip Lean 4 comments (including nested block comments), string literals
+ * (including raw `r#"..."#`, multi-line strings, and stack-aware interpolated
+ * strings `s!"...{expr}..."`), char literals, and non-soundness
+ * guillemet-escaped identifiers (`«...»`) while preserving exact 1:1 character
+ * offsets and newlines.
+ *
+ * Expressions inside `{...}` of interpolated strings and guillemet-wrapped
+ * kernel soundness names (`«sorryAx»`, `«ofReduceBool»`, etc.) are preserved so
+ * hygiene analysis cannot be bypassed via quote-parity flips or escaping.
+ */
+export function stripLeanCommentsAndStrings(rawCode: string): string {
+  const code = normalizeLeanSource(rawCode);
+  const out: string[] = [];
+  let i = 0;
+  const len = code.length;
+  let blockDepth = 0;
+  let inLineComment = false;
+  let inString = false;
+  let inInterpString = false;
+  const interpBraceDepths: number[] = [];
+  let rawStringHashes = -1;
+
+  while (i < len) {
+    const ch = code[i];
+    const next = i + 1 < len ? code[i + 1] : '';
+
+    if (inLineComment) {
+      if (ch === '\n') {
+        inLineComment = false;
+        out.push('\n');
+      } else {
+        out.push(' ');
+      }
+      i++;
+      continue;
+    }
+
+    if (blockDepth > 0) {
+      if (ch === '/' && next === '-') {
+        blockDepth++;
+        out.push(' ', ' ');
+        i += 2;
+      } else if (ch === '-' && next === '/') {
+        blockDepth--;
+        out.push(' ', ' ');
+        i += 2;
+      } else {
+        out.push(ch === '\n' ? '\n' : ' ');
+        i++;
+      }
+      continue;
+    }
+
+    if (rawStringHashes >= 0) {
+      if (matchRawStringCloseAt(code, i, rawStringHashes)) {
+        const closeLen = 1 + rawStringHashes;
+        for (let k = 0; k < closeLen; k++) out.push(' ');
+        i += closeLen;
+        rawStringHashes = -1;
+      } else {
+        out.push(ch === '\n' ? '\n' : ' ');
+        i++;
+      }
+      continue;
+    }
+
+    if (inInterpString) {
+      if (ch === '\\' && i + 1 < len) {
+        out.push(' ', next === '\n' ? '\n' : ' ');
+        i += 2;
+      } else if (ch === '"') {
+        inInterpString = false;
+        out.push(' ');
+        i++;
+      } else if (ch === '{') {
+        inInterpString = false;
+        interpBraceDepths.push(1);
+        out.push('{');
+        i++;
+      } else {
+        out.push(ch === '\n' ? '\n' : ' ');
+        i++;
+      }
+      continue;
+    }
+
+    if (inString) {
+      if (ch === '\\' && i + 1 < len) {
+        out.push(' ', next === '\n' ? '\n' : ' ');
+        i += 2;
+      } else if (ch === '"') {
+        inString = false;
+        out.push(' ');
+        i++;
+      } else {
+        out.push(ch === '\n' ? '\n' : ' ');
+        i++;
+      }
+      continue;
+    }
+
+    if (ch === '/' && next === '-') {
+      blockDepth = 1;
+      out.push(' ', ' ');
+      i += 2;
+      continue;
+    }
+
+    if (ch === '-' && next === '-') {
+      inLineComment = true;
+      out.push(' ', ' ');
+      i += 2;
+      continue;
+    }
+
+    if (interpBraceDepths.length > 0) {
+      if (ch === '{') {
+        interpBraceDepths[interpBraceDepths.length - 1]++;
+        out.push('{');
+        i++;
+        continue;
+      }
+      if (ch === '}') {
+        const nextDepth = interpBraceDepths[interpBraceDepths.length - 1] - 1;
+        if (nextDepth <= 0) {
+          interpBraceDepths.pop();
+          inInterpString = true;
+        } else {
+          interpBraceDepths[interpBraceDepths.length - 1] = nextDepth;
+        }
+        out.push('}');
+        i++;
+        continue;
+      }
+    }
+
+    const rawOpen = matchRawStringOpen(code, i);
+    if (rawOpen) {
+      const openLen = rawOpen.contentStart - i;
+      for (let k = 0; k < openLen; k++) out.push(' ');
+      rawStringHashes = rawOpen.hashes;
+      i = rawOpen.contentStart;
+      continue;
+    }
+
+    const charLen = matchCharLiteral(code, i);
+    if (charLen > 0) {
+      for (let k = 0; k < charLen; k++) out.push(' ');
+      i += charLen;
+      continue;
+    }
+
+    // Multi-line guillemet identifier `«...»`.
+    // Unwrap kernel soundness names (`«sorryAx»`, `«ofReduceBool»`, etc.) so
+    // guillemet escaping cannot bypass soundness detection; blank all others.
+    if (ch === '«') {
+      let j = i + 1;
+      while (j < len && code[j] !== '»') j++;
+      const hasClose = j < len && code[j] === '»';
+      const inner = code.slice(i + 1, j);
+      const end = hasClose ? j + 1 : j;
+      if (hasClose && SOUNDNESS_GUILLEMET_NAMES.has(inner)) {
+        out.push(' ');
+        for (let k = 0; k < inner.length; k++) out.push(inner[k]);
+        out.push(' ');
+      } else {
+        for (let k = i; k < end; k++) {
+          out.push(code[k] === '\n' ? '\n' : ' ');
+        }
+      }
+      i = end;
+      continue;
+    }
+
+    // Greedy Unicode identifier scan (prevents `f!'"'"`, `f!r"\""`, `fé'"'"`
+    // from mis-triggering char/raw-string lexers and handles `s!"..."`, `m!"..."`).
+    const {ch: startChar, len: startLen} = getCharAt(code, i);
+    if (startChar && isIdentStart(startChar)) {
+      let j = i + startLen;
+      while (j < len) {
+        const {ch: partChar, len: partLen} = getCharAt(code, j);
+        if (!partChar || !isIdentPart(partChar)) break;
+        j += partLen;
+      }
+      // Interpolated string opener (`s!"..."`, `m!"..."`, `f!"..."`).
+      // Only Lean's string interpolators enter interpolated mode so ordinary
+      // `!`-suffixed macros/functions like `panic!"{"` cannot flip quote parity.
+      const ident = code.slice(i, j);
+      if (
+        LEAN_INTERP_STRING_PREFIXES.has(ident) &&
+        j < len &&
+        code[j] === '"'
+      ) {
+        for (let k = i; k <= j; k++) out.push(' ');
+        inInterpString = true;
+        i = j + 1;
+        continue;
+      }
+      for (let k = i; k < j; k++) out.push(code[k]);
+      i = j;
+      continue;
+    }
+
+    if (ch === '"') {
+      inString = true;
+      out.push(' ');
+      i++;
+      continue;
+    }
+
+    out.push(ch);
+    i++;
+  }
+
+  return out.join('');
+}
+
+/**
+ * Scan the end position (0-based `endRow`, exclusive `endCol` after `-/`).
+ * Handles nested Lean 4 block comments (`/-`, `/--`, `/-!`) starting at
+ * `(startIdx, startCol)`.
+ */
+function findBlockCommentEnd(
+  lines: string[],
+  startIdx: number,
+  startCol = 0
+): {endRow: number; endCol: number; closed: boolean} {
+  let depth = 0;
+  for (let row = startIdx; row < lines.length; row++) {
+    const line = lines[row];
+    let i = row === startIdx ? startCol : 0;
+    while (i < line.length) {
+      if (line[i] === '/' && line[i + 1] === '-') {
+        depth++;
+        i += 2;
+      } else if (line[i] === '-' && line[i + 1] === '/') {
+        depth--;
+        i += 2;
+        if (depth <= 0) {
+          return {endRow: row, endCol: i, closed: true};
+        }
+      } else {
+        i++;
+      }
+    }
+  }
+  let endRow = lines.length - 1;
+  // Avoid attributing a phantom trailing empty line from a final newline to an
+  // unclosed EOF block comment.
+  if (endRow > startIdx && lines[endRow] === '') {
+    endRow--;
+  }
+  return {endRow, endCol: lines[endRow].length, closed: false};
+}
+
+/** Clean the outer delimiters (`/-! ... -/`, `/-- ... -/`, `/- ... -/`) of a block comment. */
+function unwrapBlockComment(raw: string, openerLen: number): string {
+  let inner = raw.trim();
+  if (inner.length >= openerLen) {
+    inner = inner.slice(openerLen);
+  }
+  if (inner.endsWith('-/')) {
+    inner = inner.slice(0, -2);
+  }
+  // Remove leading/trailing blank lines while preserving internal markdown indentation.
+  const innerLines = inner.split('\n');
+  let start = 0;
+  let end = innerLines.length;
+  while (start < end && innerLines[start].trim() === '') {
+    start++;
+  }
+  while (end > start && innerLines[end - 1].trim() === '') {
+    end--;
+  }
+  if (end - start === 1) {
+    return innerLines[start].trim();
+  }
+  return innerLines.slice(start, end).join('\n');
+}
+
+function isDividerCommentLine(line: string): boolean {
+  return /^--\s*[=\-~*─━]{4,}\s*$/.test(line.trim());
+}
+
+/**
+ * Strip leading whitespace and any leading closed Lean block comments (`/- ... -/`).
+ */
+function skipLeadingWsAndBlockComments(text: string): string {
+  let s = text.trimStart();
+  while (s.startsWith('/-')) {
+    let depth = 1;
+    let i = 2;
+    while (i < s.length && depth > 0) {
+      if (s[i] === '/' && s[i + 1] === '-') {
+        depth++;
+        i += 2;
+      } else if (s[i] === '-' && s[i + 1] === '/') {
+        depth--;
+        i += 2;
+      } else {
+        i++;
+      }
+    }
+    if (depth !== 0) break;
+    s = s.slice(i).trimStart();
+  }
+  return s;
+}
+
+/** Check if `trimmed` is a standalone attribute line (`@[simp]`, `@[simp] -- comment`, etc.) with no trailing code. */
+function isStandaloneAttributeLine(trimmed: string): boolean {
+  if (!trimmed.startsWith('@[')) return false;
+  let rest = trimmed;
+  let count = 0;
+  while (rest.startsWith('@[')) {
+    const closeIdx = findMatchingBracket(rest, 1);
+    if (closeIdx < 0) return false;
+    count++;
+    rest = skipLeadingWsAndBlockComments(rest.slice(closeIdx + 1));
+  }
+  return count > 0 && (rest === '' || rest.startsWith('--'));
+}
+
+/** Check if a line consists solely of Lean declaration modifiers (`unsafe`, `partial`, `private`, ...) + optional comments. */
+function parseStandaloneModifiersLine(line: string): string[] | null {
+  let rest = skipLeadingWsAndBlockComments(line);
+  if (!rest || rest.startsWith('--')) return null;
+  const mods: string[] = [];
+  while (rest && !rest.startsWith('--')) {
+    const match = rest.match(/^([A-Za-z_]+)\b/);
+    if (!match || !LEAN_MODIFIER_KEYWORDS.has(match[1])) {
+      return null;
+    }
+    mods.push(match[1]);
+    rest = skipLeadingWsAndBlockComments(rest.slice(match[0].length));
+  }
+  return mods.length > 0 ? mods : null;
+}
+
+const LEAN_QUALIFIED_NAME_RE =
+  /^(?:«[^»]+»|[\p{L}_][\p{L}\p{N}_'?!₀-₉⁰-⁹]*)(?:\.(?:«[^»]+»|[\p{L}_][\p{L}\p{N}_'?!₀-₉⁰-⁹]*))*/u;
+
+/** Check if a line starts a Lean declaration (with optional attributes, modifiers, and inline comments). */
+function parseDeclarationHeaderStart(
+  line: string,
+  allowIndent = false
+): {
+  attributes: string[];
+  modifiers: string[];
+  kind: LeanDeclKind;
+  name: string;
+} | null {
+  if (!line || (!allowIndent && /^\s/.test(line))) return null;
+  let rest = skipLeadingWsAndBlockComments(line);
+  const attributes: string[] = [];
+  const modifiers: string[] = [];
+
+  // Consume leading @[...] attributes on the same line (including nested brackets and inline comments).
+  while (rest.startsWith('@[')) {
+    const closeIdx = findMatchingBracket(rest, 1);
+    if (closeIdx < 0) break;
+    attributes.push(rest.slice(0, closeIdx + 1));
+    rest = skipLeadingWsAndBlockComments(rest.slice(closeIdx + 1));
+  }
+
+  // Consume leading modifiers (`public`, `private`, `protected`, `noncomputable`, `partial`, `unsafe`, `meta`, ...).
+  while (true) {
+    const match = rest.match(/^([A-Za-z_]+)\b/);
+    if (match && LEAN_MODIFIER_KEYWORDS.has(match[1])) {
+      modifiers.push(match[1]);
+      rest = skipLeadingWsAndBlockComments(rest.slice(match[0].length));
+    } else {
+      break;
+    }
+  }
+
+  const kindMatch = rest.match(/^([A-Za-z_]+)\b/);
+  if (!kindMatch) return null;
+  let candidate = kindMatch[1] as LeanDeclKind;
+  if (!LEAN_DECL_KEYWORDS.has(candidate)) return null;
+
+  let afterKind = skipLeadingWsAndBlockComments(
+    rest.slice(kindMatch[0].length)
+  );
+  // Support `class inductive Foo` and `class abbrev Bar`.
+  if (candidate === 'class') {
+    const subKind = afterKind.match(/^(inductive|abbrev)\b/);
+    if (subKind) {
+      candidate = subKind[1] as LeanDeclKind;
+      afterKind = skipLeadingWsAndBlockComments(
+        afterKind.slice(subKind[0].length)
+      );
+    }
+  }
+
+  let name = '';
+  if (candidate !== 'example') {
+    // Match qualified identifiers segment-by-segment so universe params like `id.{u}` yield `id`.
+    const nameMatch = afterKind.match(LEAN_QUALIFIED_NAME_RE);
+    if (
+      nameMatch &&
+      nameMatch[0] !== 'where' &&
+      nameMatch[0] !== 'extends' &&
+      !nameMatch[0].startsWith(':')
+    ) {
+      name = nameMatch[0];
+    }
+  }
+
+  return {attributes, modifiers, kind: candidate, name};
+}
+
+function getDirectiveKeyword(line: string, allowIndent = false): string | null {
+  if (!line || (!allowIndent && /^\s/.test(line))) return null;
+  let rest = skipLeadingWsAndBlockComments(line);
+  // Strip optional leading modifiers such as `noncomputable section`, `public section`, `scoped notation`, `local macro`.
+  while (true) {
+    const modMatch = rest.match(/^([A-Za-z_]+)\b/);
+    if (modMatch && LEAN_MODIFIER_KEYWORDS.has(modMatch[1])) {
+      const nextRest = skipLeadingWsAndBlockComments(
+        rest.slice(modMatch[0].length)
+      );
+      if (!nextRest) break;
+      rest = nextRest;
+    } else {
+      break;
+    }
+  }
+  const match = rest.match(/^(#[A-Za-z_]+|[A-Za-z_]+)\b/);
+  if (!match) return null;
+  const word = match[1];
+  if (LEAN_DIRECTIVE_KEYWORDS.has(word)) {
+    return word;
+  }
+  return null;
+}
+
+/**
+ * Find the character index of a top-level `:=` (outside parens/brackets/braces,
+ * strings, raw strings, char literals, guillemets, and comments) in a single line.
+ */
+function findTopLevelAssign(
+  line: string,
+  initialDepth: {paren: number; bracket: number; brace: number}
+): {
+  index: number;
+  depth: {paren: number; bracket: number; brace: number};
+} {
+  let {paren, bracket, brace} = initialDepth;
+  let inString = false;
+  for (let i = 0; i < line.length; i++) {
+    const ch = line[i];
+    const next = line[i + 1];
+    if (inString) {
+      if (ch === '\\') {
+        i++;
+      } else if (ch === '"') {
+        inString = false;
+      }
+      continue;
+    }
+    if (ch === '-' && next === '-') {
+      break;
+    }
+    if (ch === '/' && next === '-') {
+      let depth = 1;
+      let j = i + 2;
+      while (j < line.length && depth > 0) {
+        if (line[j] === '/' && line[j + 1] === '-') {
+          depth++;
+          j += 2;
+        } else if (line[j] === '-' && line[j + 1] === '/') {
+          depth--;
+          j += 2;
+        } else {
+          j++;
+        }
+      }
+      i = j - 1;
+      continue;
+    }
+    const rawOpen = matchRawStringOpen(line, i);
+    if (rawOpen) {
+      let j = rawOpen.contentStart;
+      while (j < line.length) {
+        if (matchRawStringCloseAt(line, j, rawOpen.hashes)) {
+          j += rawOpen.hashes;
+          break;
+        }
+        j++;
+      }
+      i = j;
+      continue;
+    }
+    const charLen = matchCharLiteral(line, i);
+    if (charLen > 0) {
+      i += charLen - 1;
+      continue;
+    }
+    if (ch === '«') {
+      const closeGuillemet = line.indexOf('»', i + 1);
+      i = closeGuillemet >= 0 ? closeGuillemet : line.length - 1;
+      continue;
+    }
+    if (ch === '"') {
+      inString = true;
+      continue;
+    }
+    if (ch === '(') paren++;
+    else if (ch === ')' && paren > 0) paren--;
+    else if (ch === '[') bracket++;
+    else if (ch === ']' && bracket > 0) bracket--;
+    else if (ch === '{') brace++;
+    else if (ch === '}' && brace > 0) brace--;
+    else if (
+      ch === ':' &&
+      next === '=' &&
+      paren === 0 &&
+      bracket === 0 &&
+      brace === 0
+    ) {
+      return {index: i, depth: {paren, bracket, brace}};
+    }
+  }
+  return {index: -1, depth: {paren, bracket, brace}};
+}
+
+/** Split trailing `-- ...` comment outside strings, raw strings, char literals, and block comments. */
+function splitLineComment(line: string): {code: string; comment?: string} {
+  let inString = false;
+  for (let i = 0; i < line.length; i++) {
+    const ch = line[i];
+    if (inString) {
+      if (ch === '\\') i++;
+      else if (ch === '"') inString = false;
+      continue;
+    }
+    if (ch === '/' && line[i + 1] === '-') {
+      let depth = 1;
+      let j = i + 2;
+      while (j < line.length && depth > 0) {
+        if (line[j] === '/' && line[j + 1] === '-') {
+          depth++;
+          j += 2;
+        } else if (line[j] === '-' && line[j + 1] === '/') {
+          depth--;
+          j += 2;
+        } else {
+          j++;
+        }
+      }
+      i = j - 1;
+      continue;
+    }
+    const rawOpen = matchRawStringOpen(line, i);
+    if (rawOpen) {
+      let j = rawOpen.contentStart;
+      while (j < line.length) {
+        if (matchRawStringCloseAt(line, j, rawOpen.hashes)) {
+          j += rawOpen.hashes;
+          break;
+        }
+        j++;
+      }
+      i = j;
+      continue;
+    }
+    const charLen = matchCharLiteral(line, i);
+    if (charLen > 0) {
+      i += charLen - 1;
+      continue;
+    }
+    if (ch === '«') {
+      const closeGuillemet = line.indexOf('»', i + 1);
+      i = closeGuillemet >= 0 ? closeGuillemet : line.length - 1;
+      continue;
+    }
+    if (ch === '"') {
+      inString = true;
+      continue;
+    }
+    if (ch === '-' && line[i + 1] === '-') {
+      return {
+        code: line.slice(0, i).trimEnd(),
+        comment: line.slice(i + 2).trim(),
+      };
+    }
+  }
+  return {code: line.trimEnd()};
+}
+
+function parseDerivingClause(lines: LeanCodeLine[]): {
+  remaining: LeanCodeLine[];
+  derivingClause?: string[];
+} {
+  if (lines.length === 0) return {remaining: lines};
+  const last = lines[lines.length - 1];
+  const {code} = splitLineComment(last.text);
+  const match = code.trim().match(/^deriving\s+(.+)$/);
+  if (!match) return {remaining: lines};
+  const clauses = match[1]
+    .split(',')
+    .map(s => s.trim())
+    .filter(Boolean);
+  return {
+    remaining: lines.slice(0, -1),
+    derivingClause: clauses.length > 0 ? clauses : undefined,
+  };
+}
+
+function parseStructureFields(
+  bodyLines: LeanCodeLine[]
+): LeanStructureField[] | undefined {
+  if (bodyLines.length === 0) return undefined;
+  const fields: LeanStructureField[] = [];
+  for (const line of bodyLines) {
+    const trimmed = line.text.trim();
+    if (!trimmed) continue;
+    // If there are standalone doc/comment lines or multi-line types, fall back to code view.
+    if (trimmed.startsWith('--') || trimmed.startsWith('/-')) {
+      return undefined;
+    }
+    const {code, comment} = splitLineComment(line.text);
+    const fieldMatch = code
+      .trim()
+      .match(
+        /^(«[^»]+»|[A-Za-z_α-ωΑ-Ω][A-Za-z0-9_'α-ωΑ-Ω₀-₉]*)\s*:(?!:)\s*(.+)$/
+      );
+    if (!fieldMatch) {
+      return undefined;
+    }
+    const fieldName = fieldMatch[1];
+    const rhs = fieldMatch[2].trim();
+    const assign = findTopLevelAssign(rhs, {paren: 0, bracket: 0, brace: 0});
+    let typeText = rhs;
+    let defaultValue: string | undefined;
+    if (assign.index >= 0) {
+      typeText = rhs.slice(0, assign.index).trim();
+      defaultValue = rhs.slice(assign.index + 2).trim();
+    }
+    fields.push({
+      name: fieldName,
+      typeText,
+      defaultValue,
+      comment,
+      lineNum: line.lineNum,
+      rawLine: line.text,
+    });
+  }
+  return fields.length > 0 ? fields : undefined;
+}
+
+/**
+ * Split a Lean inductive constructor line (starting with `|`) into one or more
+ * constructor segments, supporting inline enum syntax like `| north | south | east | west`
+ * while never splitting on `||`, `|||`, `|>`, `<|`, or pipes inside delimiters/strings.
+ */
+function splitTopLevelPipes(trimmedCode: string): string[] | undefined {
+  if (!trimmedCode.startsWith('|')) return undefined;
+  const segments: string[] = [];
+  let segStart = 1;
+  let paren = 0;
+  let bracket = 0;
+  let brace = 0;
+  let inString = false;
+
+  for (let i = 1; i < trimmedCode.length; i++) {
+    const ch = trimmedCode[i];
+    if (inString) {
+      if (ch === '\\') i++;
+      else if (ch === '"') inString = false;
+      continue;
+    }
+    const rawOpen = matchRawStringOpen(trimmedCode, i);
+    if (rawOpen) {
+      let j = rawOpen.contentStart;
+      while (j < trimmedCode.length) {
+        if (matchRawStringCloseAt(trimmedCode, j, rawOpen.hashes)) {
+          j += rawOpen.hashes;
+          break;
+        }
+        j++;
+      }
+      i = j;
+      continue;
+    }
+    const charLen = matchCharLiteral(trimmedCode, i);
+    if (charLen > 0) {
+      i += charLen - 1;
+      continue;
+    }
+    if (ch === '«') {
+      const closeGuillemet = trimmedCode.indexOf('»', i + 1);
+      i = closeGuillemet >= 0 ? closeGuillemet : trimmedCode.length - 1;
+      continue;
+    }
+    if (ch === '"') {
+      inString = true;
+      continue;
+    }
+    if (ch === '(') paren++;
+    else if (ch === ')' && paren > 0) paren--;
+    else if (ch === '[') bracket++;
+    else if (ch === ']' && bracket > 0) bracket--;
+    else if (ch === '{') brace++;
+    else if (ch === '}' && brace > 0) brace--;
+    else if (
+      ch === '|' &&
+      paren === 0 &&
+      bracket === 0 &&
+      brace === 0 &&
+      trimmedCode[i - 1] !== '|' &&
+      trimmedCode[i - 1] !== '<' &&
+      trimmedCode[i + 1] !== '|' &&
+      trimmedCode[i + 1] !== '>'
+    ) {
+      const seg = trimmedCode.slice(segStart, i).trim();
+      if (!seg) return undefined;
+      segments.push(seg);
+      segStart = i + 1;
+    }
+  }
+  const lastSeg = trimmedCode.slice(segStart).trim();
+  if (!lastSeg) return undefined;
+  segments.push(lastSeg);
+  return segments;
+}
+
+function parseInductiveConstructors(
+  bodyLines: LeanCodeLine[]
+): LeanInductiveCtor[] | undefined {
+  if (bodyLines.length === 0) return undefined;
+  const ctors: LeanInductiveCtor[] = [];
+  for (const line of bodyLines) {
+    const trimmed = line.text.trim();
+    if (!trimmed) continue;
+    if (!trimmed.startsWith('|')) {
+      return undefined;
+    }
+    const {code, comment} = splitLineComment(line.text);
+    const segments = splitTopLevelPipes(code.trim());
+    if (!segments) return undefined;
+    for (let s = 0; s < segments.length; s++) {
+      const nameMatch = segments[s].match(
+        /^(«[^»]+»|[A-Za-z_α-ωΑ-Ω][A-Za-z0-9_'α-ωΑ-Ω₀-₉]*)(.*)$/
+      );
+      if (!nameMatch) return undefined;
+      ctors.push({
+        name: nameMatch[1],
+        signatureText: nameMatch[2].trim(),
+        comment: s === segments.length - 1 ? comment : undefined,
+        lineNum: line.lineNum,
+        rawLine: line.text,
+      });
+    }
+  }
+  return ctors.length > 0 ? ctors : undefined;
+}
+
+/**
+ * Extract all Lean identifier tokens from comment/string-stripped code using
+ * exact Lean identifier boundaries (so `sorry'`, `sorry?`, `sorry₀`, and
+ * `αsorry` do not match `sorry`).
+ */
+function extractLeanIdentifiers(cleanCode: string): Set<string> {
+  const ids = new Set<string>();
+  const len = cleanCode.length;
+  let i = 0;
+  while (i < len) {
+    const {ch, len: chLen} = getCharAt(cleanCode, i);
+    if (ch && ch !== '#' && isIdentStart(ch)) {
+      let j = i + chLen;
+      while (j < len) {
+        const {ch: partCh, len: partLen} = getCharAt(cleanCode, j);
+        if (!partCh || !isIdentPart(partCh)) break;
+        j += partLen;
+      }
+      ids.add(cleanCode.slice(i, j));
+      i = j;
+    } else {
+      i += Math.max(1, chLen);
+    }
+  }
+  return ids;
+}
+
+function analyzeDeclarationHygiene(
+  kind: LeanDeclKind,
+  modifiers: string[],
+  pendingAttrs: string[],
+  codeLines: LeanCodeLine[]
+): LeanDeclHygiene {
+  const fullText = [...pendingAttrs, ...codeLines.map(l => l.text)].join('\n');
+  const cleanCode = stripLeanCommentsAndStrings(fullText);
+  const ids = extractLeanIdentifiers(cleanCode);
+  return {
+    hasSorry: ids.has('sorry') || ids.has('sorryAx'),
+    hasAdmit: ids.has('admit'),
+    isAxiom: kind === 'axiom' || ids.has('axiom'),
+    isPartial: modifiers.includes('partial') || ids.has('partial'),
+    isUnsafe: modifiers.includes('unsafe') || ids.has('unsafe'),
+    hasNativeDecide:
+      ids.has('native_decide') ||
+      ids.has('ofReduceBool') ||
+      ids.has('ofReduceNat'),
+  };
+}
+
+function detectProofStrategy(
+  kind: LeanDeclKind,
+  isTacticProof: boolean,
+  bodyLines: LeanCodeLine[],
+  hygiene: LeanDeclHygiene
+): LeanProofStrategy | undefined {
+  if (kind !== 'theorem' && kind !== 'lemma' && kind !== 'example') {
+    return undefined;
+  }
+  const cleanBody = stripLeanCommentsAndStrings(
+    bodyLines.map(l => l.text).join('\n')
+  ).trim();
+  if (!cleanBody) return undefined;
+  if (
+    !hygiene.hasSorry &&
+    !hygiene.hasAdmit &&
+    !hygiene.hasNativeDecide &&
+    /^(?:by\s+)?decide$/.test(cleanBody)
+  ) {
+    return 'decide';
+  }
+  if (isTacticProof) {
+    return 'tactic';
+  }
+  return 'term';
+}
+
+function findTopLevelAssignInStrippedLine(
+  strippedLine: string,
+  initialDepth: {paren: number; bracket: number; brace: number}
+): {
+  index: number;
+  depth: {paren: number; bracket: number; brace: number};
+} {
+  let {paren, bracket, brace} = initialDepth;
+  for (let i = 0; i < strippedLine.length; i++) {
+    const ch = strippedLine[i];
+    if (ch === '(') paren++;
+    else if (ch === ')' && paren > 0) paren--;
+    else if (ch === '[') bracket++;
+    else if (ch === ']' && bracket > 0) bracket--;
+    else if (ch === '{') brace++;
+    else if (ch === '}' && brace > 0) brace--;
+    else if (
+      ch === ':' &&
+      strippedLine[i + 1] === '=' &&
+      paren === 0 &&
+      bracket === 0 &&
+      brace === 0
+    ) {
+      return {index: i, depth: {paren, bracket, brace}};
+    }
+  }
+  return {index: -1, depth: {paren, bracket, brace}};
+}
+
+function buildDeclarationDetails(
+  header: {
+    attributes: string[];
+    modifiers: string[];
+    kind: LeanDeclKind;
+    name: string;
+  },
+  pendingAttrs: string[],
+  docComment: string | undefined,
+  docStartLine: number | undefined,
+  docEndLine: number | undefined,
+  codeLines: LeanCodeLine[]
+): LeanDeclarationDetails {
+  const attributes = [...pendingAttrs, ...header.attributes];
+  const modifiers = [...header.modifiers];
+  const hygiene = analyzeDeclarationHygiene(
+    header.kind,
+    modifiers,
+    pendingAttrs,
+    codeLines
+  );
+
+  // Pre-strip multi-line comments/strings once with exact 1:1 character offsets
+  // so signature/body splitting is immune to multi-line comments containing `:=`.
+  const strippedLines = stripLeanCommentsAndStrings(
+    codeLines.map(l => l.text).join('\n')
+  ).split('\n');
+
+  // Split declaration lines into signature vs body.
+  let signatureLines: LeanCodeLine[] = [];
+  let bodyLines: LeanCodeLine[] = [];
+  let isTacticProof = false;
+  let fields: LeanStructureField[] | undefined;
+  let constructors: LeanInductiveCtor[] | undefined;
+  let derivingClause: string[] | undefined;
+
+  if (
+    header.kind === 'structure' ||
+    header.kind === 'class' ||
+    header.kind === 'inductive' ||
+    header.kind === 'coinductive'
+  ) {
+    // Find `where` keyword line (or end of header).
+    let whereIdx = -1;
+    for (let idx = 0; idx < codeLines.length; idx++) {
+      const strippedTrimmed = (strippedLines[idx] ?? '').trim();
+      if (/\bwhere\s*$/.test(strippedTrimmed)) {
+        whereIdx = idx;
+        break;
+      }
+      if (idx > 0 && strippedTrimmed.startsWith('|')) {
+        whereIdx = idx - 1;
+        break;
+      }
+    }
+    if (whereIdx >= 0) {
+      signatureLines = codeLines.slice(0, whereIdx + 1);
+      const rawBody = codeLines.slice(whereIdx + 1);
+      const parsedDeriving = parseDerivingClause(rawBody);
+      derivingClause = parsedDeriving.derivingClause;
+      bodyLines = parsedDeriving.remaining;
+      if (header.kind === 'structure' || header.kind === 'class') {
+        fields = parseStructureFields(bodyLines);
+      } else {
+        constructors = parseInductiveConstructors(bodyLines);
+      }
+    } else {
+      signatureLines = codeLines;
+    }
+  } else {
+    // Support `instance ... where` blocks before looking for top-level `:=`.
+    let instanceWhereIdx = -1;
+    if (header.kind === 'instance') {
+      for (let idx = 0; idx < codeLines.length; idx++) {
+        const strippedTrimmed = (strippedLines[idx] ?? '').trim();
+        if (/\bwhere\s*$/.test(strippedTrimmed)) {
+          instanceWhereIdx = idx;
+          break;
+        }
+      }
+    }
+
+    if (instanceWhereIdx >= 0) {
+      signatureLines = codeLines.slice(0, instanceWhereIdx + 1);
+      bodyLines = codeLines.slice(instanceWhereIdx + 1);
+    } else {
+      // Look for top-level `:=` or equation-compiler `|` arms.
+      let depth = {paren: 0, bracket: 0, brace: 0};
+      let splitLineIdx = -1;
+      let assignCharIdx = -1;
+      let isMatchArmSplit = false;
+
+      for (let idx = 0; idx < codeLines.length; idx++) {
+        const strippedLine = strippedLines[idx] ?? '';
+        if (
+          idx > 0 &&
+          depth.paren === 0 &&
+          depth.bracket === 0 &&
+          depth.brace === 0 &&
+          /^\s*\|/.test(strippedLine)
+        ) {
+          splitLineIdx = idx;
+          isMatchArmSplit = true;
+          break;
+        }
+        const res = findTopLevelAssignInStrippedLine(strippedLine, depth);
+        depth = res.depth;
+        if (res.index >= 0) {
+          splitLineIdx = idx;
+          assignCharIdx = res.index;
+          break;
+        }
+      }
+
+      if (splitLineIdx >= 0 && isMatchArmSplit) {
+        signatureLines = codeLines.slice(0, splitLineIdx);
+        bodyLines = codeLines.slice(splitLineIdx);
+        const cleanBody = strippedLines.slice(splitLineIdx).join('\n');
+        isTacticProof = extractLeanIdentifiers(cleanBody).has('by');
+      } else if (splitLineIdx >= 0 && assignCharIdx >= 0) {
+        const splitLine = codeLines[splitLineIdx];
+        const beforeAssign = splitLine.text.slice(0, assignCharIdx).trimEnd();
+        const afterAssign = splitLine.text.slice(assignCharIdx + 2).trim();
+        const afterAssignStripped = (strippedLines[splitLineIdx] ?? '')
+          .slice(assignCharIdx + 2)
+          .trim();
+
+        signatureLines = [
+          ...codeLines.slice(0, splitLineIdx),
+          {lineNum: splitLine.lineNum, text: beforeAssign},
+        ];
+
+        const byMatch = afterAssignStripped.match(/^by(?=$|\s)/);
+        if (byMatch) {
+          isTacticProof = true;
+          const leadingStripped = skipLeadingWsAndBlockComments(afterAssign);
+          const remainder = leadingStripped.startsWith('by')
+            ? leadingStripped.slice(2).trim()
+            : afterAssign.trim();
+          if (remainder) {
+            bodyLines = [
+              {lineNum: splitLine.lineNum, text: remainder},
+              ...codeLines.slice(splitLineIdx + 1),
+            ];
+          } else {
+            bodyLines = codeLines.slice(splitLineIdx + 1);
+          }
+        } else if (/^do(?=$|\s)/.test(afterAssignStripped)) {
+          bodyLines = [
+            {lineNum: splitLine.lineNum, text: afterAssign},
+            ...codeLines.slice(splitLineIdx + 1),
+          ];
+        } else if (afterAssign) {
+          bodyLines = [
+            {lineNum: splitLine.lineNum, text: afterAssign},
+            ...codeLines.slice(splitLineIdx + 1),
+          ];
+        } else {
+          bodyLines = codeLines.slice(splitLineIdx + 1);
+          const firstNonBlankIdx = bodyLines.findIndex(
+            (_, offset) =>
+              (strippedLines[splitLineIdx + 1 + offset] ?? '').trim().length > 0
+          );
+          if (
+            firstNonBlankIdx >= 0 &&
+            /^by(?=$|\s)/.test(
+              (strippedLines[splitLineIdx + 1 + firstNonBlankIdx] ?? '').trim()
+            )
+          ) {
+            isTacticProof = true;
+          }
+        }
+      } else {
+        signatureLines = codeLines;
+      }
+    }
+  }
+
+  const isCompactDef =
+    (header.kind === 'def' || header.kind === 'abbrev') &&
+    !docComment &&
+    attributes.length === 0 &&
+    codeLines.length === 1 &&
+    !hygiene.hasSorry &&
+    !hygiene.hasAdmit &&
+    !hygiene.hasNativeDecide &&
+    !hygiene.isAxiom &&
+    !hygiene.isPartial &&
+    !hygiene.isUnsafe;
+
+  const proofStrategy = detectProofStrategy(
+    header.kind,
+    isTacticProof,
+    bodyLines,
+    hygiene
+  );
+
+  return {
+    kind: header.kind,
+    name: header.name,
+    attributes,
+    modifiers,
+    docComment,
+    docStartLine,
+    docEndLine,
+    signatureLines,
+    bodyLines,
+    isTacticProof,
+    proofStrategy,
+    fields,
+    constructors,
+    derivingClause,
+    isCompactDef,
+    hygiene,
+  };
+}
+
+const IMPORT_LINE_RE = /^(?:(?:public|private|meta)\s+)*import(?:\s+all)?\s+/;
+
+const SINGLE_LINE_DIRECTIVES = new Set([
+  'module',
+  'namespace',
+  'section',
+  'end',
+  'universe',
+  'universes',
+  'export',
+  '#where',
+  '#exit',
+]);
+
+const BODY_DIRECTIVES = new Set([
+  'macro',
+  'macro_rules',
+  'syntax',
+  'elab',
+  'elab_rules',
+  'initialize',
+  'builtin_initialize',
+  'notation',
+  'infix',
+  'infixl',
+  'infixr',
+  'prefix',
+  'postfix',
+]);
+
+const IN_SCOPING_DIRECTIVES = new Set([
+  'open',
+  'set_option',
+  'variable',
+  'variables',
+  'universe',
+  'universes',
+  'attribute',
+  'local',
+  'scoped',
+  'export',
+]);
+
+interface LeanLexState {
+  blockDepth: number;
+  inString: boolean;
+  inInterpString: boolean;
+  interpBraceDepths: number[];
+  rawStringHashes: number;
+  inGuillemet: boolean;
+  paren: number;
+  bracket: number;
+  brace: number;
+}
+
+function createLeanLexState(): LeanLexState {
+  return {
+    blockDepth: 0,
+    inString: false,
+    inInterpString: false,
+    interpBraceDepths: [],
+    rawStringHashes: -1,
+    inGuillemet: false,
+    paren: 0,
+    bracket: 0,
+    brace: 0,
+  };
+}
+
+function hasOpenLiteralOrComment(state: LeanLexState): boolean {
+  return (
+    state.blockDepth > 0 ||
+    state.inString ||
+    state.inInterpString ||
+    state.rawStringHashes >= 0 ||
+    state.inGuillemet
+  );
+}
+
+function hasOpenDelimiters(state: LeanLexState): boolean {
+  return state.paren > 0 || state.bracket > 0 || state.brace > 0;
+}
+
+/**
+ * Incrementally advance multi-line lexical & delimiter state across a single
+ * line and return the comment/string-stripped view of that line.
+ */
+function advanceLeanLexState(state: LeanLexState, line: string): string {
+  const out: string[] = [];
+  let i = 0;
+  const len = line.length;
+  while (i < len) {
+    const ch = line[i];
+    const next = i + 1 < len ? line[i + 1] : '';
+
+    if (state.blockDepth > 0) {
+      if (ch === '/' && next === '-') {
+        state.blockDepth++;
+        out.push(' ', ' ');
+        i += 2;
+      } else if (ch === '-' && next === '/') {
+        state.blockDepth--;
+        out.push(' ', ' ');
+        i += 2;
+      } else {
+        out.push(' ');
+        i++;
+      }
+      continue;
+    }
+
+    if (state.inGuillemet) {
+      out.push(' ');
+      if (ch === '»') {
+        state.inGuillemet = false;
+      }
+      i++;
+      continue;
+    }
+
+    if (state.rawStringHashes >= 0) {
+      if (matchRawStringCloseAt(line, i, state.rawStringHashes)) {
+        const closeLen = 1 + state.rawStringHashes;
+        for (let k = 0; k < closeLen; k++) out.push(' ');
+        i += closeLen;
+        state.rawStringHashes = -1;
+      } else {
+        out.push(' ');
+        i++;
+      }
+      continue;
+    }
+
+    if (state.inInterpString) {
+      if (ch === '\\' && i + 1 < len) {
+        out.push(' ', ' ');
+        i += 2;
+      } else if (ch === '"') {
+        state.inInterpString = false;
+        out.push(' ');
+        i++;
+      } else if (ch === '{') {
+        state.inInterpString = false;
+        state.interpBraceDepths.push(1);
+        out.push('{');
+        i++;
+      } else {
+        out.push(' ');
+        i++;
+      }
+      continue;
+    }
+
+    if (state.inString) {
+      if (ch === '\\' && i + 1 < len) {
+        out.push(' ', ' ');
+        i += 2;
+      } else if (ch === '"') {
+        state.inString = false;
+        out.push(' ');
+        i++;
+      } else {
+        out.push(' ');
+        i++;
+      }
+      continue;
+    }
+
+    if (ch === '/' && next === '-') {
+      state.blockDepth = 1;
+      out.push(' ', ' ');
+      i += 2;
+      continue;
+    }
+
+    if (ch === '-' && next === '-') {
+      break;
+    }
+
+    if (state.interpBraceDepths.length > 0) {
+      if (ch === '{') {
+        state.interpBraceDepths[state.interpBraceDepths.length - 1]++;
+        out.push('{');
+        i++;
+        continue;
+      }
+      if (ch === '}') {
+        const nextDepth =
+          state.interpBraceDepths[state.interpBraceDepths.length - 1] - 1;
+        if (nextDepth <= 0) {
+          state.interpBraceDepths.pop();
+          state.inInterpString = true;
+        } else {
+          state.interpBraceDepths[state.interpBraceDepths.length - 1] =
+            nextDepth;
+        }
+        out.push('}');
+        i++;
+        continue;
+      }
+    }
+
+    const rawOpen = matchRawStringOpen(line, i);
+    if (rawOpen) {
+      const openLen = rawOpen.contentStart - i;
+      for (let k = 0; k < openLen; k++) out.push(' ');
+      state.rawStringHashes = rawOpen.hashes;
+      i = rawOpen.contentStart;
+      continue;
+    }
+
+    const charLen = matchCharLiteral(line, i);
+    if (charLen > 0) {
+      for (let k = 0; k < charLen; k++) out.push(' ');
+      i += charLen;
+      continue;
+    }
+
+    if (ch === '«') {
+      state.inGuillemet = true;
+      out.push(' ');
+      i++;
+      continue;
+    }
+
+    const {ch: startChar, len: startLen} = getCharAt(line, i);
+    if (startChar && isIdentStart(startChar)) {
+      let j = i + startLen;
+      while (j < len) {
+        const {ch: partChar, len: partLen} = getCharAt(line, j);
+        if (!partChar || !isIdentPart(partChar)) break;
+        j += partLen;
+      }
+      const ident = line.slice(i, j);
+      if (
+        LEAN_INTERP_STRING_PREFIXES.has(ident) &&
+        j < len &&
+        line[j] === '"'
+      ) {
+        for (let k = i; k <= j; k++) out.push(' ');
+        state.inInterpString = true;
+        i = j + 1;
+        continue;
+      }
+      for (let k = i; k < j; k++) out.push(line[k]);
+      i = j;
+      continue;
+    }
+
+    if (ch === '"') {
+      state.inString = true;
+      out.push(' ');
+      i++;
+      continue;
+    }
+
+    if (ch === '(') state.paren++;
+    else if (ch === ')' && state.paren > 0) state.paren--;
+    else if (ch === '[') state.bracket++;
+    else if (ch === ']' && state.bracket > 0) state.bracket--;
+    else if (ch === '{') state.brace++;
+    else if (ch === '}' && state.brace > 0) state.brace--;
+
+    out.push(ch);
+    i++;
+  }
+  return out.join('');
+}
+
+function lineExpectsDeclContinuation(strippedLine: string): boolean {
+  const trimmed = strippedLine.trimEnd();
+  if (!trimmed) return false;
+  return /(?:^|[\s()[\]{}])(?:by|where|extends)$|(?::=|=>)$/.test(trimmed);
+}
+
+function extractBlockCommentRaw(
+  lines: string[],
+  startRow: number,
+  startCol: number,
+  endRow: number,
+  endCol: number
+): string {
+  if (startRow === endRow) {
+    return lines[startRow].slice(startCol, endCol);
+  }
+  const parts: string[] = [lines[startRow].slice(startCol)];
+  for (let r = startRow + 1; r < endRow; r++) {
+    parts.push(lines[r]);
+  }
+  parts.push(lines[endRow].slice(0, endCol));
+  return parts.join('\n');
+}
+
+function getLineIndent(line: string): number {
+  let idx = 0;
+  while (idx < line.length && (line[idx] === ' ' || line[idx] === '\t')) {
+    idx++;
+  }
+  return idx;
+}
+
+/**
+ * Determine whether `rawAfterKw` (following a directive keyword inside a `where`
+ * block) matches a parameterized member/field signature such as
+ * `syntax (n : Nat) : String` or `prefix x := x + 1` rather than a command.
+ */
+function hasMemberSignatureAfterKeyword(rawAfterKw: string): boolean {
+  let i = 0;
+  const len = rawAfterKw.length;
+  let sawParam = false;
+  while (i < len) {
+    while (i < len && /\s/.test(rawAfterKw[i])) i++;
+    if (i >= len) return false;
+    const ch = rawAfterKw[i];
+    const next = i + 1 < len ? rawAfterKw[i + 1] : '';
+    if (ch === '-' && next === '-') return false;
+    if (ch === '/' && next === '-') {
+      let depth = 1;
+      let j = i + 2;
+      while (j < len && depth > 0) {
+        if (rawAfterKw[j] === '/' && rawAfterKw[j + 1] === '-') {
+          depth++;
+          j += 2;
+        } else if (rawAfterKw[j] === '-' && rawAfterKw[j + 1] === '/') {
+          depth--;
+          j += 2;
+        } else {
+          j++;
+        }
+      }
+      if (depth > 0) return false;
+      i = j;
+      continue;
+    }
+    if (ch === ':' && next === '=') {
+      return true;
+    }
+    if (ch === ':' && !/^:\d/.test(rawAfterKw.slice(i))) {
+      return true;
+    }
+    if (ch === '|' && sawParam) {
+      return true;
+    }
+    if (ch === '(' || ch === '{' || ch === '[') {
+      const closeCh = ch === '(' ? ')' : ch === '{' ? '}' : ']';
+      let depth = 1;
+      let j = i + 1;
+      let inStr = false;
+      while (j < len && depth > 0) {
+        const c = rawAfterKw[j];
+        if (inStr) {
+          if (c === '\\') j++;
+          else if (c === '"') inStr = false;
+        } else if (c === '"') {
+          inStr = true;
+        } else if (c === ch) {
+          depth++;
+        } else if (c === closeCh) {
+          depth--;
+        }
+        j++;
+      }
+      if (depth > 0) return false;
+      sawParam = true;
+      i = j;
+      continue;
+    }
+    const {ch: startChar, len: startLen} = getCharAt(rawAfterKw, i);
+    if (startChar && (isIdentStart(startChar) || ch === '«')) {
+      if (ch === '«') {
+        const closeG = rawAfterKw.indexOf('»', i + 1);
+        if (closeG < 0) return false;
+        i = closeG + 1;
+      } else {
+        let j = i + startLen;
+        while (j < len) {
+          const {ch: partCh, len: partLen} = getCharAt(rawAfterKw, j);
+          if (!partCh || !isIdentPart(partCh)) break;
+          j += partLen;
+        }
+        i = j;
+      }
+      sawParam = true;
+      continue;
+    }
+    return false;
+  }
+  return false;
+}
+
+/**
+ * Determine whether a line starts a brand-new top-level Lean command (declaration,
+ * declaration prefix such as attributes/standalone modifiers/module-or-decl docs,
+ * or non-scoping directive) that should terminate an active declaration's body
+ * when delimiters are balanced.
+ */
+function startsNewTopLevelCommandInDeclBody(
+  line: string,
+  isTypeDecl: boolean,
+  inWhereBlock = false
+): boolean {
+  const trimmed = line.trim();
+  if (trimmed.startsWith('/-!')) return true;
+  if (!isTypeDecl && trimmed.startsWith('/--') && !trimmed.startsWith('/---')) {
+    return true;
+  }
+  const restAfterLeading = skipLeadingWsAndBlockComments(line);
+  if (restAfterLeading.startsWith('@[')) return true;
+  if (parseDeclarationHeaderStart(line, true)) return true;
+  if (parseStandaloneModifiersLine(line)) return true;
+  const dirKw = getDirectiveKeyword(line, true);
+  if (!dirKw) return false;
+  const kwIdx = restAfterLeading.indexOf(dirKw);
+  const rawAfterKw =
+    kwIdx >= 0 ? restAfterLeading.slice(kwIdx + dirKw.length) : '';
+  const afterKw = skipLeadingWsAndBlockComments(rawAfterKw);
+  // `deriving` clauses belong to the preceding declaration unless starting a
+  // top-level `deriving instance ... for ...` command.
+  if (dirKw === 'deriving') {
+    return /^instance(?=$|\s|--)/.test(afterKw);
+  }
+  // Avoid breaking on structure fields or local bindings whose name collides
+  // with a context-sensitive directive keyword (e.g. `module : String`,
+  // `variables := ...`, `prefix x := ...`, `syntax (n : Nat) : String`).
+  if (/^:(?!\d)/.test(afterKw) || afterKw.startsWith(':=')) return false;
+  if (inWhereBlock && hasMemberSignatureAfterKeyword(rawAfterKw)) {
+    return false;
+  }
+  // `open ... in`, `set_option ... in`, `attribute ... in`, `variable ... in`
+  // can legitimately scope expressions/tactics inside declaration bodies.
+  if (IN_SCOPING_DIRECTIVES.has(dirKw)) {
+    const stripped = stripLeanCommentsAndStrings(line);
+    if (/(?:^|\s)in(?=$|\s)/.test(stripped)) return false;
+  }
+  return true;
+}
+
+/**
+ * Parse a Lean 4 source file into semantic top-level blocks with exact 1-based
+ * `startLine`..`endLine` ranges.
+ */
+export function parseLeanBlocks(source: string): LeanBlock[] {
+  if (!source) return [];
+  const lines = normalizeLeanSource(source).split('\n');
+  const blocks: LeanBlock[] = [];
+
+  let i = 0;
+  let colOffset = 0;
+  let blockCounter = 0;
+  let inMutual = false;
+  let mutualIndent = -1;
+
+  // Lazy watermark and linear scan budget for multi-line `@[...]` attributes so
+  // files with many unclosed `@[` lines stay strictly O(N).
+  let lastClosingBracketRow: number | undefined;
+  let remainingUnclosedAttrScanBudget = Math.max(256, lines.length * 2);
+  const getLastClosingBracketRow = (): number => {
+    if (lastClosingBracketRow !== undefined) return lastClosingBracketRow;
+    for (let r = lines.length - 1; r >= 0; r--) {
+      if (lines[r].includes(']')) {
+        lastClosingBracketRow = r;
+        return r;
+      }
+    }
+    lastClosingBracketRow = -1;
+    return -1;
+  };
+
+  let pendingDoc: {text: string; startLine: number; endLine: number} | null =
+    null;
+  let pendingAttrs: Array<{text: string; startLine: number; endLine: number}> =
+    [];
+  let pendingModifiers: Array<{text: string; mods: string[]; lineNum: number}> =
+    [];
+  let pendingComments: Array<{
+    startLine: number;
+    endLine: number;
+    lines: LeanCodeLine[];
+    raw: string;
+  }> = [];
+
+  const hasPendingDeclPrefix = () =>
+    pendingDoc !== null ||
+    pendingAttrs.length > 0 ||
+    pendingModifiers.length > 0;
+
+  const flushPendingAsStandalone = () => {
+    const standalone: LeanBlock[] = [];
+    if (pendingDoc) {
+      standalone.push({
+        id: `doc-${blockCounter++}`,
+        type: 'module_doc',
+        raw: lines
+          .slice(pendingDoc.startLine - 1, pendingDoc.endLine)
+          .join('\n'),
+        startLine: pendingDoc.startLine,
+        endLine: pendingDoc.endLine,
+        markdownContent: pendingDoc.text,
+      });
+      pendingDoc = null;
+    }
+    if (pendingAttrs.length > 0) {
+      const startLine = pendingAttrs[0].startLine;
+      const endLine = pendingAttrs[pendingAttrs.length - 1].endLine;
+      standalone.push({
+        id: `dir-${blockCounter++}`,
+        type: 'directive',
+        raw: pendingAttrs.map(a => a.text).join('\n'),
+        startLine,
+        endLine,
+        directiveKind: 'attribute',
+        directiveLines: pendingAttrs.map(a => {
+          return {
+            lineNum: a.startLine,
+            text: a.text,
+          };
+        }),
+      });
+      pendingAttrs = [];
+    }
+    if (pendingModifiers.length > 0) {
+      const startLine = pendingModifiers[0].lineNum;
+      const endLine = pendingModifiers[pendingModifiers.length - 1].lineNum;
+      standalone.push({
+        id: `dir-mod-${blockCounter++}`,
+        type: 'directive',
+        raw: pendingModifiers.map(m => m.text).join('\n'),
+        startLine,
+        endLine,
+        directiveKind: 'modifier',
+        directiveLines: pendingModifiers.map(m => {
+          return {lineNum: m.lineNum, text: m.text};
+        }),
+      });
+      pendingModifiers = [];
+    }
+    for (const c of pendingComments) {
+      standalone.push({
+        id: `comment-${blockCounter++}`,
+        type: 'comment',
+        raw: c.raw,
+        startLine: c.startLine,
+        endLine: c.endLine,
+        commentLines: c.lines,
+      });
+    }
+    pendingComments = [];
+    standalone.sort((a, b) => a.startLine - b.startLine);
+    blocks.push(...standalone);
+  };
+
+  while (i < lines.length) {
+    const loopStartI = i;
+    const loopStartCol = colOffset;
+    const fullLine = lines[i];
+    const line = colOffset > 0 ? fullLine.slice(colOffset) : fullLine;
+    const trimmed = line.trim();
+
+    if (trimmed === '') {
+      i++;
+      colOffset = 0;
+      continue;
+    }
+
+    const leadingWs = getLineIndent(line);
+    const startCol = colOffset + leadingWs;
+    const lineIndent = getLineIndent(fullLine);
+
+    // Exit `mutual ... end` scope on column-0 `end`.
+    if (
+      inMutual &&
+      colOffset === 0 &&
+      lineIndent === 0 &&
+      /^end(?:\s|--|$)/.test(trimmed)
+    ) {
+      inMutual = false;
+      mutualIndent = -1;
+    }
+
+    // 1. Module doc comment `/-! ... -/`
+    if (trimmed.startsWith('/-!')) {
+      flushPendingAsStandalone();
+      const {endRow, endCol, closed} = findBlockCommentEnd(lines, i, startCol);
+      const raw = extractBlockCommentRaw(lines, i, startCol, endRow, endCol);
+      blocks.push({
+        id: `moddoc-${blockCounter++}`,
+        type: 'module_doc',
+        raw,
+        startLine: i + 1,
+        endLine: endRow + 1,
+        markdownContent: unwrapBlockComment(raw, 3),
+      });
+      if (closed && lines[endRow].slice(endCol).trim() !== '') {
+        i = endRow;
+        colOffset = endCol;
+      } else {
+        i = endRow + 1;
+        colOffset = 0;
+      }
+      continue;
+    }
+
+    // 2. Declaration doc comment `/-- ... -/` (not `/---`)
+    if (trimmed.startsWith('/--') && !trimmed.startsWith('/---')) {
+      flushPendingAsStandalone();
+      if (inMutual && mutualIndent < 0) {
+        mutualIndent = lineIndent;
+      }
+      const {endRow, endCol, closed} = findBlockCommentEnd(lines, i, startCol);
+      const raw = extractBlockCommentRaw(lines, i, startCol, endRow, endCol);
+      pendingDoc = {
+        text: unwrapBlockComment(raw, 3),
+        startLine: i + 1,
+        endLine: endRow + 1,
+      };
+      if (closed && lines[endRow].slice(endCol).trim() !== '') {
+        i = endRow;
+        colOffset = endCol;
+      } else {
+        i = endRow + 1;
+        colOffset = 0;
+      }
+      continue;
+    }
+
+    // 3. Regular block comment `/- ... -/`
+    if (trimmed.startsWith('/-')) {
+      flushPendingAsStandalone();
+      const {endRow, endCol, closed} = findBlockCommentEnd(lines, i, startCol);
+      const raw = extractBlockCommentRaw(lines, i, startCol, endRow, endCol);
+      const inner = unwrapBlockComment(raw, 2);
+      const commentLines = raw.split('\n').map((t, idx) => {
+        return {lineNum: i + 1 + idx, text: t};
+      });
+      const isLicenseHeader =
+        /copyright|apache license|spdx-license-identifier|licensed under/i.test(
+          inner
+        );
+      blocks.push({
+        id: `comment-${blockCounter++}`,
+        type: 'comment',
+        raw,
+        startLine: i + 1,
+        endLine: endRow + 1,
+        commentLines,
+        markdownContent: inner,
+        isLicenseHeader,
+      });
+      if (closed && lines[endRow].slice(endCol).trim() !== '') {
+        i = endRow;
+        colOffset = endCol;
+      } else {
+        i = endRow + 1;
+        colOffset = 0;
+      }
+      continue;
+    }
+
+    // 4. Section divider banners (`-- ===... / -- Title / -- ===...`)
+    if (colOffset === 0 && isDividerCommentLine(line)) {
+      flushPendingAsStandalone();
+      const startIdx = i;
+      let j = i + 1;
+      const titleLines: string[] = [];
+      while (j < lines.length && lines[j].trim().startsWith('--')) {
+        if (isDividerCommentLine(lines[j])) {
+          j++;
+          break;
+        }
+        titleLines.push(lines[j].trim().replace(/^--\s?/, ''));
+        j++;
+      }
+      if (titleLines.length > 0) {
+        const endIdx = j - 1;
+        blocks.push({
+          id: `section-${blockCounter++}`,
+          type: 'section_banner',
+          raw: lines.slice(startIdx, endIdx + 1).join('\n'),
+          startLine: startIdx + 1,
+          endLine: endIdx + 1,
+          markdownContent: titleLines.join(' ').trim(),
+        });
+        i = endIdx + 1;
+        colOffset = 0;
+        continue;
+      }
+      // Standalone divider comment(s) with no title lines: emit as regular comment
+      // and strictly advance `i` to prevent infinite loops.
+      const dividerEnd = j;
+      blocks.push({
+        id: `comment-${blockCounter++}`,
+        type: 'comment',
+        raw: lines.slice(startIdx, dividerEnd).join('\n'),
+        startLine: startIdx + 1,
+        endLine: dividerEnd,
+        commentLines: lines.slice(startIdx, dividerEnd).map((t, idx) => {
+          return {lineNum: startIdx + 1 + idx, text: t};
+        }),
+      });
+      i = dividerEnd;
+      colOffset = 0;
+      continue;
+    }
+
+    // 5. Standalone line comments `-- ...`
+    // Preserve pending docs/attributes/modifiers across intervening `--` comments
+    // so they remain attached to the following declaration (and flush in source
+    // order if no declaration follows).
+    if (trimmed.startsWith('--')) {
+      const startIdx = i;
+      let commentLines: LeanCodeLine[];
+      let raw: string;
+      let endLine: number;
+      if (colOffset > 0) {
+        raw = trimmed;
+        endLine = startIdx + 1;
+        commentLines = [{lineNum: startIdx + 1, text: trimmed}];
+        i = startIdx + 1;
+        colOffset = 0;
+      } else {
+        commentLines = [];
+        while (
+          i < lines.length &&
+          lines[i].trim().startsWith('--') &&
+          (i === startIdx || !isDividerCommentLine(lines[i]))
+        ) {
+          commentLines.push({lineNum: i + 1, text: lines[i]});
+          i++;
+        }
+        raw = lines.slice(startIdx, i).join('\n');
+        endLine = i;
+        colOffset = 0;
+      }
+      if (hasPendingDeclPrefix()) {
+        pendingComments.push({
+          startLine: startIdx + 1,
+          endLine,
+          lines: commentLines,
+          raw,
+        });
+      } else {
+        blocks.push({
+          id: `comment-${blockCounter++}`,
+          type: 'comment',
+          raw,
+          startLine: startIdx + 1,
+          endLine,
+          commentLines,
+        });
+      }
+      continue;
+    }
+
+    // 6. Contiguous `import` / `public import` / `private import` / `meta import` / `import all` block
+    if (colOffset === 0 && IMPORT_LINE_RE.test(line)) {
+      flushPendingAsStandalone();
+      const startIdx = i;
+      const importLines: LeanCodeLine[] = [];
+      while (i < lines.length && IMPORT_LINE_RE.test(lines[i])) {
+        importLines.push({lineNum: i + 1, text: lines[i]});
+        i++;
+      }
+      blocks.push({
+        id: `imports-${blockCounter++}`,
+        type: 'imports',
+        raw: lines.slice(startIdx, i).join('\n'),
+        startLine: startIdx + 1,
+        endLine: i,
+        importLines,
+      });
+      colOffset = 0;
+      continue;
+    }
+
+    // 6b. `mutual` opener: emit directive and allow nested declarations until `end`
+    if (
+      colOffset === 0 &&
+      lineIndent === 0 &&
+      /^mutual(?:\s|--|$)/.test(trimmed)
+    ) {
+      flushPendingAsStandalone();
+      blocks.push({
+        id: `dir-mutual-${blockCounter++}`,
+        type: 'directive',
+        raw: line,
+        startLine: i + 1,
+        endLine: i + 1,
+        directiveKind: 'mutual',
+        directiveLines: [{lineNum: i + 1, text: line}],
+      });
+      inMutual = true;
+      mutualIndent = -1;
+      i++;
+      colOffset = 0;
+      continue;
+    }
+
+    // 7. Standalone or multi-line attribute `@[...]` preceding a declaration
+    if (trimmed.startsWith('@[')) {
+      if (isStandaloneAttributeLine(trimmed)) {
+        if (inMutual && mutualIndent < 0) {
+          mutualIndent = lineIndent;
+        }
+        pendingAttrs.push({
+          text: colOffset > 0 ? trimmed : line,
+          startLine: i + 1,
+          endLine: i + 1,
+        });
+        i++;
+        colOffset = 0;
+        continue;
+      }
+      // Multi-line attribute `@[simp,\n  inline]` whose closing `]` is on a later line
+      if (findMatchingBracket(trimmed, 1) < 0) {
+        const lastBracketRow = getLastClosingBracketRow();
+        if (lastBracketRow > i) {
+          const maxAdditionalLines =
+            remainingUnclosedAttrScanBudget > 0
+              ? Math.max(8, remainingUnclosedAttrScanBudget)
+              : 8;
+          const maxEndRow = Math.min(lastBracketRow, i + maxAdditionalLines);
+          const attrScan = findMultiLineAttributeEnd(
+            lines,
+            i,
+            startCol,
+            startCol + 1,
+            maxEndRow
+          );
+          if (attrScan.closed) {
+            if (inMutual && mutualIndent < 0) {
+              mutualIndent = lineIndent;
+            }
+            pendingAttrs.push({
+              text: attrScan.text,
+              startLine: i + 1,
+              endLine: attrScan.endRow + 1,
+            });
+            if (
+              lines[attrScan.endRow]
+                .slice(attrScan.closeColExclusive)
+                .trim() !== ''
+            ) {
+              i = attrScan.endRow;
+              colOffset = attrScan.closeColExclusive;
+            } else {
+              i = attrScan.endRow + 1;
+              colOffset = 0;
+            }
+            continue;
+          }
+          remainingUnclosedAttrScanBudget = Math.max(
+            0,
+            remainingUnclosedAttrScanBudget - attrScan.scannedLines
+          );
+        }
+      }
+    }
+
+    // 7b. Standalone modifier line (`unsafe`, `partial`, `private`, ...) preceding a declaration
+    const standaloneMods = parseStandaloneModifiersLine(line);
+    if (standaloneMods) {
+      if (inMutual && mutualIndent < 0) {
+        mutualIndent = lineIndent;
+      }
+      pendingModifiers.push({
+        text: colOffset > 0 ? trimmed : line,
+        mods: standaloneMods,
+        lineNum: i + 1,
+      });
+      i++;
+      colOffset = 0;
+      continue;
+    }
+
+    // 8. Declaration (`theorem`, `lemma`, `def`, `structure`, `inductive`, `axiom`, ...)
+    // Allowed at column 0, inside `mutual`, inside `namespace`/`section`, or after `... in` / `/- ... -/`.
+    const declHeader = parseDeclarationHeaderStart(line, true);
+    if (declHeader) {
+      if (inMutual && mutualIndent < 0) {
+        mutualIndent = lineIndent;
+      }
+      const declIndent = lineIndent;
+      const declStartIdx = i;
+      const firstCodeText = colOffset > 0 ? trimmed : line;
+      const prefixLines: LeanCodeLine[] = [
+        ...pendingModifiers.map(m => {
+          return {lineNum: m.lineNum, text: m.text};
+        }),
+        ...pendingComments.flatMap(c => c.lines),
+      ].sort((a, b) => a.lineNum - b.lineNum);
+      const codeLines: LeanCodeLine[] = [
+        ...prefixLines,
+        {lineNum: i + 1, text: firstCodeText},
+      ];
+      const combinedHeader = {
+        ...declHeader,
+        modifiers: [
+          ...pendingModifiers.flatMap(m => m.mods),
+          ...declHeader.modifiers,
+        ],
+      };
+
+      const isTypeDecl =
+        combinedHeader.kind === 'structure' ||
+        combinedHeader.kind === 'class' ||
+        combinedHeader.kind === 'inductive' ||
+        combinedHeader.kind === 'coinductive';
+
+      const lexState = createLeanLexState();
+      let lastNonBlankStripped = '';
+      let inWhereBlock = false;
+      const updateWhereBlock = (stripped: string) => {
+        if (
+          !hasOpenDelimiters(lexState) &&
+          /(?:^|[\s()[\]{}])where(?=$|\s)/.test(stripped)
+        ) {
+          inWhereBlock = true;
+        }
+      };
+      for (const cl of codeLines) {
+        const s = advanceLeanLexState(lexState, cl.text);
+        if (s.trim() !== '') {
+          lastNonBlankStripped = s;
+          updateWhereBlock(s);
+        }
+      }
+
+      i++;
+      colOffset = 0;
+
+      // Collect continuation lines belonging to this declaration.
+      while (i < lines.length) {
+        const cur = lines[i];
+        const curTrimmed = cur.trim();
+
+        // Inside an unclosed multi-line comment, string, raw string, or guillemet:
+        // always consume the line regardless of blankness or column-0 indentation.
+        if (hasOpenLiteralOrComment(lexState)) {
+          codeLines.push({lineNum: i + 1, text: cur});
+          const s = advanceLeanLexState(lexState, cur);
+          if (s.trim() !== '') {
+            lastNonBlankStripped = s;
+            updateWhereBlock(s);
+          }
+          i++;
+          continue;
+        }
+
+        // Blank line: continue if next non-blank line is more indented,
+        // is a `|` arm / termination clause at declIndent, or delimiters remain open.
+        if (curTrimmed === '') {
+          let lookahead = i + 1;
+          while (lookahead < lines.length && lines[lookahead].trim() === '') {
+            lookahead++;
+          }
+          if (lookahead < lines.length) {
+            const nextLine = lines[lookahead];
+            const nextIndent = getLineIndent(nextLine);
+            const nextTrimmed = nextLine.trim();
+            if (
+              (nextIndent > declIndent &&
+                (hasOpenDelimiters(lexState) ||
+                  !startsNewTopLevelCommandInDeclBody(
+                    nextLine,
+                    isTypeDecl,
+                    inWhereBlock
+                  ))) ||
+              (hasOpenDelimiters(lexState) && nextIndent >= declIndent) ||
+              (nextIndent === declIndent &&
+                (nextTrimmed.startsWith('|') ||
+                  /^(?:termination_by|decreasing_by|partial_fixpoint|coinductive_fixpoint|inductive_fixpoint)\b/.test(
+                    nextTrimmed
+                  )))
+            ) {
+              while (i < lookahead) {
+                codeLines.push({lineNum: i + 1, text: lines[i]});
+                i++;
+              }
+              continue;
+            }
+          }
+          break;
+        }
+
+        const curIndent = getLineIndent(cur);
+
+        // More-indented line belongs to the active declaration unless delimiters
+        // are balanced and a new top-level declaration or directive starts.
+        if (curIndent > declIndent) {
+          if (
+            !hasOpenDelimiters(lexState) &&
+            startsNewTopLevelCommandInDeclBody(cur, isTypeDecl, inWhereBlock)
+          ) {
+            break;
+          }
+          codeLines.push({lineNum: i + 1, text: cur});
+          const s = advanceLeanLexState(lexState, cur);
+          if (s.trim() !== '') {
+            lastNonBlankStripped = s;
+            updateWhereBlock(s);
+          }
+          i++;
+          continue;
+        }
+
+        // Column-0 / same-indent `--` comment inside an ongoing indented body:
+        // peek past consecutive comments/blanks to see if an indented body continues.
+        if (
+          curIndent === declIndent &&
+          curTrimmed.startsWith('--') &&
+          !isDividerCommentLine(cur)
+        ) {
+          let lookahead = i + 1;
+          while (
+            lookahead < lines.length &&
+            (lines[lookahead].trim() === '' ||
+              (lines[lookahead].trim().startsWith('--') &&
+                !isDividerCommentLine(lines[lookahead])))
+          ) {
+            lookahead++;
+          }
+          if (
+            lookahead < lines.length &&
+            getLineIndent(lines[lookahead]) > declIndent &&
+            (hasOpenDelimiters(lexState) ||
+              !startsNewTopLevelCommandInDeclBody(
+                lines[lookahead],
+                isTypeDecl,
+                inWhereBlock
+              ))
+          ) {
+            codeLines.push({lineNum: i + 1, text: cur});
+            i++;
+            continue;
+          }
+        }
+
+        // Open parens/brackets/braces or trailing `:=` / `by` / `where` / `extends` / `=>`:
+        // continue even at `curIndent === declIndent` unless a brand-new top-level command starts
+        // when delimiters are balanced.
+        if (
+          curIndent === declIndent &&
+          (hasOpenDelimiters(lexState) ||
+            (lineExpectsDeclContinuation(lastNonBlankStripped) &&
+              !startsNewTopLevelCommandInDeclBody(
+                cur,
+                isTypeDecl,
+                inWhereBlock
+              ) &&
+              !isDividerCommentLine(cur)))
+        ) {
+          codeLines.push({lineNum: i + 1, text: cur});
+          const s = advanceLeanLexState(lexState, cur);
+          if (s.trim() !== '') {
+            lastNonBlankStripped = s;
+            updateWhereBlock(s);
+          }
+          i++;
+          continue;
+        }
+
+        // Same-indent `|`, `where`, `extends`, non-`instance` `deriving`,
+        // `termination_by`, `decreasing_by`, or fixpoint clauses continue the active declaration.
+        if (
+          curIndent === declIndent &&
+          (curTrimmed.startsWith('|') ||
+            (isTypeDecl && /^extends\b/.test(curTrimmed)) ||
+            (/^deriving\b/.test(curTrimmed) &&
+              !startsNewTopLevelCommandInDeclBody(
+                cur,
+                isTypeDecl,
+                inWhereBlock
+              )) ||
+            /^(?:where|termination_by|decreasing_by|partial_fixpoint|coinductive_fixpoint|inductive_fixpoint)\b/.test(
+              curTrimmed
+            ))
+        ) {
+          codeLines.push({lineNum: i + 1, text: cur});
+          const s = advanceLeanLexState(lexState, cur);
+          if (s.trim() !== '') {
+            lastNonBlankStripped = s;
+            updateWhereBlock(s);
+          }
+          i++;
+          continue;
+        }
+
+        break;
+      }
+
+      const candidateStarts: number[] = [declStartIdx + 1];
+      if (pendingDoc) candidateStarts.push(pendingDoc.startLine);
+      if (pendingAttrs.length > 0) {
+        candidateStarts.push(pendingAttrs[0].startLine);
+      }
+      if (pendingModifiers.length > 0) {
+        candidateStarts.push(pendingModifiers[0].lineNum);
+      }
+      if (pendingComments.length > 0) {
+        candidateStarts.push(pendingComments[0].startLine);
+      }
+      const blockStartLine = Math.min(...candidateStarts);
+      const blockEndLine = codeLines[codeLines.length - 1].lineNum;
+      const details = buildDeclarationDetails(
+        combinedHeader,
+        pendingAttrs.map(a => a.text),
+        pendingDoc?.text,
+        pendingDoc?.startLine,
+        pendingDoc?.endLine,
+        codeLines
+      );
+      const rawText =
+        loopStartCol > 0 && blockStartLine === declStartIdx + 1
+          ? codeLines.map(l => l.text).join('\n')
+          : lines.slice(blockStartLine - 1, blockEndLine).join('\n');
+      blocks.push({
+        id: `decl-${combinedHeader.kind}-${
+          combinedHeader.name || blockCounter
+        }-${blockCounter++}`,
+        type: 'declaration',
+        raw: rawText,
+        startLine: blockStartLine,
+        endLine: blockEndLine,
+        decl: details,
+      });
+      pendingDoc = null;
+      pendingAttrs = [];
+      pendingModifiers = [];
+      pendingComments = [];
+      continue;
+    }
+
+    // Any column-0 non-declaration exits an unclosed `mutual` scope cleanly.
+    if (inMutual && colOffset === 0 && lineIndent === 0) {
+      inMutual = false;
+      mutualIndent = -1;
+    }
+
+    // 9. Scope / file directives (`module`, `namespace`, `section`, `end`, `open`, `variable`, ...)
+    const dirKeyword = getDirectiveKeyword(line, true);
+    if (dirKeyword) {
+      flushPendingAsStandalone();
+      const startIdx = i;
+
+      // Support Lean 4 `... in <command>` prefix scoping (e.g. `open Nat in theorem ...`,
+      // `set_option ... in\n  axiom ...`) so scoped declarations are never hidden inside directives.
+      if (IN_SCOPING_DIRECTIVES.has(dirKeyword)) {
+        const strippedLine = stripLeanCommentsAndStrings(line);
+        const inMatch = strippedLine.match(/(?:^|\s)(in)(?=$|\s)/);
+        if (inMatch && inMatch.index !== undefined) {
+          const inEnd = inMatch.index + inMatch[0].length;
+          const trailing = line.slice(inEnd);
+          const prefixText = line.slice(0, inEnd).trimEnd();
+          blocks.push({
+            id: `dir-${dirKeyword}-${blockCounter++}`,
+            type: 'directive',
+            raw: prefixText,
+            startLine: startIdx + 1,
+            endLine: startIdx + 1,
+            directiveKind: dirKeyword,
+            directiveLines: [{lineNum: startIdx + 1, text: prefixText}],
+          });
+          if (trailing.trim() !== '') {
+            colOffset = loopStartCol + inEnd;
+          } else {
+            i = startIdx + 1;
+            colOffset = 0;
+          }
+          continue;
+        }
+      }
+
+      const dirLines: LeanCodeLine[] = [
+        {lineNum: i + 1, text: colOffset > 0 ? trimmed : line},
+      ];
+      i++;
+      colOffset = 0;
+
+      if (!SINGLE_LINE_DIRECTIVES.has(dirKeyword)) {
+        const isBodyDir = BODY_DIRECTIVES.has(dirKeyword);
+        while (
+          i < lines.length &&
+          lines[i].trim() !== '' &&
+          getLineIndent(lines[i]) > lineIndent
+        ) {
+          const nextTrimmed = lines[i].trim();
+          if (
+            !isBodyDir &&
+            (parseDeclarationHeaderStart(lines[i], true) ||
+              nextTrimmed.startsWith('/-!') ||
+              nextTrimmed.startsWith('/--') ||
+              nextTrimmed.startsWith('@['))
+          ) {
+            break;
+          }
+          dirLines.push({lineNum: i + 1, text: lines[i]});
+          i++;
+        }
+      }
+
+      blocks.push({
+        id: `dir-${dirKeyword}-${blockCounter++}`,
+        type: 'directive',
+        raw:
+          loopStartCol > 0
+            ? dirLines.map(l => l.text).join('\n')
+            : lines.slice(startIdx, i).join('\n'),
+        startLine: startIdx + 1,
+        endLine: i,
+        directiveKind: dirKeyword,
+        directiveLines: dirLines,
+      });
+      continue;
+    }
+
+    // 10. Fallback: any unrecognized top-level Lean snippet stays intact as a directive block.
+    flushPendingAsStandalone();
+    const startIdx = i;
+    const fallbackLines: LeanCodeLine[] = [
+      {lineNum: i + 1, text: colOffset > 0 ? trimmed : line},
+    ];
+    i++;
+    colOffset = 0;
+    while (
+      i < lines.length &&
+      lines[i].trim() !== '' &&
+      getLineIndent(lines[i]) > lineIndent &&
+      !parseDeclarationHeaderStart(lines[i], true)
+    ) {
+      fallbackLines.push({lineNum: i + 1, text: lines[i]});
+      i++;
+    }
+    blocks.push({
+      id: `code-${blockCounter++}`,
+      type: 'directive',
+      raw:
+        loopStartCol > 0
+          ? fallbackLines.map(l => l.text).join('\n')
+          : lines.slice(startIdx, i).join('\n'),
+      startLine: startIdx + 1,
+      endLine: i,
+      directiveKind: 'code',
+      directiveLines: fallbackLines,
+    });
+
+    // Mandatory forward-progress invariant.
+    if (i < loopStartI || (i === loopStartI && colOffset <= loopStartCol)) {
+      i = loopStartI + 1;
+      colOffset = 0;
+    }
+  }
+
+  flushPendingAsStandalone();
+  return blocks;
+}
+
+export interface LeanHighlightOptions {
+  initialBlockCommentDepth?: number;
+  forceComment?: boolean;
+}
+
+export interface AlignLeanCodeLinesOptions {
+  initialLeftCommentDepth?: number;
+  initialRightCommentDepth?: number;
+  forceComment?: boolean;
+}
+
+/**
+ * Tokenize a single line of Lean 4 code for syntax highlighting while tracking
+ * nested multi-line block comment (`/- ... -/`) depth across lines.
+ * Preserves exact character offsets so intra-line diff ranges map 1:1.
+ */
+export function tokenizeLeanLineWithState(
+  line: string,
+  inTacticContext = false,
+  initialBlockCommentDepth = 0
+): {tokens: LeanHighlightToken[]; blockCommentDepth: number} {
+  let blockCommentDepth = Math.max(0, initialBlockCommentDepth);
+  if (!line) return {tokens: [], blockCommentDepth};
+  const tokens: LeanHighlightToken[] = [];
+  const push = (text: string, kind: LeanTokenKind) => {
+    if (!text) return;
+    const prev = tokens[tokens.length - 1];
+    if (prev && prev.kind === kind) {
+      prev.text += text;
+    } else {
+      tokens.push({text, kind});
+    }
+  };
+
+  let i = 0;
+  const len = line.length;
+
+  while (i < len) {
+    if (blockCommentDepth > 0) {
+      const start = i;
+      while (i < len && blockCommentDepth > 0) {
+        if (line[i] === '/' && line[i + 1] === '-') {
+          blockCommentDepth++;
+          i += 2;
+        } else if (line[i] === '-' && line[i + 1] === '/') {
+          blockCommentDepth--;
+          i += 2;
+        } else {
+          i++;
+        }
+      }
+      push(line.slice(start, i), 'comment');
+      continue;
+    }
+
+    const ch = line[i];
+    const next = i + 1 < len ? line[i + 1] : '';
+
+    // Whitespace
+    if (/\s/.test(ch)) {
+      let j = i + 1;
+      while (j < len && /\s/.test(line[j])) j++;
+      push(line.slice(i, j), 'plain');
+      i = j;
+      continue;
+    }
+
+    // Line comment `-- ...`
+    if (ch === '-' && next === '-') {
+      push(line.slice(i), 'comment');
+      break;
+    }
+
+    // Inline or multi-line block comment `/- ... -/`
+    if (ch === '/' && next === '-') {
+      blockCommentDepth = 1;
+      let j = i + 2;
+      while (j < len && blockCommentDepth > 0) {
+        if (line[j] === '/' && line[j + 1] === '-') {
+          blockCommentDepth++;
+          j += 2;
+        } else if (line[j] === '-' && line[j + 1] === '/') {
+          blockCommentDepth--;
+          j += 2;
+        } else {
+          j++;
+        }
+      }
+      push(line.slice(i, j), 'comment');
+      i = j;
+      continue;
+    }
+
+    // Raw string literal `r"..."`, `r#"..."#`, `r##"..."##`
+    const rawOpen = matchRawStringOpen(line, i);
+    if (rawOpen) {
+      let j = rawOpen.contentStart;
+      while (j < len) {
+        if (matchRawStringCloseAt(line, j, rawOpen.hashes)) {
+          j += 1 + rawOpen.hashes;
+          break;
+        }
+        j++;
+      }
+      push(line.slice(i, j), 'string');
+      i = j;
+      continue;
+    }
+
+    // Interpolated string `s!"..."`, `m!"..."`, `f!"..."`, brace-aware
+    // so `s!"{'"'}"` or `s!"{r#"""#}"` cannot flip quote parity.
+    if (
+      (ch === 's' || ch === 'm' || ch === 'f') &&
+      next === '!' &&
+      line[i + 2] === '"' &&
+      !hasIdentPartBefore(line, i)
+    ) {
+      let j = i + 3;
+      let braceDepth = 0;
+      while (j < len) {
+        if (braceDepth === 0) {
+          if (line[j] === '\\' && j + 1 < len) j += 2;
+          else if (line[j] === '{') {
+            braceDepth = 1;
+            j++;
+          } else if (line[j] === '"') {
+            j++;
+            break;
+          } else {
+            j++;
+          }
+        } else {
+          const innerRaw = matchRawStringOpen(line, j);
+          if (innerRaw) {
+            let k = innerRaw.contentStart;
+            while (k < len) {
+              if (matchRawStringCloseAt(line, k, innerRaw.hashes)) {
+                k += 1 + innerRaw.hashes;
+                break;
+              }
+              k++;
+            }
+            j = k;
+            continue;
+          }
+          const innerChar = matchCharLiteral(line, j);
+          if (innerChar > 0) {
+            j += innerChar;
+            continue;
+          }
+          if (line[j] === '"') {
+            j++;
+            while (j < len) {
+              if (line[j] === '\\' && j + 1 < len) j += 2;
+              else if (line[j] === '"') {
+                j++;
+                break;
+              } else j++;
+            }
+            continue;
+          }
+          if (line[j] === '{') braceDepth++;
+          else if (line[j] === '}') braceDepth--;
+          j++;
+        }
+      }
+      push(line.slice(i, j), 'string');
+      i = j;
+      continue;
+    }
+
+    // String literal `"..."`
+    if (ch === '"') {
+      let j = i + 1;
+      while (j < len) {
+        if (line[j] === '\\' && j + 1 < len) j += 2;
+        else if (line[j] === '"') {
+          j++;
+          break;
+        } else j++;
+      }
+      push(line.slice(i, j), 'string');
+      i = j;
+      continue;
+    }
+
+    // Character literal `'a'`, `'"'`, `'\n'`, `'\x41'`, `'\u0041'`, `'😀'`
+    const charLen = matchCharLiteral(line, i);
+    if (charLen > 0) {
+      push(line.slice(i, i + charLen), 'string');
+      i += charLen;
+      continue;
+    }
+
+    // Attribute `@[...]` (supports nested brackets like `@[simp [foo]]`)
+    if (ch === '@' && next === '[') {
+      const closeIdx = findMatchingBracket(line, i + 1);
+      const end = closeIdx >= 0 ? closeIdx + 1 : len;
+      push(line.slice(i, end), 'attribute');
+      i = end;
+      continue;
+    }
+
+    // Goal-focusing bullet `·`
+    if (ch === '·') {
+      push(ch, 'bullet');
+      i++;
+      continue;
+    }
+
+    // Number literal (hex `0x...`, binary `0b...`, octal `0o...`, decimal/float)
+    if (ch >= '0' && ch <= '9' && !hasIdentPartBefore(line, i)) {
+      NUMBER_LITERAL_RE.lastIndex = i;
+      const numMatch = NUMBER_LITERAL_RE.exec(line);
+      if (numMatch) {
+        push(numMatch[0], 'number');
+        i += numMatch[0].length;
+        continue;
+      }
+    }
+
+    // Escaped identifier `«...»`
+    if (ch === '«') {
+      const closeIdx = line.indexOf('»', i + 1);
+      const end = closeIdx >= 0 ? closeIdx + 1 : len;
+      const inner = closeIdx >= 0 ? line.slice(i + 1, closeIdx) : '';
+      push(
+        line.slice(i, end),
+        SOUNDNESS_GUILLEMET_NAMES.has(inner) ? 'sorry' : 'plain'
+      );
+      i = end;
+      continue;
+    }
+
+    // Identifiers & keywords
+    const {ch: startChar, len: startLen} = getCharAt(line, i);
+    if (startChar && isIdentStart(startChar)) {
+      let j = i + startLen;
+      while (j < len) {
+        const {ch: partChar, len: partLen} = getCharAt(line, j);
+        if (!partChar || !isIdentPart(partChar)) break;
+        j += partLen;
+      }
+      const word = line.slice(i, j);
+      if (LEAN_SORRY_TOKENS.has(word)) {
+        push(word, 'sorry');
+      } else if (LEAN_KEYWORDS.has(word)) {
+        push(word, 'keyword');
+      } else if (
+        LEAN_TACTICS.has(word) &&
+        (inTacticContext || UNAMBIGUOUS_TACTICS.has(word))
+      ) {
+        push(word, 'tactic');
+      } else if (LEAN_BUILTIN_TYPES.has(word)) {
+        push(word, 'type');
+      } else if (LEAN_LITERALS.has(word)) {
+        push(word, 'literal');
+      } else {
+        push(word, 'plain');
+      }
+      i = j;
+      continue;
+    }
+
+    // Unicode math / logic operators
+    if (UNICODE_OPERATORS.has(ch)) {
+      push(ch, 'operator');
+      i++;
+      continue;
+    }
+
+    // Multi-char ASCII operators
+    let matchedOp = '';
+    for (const op of MULTI_CHAR_OPERATORS) {
+      if (line.startsWith(op, i)) {
+        matchedOp = op;
+        break;
+      }
+    }
+    if (matchedOp) {
+      push(matchedOp, 'operator');
+      i += matchedOp.length;
+      continue;
+    }
+
+    push(ch, 'plain');
+    i++;
+  }
+
+  return {tokens, blockCommentDepth};
+}
+
+/**
+ * Tokenize a single line of Lean 4 code for syntax highlighting.
+ * Preserves exact character offsets so intra-line diff ranges map 1:1.
+ */
+export function tokenizeLeanLine(
+  line: string,
+  inTacticContext = false,
+  initialBlockCommentDepth = 0
+): LeanHighlightToken[] {
+  return tokenizeLeanLineWithState(
+    line,
+    inTacticContext,
+    initialBlockCommentDepth
+  ).tokens;
+}
+
+/**
+ * Compute the entry block-comment (`/- ... -/`) nesting depth for each line in
+ * `lines` along with the exit depth after the last line.
+ */
+export function computeBlockCommentDepths(
+  lines: LeanCodeLine[],
+  initialDepth = 0
+): {depths: number[]; finalDepth: number} {
+  const depths: number[] = [];
+  let depth = Math.max(0, initialDepth);
+  for (const cl of lines) {
+    depths.push(depth);
+    depth = tokenizeLeanLineWithState(cl.text, false, depth).blockCommentDepth;
+  }
+  return {depths, finalDepth: depth};
+}
+
+function renderLeanTokenSpan(
+  text: string,
+  kind: LeanTokenKind
+): TemplateResult | string {
+  if (kind === 'plain') return text;
+  if (kind === 'operator' && UNICODE_OPERATORS.has(text)) {
+    return html`<span class="lean-tok-operator lean-tok-unicode-op"
+      >${text}</span
+    >`;
+  }
+  return html`<span class="lean-tok-${kind}">${text}</span>`;
+}
+
+/** Render a single line of Lean 4 code with syntax highlighting as a safe Lit TemplateResult. */
+export function highlightLeanLine(
+  line: string,
+  inTacticContext = false,
+  options: LeanHighlightOptions = {}
+): TemplateResult {
+  if (!line) return html``;
+  const tokens: LeanHighlightToken[] = options.forceComment
+    ? [{text: line, kind: 'comment'}]
+    : tokenizeLeanLine(
+        line,
+        inTacticContext,
+        options.initialBlockCommentDepth ?? 0
+      );
+  return html`${tokens.map(tok => renderLeanTokenSpan(tok.text, tok.kind))}`;
+}
+
+const LEAN_DIFF_WORD_RE =
+  /«[^«»\n]+»|0[xX][0-9a-fA-F_]+|0[bB][01_]+|0[oO][0-7_]+|[0-9][0-9_]*(?:\.[0-9_]+)?|[\p{L}_][\p{L}\p{N}_'?!₀-₉⁰-⁹]*|\s+|[∀∃λ→←↔⇒⇐⇔↦≤≥≠∧∨¬⊢⊥⊤⊔⊓∈∉⊆⊇⊂⊃∪∩∅⟨⟩×⊕⊗∘▸≡≈≃≅∣∑∏∫·]|:=|=>|->|<-|<->|<;>|\|\|\||&&&|\^\^\^|<<<|>>>|\|>|<\||[\s\S]/gu;
+
+/**
+ * Tokenize a Lean 4 line for intra-line diffing (preserving Unicode symbols,
+ * guillemets, decimal/float/radix literals, and guaranteeing lossless
+ * `tokens.join('') === line` with linear-time non-backtracking matching).
+ */
+export function tokenizeLeanDiffWords(line: string): string[] {
+  if (!line) return [];
+  return line.match(LEAN_DIFF_WORD_RE) || [];
+}
+
+/**
+ * Render a syntax-highlighted Lean line with intra-line diff highlights
+ * (`<del class="diff-highlight-del">` or `<ins class="diff-highlight-add">`)
+ * overlaid cleanly across character offsets.
+ *
+ * Expects raw (uncoalesced) diff segments so `common` + `editType` segments
+ * map 1:1 onto `fullLine` without opposite-side whitespace drops, and coalesces
+ * pure-whitespace runs sandwiched between edits on this side only.
+ */
+export function renderLeanLineWithInlineDiff(
+  fullLine: string,
+  segments: InlineDiffSegment[],
+  editType: 'deleted' | 'added',
+  inTacticContext = false,
+  options: LeanHighlightOptions = {}
+): TemplateResult {
+  if (!fullLine) return html``;
+
+  // Build per-side segment list preserving exact 1:1 offsets with `fullLine`.
+  const sideSegs: Array<{edited: boolean; text: string}> = [];
+  for (const seg of segments) {
+    if (seg.type === 'common') {
+      const prev = sideSegs[sideSegs.length - 1];
+      if (prev && !prev.edited) {
+        prev.text += seg.text;
+      } else {
+        sideSegs.push({edited: false, text: seg.text});
+      }
+    } else if (seg.type === editType) {
+      const prev = sideSegs[sideSegs.length - 1];
+      if (prev && prev.edited) {
+        prev.text += seg.text;
+      } else {
+        sideSegs.push({edited: true, text: seg.text});
+      }
+    }
+  }
+
+  // Coalesce pure-whitespace common runs sandwiched between two edits on this side.
+  for (let idx = 1; idx + 1 < sideSegs.length; idx++) {
+    if (
+      !sideSegs[idx].edited &&
+      /^\s+$/.test(sideSegs[idx].text) &&
+      sideSegs[idx - 1].edited &&
+      sideSegs[idx + 1].edited
+    ) {
+      sideSegs[idx].edited = true;
+    }
+  }
+
+  const isEditedAt = new Array<boolean>(fullLine.length).fill(false);
+  let pos = 0;
+  for (const seg of sideSegs) {
+    if (seg.edited) {
+      for (let k = 0; k < seg.text.length && pos + k < fullLine.length; k++) {
+        isEditedAt[pos + k] = true;
+      }
+    }
+    pos += seg.text.length;
+  }
+
+  const tokens: LeanHighlightToken[] = options.forceComment
+    ? [{text: fullLine, kind: 'comment'}]
+    : tokenizeLeanLine(
+        fullLine,
+        inTacticContext,
+        options.initialBlockCommentDepth ?? 0
+      );
+  const out: Array<TemplateResult | string> = [];
+  let activeHighlight: Array<TemplateResult | string> = [];
+
+  const flushHighlight = () => {
+    if (activeHighlight.length === 0) return;
+    if (editType === 'deleted') {
+      out.push(html`<del class="diff-highlight-del">${activeHighlight}</del>`);
+    } else {
+      out.push(html`<ins class="diff-highlight-add">${activeHighlight}</ins>`);
+    }
+    activeHighlight = [];
+  };
+
+  let offset = 0;
+  for (const tok of tokens) {
+    const tokStart = offset;
+    const tokEnd = offset + tok.text.length;
+    offset = tokEnd;
+
+    let runStart = tokStart;
+    while (runStart < tokEnd) {
+      const edited = isEditedAt[runStart];
+      let runEnd = runStart + 1;
+      while (runEnd < tokEnd && isEditedAt[runEnd] === edited) {
+        runEnd++;
+      }
+      // Never split a UTF-16 surrogate pair across a highlight slice boundary.
+      if (runEnd < tokEnd) {
+        const lastCode = tok.text.charCodeAt(runEnd - tokStart - 1);
+        const nextCode = tok.text.charCodeAt(runEnd - tokStart);
+        if (
+          lastCode >= 0xd800 &&
+          lastCode <= 0xdbff &&
+          nextCode >= 0xdc00 &&
+          nextCode <= 0xdfff
+        ) {
+          runEnd++;
+        }
+      }
+      const slice = tok.text.slice(runStart - tokStart, runEnd - tokStart);
+      const rendered = renderLeanTokenSpan(slice, tok.kind);
+      if (edited) {
+        activeHighlight.push(rendered);
+      } else {
+        flushHighlight();
+        out.push(rendered);
+      }
+      runStart = runEnd;
+    }
+  }
+  flushHighlight();
+
+  return html`${out}`;
+}
+
+/**
+ * Align and diff two sequences of Lean code lines with two-tier delta-style
+ * highlighting while preserving Lean 4 syntax highlighting.
+ */
+export function alignLeanCodeLines(
+  linesA: LeanCodeLine[],
+  linesB: LeanCodeLine[],
+  inTacticContext = false,
+  options: AlignLeanCodeLinesOptions = {}
+): LeanAlignedCodeLine[] {
+  const textsA = linesA.map(l => l.text);
+  const textsB = linesB.map(l => l.text);
+  const aligned = alignHomologousItems(
+    textsA,
+    textsB,
+    tokenizeLeanDiffWords,
+    DEFAULT_MAX_HOMOLOGOUS_DISTANCE,
+    isLeanContentToken
+  );
+
+  const forceComment = Boolean(options.forceComment);
+  const depthsA = forceComment
+    ? undefined
+    : computeBlockCommentDepths(linesA, options.initialLeftCommentDepth ?? 0)
+        .depths;
+  const depthsB = forceComment
+    ? undefined
+    : computeBlockCommentDepths(linesB, options.initialRightCommentDepth ?? 0)
+        .depths;
+
+  const result: LeanAlignedCodeLine[] = [];
+  for (const item of aligned) {
+    if (item.type === 'unchanged') {
+      const leftLine = linesA[item.aIdx];
+      const rightLine = linesB[item.bIdx];
+      const leftDepth = depthsA ? depthsA[item.aIdx] : 0;
+      const rightDepth = depthsB ? depthsB[item.bIdx] : 0;
+      const leftContent = highlightLeanLine(leftLine.text, inTacticContext, {
+        initialBlockCommentDepth: leftDepth,
+        forceComment,
+      });
+      const rightContent =
+        leftDepth === rightDepth
+          ? leftContent
+          : highlightLeanLine(rightLine.text, inTacticContext, {
+              initialBlockCommentDepth: rightDepth,
+              forceComment,
+            });
+      result.push({
+        status: 'unchanged',
+        leftLine,
+        rightLine,
+        leftContent,
+        rightContent,
+      });
+    } else if (item.type === 'deleted') {
+      const leftLine = linesA[item.aIdx];
+      result.push({
+        status: 'deleted',
+        leftLine,
+        leftContent: highlightLeanLine(leftLine.text, inTacticContext, {
+          initialBlockCommentDepth: depthsA ? depthsA[item.aIdx] : 0,
+          forceComment,
+        }),
+      });
+    } else if (item.type === 'added') {
+      const rightLine = linesB[item.bIdx];
+      result.push({
+        status: 'added',
+        rightLine,
+        rightContent: highlightLeanLine(rightLine.text, inTacticContext, {
+          initialBlockCommentDepth: depthsB ? depthsB[item.bIdx] : 0,
+          forceComment,
+        }),
+      });
+    } else {
+      const leftLine = linesA[item.aIdx];
+      const rightLine = linesB[item.bIdx];
+      const leftOpts: LeanHighlightOptions = {
+        initialBlockCommentDepth: depthsA ? depthsA[item.aIdx] : 0,
+        forceComment,
+      };
+      const rightOpts: LeanHighlightOptions = {
+        initialBlockCommentDepth: depthsB ? depthsB[item.bIdx] : 0,
+        forceComment,
+      };
+      const wordsA = tokenizeLeanDiffWords(leftLine.text);
+      const wordsB = tokenizeLeanDiffWords(rightLine.text);
+      const rawDiff = computeSequenceDiff(wordsA, wordsB);
+      const commonNonWs = rawDiff.filter(
+        s => s.type === 'common' && !/^\s+$/.test(s.text)
+      ).length;
+      if (commonNonWs < 2) {
+        result.push({
+          status: 'modified',
+          leftLine,
+          rightLine,
+          leftContent: html`<del class="diff-highlight-del"
+            >${highlightLeanLine(leftLine.text, inTacticContext, leftOpts)}</del
+          >`,
+          rightContent: html`<ins class="diff-highlight-add"
+            >${highlightLeanLine(
+              rightLine.text,
+              inTacticContext,
+              rightOpts
+            )}</ins
+          >`,
+        });
+      } else {
+        result.push({
+          status: 'modified',
+          leftLine,
+          rightLine,
+          leftContent: renderLeanLineWithInlineDiff(
+            leftLine.text,
+            rawDiff,
+            'deleted',
+            inTacticContext,
+            leftOpts
+          ),
+          rightContent: renderLeanLineWithInlineDiff(
+            rightLine.text,
+            rawDiff,
+            'added',
+            inTacticContext,
+            rightOpts
+          ),
+        });
+      }
+    }
+  }
+  return result;
+}
+
+function alignStructureFields(
+  fieldsA: LeanStructureField[],
+  fieldsB: LeanStructureField[]
+): {fields: LeanAlignedField[]; changed: boolean} {
+  const keysA = fieldsA.map(
+    f =>
+      `${f.name} : ${f.typeText}${
+        f.defaultValue ? ` := ${f.defaultValue}` : ''
+      } ${f.comment ?? ''}`
+  );
+  const keysB = fieldsB.map(
+    f =>
+      `${f.name} : ${f.typeText}${
+        f.defaultValue ? ` := ${f.defaultValue}` : ''
+      } ${f.comment ?? ''}`
+  );
+  const aligned = alignHomologousItems(
+    keysA,
+    keysB,
+    tokenizeLeanDiffWords,
+    0.75,
+    isLeanContentToken
+  );
+
+  const out: LeanAlignedField[] = [];
+  let changed = false;
+
+  for (const item of aligned) {
+    if (item.type === 'unchanged') {
+      const leftField = fieldsA[item.aIdx];
+      const rightField = fieldsB[item.bIdx];
+      out.push({
+        status: 'unchanged',
+        leftField,
+        rightField,
+        leftTypeHtml: highlightLeanLine(leftField.typeText),
+        rightTypeHtml: highlightLeanLine(rightField.typeText),
+        leftCommentHtml: leftField.comment
+          ? renderInlineMarkdown(leftField.comment)
+          : undefined,
+        rightCommentHtml: rightField.comment
+          ? renderInlineMarkdown(rightField.comment)
+          : undefined,
+      });
+    } else if (item.type === 'deleted') {
+      changed = true;
+      const leftField = fieldsA[item.aIdx];
+      out.push({
+        status: 'deleted',
+        leftField,
+        leftTypeHtml: html`<del class="diff-highlight-del"
+          >${highlightLeanLine(leftField.typeText)}</del
+        >`,
+        leftCommentHtml: leftField.comment
+          ? html`<del class="diff-highlight-del"
+              >${renderInlineMarkdown(leftField.comment)}</del
+            >`
+          : undefined,
+      });
+    } else if (item.type === 'added') {
+      changed = true;
+      const rightField = fieldsB[item.bIdx];
+      out.push({
+        status: 'added',
+        rightField,
+        rightTypeHtml: html`<ins class="diff-highlight-add"
+          >${highlightLeanLine(rightField.typeText)}</ins
+        >`,
+        rightCommentHtml: rightField.comment
+          ? html`<ins class="diff-highlight-add"
+              >${renderInlineMarkdown(rightField.comment)}</ins
+            >`
+          : undefined,
+      });
+    } else {
+      changed = true;
+      const leftField = fieldsA[item.aIdx];
+      const rightField = fieldsB[item.bIdx];
+      let leftTypeHtml: TemplateResult;
+      let rightTypeHtml: TemplateResult;
+      if (leftField.typeText === rightField.typeText) {
+        leftTypeHtml = highlightLeanLine(leftField.typeText);
+        rightTypeHtml = leftTypeHtml;
+      } else {
+        const segs = computeSequenceDiff(
+          tokenizeLeanDiffWords(leftField.typeText),
+          tokenizeLeanDiffWords(rightField.typeText)
+        );
+        leftTypeHtml = renderLeanLineWithInlineDiff(
+          leftField.typeText,
+          segs,
+          'deleted'
+        );
+        rightTypeHtml = renderLeanLineWithInlineDiff(
+          rightField.typeText,
+          segs,
+          'added'
+        );
+      }
+
+      let leftCommentHtml: TemplateResult | undefined;
+      let rightCommentHtml: TemplateResult | undefined;
+      if ((leftField.comment ?? '') === (rightField.comment ?? '')) {
+        if (leftField.comment) {
+          leftCommentHtml = renderInlineMarkdown(leftField.comment);
+          rightCommentHtml = leftCommentHtml;
+        }
+      } else {
+        const diffComment = renderInlineTextDiff(
+          leftField.comment ?? '',
+          rightField.comment ?? '',
+          'p'
+        );
+        leftCommentHtml = leftField.comment ? diffComment.leftHtml : undefined;
+        rightCommentHtml = rightField.comment
+          ? diffComment.rightHtml
+          : undefined;
+      }
+
+      out.push({
+        status: 'modified',
+        leftField,
+        rightField,
+        leftTypeHtml,
+        rightTypeHtml,
+        leftCommentHtml,
+        rightCommentHtml,
+      });
+    }
+  }
+
+  return {fields: out, changed};
+}
+
+function buildDeclarationDiffData(
+  declA: LeanDeclarationDetails,
+  declB: LeanDeclarationDetails
+): LeanDeclarationDiffData {
+  const docA = declA.docComment ?? '';
+  const docB = declB.docComment ?? '';
+  const docChanged = docA !== docB;
+  let docLeftHtml: TemplateResult | undefined;
+  let docRightHtml: TemplateResult | undefined;
+  if (docChanged) {
+    const docDiff = renderInlineTextDiff(docA, docB, 'p');
+    docLeftHtml = docA ? docDiff.leftHtml : undefined;
+    docRightHtml = docB ? docDiff.rightHtml : undefined;
+  } else if (docA) {
+    const rendered = renderMarkdownContent(docA);
+    docLeftHtml = rendered;
+    docRightHtml = rendered;
+  }
+
+  const sigDepthA = computeBlockCommentDepths(declA.signatureLines, 0);
+  const sigDepthB = computeBlockCommentDepths(declB.signatureLines, 0);
+  const signatureLines = alignLeanCodeLines(
+    declA.signatureLines,
+    declB.signatureLines,
+    false
+  );
+  const signatureChanged = signatureLines.some(l => l.status !== 'unchanged');
+
+  const inTactic = declA.isTacticProof || declB.isTacticProof;
+  const bodyLines = alignLeanCodeLines(
+    declA.bodyLines,
+    declB.bodyLines,
+    inTactic,
+    {
+      initialLeftCommentDepth: sigDepthA.finalDepth,
+      initialRightCommentDepth: sigDepthB.finalDepth,
+    }
+  );
+  const bodyChanged = bodyLines.some(l => l.status !== 'unchanged');
+
+  let fields: LeanAlignedField[] | undefined;
+  let fieldsChanged = false;
+  if (declA.fields && declB.fields) {
+    const alignedFields = alignStructureFields(declA.fields, declB.fields);
+    fields = alignedFields.fields;
+    fieldsChanged = alignedFields.changed;
+  }
+
+  return {
+    docLeftHtml,
+    docRightHtml,
+    docChanged,
+    signatureLines,
+    signatureChanged,
+    bodyLines,
+    bodyChanged,
+    fields,
+    fieldsChanged,
+  };
+}
+
+/** Render Lean Markdown docstring content safely using Lit templates via `marked`. */
+export function renderMarkdownContent(markdown: string): TemplateResult {
+  if (!markdown) return html``;
+  const tokens = parseMarkdownBlocks(markdown);
+  if (tokens.length === 0)
+    return html`<p>${renderInlineMarkdown(markdown)}</p>`;
+  return html`${tokens.map(tok => renderTokenToHtml(tok))}`;
+}
+
+function buildPairedRow(blockA: LeanBlock, blockB: LeanBlock): AlignedLeanRow {
+  const row: AlignedLeanRow = {
+    rowKey: `mod-${blockA.id}-${blockB.id}`,
+    status: 'modified',
+    leftBlock: blockA,
+    rightBlock: blockB,
+    leftStartLine: blockA.startLine,
+    leftEndLine: blockA.endLine,
+    rightStartLine: blockB.startLine,
+    rightEndLine: blockB.endLine,
+  };
+
+  if (blockA.type === 'module_doc' && blockB.type === 'module_doc') {
+    const tokensA = parseMarkdownBlocks(blockA.markdownContent ?? '');
+    const tokensB = parseMarkdownBlocks(blockB.markdownContent ?? '');
+    row.moduleDocRows = alignMarkdownTokens(tokensA, tokensB);
+  } else if (
+    blockA.type === 'section_banner' &&
+    blockB.type === 'section_banner'
+  ) {
+    row.bannerDiff = renderInlineTextDiff(
+      blockA.markdownContent ?? '',
+      blockB.markdownContent ?? '',
+      'h3'
+    );
+  } else if (blockA.type === 'imports' && blockB.type === 'imports') {
+    row.lineDiff = alignLeanCodeLines(
+      blockA.importLines ?? [],
+      blockB.importLines ?? [],
+      false
+    );
+  } else if (blockA.type === 'directive' && blockB.type === 'directive') {
+    row.lineDiff = alignLeanCodeLines(
+      blockA.directiveLines ?? [],
+      blockB.directiveLines ?? [],
+      false
+    );
+  } else if (blockA.type === 'comment' && blockB.type === 'comment') {
+    row.lineDiff = alignLeanCodeLines(
+      blockA.commentLines ?? [],
+      blockB.commentLines ?? [],
+      false,
+      {forceComment: true}
+    );
+  } else if (
+    blockA.type === 'declaration' &&
+    blockB.type === 'declaration' &&
+    blockA.decl &&
+    blockB.decl
+  ) {
+    row.declDiff = buildDeclarationDiffData(blockA.decl, blockB.decl);
+  }
+
+  return row;
+}
+
+function makeUnchangedRow(
+  blockA: LeanBlock,
+  blockB: LeanBlock
+): AlignedLeanRow {
+  return {
+    rowKey: `eq-${blockA.id}-${blockB.id}`,
+    status: 'unchanged',
+    leftBlock: blockA,
+    rightBlock: blockB,
+    leftStartLine: blockA.startLine,
+    leftEndLine: blockA.endLine,
+    rightStartLine: blockB.startLine,
+    rightEndLine: blockB.endLine,
+  };
+}
+
+function makeDeletedRow(blockA: LeanBlock): AlignedLeanRow {
+  return {
+    rowKey: `del-${blockA.id}`,
+    status: 'deleted',
+    leftBlock: blockA,
+    leftStartLine: blockA.startLine,
+    leftEndLine: blockA.endLine,
+  };
+}
+
+function makeAddedRow(blockB: LeanBlock): AlignedLeanRow {
+  return {
+    rowKey: `add-${blockB.id}`,
+    status: 'added',
+    rightBlock: blockB,
+    rightStartLine: blockB.startLine,
+    rightEndLine: blockB.endLine,
+  };
+}
+
+function getDeclarationIdentityKey(block: LeanBlock): string | null {
+  if (block.type === 'declaration' && block.decl && block.decl.name) {
+    return `${block.decl.kind}:${block.decl.name}`;
+  }
+  return null;
+}
+
+function blockPairScore(
+  blockA: LeanBlock,
+  blockB: LeanBlock,
+  wordsA: string[],
+  wordsB: string[],
+  isSingletonInterval: boolean
+): number {
+  if (blockA.type !== blockB.type) return -1;
+  // Same declaration kind + name strongly pairs even if the proof body was rewritten.
+  const idA = getDeclarationIdentityKey(blockA);
+  const idB = getDeclarationIdentityKey(blockB);
+  if (idA && idB && idA === idB) {
+    return 1.9;
+  }
+  // Same declaration name across kind change (e.g. lemma -> theorem)
+  if (
+    blockA.type === 'declaration' &&
+    blockB.type === 'declaration' &&
+    blockA.decl?.name &&
+    blockA.decl.name === blockB.decl?.name
+  ) {
+    return 1.7;
+  }
+  const dist = computeNormalizedEditDistance(
+    wordsA,
+    wordsB,
+    isLeanContentToken
+  );
+  if (dist <= DEFAULT_MAX_HOMOLOGOUS_DISTANCE) {
+    return 1 + (1 - dist);
+  }
+  // Heavily-edited module docstrings or import blocks in the same diff interval
+  // should still pair side-by-side for structured inner diffing.
+  if (blockA.type === 'module_doc' || blockA.type === 'imports') {
+    return 0.3 + 0.5 * (1 - dist);
+  }
+  if (
+    isSingletonInterval &&
+    (blockA.type !== 'declaration' ||
+      (blockA.decl?.kind === blockB.decl?.kind &&
+        !blockA.decl?.name &&
+        !blockB.decl?.name))
+  ) {
+    return 0.01 + 0.1 * (1 - dist);
+  }
+  return -1;
+}
+
+/**
+ * Align base (A) and revision (B) Lean 4 semantic blocks into diff rows.
+ * Optimizes single-sided files and large diffs with prefix/suffix trimming,
+ * declaration identity anchors, and homologous interval DP.
+ */
+export function alignLeanBlocks(
+  blocksA: LeanBlock[],
+  blocksB: LeanBlock[]
+): AlignedLeanRow[] {
+  const m = blocksA.length;
+  const n = blocksB.length;
+  if (m === 0 && n === 0) return [];
+  if (m === 0) return blocksB.map(makeAddedRow);
+  if (n === 0) return blocksA.map(makeDeletedRow);
+
+  // Fast-path common prefix and suffix trimming for large proofs.
+  let prefixLen = 0;
+  while (
+    prefixLen < m &&
+    prefixLen < n &&
+    blocksA[prefixLen].raw === blocksB[prefixLen].raw
+  ) {
+    prefixLen++;
+  }
+  let suffixLen = 0;
+  while (
+    suffixLen < m - prefixLen &&
+    suffixLen < n - prefixLen &&
+    blocksA[m - 1 - suffixLen].raw === blocksB[n - 1 - suffixLen].raw
+  ) {
+    suffixLen++;
+  }
+
+  const rows: AlignedLeanRow[] = [];
+  for (let p = 0; p < prefixLen; p++) {
+    rows.push(makeUnchangedRow(blocksA[p], blocksB[p]));
+  }
+
+  const midA = blocksA.slice(prefixLen, m - suffixLen);
+  const midB = blocksB.slice(prefixLen, n - suffixLen);
+  const mm = midA.length;
+  const nn = midB.length;
+
+  if (mm > 0 || nn > 0) {
+    const anchorPairs: Array<{aIdx: number; bIdx: number}> = [];
+
+    if (mm * nn <= 250000) {
+      // Exact-match LCS DP on middle region using flat Int32Array
+      const cols = nn + 1;
+      const dp = new Int32Array((mm + 1) * cols);
+      for (let i = 0; i < mm; i++) {
+        const rawA = midA[i].raw;
+        const rowOffset = i * cols;
+        const nextRowOffset = (i + 1) * cols;
+        for (let j = 0; j < nn; j++) {
+          if (rawA === midB[j].raw) {
+            dp[nextRowOffset + j + 1] = dp[rowOffset + j] + 1;
+          } else {
+            const left = dp[nextRowOffset + j];
+            const up = dp[rowOffset + j + 1];
+            dp[nextRowOffset + j + 1] = left >= up ? left : up;
+          }
+        }
+      }
+      let i = mm;
+      let j = nn;
+      while (i > 0 && j > 0) {
+        if (midA[i - 1].raw === midB[j - 1].raw) {
+          anchorPairs.push({aIdx: i - 1, bIdx: j - 1});
+          i--;
+          j--;
+        } else if (dp[i * cols + (j - 1)] >= dp[(i - 1) * cols + j]) {
+          j--;
+        } else {
+          i--;
+        }
+      }
+      anchorPairs.reverse();
+    } else {
+      // Linear-time Patience-style anchor matching for very large diffs.
+      anchorPairs.push(
+        ...computeLinearExactAnchors(
+          midA.map(b => b.raw),
+          midB.map(b => b.raw)
+        )
+      );
+    }
+
+    let lastA = 0;
+    let lastB = 0;
+
+    const processInterval = (endA: number, endB: number) => {
+      const unA = midA.slice(lastA, endA);
+      const unB = midB.slice(lastB, endB);
+      const uA = unA.length;
+      const uB = unB.length;
+      if (uA === 0 && uB === 0) return;
+      if (uA === 0) {
+        rows.push(...unB.map(makeAddedRow));
+        return;
+      }
+      if (uB === 0) {
+        rows.push(...unA.map(makeDeletedRow));
+        return;
+      }
+
+      // Guard quadratic interval pairing for huge completely-rewritten sections.
+      if (uA * uB > 10000) {
+        const bByKey = new Map<string, number>();
+        for (let b = 0; b < uB; b++) {
+          const key = getDeclarationIdentityKey(unB[b]);
+          if (key && !bByKey.has(key)) bByKey.set(key, b);
+        }
+        let bCursor = 0;
+        for (let a = 0; a < uA; a++) {
+          const key = getDeclarationIdentityKey(unA[a]);
+          const matchedB = key ? bByKey.get(key) : undefined;
+          if (matchedB !== undefined && matchedB >= bCursor) {
+            while (bCursor < matchedB) {
+              rows.push(makeAddedRow(unB[bCursor++]));
+            }
+            rows.push(buildPairedRow(unA[a], unB[matchedB]));
+            bCursor = matchedB + 1;
+          } else {
+            rows.push(makeDeletedRow(unA[a]));
+          }
+        }
+        while (bCursor < uB) {
+          rows.push(makeAddedRow(unB[bCursor++]));
+        }
+        return;
+      }
+
+      const wordsA = unA.map(b => tokenizeLeanDiffWords(b.raw));
+      const wordsB = unB.map(b => tokenizeLeanDiffWords(b.raw));
+      const isSingleton = uA === 1 && uB === 1;
+
+      const pairScore: number[][] = Array.from({length: uA}, (_, a) =>
+        Array.from({length: uB}, (__, b) =>
+          blockPairScore(unA[a], unB[b], wordsA[a], wordsB[b], isSingleton)
+        )
+      );
+
+      const subDp: number[][] = Array.from({length: uA + 1}, () =>
+        new Array(uB + 1).fill(0)
+      );
+      for (let a = 0; a < uA; a++) {
+        for (let b = 0; b < uB; b++) {
+          let best = Math.max(subDp[a][b + 1], subDp[a + 1][b]);
+          if (pairScore[a][b] >= 0) {
+            best = Math.max(best, subDp[a][b] + pairScore[a][b]);
+          }
+          subDp[a + 1][b + 1] = best;
+        }
+      }
+
+      const intervalRows: AlignedLeanRow[] = [];
+      let a = uA;
+      let b = uB;
+      while (a > 0 || b > 0) {
+        if (
+          a > 0 &&
+          b > 0 &&
+          pairScore[a - 1][b - 1] >= 0 &&
+          Math.abs(
+            subDp[a][b] - (subDp[a - 1][b - 1] + pairScore[a - 1][b - 1])
+          ) < 1e-9
+        ) {
+          intervalRows.push(buildPairedRow(unA[a - 1], unB[b - 1]));
+          a--;
+          b--;
+        } else if (b > 0 && (a === 0 || subDp[a][b - 1] >= subDp[a - 1][b])) {
+          intervalRows.push(makeAddedRow(unB[b - 1]));
+          b--;
+        } else {
+          intervalRows.push(makeDeletedRow(unA[a - 1]));
+          a--;
+        }
+      }
+      for (let k = intervalRows.length - 1; k >= 0; k--) {
+        rows.push(intervalRows[k]);
+      }
+    };
+
+    for (const anchor of anchorPairs) {
+      processInterval(anchor.aIdx, anchor.bIdx);
+      rows.push(makeUnchangedRow(midA[anchor.aIdx], midB[anchor.bIdx]));
+      lastA = anchor.aIdx + 1;
+      lastB = anchor.bIdx + 1;
+    }
+    processInterval(mm, nn);
+  }
+
+  for (let s = 0; s < suffixLen; s++) {
+    rows.push(
+      makeUnchangedRow(blocksA[m - suffixLen + s], blocksB[n - suffixLen + s])
+    );
+  }
+
+  return rows;
+}
+
+function countBlocks(blocks: LeanBlock[]): LeanFileCounts {
+  const counts: LeanFileCounts = {
+    theorems: 0,
+    definitions: 0,
+    types: 0,
+    instances: 0,
+    axioms: 0,
+    sorryCount: 0,
+    admitCount: 0,
+    partialCount: 0,
+    unsafeCount: 0,
+    nativeDecideCount: 0,
+  };
+  for (const block of blocks) {
+    if (block.type === 'declaration' && block.decl) {
+      const {kind, hygiene} = block.decl;
+      if (kind === 'theorem' || kind === 'lemma' || kind === 'example') {
+        counts.theorems++;
+      } else if (kind === 'def' || kind === 'abbrev' || kind === 'opaque') {
+        counts.definitions++;
+      } else if (
+        kind === 'structure' ||
+        kind === 'class' ||
+        kind === 'inductive' ||
+        kind === 'coinductive'
+      ) {
+        counts.types++;
+      } else if (kind === 'instance') {
+        counts.instances++;
+      }
+      if (hygiene.isAxiom) counts.axioms++;
+      if (hygiene.hasSorry) counts.sorryCount++;
+      if (hygiene.hasAdmit) counts.admitCount++;
+      if (hygiene.isPartial) counts.partialCount++;
+      if (hygiene.isUnsafe) counts.unsafeCount++;
+      if (hygiene.hasNativeDecide) counts.nativeDecideCount++;
+    } else if (block.type === 'directive') {
+      // Fail-closed defense-in-depth: scan ALL non-comment / non-declaration
+      // code blocks (`macro`, `elab`, `initialize`, `#eval`, `attribute`,
+      // fallback `code`, etc.) so soundness hazards can never hide outside a
+      // recognized declaration and spoof a clean `0 sorry` badge.
+      const clean = stripLeanCommentsAndStrings(block.raw);
+      const ids = extractLeanIdentifiers(clean);
+      if (ids.has('sorry') || ids.has('sorryAx')) counts.sorryCount++;
+      if (ids.has('admit')) counts.admitCount++;
+      if (
+        ids.has('native_decide') ||
+        ids.has('ofReduceBool') ||
+        ids.has('ofReduceNat')
+      ) {
+        counts.nativeDecideCount++;
+      }
+      if (ids.has('axiom')) counts.axioms++;
+      if (ids.has('unsafe')) counts.unsafeCount++;
+      if (ids.has('partial')) counts.partialCount++;
+    }
+  }
+  return counts;
+}
+
+/** Compute declaration and proof-hygiene summary across base and revision blocks. */
+export function computeLeanSummary(
+  blocksA: LeanBlock[],
+  blocksB: LeanBlock[],
+  alignedRows: AlignedLeanRow[]
+): LeanDiffSummary {
+  let addedDeclarations = 0;
+  let deletedDeclarations = 0;
+  let modifiedDeclarations = 0;
+  for (const row of alignedRows) {
+    if (row.status === 'added' && row.rightBlock?.type === 'declaration') {
+      addedDeclarations++;
+    } else if (
+      row.status === 'deleted' &&
+      row.leftBlock?.type === 'declaration'
+    ) {
+      deletedDeclarations++;
+    } else if (
+      row.status === 'modified' &&
+      (row.leftBlock?.type === 'declaration' ||
+        row.rightBlock?.type === 'declaration')
+    ) {
+      modifiedDeclarations++;
+    }
+  }
+  return {
+    base: countBlocks(blocksA),
+    revision: countBlocks(blocksB),
+    hasBase: blocksA.length > 0,
+    hasRevision: blocksB.length > 0,
+    addedDeclarations,
+    deletedDeclarations,
+    modifiedDeclarations,
+  };
+}
+
+/** Attach comment threads to aligned Lean diff rows using line numbers and side. */
+export function attachThreadsToLeanRows(
+  rows: AlignedLeanRow[],
+  threads: CommentThread[] = [],
+  patchRange?: PatchRange
+): {
+  rowsWithThreads: AlignedLeanRowWithThreads[];
+  fileLevelThreads: CommentThread[];
+} {
+  const {rowsWithThreads, fileLevelThreads} = attachThreadsToRows(
+    rows,
+    threads,
+    patchRange
+  );
+  return {
+    rowsWithThreads: rowsWithThreads as AlignedLeanRowWithThreads[],
+    fileLevelThreads,
+  };
+}
+
+/** Helper to format a compact 1-based line range pill label (e.g. `L95` or `L95–L111`). */
+export function formatLineRange(startLine?: number, endLine?: number): string {
+  if (startLine === undefined) return '';
+  if (endLine === undefined || endLine <= startLine) return `L${startLine}`;
+  return `L${startLine}–L${endLine}`;
+}
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-lean-viewer/lean-diff-util_test.ts b/polygerrit-ui/app/elements/diff/gr-diff-lean-viewer/lean-diff-util_test.ts
new file mode 100644
index 0000000..7d797cc
--- /dev/null
+++ b/polygerrit-ui/app/elements/diff/gr-diff-lean-viewer/lean-diff-util_test.ts
@@ -0,0 +1,1814 @@
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import {assert, fixture, html} from '@open-wc/testing';
+import '../../../test/common-test-setup';
+import {
+  alignLeanBlocks,
+  alignLeanCodeLines,
+  computeBlockCommentDepths,
+  computeLeanSummary,
+  formatLineRange,
+  highlightLeanLine,
+  parseLeanBlocks,
+  renderMarkdownContent,
+  stripLeanCommentsAndStrings,
+  tokenizeLeanDiffWords,
+  tokenizeLeanLine,
+  tokenizeLeanLineWithState,
+} from './lean-diff-util';
+
+suite('lean-diff-util tests', () => {
+  suite('stripLeanCommentsAndStrings()', () => {
+    test('strips line comments, deeply nested block comments, and string literals', () => {
+      const code = [
+        '-- sorry in line comment',
+        '/- outer /- middle /- inner sorry -/ still nested -/ still comment -/',
+        'def msg : String := "do not trigger \\"sorry\\" or admit"',
+        'def multi : String := "line 1\n  sorry on line 2\n  admit on line 3"',
+        'def interp (x : Nat) : String := s!"value {x} sorry"',
+        'theorem real : True := by trivial',
+      ].join('\n');
+
+      const clean = stripLeanCommentsAndStrings(code);
+      assert.isFalse(/\bsorry\b/.test(clean));
+      assert.isFalse(/\badmit\b/.test(clean));
+      assert.include(clean, 'def msg : String :=');
+      assert.include(clean, 'theorem real : True := by trivial');
+      // Preserves exact line count so line-number mappings never drift
+      assert.equal(clean.split('\n').length, code.split('\n').length);
+    });
+
+    test('strips raw string literals (r"...", r#"..."#, r##"..."##) including multi-line raw strings', () => {
+      const code = [
+        'def r0 : String := r"backslash \\ sorry -- not a comment"',
+        'def r1 : String := r#"quoted "sorry" and native_decide"#',
+        'def r2 : String := r##"nested #"admit"# inside\n  still raw sorry"##',
+        'theorem after_raw : True := by trivial',
+      ].join('\n');
+
+      const clean = stripLeanCommentsAndStrings(code);
+      assert.isFalse(/\bsorry\b/.test(clean));
+      assert.isFalse(/\badmit\b/.test(clean));
+      assert.isFalse(/\bnative_decide\b/.test(clean));
+      assert.include(clean, 'theorem after_raw : True := by trivial');
+    });
+
+    test('handles char literals including double-quote char without swallowing subsequent code', () => {
+      const code = [
+        "def quoteChar : Char := '\"'",
+        "def singleQuote : Char := '\\''",
+        "def hexChar : Char := '\\x41'",
+        "def unicodeChar : Char := '\\u03bb'",
+        'theorem real_sorry : False := by sorry',
+      ].join('\n');
+
+      const clean = stripLeanCommentsAndStrings(code);
+      // `'"'` must NOT open a string that swallows `theorem real_sorry`!
+      assert.isTrue(/\bsorry\b/.test(clean));
+      assert.include(clean, 'theorem real_sorry : False := by sorry');
+    });
+
+    test('strips guillemet-escaped identifiers so «sorry» does not trigger hygiene false positives', () => {
+      const code = [
+        'def «sorry» : Nat := 1',
+        'def «admit» : Nat := 2',
+        'def «native_decide» : Nat := 3',
+        'theorem «1 + 1 = 2» : 1 + 1 = 2 := rfl',
+      ].join('\n');
+
+      const clean = stripLeanCommentsAndStrings(code);
+      assert.isFalse(/\bsorry\b/.test(clean));
+      assert.isFalse(/\badmit\b/.test(clean));
+      assert.isFalse(/\bnative_decide\b/.test(clean));
+      assert.include(clean, ':= rfl');
+    });
+
+    test('preserves sorry, admit, and native_decide in executable code', () => {
+      const code = [
+        'theorem t1 : False := by sorry',
+        'theorem t2 : False := by admit',
+        'theorem t3 : 1 + 1 = 2 := by native_decide',
+      ].join('\n');
+      const clean = stripLeanCommentsAndStrings(code);
+      assert.isTrue(/\bsorry\b/.test(clean));
+      assert.isTrue(/\badmit\b/.test(clean));
+      assert.isTrue(/\bnative_decide\b/.test(clean));
+    });
+  });
+
+  suite('parseLeanBlocks()', () => {
+    test('returns empty array for empty source', () => {
+      assert.deepEqual(parseLeanBlocks(''), []);
+    });
+
+    test('parses module_doc, license header, imports, directive, section_banner, structure, def, theorem', () => {
+      const source = [
+        'import Init',
+        '',
+        '/-',
+        'Copyright (C) 2026 Example Contributors',
+        'Licensed under the Apache License, Version 2.0',
+        '-/',
+        '',
+        '/-!',
+        '# Soundness Proof',
+        'Zero `sorry` or `axiom` declarations.',
+        '-/',
+        '',
+        'namespace BoundedLattice',
+        '',
+        '-- ============================================',
+        '-- Section 0: Helpers on `Nat`',
+        '-- ============================================',
+        '',
+        '/-- Bitwise subset order. -/',
+        '@[simp]',
+        'def maskSub (a b : Nat) : Prop :=',
+        '  (a &&& b) = a',
+        '',
+        'def MAX_LEVEL : Nat := 7',
+        '',
+        '/-- Single-cell state. -/',
+        'structure CellState where',
+        '  level : Nat -- `[2:0]` bottom = 7',
+        '  isPinned : Bool := false -- `[11]`',
+        '  deriving DecidableEq, Repr',
+        '',
+        'theorem maskSub_refl (a : Nat) : maskSub a a := by',
+        '  unfold maskSub',
+        '  simp',
+        '',
+        'end BoundedLattice',
+      ].join('\n');
+
+      const blocks = parseLeanBlocks(source);
+      const types = blocks.map(b => b.type);
+      assert.deepEqual(types, [
+        'imports',
+        'comment',
+        'module_doc',
+        'directive',
+        'section_banner',
+        'declaration',
+        'declaration',
+        'declaration',
+        'declaration',
+        'directive',
+      ]);
+
+      // Imports
+      assert.equal(blocks[0].startLine, 1);
+      assert.equal(blocks[0].endLine, 1);
+      assert.equal(blocks[0].importLines?.length, 1);
+
+      // License comment
+      assert.isTrue(blocks[1].isLicenseHeader);
+      assert.equal(blocks[1].startLine, 3);
+      assert.equal(blocks[1].endLine, 6);
+
+      // Module doc
+      assert.include(blocks[2].markdownContent!, '# Soundness Proof');
+      assert.equal(blocks[2].startLine, 8);
+      assert.equal(blocks[2].endLine, 11);
+
+      // Namespace directive
+      assert.equal(blocks[3].directiveKind, 'namespace');
+
+      // Section banner
+      assert.equal(blocks[4].markdownContent, 'Section 0: Helpers on `Nat`');
+
+      // Declaration: maskSub with attached doc & @[simp]
+      const maskSub = blocks[5].decl!;
+      assert.equal(maskSub.kind, 'def');
+      assert.equal(maskSub.name, 'maskSub');
+      assert.equal(maskSub.docComment, 'Bitwise subset order.');
+      assert.deepEqual(maskSub.attributes, ['@[simp]']);
+      assert.isFalse(maskSub.isCompactDef);
+      assert.isFalse(maskSub.hygiene.hasSorry);
+
+      // Compact 1-line def
+      const maxLevel = blocks[6].decl!;
+      assert.equal(maxLevel.kind, 'def');
+      assert.equal(maxLevel.name, 'MAX_LEVEL');
+      assert.isTrue(maxLevel.isCompactDef);
+
+      // Structure with fields & deriving
+      const cellState = blocks[7].decl!;
+      assert.equal(cellState.kind, 'structure');
+      assert.equal(cellState.name, 'CellState');
+      assert.equal(cellState.fields?.length, 2);
+      assert.equal(cellState.fields![0].name, 'level');
+      assert.equal(cellState.fields![0].typeText, 'Nat');
+      assert.equal(cellState.fields![0].comment, '`[2:0]` bottom = 7');
+      assert.equal(cellState.fields![1].name, 'isPinned');
+      assert.equal(cellState.fields![1].typeText, 'Bool');
+      assert.equal(cellState.fields![1].defaultValue, 'false');
+      assert.deepEqual(cellState.derivingClause, ['DecidableEq', 'Repr']);
+
+      // Theorem with tactic proof
+      const maskSubRefl = blocks[8].decl!;
+      assert.equal(maskSubRefl.kind, 'theorem');
+      assert.equal(maskSubRefl.name, 'maskSub_refl');
+      assert.isTrue(maskSubRefl.isTacticProof);
+      assert.equal(maskSubRefl.proofStrategy, 'tactic');
+      assert.equal(maskSubRefl.signatureLines.length, 1);
+      assert.equal(maskSubRefl.bodyLines.length, 2);
+      assert.isFalse(maskSubRefl.hygiene.hasSorry);
+    });
+
+    test('parses equation-compiler definitions without := and inductive constructors', () => {
+      const source = [
+        'def bitCount : Nat → Nat → Nat',
+        '  | 0, _        => 0',
+        '  | k + 1, mask => bitCount k mask + (if mask.testBit k then 1 else 0)',
+        '',
+        'inductive Verdict where',
+        '  | ok : Nat → Verdict -- success',
+        '  | err : String → Verdict -- failure',
+        '  deriving Repr',
+      ].join('\n');
+
+      const blocks = parseLeanBlocks(source);
+      assert.equal(blocks.length, 2);
+
+      const bitCount = blocks[0].decl!;
+      assert.equal(bitCount.name, 'bitCount');
+      assert.equal(bitCount.signatureLines.length, 1);
+      assert.equal(bitCount.bodyLines.length, 2);
+
+      const verdict = blocks[1].decl!;
+      assert.equal(verdict.kind, 'inductive');
+      assert.equal(verdict.constructors?.length, 2);
+      assert.equal(verdict.constructors![0].name, 'ok');
+      assert.equal(verdict.constructors![0].comment, 'success');
+      assert.deepEqual(verdict.derivingClause, ['Repr']);
+    });
+
+    test('detects hygiene alerts accurately without false positives in comments or strings', () => {
+      const source = [
+        '/-- Proves with zero `sorry`, `admit`, or `native_decide`. -/',
+        'theorem clean_thm : 1 + 1 = 2 := by decide',
+        '',
+        'theorem has_sorry : False := by',
+        '  sorry',
+        '',
+        'axiom external_oracle : Nat → Bool',
+        '',
+        'partial def loop (n : Nat) : Nat := loop (n + 1)',
+        '',
+        'theorem uses_native : 2 + 2 = 4 := by native_decide',
+      ].join('\n');
+
+      const blocks = parseLeanBlocks(source);
+      assert.equal(blocks.length, 5);
+
+      assert.isFalse(blocks[0].decl!.hygiene.hasSorry);
+      assert.isFalse(blocks[0].decl!.hygiene.hasAdmit);
+      assert.isFalse(blocks[0].decl!.hygiene.hasNativeDecide);
+      assert.equal(blocks[0].decl!.proofStrategy, 'decide');
+
+      assert.isTrue(blocks[1].decl!.hygiene.hasSorry);
+      assert.isTrue(blocks[2].decl!.hygiene.isAxiom);
+      assert.isTrue(blocks[3].decl!.hygiene.isPartial);
+      assert.isTrue(blocks[4].decl!.hygiene.hasNativeDecide);
+    });
+
+    test('parses Lean 4 module system headers, public/meta/private imports, and modifier directives', () => {
+      const source = [
+        'module',
+        '',
+        'public import Init.Core',
+        'meta import Lean.Meta',
+        'private import Init.Data.Nat.Basic',
+        'import all Init.Data.List',
+        '',
+        'noncomputable section',
+        'public section',
+        'scoped notation "⟪" a ", " b "⟫" => Prod.mk a b',
+        'universe u v',
+        'variable {α : Type u}',
+        '#guard 1 + 1 == 2',
+        'end',
+      ].join('\n');
+
+      const blocks = parseLeanBlocks(source);
+      assert.equal(blocks[0].type, 'directive');
+      assert.equal(blocks[0].directiveKind, 'module');
+
+      assert.equal(blocks[1].type, 'imports');
+      assert.equal(blocks[1].importLines?.length, 4);
+      assert.equal(blocks[1].startLine, 3);
+      assert.equal(blocks[1].endLine, 6);
+
+      const dirKinds = blocks.slice(2).map(b => b.directiveKind);
+      assert.deepEqual(dirKinds, [
+        'section',
+        'section',
+        'notation',
+        'universe',
+        'variable',
+        '#guard',
+        'end',
+      ]);
+    });
+
+    test('parses universe-polymorphic names, guillemet names, stacked modifiers, and nested-bracket attributes', () => {
+      const source = [
+        '@[simp [Nat.add_comm], inline]',
+        'public noncomputable def id.{u} {α : Sort u} (a : α) : α := a',
+        '',
+        '@[deprecated old_fn (since := "2026-01-01")] protected theorem Nat.my_id (n : Nat) : n = n := rfl',
+        '',
+        'theorem «1 + 1 = 2» : 1 + 1 = 2 := by decide',
+        '',
+        'unsafe def peekPtr (x : Nat) : Nat := x',
+        '',
+        'opaque secretKey : Nat := 42',
+        '',
+        'example (p q : Prop) (hp : p) : p ∨ q := Or.inl hp',
+        '',
+        'def nativeOneLiner : Bool := by native_decide',
+      ].join('\n');
+
+      const blocks = parseLeanBlocks(source);
+      assert.equal(blocks.length, 7);
+
+      const idDecl = blocks[0].decl!;
+      assert.equal(idDecl.kind, 'def');
+      assert.equal(idDecl.name, 'id');
+      assert.deepEqual(idDecl.modifiers, ['public', 'noncomputable']);
+      assert.deepEqual(idDecl.attributes, ['@[simp [Nat.add_comm], inline]']);
+
+      const natDecl = blocks[1].decl!;
+      assert.equal(natDecl.kind, 'theorem');
+      assert.equal(natDecl.name, 'Nat.my_id');
+      assert.deepEqual(natDecl.modifiers, ['protected']);
+      assert.deepEqual(natDecl.attributes, [
+        '@[deprecated old_fn (since := "2026-01-01")]',
+      ]);
+      assert.equal(natDecl.proofStrategy, 'term');
+
+      const guillemetDecl = blocks[2].decl!;
+      assert.equal(guillemetDecl.name, '«1 + 1 = 2»');
+      assert.equal(guillemetDecl.proofStrategy, 'decide');
+
+      const unsafeDecl = blocks[3].decl!;
+      assert.isTrue(unsafeDecl.hygiene.isUnsafe);
+      assert.isFalse(unsafeDecl.isCompactDef);
+
+      const opaqueDecl = blocks[4].decl!;
+      assert.equal(opaqueDecl.kind, 'opaque');
+      assert.equal(opaqueDecl.name, 'secretKey');
+
+      const exDecl = blocks[5].decl!;
+      assert.equal(exDecl.kind, 'example');
+      assert.equal(exDecl.name, '');
+
+      const nativeDecl = blocks[6].decl!;
+      assert.isTrue(nativeDecl.hygiene.hasNativeDecide);
+      assert.isFalse(nativeDecl.isCompactDef);
+    });
+
+    test('parses structure extends, custom constructor fallback, class, inline inductive enums, coinductive, and instance where', () => {
+      const source = [
+        'structure Child extends Parent1, Parent2 where',
+        '  label : String := "-- not a comment" -- field note',
+        "  quote : Char := '\"' -- double-quote literal",
+        'deriving DecidableEq, Repr, Hashable',
+        '',
+        'structure Point (α : Type) where',
+        '  mk ::',
+        '  x : α',
+        '  y : α',
+        'deriving Repr',
+        '',
+        'class Addable (α : Type) where',
+        '  add : α → α → α',
+        '',
+        'inductive Direction where',
+        '  | north | south | east | west -- cardinal directions',
+        'deriving Repr, BEq',
+        '',
+        'inductive BoolMask : Type',
+        '  | bits : (a ||| b = c) → BoolMask',
+        '  | empty : BoolMask',
+        '',
+        'coinductive Stream (α : Type) where',
+        '  | cons (head : α) (tail : Stream α) : Stream α',
+        '',
+        'instance (priority := high) [Addable α] : Addable (Option α) where',
+        '  add',
+        '    | some x, some y => some (Addable.add x y)',
+        '    | _, _ => none',
+      ].join('\n');
+
+      const blocks = parseLeanBlocks(source);
+      assert.equal(blocks.length, 7);
+
+      // structure ... extends ... with string/char defaults & column-0 deriving
+      const child = blocks[0].decl!;
+      assert.equal(child.kind, 'structure');
+      assert.equal(child.name, 'Child');
+      assert.equal(child.fields?.length, 2);
+      assert.equal(child.fields![0].defaultValue, '"-- not a comment"');
+      assert.equal(child.fields![0].comment, 'field note');
+      assert.equal(child.fields![1].defaultValue, "'\"'");
+      assert.equal(child.fields![1].comment, 'double-quote literal');
+      assert.deepEqual(child.derivingClause, [
+        'DecidableEq',
+        'Repr',
+        'Hashable',
+      ]);
+
+      // structure with custom `mk ::` gracefully falls back to code lines while keeping deriving
+      const point = blocks[1].decl!;
+      assert.equal(point.kind, 'structure');
+      assert.isUndefined(point.fields);
+      assert.equal(point.bodyLines.length, 3);
+      assert.deepEqual(point.derivingClause, ['Repr']);
+
+      // class with field table
+      const addable = blocks[2].decl!;
+      assert.equal(addable.kind, 'class');
+      assert.equal(addable.fields?.length, 1);
+      assert.equal(addable.fields![0].name, 'add');
+
+      // inline-pipe inductive constructors
+      const dir = blocks[3].decl!;
+      assert.equal(dir.kind, 'inductive');
+      assert.deepEqual(
+        dir.constructors?.map(c => c.name),
+        ['north', 'south', 'east', 'west']
+      );
+      assert.equal(dir.constructors![3].comment, 'cardinal directions');
+      assert.deepEqual(dir.derivingClause, ['Repr', 'BEq']);
+
+      // inductive without `where`, bitwise `|||` inside type must NOT split constructor
+      const mask = blocks[4].decl!;
+      assert.equal(mask.constructors?.length, 2);
+      assert.equal(mask.constructors![0].name, 'bits');
+      assert.equal(
+        mask.constructors![0].signatureText,
+        ': (a ||| b = c) → BoolMask'
+      );
+
+      // coinductive type
+      const stream = blocks[5].decl!;
+      assert.equal(stream.kind, 'coinductive');
+      assert.equal(stream.constructors?.length, 1);
+      assert.equal(stream.constructors![0].name, 'cons');
+
+      // anonymous prioritized `instance ... where` splits cleanly at `where`, not at `(priority := high)` or method `:=`
+      const instAnon = blocks[6].decl!;
+      assert.equal(instAnon.kind, 'instance');
+      assert.equal(instAnon.name, '');
+      assert.equal(instAnon.signatureLines.length, 1);
+      assert.equal(instAnon.bodyLines.length, 3);
+    });
+
+    test('parses named instance ... where and term-style instance := cleanly', () => {
+      const source = [
+        'instance instAddNat : Add Nat where',
+        '  add x y := x + y',
+        '',
+        'instance : Inhabited Nat := ⟨0⟩',
+      ].join('\n');
+
+      const blocks = parseLeanBlocks(source);
+      assert.equal(blocks.length, 2);
+
+      const namedInst = blocks[0].decl!;
+      assert.equal(namedInst.kind, 'instance');
+      assert.equal(namedInst.name, 'instAddNat');
+      assert.equal(namedInst.signatureLines.length, 1);
+      assert.equal(namedInst.bodyLines.length, 1);
+      assert.include(namedInst.bodyLines[0].text, 'add x y := x + y');
+
+      const termInst = blocks[1].decl!;
+      assert.equal(termInst.kind, 'instance');
+      assert.equal(termInst.name, '');
+      assert.equal(termInst.signatureLines[0].text, 'instance : Inhabited Nat');
+      assert.equal(termInst.bodyLines[0].text, '⟨0⟩');
+    });
+
+    test('keeps termination_by, decreasing_by, where helpers, and partial_fixpoint attached to their declaration', () => {
+      const source = [
+        'def ackermann (m n : Nat) : Nat :=',
+        '  match m, n with',
+        '  | 0, y => y + 1',
+        '  | x + 1, 0 => ackermann x 1',
+        '  | x + 1, y + 1 => ackermann x (ackermann (x + 1) y)',
+        'termination_by (m, n)',
+        'decreasing_by',
+        '  all_goals simp_wf',
+        '  sorry',
+        '',
+        'def sumTo (n : Nat) : Nat :=',
+        '  go n 0',
+        'where',
+        '  go : Nat → Nat → Nat',
+        '    | 0, acc => acc',
+        '    | k + 1, acc => go k (acc + k + 1)',
+        '',
+        'def findZero (x : Nat) : Option Nat :=',
+        '  if x == 0 then some 0 else findZero (x - 1)',
+        'partial_fixpoint',
+      ].join('\n');
+
+      const blocks = parseLeanBlocks(source);
+      assert.equal(blocks.length, 3);
+
+      const ack = blocks[0].decl!;
+      assert.equal(ack.name, 'ackermann');
+      assert.equal(blocks[0].startLine, 1);
+      assert.equal(blocks[0].endLine, 9);
+      assert.isTrue(ack.hygiene.hasSorry);
+
+      const sumTo = blocks[1].decl!;
+      assert.equal(sumTo.name, 'sumTo');
+      assert.equal(blocks[1].startLine, 11);
+      assert.equal(blocks[1].endLine, 16);
+      assert.isFalse(sumTo.hygiene.hasSorry);
+
+      const findZero = blocks[2].decl!;
+      assert.equal(findZero.name, 'findZero');
+      assert.equal(blocks[2].startLine, 18);
+      assert.equal(blocks[2].endLine, 20);
+    });
+
+    test('parses mutual ... end blocks into first-class inner declarations with hygiene tracking', () => {
+      const source = [
+        'mutual',
+        '  inductive Tree where',
+        '    | node : TreeList → Tree',
+        '',
+        '  inductive TreeList where',
+        '    | nil : TreeList',
+        '    | cons : Tree → TreeList → TreeList',
+        'end',
+        '',
+        'mutual',
+        '  /-- Even check. -/',
+        '  def isEven : Nat → Bool',
+        '    | 0 => true',
+        '    | n + 1 => isOdd n',
+        '',
+        '  theorem even_or_odd (n : Nat) : isEven n = true ∨ isOdd n = true := by',
+        '    sorry',
+        'end',
+      ].join('\n');
+
+      const blocks = parseLeanBlocks(source);
+      assert.deepEqual(
+        blocks.map(b =>
+          b.type === 'declaration'
+            ? `${b.decl!.kind}:${b.decl!.name}`
+            : `${b.type}:${b.directiveKind}`
+        ),
+        [
+          'directive:mutual',
+          'inductive:Tree',
+          'inductive:TreeList',
+          'directive:end',
+          'directive:mutual',
+          'def:isEven',
+          'theorem:even_or_odd',
+          'directive:end',
+        ]
+      );
+      assert.equal(blocks[1].decl!.constructors?.length, 1);
+      assert.equal(blocks[2].decl!.constructors?.length, 2);
+      assert.equal(blocks[5].decl!.docComment, 'Even check.');
+      assert.isTrue(blocks[6].decl!.hygiene.hasSorry);
+    });
+
+    test('parses calc and conv proofs accurately', () => {
+      const source = [
+        'theorem trans_calc (a b c : Nat) (h1 : a ≤ b) (h2 : b ≤ c) : a ≤ c := by',
+        '  calc',
+        '    a ≤ b := h1',
+        '    _ ≤ c := h2',
+        '',
+        'theorem conv_rhs (a b c : Nat) : a + (b + c) = a + (c + b) := by',
+        '  conv =>',
+        '    lhs',
+        '    arg 2',
+        '    rw [Nat.add_comm]',
+        '',
+        'theorem term_calc (a b : Nat) (h : a = b) : a = b :=',
+        '  calc',
+        '    a = b := h',
+      ].join('\n');
+
+      const blocks = parseLeanBlocks(source);
+      assert.equal(blocks.length, 3);
+      assert.equal(blocks[0].decl!.proofStrategy, 'tactic');
+      assert.equal(blocks[0].decl!.bodyLines.length, 3);
+      assert.equal(blocks[1].decl!.proofStrategy, 'tactic');
+      assert.equal(blocks[1].decl!.bodyLines.length, 4);
+      assert.equal(blocks[2].decl!.proofStrategy, 'term');
+      assert.equal(blocks[2].decl!.bodyLines.length, 2);
+    });
+
+    test('avoids hygiene false positives from raw strings, char quotes, and guillemets inside declarations', () => {
+      const source = [
+        'def trickyLiterals : String × Char × Nat :=',
+        '  (r#"not a "sorry" or admit or native_decide"#, \'"\', «sorry»)',
+        'where',
+        '  «sorry» : Nat := 7',
+      ].join('\n');
+
+      const blocks = parseLeanBlocks(source);
+      assert.equal(blocks.length, 1);
+      const decl = blocks[0].decl!;
+      assert.isFalse(decl.hygiene.hasSorry);
+      assert.isFalse(decl.hygiene.hasAdmit);
+      assert.isFalse(decl.hygiene.hasNativeDecide);
+    });
+  });
+
+  suite('tokenizeLeanLine() and highlightLeanLine()', () => {
+    test('highlights keywords, tactics, types, operators, bullets, sorry, and prime identifiers', () => {
+      const tokens = tokenizeLeanLine(
+        "  · have hlt' : i < k := by omega -- comment",
+        true
+      );
+      const kinds = tokens.map(t => `${t.kind}:${t.text}`);
+      assert.include(kinds, 'bullet:·');
+      assert.include(kinds, 'keyword:have');
+      assert.isTrue(
+        tokens.some(t => t.kind === 'plain' && t.text.includes("hlt'"))
+      );
+      assert.isFalse(tokens.some(t => t.kind === 'string'));
+      assert.include(kinds, 'tactic:omega');
+      assert.include(kinds, 'comment:-- comment');
+    });
+
+    test('tokenizes raw strings, interpolated strings, char literals, nested-bracket attributes, radix numbers, and Lean 4 tactics', () => {
+      const rawLine =
+        '@[simp [Nat.add_comm]] public def demo := (r#"quoted "sorry""#, s!"hi {x}", \'"\', \'\\u03bb\', 0xff_00, 0b1010, 0o755)';
+      const tokens = tokenizeLeanLine(rawLine, false);
+      const pairs = tokens.map(t => `${t.kind}:${t.text}`);
+
+      assert.include(pairs, 'attribute:@[simp [Nat.add_comm]]');
+      assert.include(pairs, 'keyword:public');
+      assert.include(pairs, 'keyword:def');
+      assert.include(pairs, 'string:r#"quoted "sorry""#');
+      assert.include(pairs, 'string:s!"hi {x}"');
+      assert.include(pairs, "string:'\"'");
+      assert.include(pairs, "string:'\\u03bb'");
+      assert.include(pairs, 'number:0xff_00');
+      assert.include(pairs, 'number:0b1010');
+      assert.include(pairs, 'number:0o755');
+      // `sorry` inside raw string must NEVER emit a `sorry` token
+      assert.isFalse(tokens.some(t => t.kind === 'sorry'));
+
+      const tacticLine =
+        '  conv => lhs; arg 2; simp_wf <;> grind <;> bv_decide';
+      const tacticTokens = tokenizeLeanLine(tacticLine, true);
+      const tacticPairs = tacticTokens.map(t => `${t.kind}:${t.text}`);
+      assert.include(tacticPairs, 'keyword:conv');
+      assert.include(tacticPairs, 'tactic:lhs');
+      assert.include(tacticPairs, 'tactic:arg');
+      assert.include(tacticPairs, 'tactic:simp_wf');
+      assert.include(tacticPairs, 'operator:<;>');
+      assert.include(tacticPairs, 'tactic:grind');
+      assert.include(tacticPairs, 'tactic:bv_decide');
+    });
+
+    test('escapes HTML tags safely when rendering highlighted Lean code', async () => {
+      const tpl = highlightLeanLine(
+        'def xss : String := "<img src=x onerror=alert(1)>"'
+      );
+      const container = await fixture(html`<div>${tpl}</div>`);
+      assert.isNull(container.querySelector('img'));
+      assert.include(container.textContent, '<img src=x onerror=alert(1)>');
+    });
+
+    test('tags Unicode math operators with fixed-cell class without tagging ASCII operators', async () => {
+      const tpl = highlightLeanLine('theorem t : ∀ x : Nat, x ≤ x := by');
+      const container = await fixture(html`<div>${tpl}</div>`);
+      const unicodeOps = Array.from(
+        container.querySelectorAll('.lean-tok-unicode-op')
+      ).map(el => el.textContent);
+      assert.deepEqual(unicodeOps, ['∀', '≤']);
+      const allOps = Array.from(
+        container.querySelectorAll('.lean-tok-operator')
+      ).map(el => el.textContent);
+      assert.deepEqual(allOps, ['∀', '≤', ':=']);
+    });
+
+    test('neutralizes javascript: URLs inside rendered Lean docstrings', async () => {
+      const tpl = renderMarkdownContent(
+        'See [click](javascript:alert(1)) and <script>alert(1)</script>.'
+      );
+      const container = await fixture(html`<div>${tpl}</div>`);
+      assert.isNull(container.querySelector('script'));
+      const link = container.querySelector('a');
+      if (link) {
+        assert.notInclude(
+          (link.getAttribute('href') ?? '').toLowerCase(),
+          'javascript:'
+        );
+      }
+    });
+  });
+
+  suite('alignLeanBlocks() and computeLeanSummary()', () => {
+    test('pairs modified declarations by (kind, name) even when proof body changes heavily', () => {
+      const base = [
+        'theorem transfer_monotone (x y : Nat) (h : x ≤ y) : x + 1 ≤ y + 1 := by',
+        '  sorry',
+      ].join('\n');
+      const rev = [
+        'theorem transfer_monotone (x y : Nat) (h : x ≤ y) : x + 1 ≤ y + 1 := by',
+        '  omega',
+      ].join('\n');
+
+      const blocksA = parseLeanBlocks(base);
+      const blocksB = parseLeanBlocks(rev);
+      const rows = alignLeanBlocks(blocksA, blocksB);
+
+      assert.equal(rows.length, 1);
+      assert.equal(rows[0].status, 'modified');
+      assert.isDefined(rows[0].declDiff);
+      assert.isFalse(rows[0].declDiff.signatureChanged);
+      assert.isTrue(rows[0].declDiff.bodyChanged);
+
+      const summary = computeLeanSummary(blocksA, blocksB, rows);
+      assert.equal(summary.base.sorryCount, 1);
+      assert.equal(summary.revision.sorryCount, 0);
+      assert.equal(summary.modifiedDeclarations, 1);
+    });
+
+    test('aligns structure field additions, deletions, and type/comment modifications', () => {
+      const base = [
+        'structure Config where',
+        '  timeout : Nat -- ms',
+        '  legacyFlag : Bool := false -- deprecated',
+        '  retries : Nat := 3 -- max retries',
+        'deriving Repr',
+      ].join('\n');
+      const rev = [
+        'structure Config where',
+        '  timeout : UInt64 -- milliseconds',
+        '  retries : Nat := 3 -- max retries',
+        '  strictMode : Bool := true -- fail fast',
+        'deriving Repr, BEq',
+      ].join('\n');
+
+      const rows = alignLeanBlocks(parseLeanBlocks(base), parseLeanBlocks(rev));
+      assert.equal(rows.length, 1);
+      assert.equal(rows[0].status, 'modified');
+      const fields = rows[0].declDiff?.fields;
+      assert.isDefined(fields);
+      assert.isTrue(rows[0].declDiff?.fieldsChanged);
+      assert.isTrue(
+        fields.some(
+          f => f.status === 'modified' && f.rightField?.name === 'timeout'
+        )
+      );
+      assert.isTrue(
+        fields.some(
+          f => f.status === 'deleted' && f.leftField?.name === 'legacyFlag'
+        )
+      );
+      assert.isTrue(
+        fields.some(
+          f => f.status === 'unchanged' && f.rightField?.name === 'retries'
+        )
+      );
+      assert.isTrue(
+        fields.some(
+          f => f.status === 'added' && f.rightField?.name === 'strictMode'
+        )
+      );
+    });
+
+    test('pairs declaration across kind rename (lemma -> theorem) and diffs module_doc markdown', () => {
+      const base = [
+        '/-!',
+        '# Spec v1',
+        'Initial proof.',
+        '-/',
+        '',
+        'lemma helper (n : Nat) : n + 0 = n := by',
+        '  sorry',
+      ].join('\n');
+      const rev = [
+        '/-!',
+        '# Spec v2',
+        'Verified proof with zero `sorry`.',
+        '-/',
+        '',
+        'theorem helper (n : Nat) : n + 0 = n := by',
+        '  simp',
+      ].join('\n');
+
+      const blocksA = parseLeanBlocks(base);
+      const blocksB = parseLeanBlocks(rev);
+      const rows = alignLeanBlocks(blocksA, blocksB);
+      assert.equal(rows.length, 2);
+      assert.equal(rows[0].status, 'modified');
+      assert.isDefined(rows[0].moduleDocRows);
+      assert.equal(rows[1].status, 'modified');
+      assert.equal(rows[1].leftBlock?.decl?.kind, 'lemma');
+      assert.equal(rows[1].rightBlock?.decl?.kind, 'theorem');
+    });
+
+    test('handles added-only, deleted-only, and large 250-declaration files with fast prefix/suffix trimming', () => {
+      const makeDecl = (k: number, proof: string) =>
+        `theorem thm_${k} (n : Nat) : n + ${k} = ${k} + n := by\n  ${proof}`;
+      const baseLines: string[] = [];
+      const revLines: string[] = [];
+      for (let k = 0; k < 250; k++) {
+        baseLines.push(makeDecl(k, k === 125 ? 'sorry' : 'omega'));
+        revLines.push(makeDecl(k, 'omega'));
+      }
+      const baseSrc = baseLines.join('\n\n');
+      const revSrc = revLines.join('\n\n');
+
+      const blocksA = parseLeanBlocks(baseSrc);
+      const blocksB = parseLeanBlocks(revSrc);
+      assert.equal(blocksA.length, 250);
+      assert.equal(blocksB.length, 250);
+
+      const rows = alignLeanBlocks(blocksA, blocksB);
+      assert.equal(rows.length, 250);
+      const modified = rows.filter(r => r.status === 'modified');
+      assert.equal(modified.length, 1);
+      assert.equal(modified[0].rightBlock?.decl?.name, 'thm_125');
+
+      const addedOnlySummary = computeLeanSummary(
+        [],
+        blocksB,
+        alignLeanBlocks([], blocksB)
+      );
+      assert.isFalse(addedOnlySummary.hasBase);
+      assert.isTrue(addedOnlySummary.hasRevision);
+      assert.equal(addedOnlySummary.addedDeclarations, 250);
+      assert.equal(addedOnlySummary.revision.theorems, 250);
+
+      const deletedOnlySummary = computeLeanSummary(
+        blocksA,
+        [],
+        alignLeanBlocks(blocksA, [])
+      );
+      assert.isTrue(deletedOnlySummary.hasBase);
+      assert.isFalse(deletedOnlySummary.hasRevision);
+      assert.equal(deletedOnlySummary.deletedDeclarations, 250);
+      assert.equal(deletedOnlySummary.base.sorryCount, 1);
+    });
+
+    test('computes aligned code lines with intra-line diff highlights', () => {
+      const aligned = alignLeanCodeLines(
+        [{lineNum: 1, text: '  have h : x ≤ 31 := by omega'}],
+        [{lineNum: 1, text: '  have h : x ≤ MAX_WEIGHT := by omega'}],
+        true
+      );
+      assert.equal(aligned.length, 1);
+      assert.equal(aligned[0].status, 'modified');
+      assert.isDefined(aligned[0].leftContent);
+      assert.isDefined(aligned[0].rightContent);
+    });
+
+    test('formats line ranges cleanly', () => {
+      assert.equal(formatLineRange(undefined, undefined), '');
+      assert.equal(formatLineRange(12, 12), 'L12');
+      assert.equal(formatLineRange(95, 111), 'L95–L111');
+    });
+  });
+
+  suite('adversarial XSS and injection hardening', () => {
+    test('renderMarkdownContent strips raw HTML, mXSS, unsafe links, and class injection', async () => {
+      const maliciousMd = [
+        '<script>window.__xss = 1</script>',
+        '<svg onload="window.__xss = 2"></svg>',
+        '<iframe src="javascript:alert(1)"></iframe>',
+        '<math><mtext></mtext><img src=x onerror="window.__xss=3"></math>',
+        '<style>body { display: none; }</style>',
+        '<noscript><p title="</noscript><img src=x onerror=alert(1)>">',
+        '![img](javascript:alert(1))',
+        '[js](javascript:alert(1)) [proto](//evil.com) [bs](/\\evil.com) [entity](&#106;avascript:alert(1))',
+        '[safe](https://lean-lang.org/doc/reference/latest/)',
+        '```lean selection-action-box diff-cell hygiene-pill verified',
+        'theorem p : True := trivial',
+        '```',
+      ].join('\n\n');
+
+      const el = await fixture<HTMLDivElement>(
+        html`<div>${renderMarkdownContent(maliciousMd)}</div>`
+      );
+
+      assert.isNull(el.querySelector('script'));
+      assert.isNull(el.querySelector('svg'));
+      assert.isNull(el.querySelector('iframe'));
+      assert.isNull(el.querySelector('img'));
+      assert.isNull(el.querySelector('math'));
+      assert.isNull(el.querySelector('style'));
+
+      const links = Array.from(el.querySelectorAll('a'));
+      assert.isAbove(links.length, 0);
+      for (const a of links) {
+        const href = a.getAttribute('href') ?? '';
+        assert.isFalse(
+          /^(javascript|data|vbscript|file):/i.test(href),
+          `Unsafe href leaked: ${href}`
+        );
+        assert.isFalse(
+          href.startsWith('//'),
+          `Protocol-relative href: ${href}`
+        );
+        assert.isFalse(href.includes('\\'), `Backslash href: ${href}`);
+        assert.equal(a.getAttribute('rel'), 'noopener noreferrer');
+        if (href.startsWith('https://')) {
+          assert.equal(a.getAttribute('target'), '_blank');
+        }
+      }
+
+      const codeEl = el.querySelector('pre code');
+      assert.isNotNull(codeEl);
+      assert.equal(codeEl.className, 'language-lean');
+    });
+
+    test('diff-interleaved split HTML payloads stay inert in rendered code lines', async () => {
+      const aligned = alignLeanCodeLines(
+        [{lineNum: 1, text: 'def x := "<scr" ++ "ipt>alert(1)</script>"'}],
+        [
+          {
+            lineNum: 1,
+            text: 'def x := "<script>alert(1)</script><img src=x onerror=alert(1)>"',
+          },
+        ],
+        true
+      );
+      const el = await fixture<HTMLDivElement>(
+        html`<div>${aligned[0].leftContent}${aligned[0].rightContent}</div>`
+      );
+      assert.isNull(el.querySelector('script'));
+      assert.isNull(el.querySelector('img'));
+      assert.include(el.textContent ?? '', '<script>alert(1)</script>');
+    });
+
+    test('Object.prototype declaration names do not corrupt block parsing, alignment, or summary', () => {
+      const srcA = [
+        'def __proto__ : Nat := 1',
+        'def constructor : Nat := 2',
+        'theorem toString : True := by sorry',
+        'theorem hasOwnProperty : True := by trivial',
+      ].join('\n\n');
+      const srcB = [
+        'def __proto__ : Nat := 10',
+        'def constructor : Nat := 2',
+        'theorem toString : True := by trivial',
+        'theorem hasOwnProperty : True := by trivial',
+      ].join('\n\n');
+
+      const blocksA = parseLeanBlocks(srcA);
+      const blocksB = parseLeanBlocks(srcB);
+      const rows = alignLeanBlocks(blocksA, blocksB);
+      const summary = computeLeanSummary(blocksA, blocksB, rows);
+
+      assert.equal(blocksA.length, 4);
+      assert.equal(blocksB.length, 4);
+      assert.equal(summary.base.sorryCount, 1);
+      assert.equal(summary.revision.sorryCount, 0);
+      assert.equal(summary.modifiedDeclarations, 2);
+    });
+  });
+
+  suite('adversarial soundness hygiene smuggling and parser edge cases', () => {
+    test('standalone divider comments terminate immediately without infinite loop', () => {
+      const start = performance.now();
+      const blocks = parseLeanBlocks(
+        [
+          '-- ============================================================',
+          '-- ============================================================',
+          '-- ------------------------------------------------------------',
+          'theorem after_dividers : True := by sorry',
+        ].join('\n')
+      );
+      assert.isBelow(performance.now() - start, 200);
+      const decl = blocks.find(b => b.type === 'declaration');
+      assert.isDefined(decl);
+      assert.equal(decl.decl?.name, 'after_dividers');
+      assert.isTrue(decl.decl?.hygiene.hasSorry);
+    });
+
+    test('detects declarations prefixed by in-scoping directives (open/set_option/variable/universe)', () => {
+      const src = [
+        'open Nat in theorem sneaky_open : False := by sorry',
+        '',
+        'set_option maxHeartbeats 0 in',
+        '  axiom sneaky_axiom : False',
+        '',
+        'variable (x : Nat) in',
+        'theorem sneaky_var : x = x := by native_decide',
+      ].join('\n');
+
+      const blocks = parseLeanBlocks(src);
+      const summary = computeLeanSummary(
+        [],
+        blocks,
+        alignLeanBlocks([], blocks)
+      );
+      assert.equal(summary.revision.sorryCount, 1);
+      assert.equal(summary.revision.axioms, 1);
+      assert.equal(summary.revision.nativeDecideCount, 1);
+      assert.isDefined(blocks.find(b => b.decl?.name === 'sneaky_open'));
+      assert.isDefined(blocks.find(b => b.decl?.name === 'sneaky_axiom'));
+      assert.isDefined(blocks.find(b => b.decl?.name === 'sneaky_var'));
+    });
+
+    test('parses indented declarations inside namespace and section blocks', () => {
+      const src = [
+        'namespace Outer',
+        '  section Inner',
+        '    theorem indented_bad : False := by',
+        '      sorry',
+        '    axiom indented_ax : False',
+        '  end Inner',
+        'end Outer',
+      ].join('\n');
+
+      const blocks = parseLeanBlocks(src);
+      const summary = computeLeanSummary(
+        [],
+        blocks,
+        alignLeanBlocks([], blocks)
+      );
+      assert.equal(summary.revision.theorems, 1);
+      assert.equal(summary.revision.sorryCount, 1);
+      assert.equal(summary.revision.axioms, 1);
+    });
+
+    test('fail-closed summary catches sorry/admit/native_decide inside macro, elab, initialize, and #eval directives', () => {
+      const src = [
+        'macro "cheat" : tactic => `(tactic| sorry)',
+        'elab "cheat2" : tactic => admit',
+        'initialize x := native_decide',
+        '#eval sorryAx False false',
+      ].join('\n\n');
+
+      const blocks = parseLeanBlocks(src);
+      const summary = computeLeanSummary(
+        [],
+        blocks,
+        alignLeanBlocks([], blocks)
+      );
+      assert.isAtLeast(summary.revision.sorryCount, 2);
+      assert.isAtLeast(summary.revision.admitCount, 1);
+      assert.isAtLeast(summary.revision.nativeDecideCount, 1);
+    });
+
+    test('handles column-0 continuations, -- comment lookahead, blank lines before |, and extends on next line', () => {
+      const src = [
+        'theorem col0_sorry : False :=',
+        'sorry',
+        '',
+        'theorem comment_before_sorry : False := by',
+        '-- harmless comment',
+        '  sorry',
+        '',
+        'def pattern_match : Nat → Nat',
+        '',
+        '| 0 => 0',
+        '| n + 1 => sorry',
+        '',
+        'structure Child',
+        'extends Parent where',
+        '  x : Nat',
+      ].join('\n');
+
+      const blocks = parseLeanBlocks(src);
+      const col0 = blocks.find(b => b.decl?.name === 'col0_sorry');
+      const commentBefore = blocks.find(
+        b => b.decl?.name === 'comment_before_sorry'
+      );
+      const pat = blocks.find(b => b.decl?.name === 'pattern_match');
+      const child = blocks.find(b => b.decl?.name === 'Child');
+
+      assert.isTrue(col0?.decl?.hygiene.hasSorry);
+      assert.isTrue(commentBefore?.decl?.hygiene.hasSorry);
+      assert.isTrue(pat?.decl?.hygiene.hasSorry);
+      assert.equal(child?.decl?.kind, 'structure');
+      assert.equal(child?.decl?.fields?.length, 1);
+    });
+
+    test('detects direct kernel soundness axioms (sorryAx, «sorryAx», ofReduceBool, ofReduceNat)', () => {
+      const src = [
+        'theorem t1 : False := sorryAx False false',
+        'theorem t2 : False := «sorryAx» False false',
+        'theorem t3 : True := Lean.ofReduceBool true rfl',
+        'theorem t4 : True := Lean.«ofReduceNat» 0 rfl',
+      ].join('\n\n');
+
+      const blocks = parseLeanBlocks(src);
+      const summary = computeLeanSummary(
+        [],
+        blocks,
+        alignLeanBlocks([], blocks)
+      );
+      assert.equal(summary.revision.sorryCount, 2);
+      assert.equal(summary.revision.nativeDecideCount, 2);
+
+      // Syntax highlighter also tags kernel escapes as sorry tokens
+      const tokens1 = tokenizeLeanLine('  exact sorryAx False false');
+      assert.isTrue(
+        tokens1.some(t => t.kind === 'sorry' && t.text === 'sorryAx')
+      );
+      const tokens2 = tokenizeLeanLine('  exact «sorryAx» False false');
+      assert.isTrue(
+        tokens2.some(t => t.kind === 'sorry' && t.text === '«sorryAx»')
+      );
+      const tokens3 = tokenizeLeanLine('  exact Lean.ofReduceBool true rfl');
+      assert.isTrue(
+        tokens3.some(t => t.kind === 'sorry' && t.text === 'ofReduceBool')
+      );
+    });
+
+    test('interpolated string quote-parity and brace expressions cannot hide subsequent sorry', () => {
+      const src = [
+        'def a : String := s!"{\'"\'}"',
+        'theorem after_char_in_interp : False := by sorry',
+        '',
+        'def b : String := s!"{r#"""#}"',
+        'theorem after_raw_in_interp : False := by sorry',
+        '',
+        'def c : String := s!"{(sorry : String)}"',
+        'theorem after_expr_in_interp : True := by trivial',
+      ].join('\n');
+
+      const blocks = parseLeanBlocks(src);
+      const tA = blocks.find(b => b.decl?.name === 'after_char_in_interp');
+      const tB = blocks.find(b => b.decl?.name === 'after_raw_in_interp');
+      const dC = blocks.find(b => b.decl?.name === 'c');
+
+      assert.isTrue(tA?.decl?.hygiene.hasSorry);
+      assert.isTrue(tB?.decl?.hygiene.hasSorry);
+      assert.isTrue(dC?.decl?.hygiene.hasSorry);
+    });
+
+    test('multi-line guillemets and Unicode/! identifier boundaries cannot desync quote parity or cause false positives', () => {
+      const src = [
+        'def «multi\n"» : Nat := 1',
+        'theorem after_guillemet : False := by sorry',
+        '',
+        'def x1 := f!\'"\'"',
+        'theorem after_bang_char : False := by sorry',
+        '',
+        'def x2 := f!r"\\""',
+        'theorem after_bang_raw : False := by sorry',
+        '',
+        'def x3 := fé\'"\'"',
+        'theorem after_unicode_char : False := by sorry',
+        '',
+        '-- Non-false-positive identifiers with Lean ident continuations',
+        "def sorry' : Nat := 1",
+        'def sorry? : Nat := 2',
+        'def sorry₀ : Nat := 3',
+        'def αsorry : Nat := 4',
+        'def «no sorry allowed» : Nat := 5',
+      ].join('\n');
+
+      const blocks = parseLeanBlocks(src);
+      const summary = computeLeanSummary(
+        [],
+        blocks,
+        alignLeanBlocks([], blocks)
+      );
+      assert.equal(summary.revision.sorryCount, 4);
+      assert.isFalse(
+        blocks.find(b => b.decl?.name === "sorry'")?.decl?.hygiene.hasSorry
+      );
+      assert.isFalse(
+        blocks.find(b => b.decl?.name === 'sorry?')?.decl?.hygiene.hasSorry
+      );
+      assert.isFalse(
+        blocks.find(b => b.decl?.name === 'sorry₀')?.decl?.hygiene.hasSorry
+      );
+      assert.isFalse(
+        blocks.find(b => b.decl?.name === 'αsorry')?.decl?.hygiene.hasSorry
+      );
+      assert.isFalse(
+        blocks.find(b => b.decl?.name === '«no sorry allowed»')?.decl?.hygiene
+          .hasSorry
+      );
+    });
+
+    test('block comment trailing declarations, dual block comments, and unclosed EOF comments parse safely', () => {
+      const src = [
+        '/- Copyright 2026 -/ axiom hidden_after_block : False',
+        '/-- Doc on same line -/ theorem hidden_after_doc : False := by sorry',
+        '/- first -/ /-',
+        'theorem fake_inside_second : False := by sorry',
+        '-/',
+        '/- unclosed eof comment',
+        '',
+      ].join('\n');
+
+      const blocks = parseLeanBlocks(src);
+      const summary = computeLeanSummary(
+        [],
+        blocks,
+        alignLeanBlocks([], blocks)
+      );
+      assert.equal(summary.revision.axioms, 1);
+      assert.equal(summary.revision.sorryCount, 1);
+      assert.isUndefined(
+        blocks.find(b => b.decl?.name === 'fake_inside_second')
+      );
+    });
+
+    test('multi-line attributes, multi-line modifiers, class inductive/abbrev, BOM, and CRLF are handled cleanly', () => {
+      const src =
+        '\uFEFF' +
+        [
+          '@[simp,',
+          '  inline]',
+          'theorem attr_multiline : True := by trivial',
+          '',
+          '@[simp /- ] -/] theorem attr_with_comment : False := by sorry',
+          '',
+          '@[simp] /- c -/ theorem attr_then_comment : True := by trivial',
+          '',
+          'unsafe',
+          'def sneaky_unsafe : Nat := 0',
+          '',
+          'partial',
+          'def sneaky_partial (n : Nat) : Nat := sneaky_partial n',
+          '',
+          'private /- c -/ axiom sneaky_private_ax : False',
+          '',
+          'class inductive MyClassInd : Type where',
+          '  | mk : MyClassInd',
+          '',
+          'class abbrev MyClassAbbrev := MyClassInd',
+        ].join('\r\n');
+
+      const blocks = parseLeanBlocks(src);
+      const summary = computeLeanSummary(
+        [],
+        blocks,
+        alignLeanBlocks([], blocks)
+      );
+      assert.equal(summary.revision.sorryCount, 1);
+      assert.equal(summary.revision.unsafeCount, 1);
+      assert.equal(summary.revision.partialCount, 1);
+      assert.equal(summary.revision.axioms, 1);
+      assert.equal(
+        blocks.find(b => b.decl?.name === 'MyClassInd')?.decl?.kind,
+        'inductive'
+      );
+      assert.equal(
+        blocks.find(b => b.decl?.name === 'MyClassAbbrev')?.decl?.kind,
+        'abbrev'
+      );
+    });
+
+    test('detectProofStrategy rejects dirty decide proofs and splits signature/body accurately around comments', () => {
+      const src = [
+        'theorem dirty_decide : False := by decide <;> sorry',
+        '',
+        "theorem prime_decide : True := by decide'",
+        '',
+        'theorem tab_decide : 1 + 1 = 2 := by\tdecide',
+        '',
+        'theorem comment_in_sig (x : Nat /- := fake -/) : x = x := by/- c -/ rfl',
+      ].join('\n');
+
+      const blocks = parseLeanBlocks(src);
+      const dirty = blocks.find(b => b.decl?.name === 'dirty_decide')!.decl!;
+      const prime = blocks.find(b => b.decl?.name === 'prime_decide')!.decl!;
+      const tab = blocks.find(b => b.decl?.name === 'tab_decide')!.decl!;
+      const commentSig = blocks.find(b => b.decl?.name === 'comment_in_sig')!
+        .decl!;
+
+      assert.equal(dirty.proofStrategy, 'tactic');
+      assert.isTrue(dirty.hygiene.hasSorry);
+      assert.equal(prime.proofStrategy, 'tactic');
+      assert.equal(tab.proofStrategy, 'decide');
+      assert.isTrue(tab.isTacticProof);
+      assert.isTrue(commentSig.isTacticProof);
+      assert.include(
+        commentSig.signatureLines.map(l => l.text).join('\n'),
+        'x = x'
+      );
+    });
+  });
+
+  suite('DoS resilience and lossless diff tokenization', () => {
+    test('tokenizeLeanDiffWords has no ReDoS on 50k unclosed guillemets and is strictly lossless', () => {
+      const start = performance.now();
+      const tokens = tokenizeLeanDiffWords('«'.repeat(50_000));
+      assert.isBelow(performance.now() - start, 200);
+      assert.equal(tokens.length, 50_000);
+
+      const samples = [
+        'def x := 0x7ff + 3.14159 + 0b1010 + 1_000_000',
+        'theorem ∀ α β, «spaced ident» → ∃ γ, x ≠ y := by simp',
+        'def emoji := "😀🚀" -- trailing\tspace  ',
+        'unclosed «guillemet and \u0007 control',
+      ];
+      for (const sample of samples) {
+        assert.equal(
+          tokenizeLeanDiffWords(sample).join(''),
+          sample,
+          `Lossy tokenization on: ${sample}`
+        );
+      }
+    });
+
+    test('alignLeanCodeLines preserves and diffs numeric literals without dropping digits', async () => {
+      const aligned = alignLeanCodeLines(
+        [{lineNum: 1, text: 'def limit : Nat := 100'}],
+        [{lineNum: 1, text: 'def limit : Nat := 0'}],
+        true
+      );
+      assert.equal(aligned.length, 1);
+      assert.equal(aligned[0].status, 'modified');
+
+      const leftEl = await fixture<HTMLDivElement>(
+        html`<div>${aligned[0].leftContent}</div>`
+      );
+      const rightEl = await fixture<HTMLDivElement>(
+        html`<div>${aligned[0].rightContent}</div>`
+      );
+      assert.equal(leftEl.querySelector('del')?.textContent, '100');
+      assert.equal(rightEl.querySelector('ins')?.textContent, '0');
+    });
+
+    test('handles 100KB Lean line and 200-block disjoint diff within latency budget', () => {
+      const start = performance.now();
+      const hugeLine = 'def big : Nat := ' + '1 + '.repeat(25_000) + '0';
+      const tokens = tokenizeLeanLine(hugeLine);
+      assert.isAbove(tokens.length, 25_000);
+
+      const baseBlocks = parseLeanBlocks(
+        Array.from({length: 200}, (_, i) => `def a_${i} : Nat := ${i}`).join(
+          '\n\n'
+        )
+      );
+      const revBlocks = parseLeanBlocks(
+        Array.from({length: 200}, (_, i) => `def b_${i} : Nat := ${i}`).join(
+          '\n\n'
+        )
+      );
+      const rows = alignLeanBlocks(baseBlocks, revBlocks);
+      assert.equal(rows.length, 400);
+      assert.isBelow(performance.now() - start, 1500);
+    });
+
+    test('only s!, m!, f! enter interpolated string mode so panic!"{" cannot swallow sorry', () => {
+      const attack = [
+        'def msg : String := panic!"{"',
+        'theorem bad : False := by sorry',
+        'def endMsg : String := "}"',
+        'def formatted (x : Nat) := f!"val {x} {sorry}"',
+      ].join('\n');
+
+      const blocks = parseLeanBlocks(attack);
+      const badBlock = blocks.find(b => b.decl?.name === 'bad');
+      assert.isDefined(badBlock);
+      assert.isTrue(badBlock.decl!.hygiene.hasSorry);
+
+      const formattedBlock = blocks.find(b => b.decl?.name === 'formatted');
+      assert.isDefined(formattedBlock);
+      assert.isTrue(formattedBlock.decl!.hygiene.hasSorry);
+
+      const summary = computeLeanSummary(
+        [],
+        blocks,
+        alignLeanBlocks([], blocks)
+      );
+      assert.equal(summary.revision.sorryCount, 2);
+
+      // Tokenizer recognizes f!"..." consistently with s!"..." and m!"..."
+      const fTokens = tokenizeLeanLine('def x := f!"hello {a}"');
+      assert.isTrue(
+        fTokens.some(t => t.kind === 'string' && t.text === 'f!"hello {a}"')
+      );
+    });
+
+    test('multi-line attributes with thousands of unclosed @[ stay strictly linear', () => {
+      const start = performance.now();
+      const unclosedNoClose = Array.from({length: 2000}, () => '@[foo').join(
+        '\n'
+      );
+      const blocksNoClose = parseLeanBlocks(unclosedNoClose);
+      assert.isAbove(blocksNoClose.length, 0);
+
+      const unclosedWithTrailingClose =
+        Array.from({length: 2000}, () => '@[foo').join('\n') + '\n]';
+      const blocksWithClose = parseLeanBlocks(unclosedWithTrailingClose);
+      assert.isAbove(blocksWithClose.length, 0);
+
+      assert.isBelow(performance.now() - start, 500);
+
+      // Valid multi-line attribute with nested brackets and comments still parses.
+      const validAttr = [
+        '@[simp [foo],',
+        '  /- ] inside comment -/',
+        '  inline]',
+        'def attributed : Nat := 1',
+      ].join('\n');
+      const parsed = parseLeanBlocks(validAttr);
+      assert.equal(parsed.length, 1);
+      assert.equal(parsed[0].type, 'declaration');
+      assert.equal(parsed[0].startLine, 1);
+      assert.equal(parsed[0].endLine, 4);
+      assert.equal(parsed[0].decl?.name, 'attributed');
+      assert.equal(parsed[0].decl?.attributes.length, 1);
+    });
+
+    test('indented or same-line axiom/partial/unsafe cannot hide inside a clean declaration', () => {
+      const indentedAfterBlank = [
+        'theorem clean : 1 + 1 = 2 := rfl',
+        '',
+        '  axiom bad : False',
+      ].join('\n');
+      const blocks1 = parseLeanBlocks(indentedAfterBlank);
+      assert.equal(blocks1.length, 2);
+      assert.equal(blocks1[0].decl?.name, 'clean');
+      assert.equal(blocks1[1].decl?.kind, 'axiom');
+      assert.equal(blocks1[1].decl?.name, 'bad');
+      assert.isTrue(blocks1[1].decl?.hygiene.isAxiom);
+
+      const indentedNoBlank = [
+        'theorem clean2 : 1 + 1 = 2 := rfl',
+        '  axiom bad2 : False',
+      ].join('\n');
+      const blocks2 = parseLeanBlocks(indentedNoBlank);
+      assert.equal(blocks2.length, 2);
+      assert.equal(blocks2[1].decl?.kind, 'axiom');
+
+      const sameLineAttack =
+        'theorem clean3 : True := (trivial) axiom bad3 : False';
+      const blocks3 = parseLeanBlocks(sameLineAttack);
+      assert.isTrue(blocks3[0].decl?.hygiene.isAxiom);
+      const summary3 = computeLeanSummary(
+        [],
+        blocks3,
+        alignLeanBlocks([], blocks3)
+      );
+      assert.equal(summary3.revision.axioms, 1);
+
+      // Guillemet-escaped identifiers and legitimate indented clauses stay clean.
+      const benign = [
+        'structure Config where',
+        '  module : String',
+        '  «axiom» : Nat',
+        '  deriving Repr',
+        '',
+        'theorem scoped : True := by',
+        '  open Nat in',
+        '  exact trivial',
+      ].join('\n');
+      const benignBlocks = parseLeanBlocks(benign);
+      assert.equal(benignBlocks.length, 2);
+      assert.equal(benignBlocks[0].decl?.fields?.length, 2);
+      assert.deepEqual(benignBlocks[0].decl?.derivingClause, ['Repr']);
+      assert.isFalse(benignBlocks[0].decl?.hygiene.isAxiom);
+      assert.equal(benignBlocks[1].decl?.name, 'scoped');
+      assert.isFalse(benignBlocks[1].decl?.hygiene.isAxiom);
+    });
+
+    test('computes Math.min blockStartLine for modifier before @[...] and preserves prefixes across -- comments', () => {
+      const baseSrc = ['@[simp]', 'def foo : Nat := 1'].join('\n');
+      const revSrc = ['unsafe', '@[simp]', 'def foo : Nat := 1'].join('\n');
+
+      const revBlocks = parseLeanBlocks(revSrc);
+      assert.equal(revBlocks.length, 1);
+      assert.equal(revBlocks[0].startLine, 1);
+      assert.equal(revBlocks[0].endLine, 3);
+      assert.include(revBlocks[0].raw, 'unsafe');
+      assert.isTrue(revBlocks[0].decl?.hygiene.isUnsafe);
+
+      const rows = alignLeanBlocks(parseLeanBlocks(baseSrc), revBlocks);
+      assert.equal(rows.length, 1);
+      assert.equal(rows[0].status, 'modified');
+
+      // Intervening `--` comments must not detach pending docstrings/attrs/modifiers
+      // AND must remain visible in `signatureLines` in lineNum order with diffs.
+      const withComments = [
+        '/-- Computes foo. -/',
+        '-- temporary note',
+        'unsafe',
+        '-- another note',
+        '@[simp]',
+        'def bar : Nat := 1',
+      ].join('\n');
+      const barBlocks = parseLeanBlocks(withComments);
+      assert.equal(barBlocks.length, 1);
+      assert.equal(barBlocks[0].startLine, 1);
+      assert.equal(barBlocks[0].endLine, 6);
+      assert.equal(barBlocks[0].decl?.docComment, 'Computes foo.');
+      assert.equal(barBlocks[0].decl?.attributes.length, 1);
+      assert.isTrue(barBlocks[0].decl?.hygiene.isUnsafe);
+      assert.deepEqual(barBlocks[0].decl?.signatureLines, [
+        {lineNum: 2, text: '-- temporary note'},
+        {lineNum: 3, text: 'unsafe'},
+        {lineNum: 4, text: '-- another note'},
+        {lineNum: 6, text: 'def bar : Nat'},
+      ]);
+
+      const editedComments = withComments.replace(
+        '-- temporary note',
+        '-- updated note'
+      );
+      const commentDiffRows = alignLeanBlocks(
+        barBlocks,
+        parseLeanBlocks(editedComments)
+      );
+      assert.equal(commentDiffRows.length, 1);
+      assert.equal(commentDiffRows[0].status, 'modified');
+      const alignedSig = alignLeanCodeLines(
+        commentDiffRows[0].leftBlock!.decl!.signatureLines,
+        commentDiffRows[0].rightBlock!.decl!.signatureLines,
+        false
+      );
+      assert.equal(alignedSig[0].leftLine?.lineNum, 2);
+      assert.equal(alignedSig[0].rightLine?.lineNum, 2);
+      assert.equal(alignedSig[0].status, 'modified');
+    });
+
+    test('treats declaration prefixes as command boundaries, allows non-instance deriving on defs, and preserves parameterized where members', () => {
+      // (1) Indented prefix (`unsafe`, `@[simp]`, `/--`, `/-!`) after a blank line must break cleanly.
+      const prefixAfterClean = [
+        'theorem clean : 1 + 1 = 2 := rfl',
+        '',
+        '  unsafe',
+        '  def bad : Nat := 0',
+        '',
+        'theorem clean2 : 1 + 1 = 2 := rfl',
+        '',
+        '  /-- Second theorem doc -/',
+        '  theorem with_doc : False := by sorry',
+        '',
+        'theorem clean_before_attr : 1 + 1 = 2 := rfl',
+        '  @[simp]',
+        '  theorem with_attr : False := by sorry',
+        '',
+        'theorem clean3 : True := trivial',
+        '  /-! Indented module note -/',
+      ].join('\n');
+      const prefixBlocks = parseLeanBlocks(prefixAfterClean);
+      const cleanBlock = prefixBlocks.find(b => b.decl?.name === 'clean');
+      const badBlock = prefixBlocks.find(b => b.decl?.name === 'bad');
+      const clean2Block = prefixBlocks.find(b => b.decl?.name === 'clean2');
+      const docBlock = prefixBlocks.find(b => b.decl?.name === 'with_doc');
+      const cleanAttrBlock = prefixBlocks.find(
+        b => b.decl?.name === 'clean_before_attr'
+      );
+      const attrBlock = prefixBlocks.find(b => b.decl?.name === 'with_attr');
+      const clean3Block = prefixBlocks.find(b => b.decl?.name === 'clean3');
+
+      assert.isDefined(cleanBlock);
+      assert.isFalse(cleanBlock.decl!.hygiene.isUnsafe);
+      assert.equal(cleanBlock.endLine, 1);
+
+      assert.isDefined(badBlock);
+      assert.isTrue(badBlock.decl!.hygiene.isUnsafe);
+      assert.equal(badBlock.startLine, 3);
+
+      assert.isDefined(clean2Block);
+      assert.equal(clean2Block.endLine, 6);
+      assert.isDefined(docBlock);
+      assert.equal(docBlock.startLine, 8);
+      assert.equal(docBlock.decl!.docComment, 'Second theorem doc');
+      assert.isTrue(docBlock.decl!.hygiene.hasSorry);
+
+      assert.isDefined(cleanAttrBlock);
+      assert.equal(cleanAttrBlock.endLine, 11);
+      assert.isDefined(attrBlock);
+      assert.equal(attrBlock.startLine, 12);
+      assert.deepEqual(attrBlock.decl!.attributes, ['  @[simp]']);
+      assert.isTrue(attrBlock.decl!.hygiene.hasSorry);
+
+      assert.isDefined(clean3Block);
+      assert.equal(clean3Block.endLine, 15);
+      assert.isTrue(prefixBlocks.some(b => b.type === 'module_doc'));
+
+      // (2a) Non-`instance` `deriving` attaches to `def`/`abbrev`, whereas `deriving instance` is top-level.
+      const derivingSrc = [
+        'def Color : Type := Nat',
+        '  deriving BEq, Repr',
+        '',
+        'abbrev Alias := Nat',
+        'deriving DecidableEq',
+        '',
+        'def Target := Nat',
+        '  deriving instance Hashable for Target',
+      ].join('\n');
+      const derivingBlocks = parseLeanBlocks(derivingSrc);
+      assert.equal(derivingBlocks.length, 4);
+      assert.equal(derivingBlocks[0].decl?.name, 'Color');
+      assert.include(derivingBlocks[0].raw, 'deriving BEq, Repr');
+      assert.equal(derivingBlocks[1].decl?.name, 'Alias');
+      assert.include(derivingBlocks[1].raw, 'deriving DecidableEq');
+      assert.equal(derivingBlocks[2].decl?.name, 'Target');
+      assert.notInclude(derivingBlocks[2].raw, 'Hashable');
+      assert.equal(derivingBlocks[3].type, 'directive');
+      assert.equal(derivingBlocks[3].directiveKind, 'deriving');
+
+      // (2b) `/--` field doc and parameterized `where` members (`syntax`, `prefix`) stay inside container decl.
+      const whereMembersSrc = [
+        'structure LangConfig where',
+        '  /-- Parameterized field named syntax. -/',
+        '  syntax (n : Nat) : String',
+        '  prefix x := x + 1',
+        '',
+        'def outerFn (a : Nat) : Nat := helper a where',
+        '  prefix n := n + 1',
+      ].join('\n');
+      const whereBlocks = parseLeanBlocks(whereMembersSrc);
+      assert.equal(whereBlocks.length, 2);
+      assert.equal(whereBlocks[0].decl?.name, 'LangConfig');
+      assert.include(whereBlocks[0].raw, 'syntax (n : Nat) : String');
+      assert.include(whereBlocks[0].raw, 'prefix x := x + 1');
+      assert.equal(whereBlocks[1].decl?.name, 'outerFn');
+      assert.include(whereBlocks[1].raw, 'prefix n := n + 1');
+    });
+
+    test('multi-line /- ... -/ comments stay styled as comment tokens without false sorry highlights', async () => {
+      const baseSrc = [
+        '/-',
+        'All proofs below use zero sorry or admit.',
+        '-/',
+      ].join('\n');
+      const revSrc = [
+        '/-',
+        'All proofs below use zero sorry or admit (verified).',
+        '-/',
+      ].join('\n');
+
+      const rows = alignLeanBlocks(
+        parseLeanBlocks(baseSrc),
+        parseLeanBlocks(revSrc)
+      );
+      assert.equal(rows.length, 1);
+      assert.equal(rows[0].status, 'modified');
+      assert.isDefined(rows[0].lineDiff);
+      for (const line of rows[0].lineDiff) {
+        const leftEl = await fixture<HTMLDivElement>(
+          html`<div>${line.leftContent}</div>`
+        );
+        const rightEl = await fixture<HTMLDivElement>(
+          html`<div>${line.rightContent}</div>`
+        );
+        assert.isNull(leftEl.querySelector('.lean-tok-sorry'));
+        assert.isNull(rightEl.querySelector('.lean-tok-sorry'));
+        assert.isNotNull(rightEl.querySelector('.lean-tok-comment'));
+      }
+
+      // Multi-line comment inside a declaration body propagates comment depth.
+      const declLines = [
+        {lineNum: 1, text: 'theorem t : True := by /- start note'},
+        {lineNum: 2, text: '  do not mention sorry or admit here'},
+        {lineNum: 3, text: '  -/ trivial'},
+      ];
+      const {depths, finalDepth} = computeBlockCommentDepths(declLines);
+      assert.deepEqual(depths, [0, 1, 1]);
+      assert.equal(finalDepth, 0);
+
+      const line2Tokens = tokenizeLeanLineWithState(
+        declLines[1].text,
+        true,
+        depths[1]
+      );
+      assert.equal(line2Tokens.blockCommentDepth, 1);
+      assert.isTrue(line2Tokens.tokens.every(t => t.kind === 'comment'));
+
+      const line3Tokens = tokenizeLeanLineWithState(
+        declLines[2].text,
+        true,
+        depths[2]
+      );
+      assert.equal(line3Tokens.blockCommentDepth, 0);
+      assert.equal(line3Tokens.tokens[0].kind, 'comment');
+      assert.isTrue(
+        line3Tokens.tokens.some(
+          t => t.kind === 'tactic' && t.text === 'trivial'
+        )
+      );
+    });
+
+    test('per-side inline diff mask preserves exact offsets and astral Unicode symbols without surrogate splitting', async () => {
+      const aligned = alignLeanCodeLines(
+        [{lineNum: 1, text: 'def f ( ) : 𝔸 := oldVal'}],
+        [{lineNum: 1, text: 'def f (a b) : 𝔸 := newVal'}],
+        false
+      );
+      assert.equal(aligned.length, 1);
+      assert.equal(aligned[0].status, 'modified');
+
+      const leftEl = await fixture<HTMLDivElement>(
+        html`<div>${aligned[0].leftContent}</div>`
+      );
+      const rightEl = await fixture<HTMLDivElement>(
+        html`<div>${aligned[0].rightContent}</div>`
+      );
+
+      assert.equal(leftEl.textContent, 'def f ( ) : 𝔸 := oldVal');
+      assert.equal(rightEl.textContent, 'def f (a b) : 𝔸 := newVal');
+      const leftDels = Array.from(leftEl.querySelectorAll('del')).map(
+        el => el.textContent
+      );
+      const rightIns = Array.from(rightEl.querySelectorAll('ins')).map(
+        el => el.textContent
+      );
+      assert.deepEqual(leftDels, ['oldVal']);
+      assert.deepEqual(rightIns, ['a b', 'newVal']);
+    });
+
+    test('alignLeanCodeLines uses Unicode-aware token similarity for Greek identifiers and math operators', () => {
+      const paired = alignLeanCodeLines(
+        [{lineNum: 1, text: '  | ⟨α, β, γ⟩ => ⟨α, β, γ⟩'}],
+        [{lineNum: 1, text: '  | ⟨α, β, γ⟩ => ⟨α, β, γ + 1⟩'}],
+        false
+      );
+      assert.equal(paired.length, 1);
+      assert.equal(paired[0].status, 'modified');
+
+      const unrelated = alignLeanCodeLines(
+        [{lineNum: 1, text: '  have : α = β'}],
+        [{lineNum: 1, text: '  have : ∀ γ δ, γ ⊆ δ'}],
+        true
+      );
+      assert.equal(unrelated.length, 2);
+      assert.equal(unrelated[0].status, 'deleted');
+      assert.equal(unrelated[1].status, 'added');
+    });
+
+    test('alignLeanBlocks does not pair unrelated named declarations in a 1-vs-1 gap', () => {
+      const baseSrc = ['structure Point where', '  x : Nat', '  y : Nat'].join(
+        '\n'
+      );
+      const revSrc = [
+        'theorem main_soundness (n : Nat) : n + 0 = n := by',
+        '  simp',
+      ].join('\n');
+
+      const baseBlocks = parseLeanBlocks(baseSrc);
+      const revBlocks = parseLeanBlocks(revSrc);
+      const rows = alignLeanBlocks(baseBlocks, revBlocks);
+      assert.equal(rows.length, 2);
+      assert.equal(rows[0].status, 'deleted');
+      assert.equal(rows[0].leftBlock?.decl?.name, 'Point');
+      assert.equal(rows[0].leftBlock?.decl?.fields?.length, 2);
+      assert.equal(rows[1].status, 'added');
+      assert.equal(rows[1].rightBlock?.decl?.name, 'main_soundness');
+
+      const summary = computeLeanSummary(baseBlocks, revBlocks, rows);
+      assert.equal(summary.deletedDeclarations, 1);
+      assert.equal(summary.addedDeclarations, 1);
+      assert.equal(summary.modifiedDeclarations, 0);
+    });
+
+    test('alignLeanCodeLines preserves inline word diffs near top and bottom of >100-line Lean proof', async () => {
+      const bodyMiddle = Array.from(
+        {length: 118},
+        (_, i) => `  have h_${i} : True := trivial`
+      );
+      const baseProof = [
+        {lineNum: 1, text: '  have h_top : n = oldHyp'},
+        ...bodyMiddle.map((text, idx) => {
+          return {lineNum: idx + 2, text};
+        }),
+        {lineNum: 120, text: '  exact Nat.add_comm n oldGoal'},
+      ];
+      const revProof = [
+        {lineNum: 1, text: '  have h_top : n = newHyp'},
+        ...bodyMiddle.map((text, idx) => {
+          return {lineNum: idx + 2, text};
+        }),
+        {lineNum: 120, text: '  exact Nat.add_comm n newGoal'},
+      ];
+
+      const aligned = alignLeanCodeLines(baseProof, revProof, true);
+      assert.equal(aligned.length, 120);
+      assert.equal(aligned[0].status, 'modified');
+      assert.equal(aligned[119].status, 'modified');
+
+      const topLeftEl = await fixture<HTMLDivElement>(
+        html`<div>${aligned[0].leftContent}</div>`
+      );
+      const topRightEl = await fixture<HTMLDivElement>(
+        html`<div>${aligned[0].rightContent}</div>`
+      );
+      const botLeftEl = await fixture<HTMLDivElement>(
+        html`<div>${aligned[119].leftContent}</div>`
+      );
+      const botRightEl = await fixture<HTMLDivElement>(
+        html`<div>${aligned[119].rightContent}</div>`
+      );
+      assert.equal(topLeftEl.querySelector('del')?.textContent, 'oldHyp');
+      assert.equal(topRightEl.querySelector('ins')?.textContent, 'newHyp');
+      assert.equal(botLeftEl.querySelector('del')?.textContent, 'oldGoal');
+      assert.equal(botRightEl.querySelector('ins')?.textContent, 'newGoal');
+    });
+  });
+});
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-markdown-viewer/gr-diff-markdown-viewer.ts b/polygerrit-ui/app/elements/diff/gr-diff-markdown-viewer/gr-diff-markdown-viewer.ts
index be9d15b..f2f968d 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-markdown-viewer/gr-diff-markdown-viewer.ts
+++ b/polygerrit-ui/app/elements/diff/gr-diff-markdown-viewer/gr-diff-markdown-viewer.ts
@@ -23,7 +23,6 @@
   PatchSetNum,
   RevisionPatchSetNum,
 } from '../../../types/common';
-import {sanitizeHtmlToFragment} from '../../../utils/inner-html-util';
 import {resolve} from '../../../models/dependency';
 import {browserModelToken} from '../../../models/browser/browser-model';
 import {commentsModelToken} from '../../../models/comments/comments-model';
@@ -68,7 +67,7 @@
 
   @property({type: Boolean}) loggedIn = false;
 
-  @query('.selection-action-box')
+  @query('#selection-action-box')
   private selectionActionBox?: HTMLElement;
 
   private selectionActionBoxVisible = false;
@@ -357,50 +356,94 @@
         ins {
           background-color: var(--dark-add-highlight-color, #aaf2aa);
           text-decoration: none;
-          border-radius: 2px;
-          padding: 1px 2px;
+          border-radius: 3px;
+          padding: 1px 3px;
+          box-decoration-break: clone;
+          -webkit-box-decoration-break: clone;
         }
         .diff-highlight-del,
         del {
           background-color: var(--dark-remove-highlight-color, #ffcdd2);
-          text-decoration: line-through;
-          border-radius: 2px;
-          padding: 1px 2px;
+          text-decoration: none;
+          border-radius: 3px;
+          padding: 1px 3px;
+          box-decoration-break: clone;
+          -webkit-box-decoration-break: clone;
         }
-        .diff-cell.deleted code,
-        .diff-cell.modified-left code,
-        .unified-block.deleted code,
+        .diff-cell.deleted :not(pre) > code,
+        .diff-cell.modified-left :not(pre) > code,
+        .unified-block.deleted :not(pre) > code,
+        .diff-cell.added :not(pre) > code,
+        .diff-cell.modified-right :not(pre) > code,
+        .unified-block.added :not(pre) > code {
+          background-color: var(--disabled-background, rgba(60, 64, 67, 0.12));
+          border: 1px solid var(--border-color, #dadce0);
+        }
+        .diff-cell.deleted del code,
+        .diff-cell.modified-left del code,
+        .unified-block.deleted del code,
+        .diff-cell del.diff-highlight-del code,
+        .unified-block del.diff-highlight-del code,
         del code {
-          background-color: rgba(0, 0, 0, 0.05);
+          background-color: var(--dark-remove-highlight-color, #ffcdd2);
+          border: 1px solid rgba(207, 34, 46, 0.45);
         }
-        .diff-cell.added code,
-        .diff-cell.modified-right code,
-        .unified-block.added code,
+        .diff-cell.added ins code,
+        .diff-cell.modified-right ins code,
+        .unified-block.added ins code,
+        .diff-cell ins.diff-highlight-add code,
+        .unified-block ins.diff-highlight-add code,
         ins code {
-          background-color: rgba(0, 0, 0, 0.05);
+          background-color: var(--dark-add-highlight-color, #aaf2aa);
+          border: 1px solid rgba(46, 160, 67, 0.45);
         }
         .diff-cell.deleted pre,
         .diff-cell.modified-left pre,
         .unified-block.deleted pre {
-          background-color: rgba(0, 0, 0, 0.03);
-          border-color: rgba(207, 34, 46, 0.2);
+          background-color: var(--view-background-color, #ffffff);
+          border-color: rgba(207, 34, 46, 0.25);
         }
         .diff-cell.added pre,
         .diff-cell.modified-right pre,
         .unified-block.added pre {
-          background-color: rgba(0, 0, 0, 0.03);
-          border-color: rgba(46, 160, 67, 0.2);
+          background-color: var(--view-background-color, #ffffff);
+          border-color: rgba(46, 160, 67, 0.25);
         }
         pre .diff-highlight-del {
           display: inline-block;
-          width: 100%;
+          min-width: 100%;
           box-sizing: border-box;
         }
         pre .diff-highlight-add {
           display: inline-block;
-          width: 100%;
+          min-width: 100%;
           box-sizing: border-box;
         }
+        pre .diff-code-line-del {
+          display: inline-block;
+          min-width: 100%;
+          box-sizing: border-box;
+          background-color: var(--light-remove-highlight-color, #ffebee);
+          border-radius: 2px;
+          padding: 1px 4px;
+        }
+        pre .diff-code-line-add {
+          display: inline-block;
+          min-width: 100%;
+          box-sizing: border-box;
+          background-color: var(--light-add-highlight-color, #d8fed8);
+          border-radius: 2px;
+          padding: 1px 4px;
+        }
+        pre .diff-code-line-del .diff-highlight-del,
+        pre .diff-code-line-add .diff-highlight-add {
+          display: inline;
+          min-width: 0;
+          width: auto;
+          padding: 1px 3px;
+          border-radius: 3px;
+          font-weight: var(--font-weight-medium, 500);
+        }
         .diff-cell.deleted th,
         .diff-cell.modified-left th,
         .unified-block.deleted th {
@@ -433,6 +476,10 @@
           margin-top: 0;
           margin-bottom: var(--spacing-xs, 4px);
         }
+        a {
+          color: var(--link-color, #1a73e8);
+          text-decoration: underline;
+        }
         code {
           font-family: var(--monospace-font-family, 'Roboto Mono', monospace);
           font-size: var(--font-size-code, 12px);
@@ -453,7 +500,8 @@
           padding: 0;
           font-size: var(--font-size-code, 12px);
           display: block;
-          white-space: pre;
+          white-space: pre-wrap;
+          overflow-wrap: break-word;
         }
         blockquote {
           border-left: 4px solid var(--border-color, #d0d7de);
@@ -482,6 +530,48 @@
           background-color: var(--background-color-secondary, #f8f9fa);
           font-weight: var(--font-weight-bold, 600);
         }
+        li.diff-list-item-del::marker {
+          color: var(--negative-red-text-color, #d93025);
+        }
+        li.diff-list-item-add::marker {
+          color: var(--positive-green-text-color, #188038);
+        }
+        li.diff-list-item-placeholder,
+        li[aria-hidden='true'] {
+          visibility: hidden;
+          user-select: none;
+        }
+        li.diff-list-item-placeholder::after,
+        li[aria-hidden='true']::after {
+          content: '\\00a0';
+        }
+        tr.diff-table-row-del td {
+          background-color: var(--light-remove-highlight-color, #ffebee);
+        }
+        tr.diff-table-row-add td {
+          background-color: var(--light-add-highlight-color, #d8fed8);
+        }
+        th.diff-table-cell-placeholder,
+        td.diff-table-cell-placeholder,
+        th[aria-hidden='true'],
+        td[aria-hidden='true'] {
+          background-color: var(
+            --diff-blank-background-color,
+            rgba(0, 0, 0, 0.02)
+          );
+          user-select: none;
+        }
+        tr.diff-table-row-placeholder td.diff-table-cell-placeholder::after,
+        tr[aria-hidden='true'] td[aria-hidden='true']::after {
+          content: '\\00a0';
+          visibility: hidden;
+        }
+        .unified-block li.diff-list-item-placeholder,
+        .unified-block li[aria-hidden='true'],
+        .unified-block tr.diff-table-row-placeholder,
+        .unified-block tr[aria-hidden='true'] {
+          display: none;
+        }
       `,
     ];
   }
@@ -609,6 +699,10 @@
     this.selectedLine = undefined;
   }
 
+  hasHoverTarget(): boolean {
+    return this.hoveredSide !== undefined;
+  }
+
   hasActiveSelection(): boolean {
     const selection = this.getActiveSelection();
     if (!selection || selection.isCollapsed || !selection.rangeCount) {
@@ -617,13 +711,13 @@
     const range = selection.getRangeAt(0);
     const container = range.commonAncestorContainer;
     const elementNode =
-      container.nodeType === Node.TEXT_NODE
-        ? container.parentElement
-        : (container as Element);
+      container.nodeType === Node.ELEMENT_NODE
+        ? (container as Element)
+        : container.parentElement;
     return !!(
       elementNode &&
       this.renderRoot.contains(elementNode) &&
-      elementNode.closest('.diff-cell, .unified-block')
+      elementNode.closest('.diff-cell[data-side], .unified-block[data-side]')
     );
   }
 
@@ -661,9 +755,9 @@
     const range = selection.getRangeAt(0);
     const container = range.commonAncestorContainer;
     const elementNode =
-      container.nodeType === Node.TEXT_NODE
-        ? container.parentElement
-        : (container as Element);
+      container.nodeType === Node.ELEMENT_NODE
+        ? (container as Element)
+        : container.parentElement;
     if (!elementNode || !this.renderRoot.contains(elementNode)) {
       if (this.selectionActionBoxVisible) {
         this.selectionActionBoxVisible = false;
@@ -673,7 +767,9 @@
       }
       return;
     }
-    const cell = elementNode.closest('.diff-cell, .unified-block');
+    const cell = elementNode.closest(
+      '.diff-cell[data-side], .unified-block[data-side]'
+    );
     if (!cell) {
       if (this.selectionActionBoxVisible) {
         this.selectionActionBoxVisible = false;
@@ -726,22 +822,26 @@
   }
 
   private handleKeyDown = (e: KeyboardEvent) => {
+    if (e.defaultPrevented || e.repeat) return;
     if (e.key === 'c' || e.key === 'C') {
       if (e.ctrlKey || e.metaKey || e.altKey) {
         return;
       }
-      const target = e.composedPath()[0] as HTMLElement;
+      const path = e.composedPath();
+      const target = path[0] as HTMLElement | undefined;
       if (
         target?.tagName === 'INPUT' ||
         target?.tagName === 'TEXTAREA' ||
         target?.tagName === 'GR-TEXTAREA' ||
-        target?.isContentEditable
+        target?.isContentEditable ||
+        path.some(n => (n as Element)?.tagName === 'DIALOG')
       ) {
         return;
       }
       if (this.hasActiveSelection() || this.hoveredSide !== undefined) {
         e.preventDefault();
         e.stopPropagation();
+        e.stopImmediatePropagation();
         this.createCommentFromSelectionOrHover();
       }
     }
@@ -753,11 +853,13 @@
       const range = selection.getRangeAt(0);
       const container = range.commonAncestorContainer;
       const elementNode =
-        container.nodeType === Node.TEXT_NODE
-          ? container.parentElement
-          : (container as Element);
+        container.nodeType === Node.ELEMENT_NODE
+          ? (container as Element)
+          : container.parentElement;
       if (elementNode && this.renderRoot.contains(elementNode)) {
-        const cell = elementNode.closest('.diff-cell, .unified-block');
+        const cell = elementNode.closest(
+          '.diff-cell[data-side], .unified-block[data-side]'
+        );
         if (cell) {
           const sideStr = cell.getAttribute('data-side');
           const side = sideStr === 'left' ? Side.LEFT : Side.RIGHT;
@@ -849,6 +951,7 @@
   private renderSelectionActionBox() {
     return html`
       <div
+        id="selection-action-box"
         class="selection-action-box ${this.selectionBoxPositionBelow
           ? 'below'
           : ''}"
@@ -942,7 +1045,7 @@
         >
           ${this.renderCommentButton(Side.RIGHT, row.rightStartLine)}
           <div class="cell-content">
-            ${sanitizeHtmlToFragment(row.leftHtml ?? row.rightHtml ?? '')}
+            ${row.leftHtml ?? row.rightHtml ?? nothing}
           </div>
           ${when(
             allThreads.length > 0,
@@ -966,9 +1069,7 @@
           @mouseleave=${() => this.handleCellMouseLeave()}
         >
           ${this.renderCommentButton(Side.LEFT, row.leftStartLine)}
-          <div class="cell-content">
-            ${sanitizeHtmlToFragment(row.leftHtml!)}
-          </div>
+          <div class="cell-content">${row.leftHtml}</div>
           ${when(
             row.leftThreads.length > 0,
             () => html`
@@ -991,9 +1092,7 @@
           @mouseleave=${() => this.handleCellMouseLeave()}
         >
           ${this.renderCommentButton(Side.RIGHT, row.rightStartLine)}
-          <div class="cell-content">
-            ${sanitizeHtmlToFragment(row.rightHtml!)}
-          </div>
+          <div class="cell-content">${row.rightHtml}</div>
           ${when(
             row.rightThreads.length > 0,
             () => html`
@@ -1016,7 +1115,7 @@
         @mouseleave=${() => this.handleCellMouseLeave()}
       >
         ${this.renderCommentButton(Side.LEFT, row.leftStartLine)}
-        <div class="cell-content">${sanitizeHtmlToFragment(row.leftHtml!)}</div>
+        <div class="cell-content">${row.leftHtml}</div>
         ${when(
           row.leftThreads.length > 0,
           () => html`
@@ -1035,9 +1134,7 @@
         @mouseleave=${() => this.handleCellMouseLeave()}
       >
         ${this.renderCommentButton(Side.RIGHT, row.rightStartLine)}
-        <div class="cell-content">
-          ${sanitizeHtmlToFragment(row.rightHtml!)}
-        </div>
+        <div class="cell-content">${row.rightHtml}</div>
         ${when(
           row.rightThreads.length > 0,
           () => html`
@@ -1079,9 +1176,7 @@
         ${when(!isEmpty, () =>
           this.renderCommentButton(Side.LEFT, row.leftStartLine)
         )}
-        <div class="cell-content">
-          ${when(!isEmpty, () => sanitizeHtmlToFragment(row.leftHtml!))}
-        </div>
+        <div class="cell-content">${when(!isEmpty, () => row.leftHtml)}</div>
         ${when(
           row.leftThreads.length > 0,
           () => html`
@@ -1119,9 +1214,7 @@
         ${when(!isEmpty, () =>
           this.renderCommentButton(Side.RIGHT, row.rightStartLine)
         )}
-        <div class="cell-content">
-          ${when(!isEmpty, () => sanitizeHtmlToFragment(row.rightHtml!))}
-        </div>
+        <div class="cell-content">${when(!isEmpty, () => row.rightHtml)}</div>
         ${when(
           row.rightThreads.length > 0,
           () => html`
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-markdown-viewer/gr-diff-markdown-viewer_screenshot_test.ts b/polygerrit-ui/app/elements/diff/gr-diff-markdown-viewer/gr-diff-markdown-viewer_screenshot_test.ts
new file mode 100644
index 0000000..9ae8c5d
--- /dev/null
+++ b/polygerrit-ui/app/elements/diff/gr-diff-markdown-viewer/gr-diff-markdown-viewer_screenshot_test.ts
@@ -0,0 +1,169 @@
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import '../../../test/common-test-setup';
+import './gr-diff-markdown-viewer';
+import {GrDiffMarkdownViewer} from './gr-diff-markdown-viewer';
+import {fixture, html} from '@open-wc/testing';
+// Until https://github.com/modernweb-dev/web/issues/2804 is fixed
+// @ts-expect-error
+import {visualDiff} from '@web/test-runner-visual-regression';
+import {visualDiffDarkTheme} from '../../../test/test-utils';
+import {createDiff, createPatchRange} from '../../../test/test-data-generators';
+import {DiffInfo, DiffViewMode} from '../../../api/diff';
+
+suite('gr-diff-markdown-viewer screenshot tests', () => {
+  let element: GrDiffMarkdownViewer;
+
+  setup(async () => {
+    const diff: DiffInfo = {
+      ...createDiff(),
+      meta_a: {
+        name: 'SKILL.md',
+        content_type: 'text/markdown',
+        lines: 25,
+      },
+      meta_b: {
+        name: 'SKILL.md',
+        content_type: 'text/markdown',
+        lines: 25,
+      },
+      content: [
+        {
+          ab: ['## Running the Experiment', ''],
+        },
+        {
+          a: [
+            'The generalized runner script is located at [run_experiment.py](file:///path/to/workspace/tools/build_experimentation/scripts/run_experiment.py).',
+          ],
+          b: [
+            'The generalized runner script is located at [`scripts/run_experiment.py`](scripts/run_experiment.py) (relative to this `SKILL.md` directory, `<SKILL_DIR>`). It automatically resolves the workspace root from `--workspace-root`, `workspace_root` in the JSON config, `$ANDROID_BUILD_TOP`, or the nearest ancestor directory containing `.repo/`.',
+          ],
+        },
+        {
+          ab: [
+            '',
+            '### Execution',
+            '',
+            'Run the script from the build top directory, passing the path to your config file:',
+            '',
+            '```bash',
+          ],
+        },
+        {
+          a: [
+            'python3 tools/build_experimentation/scripts/run_experiment.py --config path/to/config.json',
+          ],
+          b: [
+            'python3 <SKILL_DIR>/scripts/run_experiment.py --config path/to/config.json',
+          ],
+        },
+        {
+          ab: [
+            '```',
+            '',
+            'By default, running this command will clear any existing results in `out/experiment_results.json`.',
+            '',
+            '#### Appending Results (Opt-in)',
+            'To append results to a prior run (e.g., to add more iterations to an existing experiment), use the `--append` flag:',
+            '',
+            '```bash',
+          ],
+        },
+        {
+          a: [
+            'python3 tools/build_experimentation/scripts/run_experiment.py --config path/to/config.json --append',
+          ],
+          b: [
+            'python3 <SKILL_DIR>/scripts/run_experiment.py --config path/to/config.json --append',
+          ],
+        },
+        {
+          ab: [
+            '```',
+            '',
+            'This will preserve existing results, start iteration numbering from where the last run left off, and avoid clearing preserved artifacts.',
+          ],
+        },
+      ],
+    };
+
+    element = await fixture<GrDiffMarkdownViewer>(
+      html`<gr-diff-markdown-viewer
+        style="display: block; width: 1200px;"
+        .diff=${diff}
+        .path=${'SKILL.md'}
+        .patchRange=${createPatchRange()}
+      ></gr-diff-markdown-viewer>`
+    );
+    await element.updateComplete;
+    await document.fonts?.ready;
+  });
+
+  test('side-by-side rich diff with inline code spans', async () => {
+    await visualDiff(element, 'gr-diff-markdown-viewer-inline-code');
+    await visualDiffDarkTheme(element, 'gr-diff-markdown-viewer-inline-code');
+  });
+
+  test('unified rich diff with inline code spans', async () => {
+    element.viewMode = DiffViewMode.UNIFIED;
+    await element.updateComplete;
+
+    await visualDiff(element, 'gr-diff-markdown-viewer-inline-code-unified');
+    await visualDiffDarkTheme(
+      element,
+      'gr-diff-markdown-viewer-inline-code-unified'
+    );
+  });
+
+  test('rich diff showcase with lists, tables, blockquotes, and code blocks', async () => {
+    element.diff = {
+      ...createDiff(),
+      meta_a: {name: 'README.md', content_type: 'text/markdown', lines: 30},
+      meta_b: {name: 'README.md', content_type: 'text/markdown', lines: 32},
+      content: [
+        {
+          a: [
+            '# Service Configuration Guide',
+            '',
+            '> Note: Legacy v1 endpoints are deprecated and will be removed in Q3.',
+            '',
+            '- Enable `--legacy-auth` when starting the local worker.',
+            '- Configure timeout in `config/default.yaml` (default: `30s`).',
+            '- Upload logs to [metrics-v1](https://example.com/metrics/v1).',
+            '',
+            '| Flag | Default | Description |',
+            '| --- | --- | --- |',
+            '| `--threads` | `4` | Worker thread pool size |',
+            '| `--timeout` | `30s` | Request deadline per RPC |',
+          ],
+          b: [
+            '# Service Configuration Guide',
+            '',
+            '> Note: Legacy v1 endpoints are deprecated and will be removed in Q4.',
+            '',
+            '- Enable `--oauth2-auth` when starting the local worker.',
+            '- Configure timeout in `config/production.yaml` (default: `60s`).',
+            '- Upload logs to [metrics-v2](https://example.com/metrics/v2).',
+            '- Verify health check at `/healthz` before traffic cutover.',
+            '',
+            '| Flag | Default | Description |',
+            '| --- | --- | --- |',
+            '| `--threads` | `8` | Worker thread pool size |',
+            '| `--timeout` | `60s` | Request deadline per streaming RPC |',
+          ],
+        },
+      ],
+    };
+    await element.updateComplete;
+    await document.fonts?.ready;
+
+    await visualDiff(element, 'gr-diff-markdown-viewer-delta-showcase');
+    await visualDiffDarkTheme(
+      element,
+      'gr-diff-markdown-viewer-delta-showcase'
+    );
+  });
+});
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-markdown-viewer/gr-diff-markdown-viewer_test.ts b/polygerrit-ui/app/elements/diff/gr-diff-markdown-viewer/gr-diff-markdown-viewer_test.ts
index e164913..c9e3aa2 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-markdown-viewer/gr-diff-markdown-viewer_test.ts
+++ b/polygerrit-ui/app/elements/diff/gr-diff-markdown-viewer/gr-diff-markdown-viewer_test.ts
@@ -74,8 +74,8 @@
     const rightHeader = element.shadowRoot!.querySelector(
       '.column-header.right'
     );
-    assert.equal(leftHeader!.textContent!.trim(), 'Base');
-    assert.equal(rightHeader!.textContent!.trim(), 'Revision');
+    assert.equal(leftHeader!.textContent.trim(), 'Base');
+    assert.equal(rightHeader!.textContent.trim(), 'Revision');
   });
 
   test('highlights modified and added cells correctly', async () => {
@@ -105,6 +105,66 @@
     assert.notEqual(styleRight.backgroundColor, 'transparent');
   });
 
+  test('renders inline single backtick code blocks in modified paragraphs and headings', async () => {
+    const diff: DiffInfo = {
+      ...createDiff(),
+      content: [
+        {
+          a: ['## Running `old_script.py`'],
+          b: ['## Running `new_script.py`'],
+        },
+        {ab: ['']},
+        {
+          a: [
+            'The generalized runner script is located at [run_experiment.py](file:///path/to/workspace/tools/build_experimentation/scripts/run_experiment.py).',
+          ],
+          b: [
+            'The generalized runner script is located at [`scripts/run_experiment.py`](scripts/run_experiment.py) (relative to this `SKILL.md` directory, `<SKILL_DIR>`). It automatically resolves the workspace root from `--workspace-root`, `workspace_root` in the JSON config, `$ANDROID_BUILD_TOP`, or the nearest ancestor directory containing `.repo/`.',
+          ],
+        },
+      ],
+    };
+
+    element.diff = diff;
+    await element.updateComplete;
+
+    const modifiedLefts = element.shadowRoot!.querySelectorAll<HTMLElement>(
+      '.diff-cell.modified-left'
+    );
+    assert.equal(modifiedLefts.length, 2);
+    const leftLink = modifiedLefts[1].querySelector<HTMLAnchorElement>('p a');
+    assert.isNotNull(leftLink);
+    assert.equal(leftLink.textContent, 'run_experiment.py');
+
+    const modifiedRights = element.shadowRoot!.querySelectorAll<HTMLElement>(
+      '.diff-cell.modified-right'
+    );
+    assert.equal(modifiedRights.length, 2);
+
+    const headingCode = modifiedRights[0].querySelector('h2 code');
+    assert.isNotNull(headingCode);
+    assert.equal(headingCode.textContent, 'new_script.py');
+
+    const rightLink = modifiedRights[1].querySelector<HTMLAnchorElement>('p a');
+    assert.isNotNull(rightLink);
+    assert.equal(rightLink.getAttribute('href'), 'scripts/run_experiment.py');
+    assert.isNotNull(rightLink.querySelector('code'));
+    assert.equal(rightLink.textContent, 'scripts/run_experiment.py');
+
+    const paragraphCodes = Array.from(
+      modifiedRights[1].querySelectorAll('p code')
+    ).map(el => el.textContent);
+    assert.deepEqual(paragraphCodes, [
+      'scripts/run_experiment.py',
+      'SKILL.md',
+      '<SKILL_DIR>',
+      '--workspace-root',
+      'workspace_root',
+      '$ANDROID_BUILD_TOP',
+      '.repo/',
+    ]);
+  });
+
   test('renders deleted block with red background in side-by-side mode', async () => {
     const diff: DiffInfo = {
       ...createDiff(),
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-markdown-viewer/markdown-diff-util.ts b/polygerrit-ui/app/elements/diff/gr-diff-markdown-viewer/markdown-diff-util.ts
index 2e5752f..0b45217 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-markdown-viewer/markdown-diff-util.ts
+++ b/polygerrit-ui/app/elements/diff/gr-diff-markdown-viewer/markdown-diff-util.ts
@@ -8,11 +8,23 @@
 import {CommentThread, PatchRange} from '../../../types/common';
 import {isInBaseOfPatchRange} from '../../../utils/comment-util';
 import {getDiffLines} from '../../../utils/diff-util';
-import {htmlEscape} from '../../../utils/inner-html-util';
-import {Marked, Token, Tokens} from 'marked';
+import {html, TemplateResult} from 'lit';
+import {getDefaults, Lexer, Marked, Token, Tokens} from 'marked';
 
 export type DiffBlockStatus = 'unchanged' | 'added' | 'deleted' | 'modified';
 
+export type WrapperTag =
+  | 'p'
+  | 'li'
+  | 'th'
+  | 'td'
+  | 'h1'
+  | 'h2'
+  | 'h3'
+  | 'h4'
+  | 'h5'
+  | 'h6';
+
 export type MarkdownToken = Token & {
   startLine?: number;
   endLine?: number;
@@ -22,8 +34,8 @@
   status: DiffBlockStatus;
   leftToken?: MarkdownToken;
   rightToken?: MarkdownToken;
-  leftHtml?: string;
-  rightHtml?: string;
+  leftHtml?: TemplateResult;
+  rightHtml?: TemplateResult;
   leftStartLine?: number;
   leftEndLine?: number;
   rightStartLine?: number;
@@ -40,6 +52,14 @@
   type: 'common' | 'added' | 'deleted';
 }
 
+/**
+ * Maximum normalized edit distance (0.0 = identical, 1.0 = completely disjoint)
+ * for two blocks, lines, or list items to be inferred as homologous
+ * modifications of one another (inspired by dandavison/delta's
+ * --max-line-distance, which defaults to 0.6).
+ */
+export const DEFAULT_MAX_HOMOLOGOUS_DISTANCE = 0.6;
+
 /** Reconstruct the entire file content from diff chunks for the given side. */
 export function reconstructFileContent(diff: DiffInfo, side: Side): string {
   return getDiffLines(diff, side).join('\n');
@@ -63,16 +83,293 @@
     }
     (t as MarkdownToken).startLine = startLine;
     (t as MarkdownToken).endLine = Math.max(startLine, endLine);
-    result.push(t as MarkdownToken);
+    result.push(t);
   }
   return result;
 }
 
-/** Tokenize text into words, whitespace, and punctuation for fine-grained inline diffing. */
-export function tokenizeWords(text: string): string[] {
-  return text.match(/\s+|[^\s\w]+|\w+/g) || [];
+function isMarkdownLinkToken(token: Token): token is Tokens.Link {
+  return token.type === 'link';
 }
 
+function isInlineContainerToken(
+  token: Token
+): token is (Tokens.Strong | Tokens.Em | Tokens.Del) & {tokens: Token[]} {
+  return (
+    (token.type === 'strong' || token.type === 'em' || token.type === 'del') &&
+    'tokens' in token &&
+    Array.isArray(token.tokens)
+  );
+}
+
+function getContainerDelimiters(token: Token & {tokens?: Token[]}): {
+  openDelim: string;
+  closeDelim: string;
+} {
+  const innerRaw = (token.tokens ?? []).map(t => t.raw).join('');
+  if (!innerRaw) {
+    return {openDelim: '', closeDelim: ''};
+  }
+  const symIdx = Math.floor((token.raw.length - innerRaw.length) / 2);
+  if (
+    symIdx > 0 &&
+    token.raw.slice(symIdx, symIdx + innerRaw.length) === innerRaw
+  ) {
+    return {
+      openDelim: token.raw.slice(0, symIdx),
+      closeDelim: token.raw.slice(symIdx + innerRaw.length),
+    };
+  }
+  const idx = token.raw.indexOf(innerRaw);
+  if (idx >= 0) {
+    return {
+      openDelim: token.raw.slice(0, idx),
+      closeDelim: token.raw.slice(idx + innerRaw.length),
+    };
+  }
+  return {openDelim: '', closeDelim: ''};
+}
+
+function tokenizeInlineAstTokens(tokens: Token[], result: string[]) {
+  for (const token of tokens) {
+    if (token.type === 'codespan' || isMarkdownLinkToken(token)) {
+      result.push(token.raw);
+    } else if (isInlineContainerToken(token)) {
+      const {openDelim, closeDelim} = getContainerDelimiters(token);
+      if (openDelim) result.push(openDelim);
+      tokenizeInlineAstTokens(token.tokens, result);
+      if (closeDelim) result.push(closeDelim);
+    } else {
+      const subTokens = token.raw.match(/\s+|[^\s\w]+|\w+/g);
+      if (subTokens) {
+        result.push(...subTokens);
+      }
+    }
+  }
+}
+
+function lexInlineIsolated(text: string): Token[] {
+  return Lexer.lexInline(text, getDefaults());
+}
+
+/**
+ * Tokenize text using Marked's inline AST lexer (`Lexer.lexInline`) so
+ * markdown links and inline code spans remain atomic AST units (including when
+ * nested inside container tokens such as `strong`, `em`, or `del`) while plain
+ * text nodes are split into words, whitespace, and punctuation for
+ * fine-grained inline diffing.
+ */
+export function tokenizeWords(text: string): string[] {
+  if (!text) return [];
+  const inlineTokens = lexInlineIsolated(text);
+  const result: string[] = [];
+  tokenizeInlineAstTokens(inlineTokens, result);
+  return result;
+}
+
+const SAFE_URL_SCHEMES = new Set(['http:', 'https:']);
+const INVALID_URL = 'about:invalid#zClosurez';
+const RELATIVE_URL_BASE = 'https://relative.invalid/';
+
+/**
+ * Sanitize a fenced code block language info string into a single safe
+ * `language-*` CSS class name. Prevents whitespace-delimited class injection
+ * (e.g., ```` ```lean selection-action-box diff-cell ````) from hijacking
+ * viewer styles or Shadow DOM queries.
+ */
+export function sanitizeCodeLanguage(lang?: string): string | undefined {
+  if (!lang) return undefined;
+  const firstToken = lang.trim().split(/\s+/)[0] ?? '';
+  const safe = firstToken.replace(/[^A-Za-z0-9_+#.-]/g, '').slice(0, 40);
+  return safe ? `language-${safe}` : undefined;
+}
+
+/**
+ * Sanitize a markdown link href so dangerous schemes (such as `javascript:`,
+ * `data:`, `vbscript:`, `file:`), protocol-relative/backslash host redirects
+ * (`//evil.com`, `/\evil.com`, `\/evil.com`, `\\evil.com`), control-character
+ * obfuscation (`ht\ttps://`, `\u0000//`), and HTML entity-obfuscated schemes
+ * cannot execute or hijack navigation when rendered in an `<a>` tag.
+ * Fails closed to `about:invalid#zClosurez` on malformed inputs.
+ */
+export function sanitizeMarkdownUrl(url: string): string {
+  const trimmed = url.trim();
+  if (!trimmed) return '';
+  // Reject any ASCII C0/C1 control characters or DEL anywhere in the URL.
+  // eslint-disable-next-line no-control-regex
+  if (/[\u0000-\u001f\u007f-\u009f]/.test(trimmed)) {
+    return INVALID_URL;
+  }
+  // Reject protocol-relative (`//host`), backslash-prefixed (`/\host`, `\/host`, `\\host`, `\host`).
+  if (/^(?:[/\\]{2}|[/\\]\s*[/\\]|\\)/.test(trimmed)) {
+    return INVALID_URL;
+  }
+  // Reject HTML entity references before any path/query/fragment delimiter
+  // (e.g. `&#106;avascript:`, `javascript&colon;`).
+  if (/^[^/?#]*&(?:#x?[0-9a-f]+|[a-z]+);/i.test(trimmed)) {
+    return INVALID_URL;
+  }
+
+  // Explicit scheme check (anything with `:` before `/`, `?`, or `#`).
+  if (/^[^/?#]*:/.test(trimmed)) {
+    if (!/^https?:\/\//i.test(trimmed)) {
+      return INVALID_URL;
+    }
+    try {
+      const parsed = new URL(trimmed);
+      if (!SAFE_URL_SCHEMES.has(parsed.protocol.toLowerCase())) {
+        return INVALID_URL;
+      }
+      // Canonicalize if the raw URL contains whitespace or backslashes.
+      if (/[\s\\]/.test(trimmed)) {
+        return parsed.href;
+      }
+      return trimmed;
+    } catch {
+      return INVALID_URL;
+    }
+  }
+
+  // Relative URL or same-page fragment: verify WHATWG URL parsing cannot
+  // escape the synthetic origin (catches host-redirect edge cases).
+  try {
+    const parsed = new URL(trimmed, RELATIVE_URL_BASE);
+    if (parsed.origin !== 'https://relative.invalid') {
+      return INVALID_URL;
+    }
+    return trimmed;
+  } catch {
+    return INVALID_URL;
+  }
+}
+
+function renderCodeSpanToken(token: Tokens.Codespan): TemplateResult {
+  return html`<code>${token.text}</code>`;
+}
+
+function renderInlineContainerTag(
+  type: 'strong' | 'em' | 'del',
+  content: unknown
+): TemplateResult {
+  switch (type) {
+    case 'strong':
+      return html`<strong>${content}</strong>`;
+    case 'em':
+      return html`<em>${content}</em>`;
+    case 'del':
+      return html`<del>${content}</del>`;
+  }
+}
+
+function renderHighlightTag(
+  tag: 'del' | 'ins',
+  highlightClass: string,
+  content: unknown
+): TemplateResult {
+  return tag === 'del'
+    ? html`<del class=${highlightClass}>${content}</del>`
+    : html`<ins class=${highlightClass}>${content}</ins>`;
+}
+
+function renderWrapperTag(tag: WrapperTag, content: unknown): TemplateResult {
+  switch (tag) {
+    case 'h1':
+      return html`<h1>${content}</h1>`;
+    case 'h2':
+      return html`<h2>${content}</h2>`;
+    case 'h3':
+      return html`<h3>${content}</h3>`;
+    case 'h4':
+      return html`<h4>${content}</h4>`;
+    case 'h5':
+      return html`<h5>${content}</h5>`;
+    case 'h6':
+      return html`<h6>${content}</h6>`;
+    case 'li':
+      return html`<li>${content}</li>`;
+    case 'th':
+      return html`<th>${content}</th>`;
+    case 'td':
+      return html`<td>${content}</td>`;
+    case 'p':
+      return html`<p>${content}</p>`;
+  }
+}
+
+function renderInlineAstTokens(
+  tokens: Token[],
+  options: {includeLinks: boolean}
+): TemplateResult {
+  const parts: Array<TemplateResult | string> = [];
+  for (const token of tokens) {
+    if (token.type === 'codespan') {
+      parts.push(renderCodeSpanToken(token as Tokens.Codespan));
+    } else if (options.includeLinks && isMarkdownLinkToken(token)) {
+      const labelContent =
+        token.tokens && token.tokens.length > 0
+          ? renderInlineAstTokens(token.tokens, {
+              includeLinks: false,
+            })
+          : token.text || token.href;
+      const safeHref = sanitizeMarkdownUrl(token.href);
+      const isExternal = /^https?:\/\//i.test(safeHref);
+      parts.push(
+        isExternal
+          ? html`<a href=${safeHref} target="_blank" rel="noopener noreferrer"
+              >${labelContent}</a
+            >`
+          : html`<a href=${safeHref} rel="noopener noreferrer"
+              >${labelContent}</a
+            >`
+      );
+    } else if (isInlineContainerToken(token)) {
+      parts.push(
+        renderInlineContainerTag(
+          token.type,
+          renderInlineAstTokens(token.tokens, options)
+        )
+      );
+    } else if (token.type === 'br') {
+      parts.push(html`<br />`);
+    } else if (token.type === 'escape') {
+      parts.push((token as Tokens.Escape).text);
+    } else if (
+      'tokens' in token &&
+      token.tokens &&
+      token.type !== 'image' &&
+      !isMarkdownLinkToken(token)
+    ) {
+      parts.push(renderInlineAstTokens(token.tokens, options));
+    } else {
+      parts.push(token.raw);
+    }
+  }
+  return html`${parts}`;
+}
+
+/**
+ * Render text with inline backtick code spans (`...` or ``...``) converted to
+ * <code> Lit template elements using Marked's inline AST lexer.
+ */
+export function renderInlineCodeSpans(text: string): TemplateResult {
+  if (!text) return html``;
+  return renderInlineAstTokens(lexInlineIsolated(text), {includeLinks: false});
+}
+
+/**
+ * Render text with markdown links ([label](url)) converted to <a> Lit template
+ * elements and inline backtick code spans converted to <code> Lit template
+ * elements using Marked's inline AST lexer.
+ */
+export function renderInlineMarkdown(text: string): TemplateResult {
+  if (!text) return html``;
+  return renderInlineAstTokens(lexInlineIsolated(text), {includeLinks: true});
+}
+
+const MAX_SEQUENCE_DIFF_CELLS = 250_000;
+const MAX_EDIT_DISTANCE_CELLS = 40_000;
+const MAX_ALIGN_ITEMS_CELLS = 10_000;
+
 /** Compute LCS-based diff between two arrays of strings (e.g. words or lines). */
 export function computeSequenceDiff(
   seqA: string[],
@@ -80,122 +377,1708 @@
 ): InlineDiffSegment[] {
   const m = seqA.length;
   const n = seqB.length;
-  // DP table for LCS lengths
-  const dp: number[][] = Array.from({length: m + 1}, () =>
-    new Array(n + 1).fill(0)
-  );
+  if (m === 0 && n === 0) return [];
 
-  for (let i = 0; i < m; i++) {
-    for (let j = 0; j < n; j++) {
-      if (seqA[i] === seqB[j]) {
-        dp[i + 1][j + 1] = dp[i][j] + 1;
-      } else {
-        dp[i + 1][j + 1] = Math.max(dp[i + 1][j], dp[i][j + 1]);
+  // Trim exact common prefix and suffix to keep near-identical large inputs O(N).
+  let prefixLen = 0;
+  while (
+    prefixLen < m &&
+    prefixLen < n &&
+    seqA[prefixLen] === seqB[prefixLen]
+  ) {
+    prefixLen++;
+  }
+  let suffixLen = 0;
+  while (
+    suffixLen < m - prefixLen &&
+    suffixLen < n - prefixLen &&
+    seqA[m - 1 - suffixLen] === seqB[n - 1 - suffixLen]
+  ) {
+    suffixLen++;
+  }
+
+  const segments: InlineDiffSegment[] = [];
+  for (let p = 0; p < prefixLen; p++) {
+    segments.push({text: seqA[p], type: 'common'});
+  }
+
+  const midLenA = m - prefixLen - suffixLen;
+  const midLenB = n - prefixLen - suffixLen;
+
+  if (midLenA === 0) {
+    for (let j = 0; j < midLenB; j++) {
+      segments.push({text: seqB[prefixLen + j], type: 'added'});
+    }
+  } else if (midLenB === 0) {
+    for (let i = 0; i < midLenA; i++) {
+      segments.push({text: seqA[prefixLen + i], type: 'deleted'});
+    }
+  } else if (midLenA * midLenB > MAX_SEQUENCE_DIFF_CELLS) {
+    // Bounded linear fallback for adversarial/huge unaligned sequences.
+    for (let i = 0; i < midLenA; i++) {
+      segments.push({text: seqA[prefixLen + i], type: 'deleted'});
+    }
+    for (let j = 0; j < midLenB; j++) {
+      segments.push({text: seqB[prefixLen + j], type: 'added'});
+    }
+  } else {
+    const cols = midLenB + 1;
+    const dp = new Int32Array((midLenA + 1) * cols);
+
+    for (let i = 0; i < midLenA; i++) {
+      const aVal = seqA[prefixLen + i];
+      const rowOffset = i * cols;
+      const nextRowOffset = (i + 1) * cols;
+      for (let j = 0; j < midLenB; j++) {
+        if (aVal === seqB[prefixLen + j]) {
+          dp[nextRowOffset + j + 1] = dp[rowOffset + j] + 1;
+        } else {
+          const left = dp[nextRowOffset + j];
+          const up = dp[rowOffset + j + 1];
+          dp[nextRowOffset + j + 1] = left >= up ? left : up;
+        }
       }
     }
+
+    const midSegments: InlineDiffSegment[] = [];
+    let i = midLenA;
+    let j = midLenB;
+    while (i > 0 || j > 0) {
+      if (
+        i > 0 &&
+        j > 0 &&
+        seqA[prefixLen + i - 1] === seqB[prefixLen + j - 1]
+      ) {
+        midSegments.push({text: seqA[prefixLen + i - 1], type: 'common'});
+        i--;
+        j--;
+      } else if (
+        j > 0 &&
+        (i === 0 || dp[i * cols + (j - 1)] >= dp[(i - 1) * cols + j])
+      ) {
+        midSegments.push({text: seqB[prefixLen + j - 1], type: 'added'});
+        j--;
+      } else {
+        midSegments.push({text: seqA[prefixLen + i - 1], type: 'deleted'});
+        i--;
+      }
+    }
+    for (let k = midSegments.length - 1; k >= 0; k--) {
+      segments.push(midSegments[k]);
+    }
   }
 
-  // Backtrack to build diff segments
-  const segments: InlineDiffSegment[] = [];
-  let i = m;
-  let j = n;
-
-  while (i > 0 || j > 0) {
-    if (i > 0 && j > 0 && seqA[i - 1] === seqB[j - 1]) {
-      segments.unshift({text: seqA[i - 1], type: 'common'});
-      i--;
-      j--;
-    } else if (j > 0 && (i === 0 || dp[i][j - 1] >= dp[i - 1][j])) {
-      segments.unshift({text: seqB[j - 1], type: 'added'});
-      j--;
-    } else if (i > 0 && (j === 0 || dp[i][j - 1] < dp[i - 1][j])) {
-      segments.unshift({text: seqA[i - 1], type: 'deleted'});
-      i--;
-    }
+  for (let s = 0; s < suffixLen; s++) {
+    segments.push({text: seqA[m - suffixLen + s], type: 'common'});
   }
 
   return segments;
 }
 
-/** Render a single marked token to standard HTML using marked. */
-export function renderTokenToHtml(token?: Token): string {
-  if (!token) return '';
-  const marked = new Marked();
-  return marked.parse(token.raw, {async: false}) || '';
+/**
+ * Tokenize a single line of code into placeholders (<...>), CLI flags,
+ * identifiers, whitespace, and punctuation for within-line code diffing.
+ */
+export function tokenizeCodeWords(line: string): string[] {
+  const codeTokenRegex =
+    /<[A-Za-z0-9_.-]+>|--?[A-Za-z0-9_.-]+|\w+|\s+|[^\s\w]/g;
+  return line.match(codeTokenRegex) || [];
+}
+
+const DEFAULT_CONTENT_TOKEN_RE = /[\p{L}\p{N}_]/u;
+
+function defaultIsContentToken(tok: string): boolean {
+  return DEFAULT_CONTENT_TOKEN_RE.test(tok);
+}
+
+/**
+ * Compute the normalized token edit distance in [0.0, 1.0] between two token
+ * sequences, ignoring pure-whitespace and pure-punctuation tokens so spaces and
+ * punctuation do not artificially inflate similarity between unrelated
+ * sentences.
+ */
+export function computeNormalizedEditDistance(
+  seqA: string[],
+  seqB: string[],
+  isContentToken: (tok: string) => boolean = defaultIsContentToken
+): number {
+  const nonWsA = seqA.filter(t => !/^\s+$/.test(t));
+  const nonWsB = seqB.filter(t => !/^\s+$/.test(t));
+  if (nonWsA.length === 0 && nonWsB.length === 0) return 0;
+  if (nonWsA.length === 0 || nonWsB.length === 0) return 1;
+
+  const wordsA = nonWsA.filter(isContentToken);
+  const wordsB = nonWsB.filter(isContentToken);
+  const contentA = wordsA.length > 0 || wordsB.length > 0 ? wordsA : nonWsA;
+  const contentB = wordsA.length > 0 || wordsB.length > 0 ? wordsB : nonWsB;
+  if (contentA.length === 0 || contentB.length === 0) return 1;
+
+  let commonCount = 0;
+  if (contentA.length * contentB.length > MAX_EDIT_DISTANCE_CELLS) {
+    // Linear O(m + n) multiset overlap approximation for very large token lists.
+    const countsA = new Map<string, number>();
+    for (const tok of contentA) {
+      countsA.set(tok, (countsA.get(tok) ?? 0) + 1);
+    }
+    for (const tok of contentB) {
+      const rem = countsA.get(tok) ?? 0;
+      if (rem > 0) {
+        commonCount++;
+        countsA.set(tok, rem - 1);
+      }
+    }
+  } else {
+    const diff = computeSequenceDiff(contentA, contentB);
+    for (const seg of diff) {
+      if (seg.type === 'common') {
+        commonCount++;
+      }
+    }
+  }
+  const minLen = Math.min(contentA.length, contentB.length);
+  const maxLen = Math.max(contentA.length, contentB.length);
+  const diceDistance =
+    1 - (2 * commonCount) / (contentA.length + contentB.length);
+  const overlapDistance = 1 - commonCount / minLen;
+  // If one sequence is an extension of the other (high overlap with the shorter
+  // sequence, bounded length ratio, and at least 3 shared content tokens),
+  // treat them as homologous so shared prefixes/clauses remain unhighlighted.
+  if (commonCount >= 3 && maxLen <= minLen * 5 && overlapDistance <= 0.4) {
+    return Math.min(diceDistance, overlapDistance);
+  }
+  return diceDistance;
+}
+
+/**
+ * Coalesce fragmented inline diff segments (inspired by dandavison/delta's
+ * within-line edit coalescing):
+ * 1. Merge consecutive segments of the same type.
+ * 2. Absorb pure-whitespace 'common' tokens sandwiched between edit segments
+ *    so multi-word edits form a single continuous highlight span.
+ * 3. Absorb isolated non-word punctuation at the boundary of a multi-word
+ *    clause edit so trailing periods do not detach from rewritten sentences.
+ */
+export function coalesceInlineDiffSegments(
+  segments: InlineDiffSegment[]
+): InlineDiffSegment[] {
+  const mergeAdjacent = (segs: InlineDiffSegment[]): InlineDiffSegment[] => {
+    const merged: InlineDiffSegment[] = [];
+    for (const seg of segs) {
+      if (!seg.text) continue;
+      const last = merged[merged.length - 1];
+      if (last && last.type === seg.type) {
+        last.text += seg.text;
+      } else {
+        merged.push({...seg});
+      }
+    }
+    return merged;
+  };
+
+  // Group segments into alternating 'common' and edit ('deleted' + 'added') runs.
+  type Run =
+    | {kind: 'common'; text: string}
+    | {kind: 'edit'; delText: string; addText: string};
+
+  const buildRuns = (segs: InlineDiffSegment[]): Run[] => {
+    const runs: Run[] = [];
+    for (const seg of mergeAdjacent(segs)) {
+      if (seg.type === 'common') {
+        const last = runs[runs.length - 1];
+        if (last && last.kind === 'common') {
+          last.text += seg.text;
+        } else {
+          runs.push({kind: 'common', text: seg.text});
+        }
+      } else {
+        let last = runs[runs.length - 1];
+        if (!last || last.kind !== 'edit') {
+          last = {kind: 'edit', delText: '', addText: ''};
+          runs.push(last);
+        }
+        if (seg.type === 'deleted') {
+          last.delText += seg.text;
+        } else {
+          last.addText += seg.text;
+        }
+      }
+    }
+    return runs;
+  };
+
+  const runs = buildRuns(segments);
+
+  // Coalesce pure-whitespace common runs sandwiched between two edit runs
+  // in a single linear O(R) stack pass when both edits have deleted text or
+  // both edits have added text.
+  const coalescedRuns: Run[] = [];
+  for (const run of runs) {
+    if (coalescedRuns.length >= 2 && run.kind === 'edit') {
+      const curr = coalescedRuns[coalescedRuns.length - 1];
+      const prev = coalescedRuns[coalescedRuns.length - 2];
+      if (
+        curr.kind === 'common' &&
+        /^\s+$/.test(curr.text) &&
+        prev.kind === 'edit'
+      ) {
+        const bothHaveDel = prev.delText.length > 0 && run.delText.length > 0;
+        const bothHaveAdd = prev.addText.length > 0 && run.addText.length > 0;
+        const prevIsPair = prev.delText.length > 0 && prev.addText.length > 0;
+        const nextIsPair = run.delText.length > 0 && run.addText.length > 0;
+        if (
+          (bothHaveDel && !prev.addText && !run.addText) ||
+          (bothHaveAdd && !prev.delText && !run.delText) ||
+          (prevIsPair && nextIsPair)
+        ) {
+          if (prev.delText || run.delText) {
+            prev.delText += curr.text + run.delText;
+          }
+          if (prev.addText || run.addText) {
+            prev.addText += curr.text + run.addText;
+          }
+          coalescedRuns.pop();
+          continue;
+        }
+      }
+    }
+    coalescedRuns.push(run);
+  }
+
+  // Absorb a trailing punctuation-only common run (e.g. a lone '.') when it
+  // immediately follows a multi-word replacement edit that itself contains
+  // sentence punctuation or whitespace.
+  if (coalescedRuns.length >= 2) {
+    const last = coalescedRuns[coalescedRuns.length - 1];
+    const prev = coalescedRuns[coalescedRuns.length - 2];
+    if (
+      last.kind === 'common' &&
+      /^[.,;!?]+$/.test(last.text) &&
+      prev.kind === 'edit' &&
+      prev.delText.length > 0 &&
+      prev.addText.length > 0 &&
+      (/\s/.test(prev.delText) || /\s/.test(prev.addText)) &&
+      prev.delText.length + prev.addText.length > 20
+    ) {
+      prev.delText += last.text;
+      prev.addText += last.text;
+      coalescedRuns.pop();
+    }
+  }
+
+  const out: InlineDiffSegment[] = [];
+  for (const r of coalescedRuns) {
+    if (r.kind === 'common') {
+      out.push({text: r.text, type: 'common'});
+    } else {
+      if (r.delText) out.push({text: r.delText, type: 'deleted'});
+      if (r.addText) out.push({text: r.addText, type: 'added'});
+    }
+  }
+  return mergeAdjacent(out);
+}
+
+/**
+ * Patience-style exact-match anchor finder for large sequences where O(m * n)
+ * DP exceeds the cell budget.
+ *
+ * 1. Peels matching prefixes and suffixes in each interval.
+ * 2. Anchors on keys unique within the interval using Patience LIS
+ *    (O(u log u)), preventing a deleted repeated line (e.g. `""`, `end`,
+ *    `simp`) from greedily jumping the cursor to the bottom of the file.
+ * 3. For residual sub-intervals with zero unique keys, runs small exact LCS DP
+ *    within budget or falls back to a monotonic per-key index cursor
+ *    (amortized O(gapA + gapB)) with no O(m * n) rescans.
+ */
+export function computeLinearExactAnchors(
+  keysA: string[],
+  keysB: string[]
+): Array<{aIdx: number; bIdx: number}> {
+  const m = keysA.length;
+  const n = keysB.length;
+  if (m === 0 || n === 0) return [];
+
+  const anchors: Array<{aIdx: number; bIdx: number}> = [];
+
+  const findUniqueLIS = (
+    aStart: number,
+    aEnd: number,
+    bStart: number,
+    bEnd: number
+  ): Array<{aIdx: number; bIdx: number}> => {
+    const countA = new Map<string, number>();
+    for (let i = aStart; i < aEnd; i++) {
+      const k = keysA[i];
+      countA.set(k, (countA.get(k) ?? 0) + 1);
+    }
+    const posB = new Map<string, number>();
+    for (let j = bStart; j < bEnd; j++) {
+      const k = keysB[j];
+      if (countA.get(k) !== 1) continue;
+      if (posB.has(k)) {
+        posB.set(k, -1);
+      } else {
+        posB.set(k, j);
+      }
+    }
+    const pairs: Array<{aIdx: number; bIdx: number}> = [];
+    for (let i = aStart; i < aEnd; i++) {
+      const bIdx = posB.get(keysA[i]);
+      if (bIdx !== undefined && bIdx >= 0) {
+        pairs.push({aIdx: i, bIdx});
+      }
+    }
+    if (pairs.length <= 1) return pairs;
+
+    const tailPairIdx: number[] = [];
+    const prevPairIdx = new Int32Array(pairs.length).fill(-1);
+    for (let idx = 0; idx < pairs.length; idx++) {
+      const bVal = pairs[idx].bIdx;
+      let lo = 0;
+      let hi = tailPairIdx.length;
+      while (lo < hi) {
+        const mid = (lo + hi) >>> 1;
+        if (pairs[tailPairIdx[mid]].bIdx < bVal) {
+          lo = mid + 1;
+        } else {
+          hi = mid;
+        }
+      }
+      if (lo > 0) prevPairIdx[idx] = tailPairIdx[lo - 1];
+      tailPairIdx[lo] = idx;
+    }
+
+    const lis: Array<{aIdx: number; bIdx: number}> = [];
+    let cur = tailPairIdx[tailPairIdx.length - 1];
+    while (cur >= 0) {
+      lis.push(pairs[cur]);
+      cur = prevPairIdx[cur];
+    }
+    lis.reverse();
+    return lis;
+  };
+
+  type StackEntry =
+    | {kind: 'emit'; pairs: Array<{aIdx: number; bIdx: number}>}
+    | {
+        kind: 'gap';
+        aStart: number;
+        aEnd: number;
+        bStart: number;
+        bEnd: number;
+        depth: number;
+      };
+
+  const stack: StackEntry[] = [
+    {kind: 'gap', aStart: 0, aEnd: m, bStart: 0, bEnd: n, depth: 0},
+  ];
+  const MAX_PATIENCE_DEPTH = 32;
+
+  while (stack.length > 0) {
+    const entry = stack.pop()!;
+    if (entry.kind === 'emit') {
+      for (const p of entry.pairs) anchors.push(p);
+      continue;
+    }
+
+    let {aStart, aEnd, bStart, bEnd} = entry;
+    const {depth} = entry;
+
+    while (aStart < aEnd && bStart < bEnd && keysA[aStart] === keysB[bStart]) {
+      anchors.push({aIdx: aStart, bIdx: bStart});
+      aStart++;
+      bStart++;
+    }
+
+    const suffixPairs: Array<{aIdx: number; bIdx: number}> = [];
+    while (
+      aEnd > aStart &&
+      bEnd > bStart &&
+      keysA[aEnd - 1] === keysB[bEnd - 1]
+    ) {
+      aEnd--;
+      bEnd--;
+      suffixPairs.push({aIdx: aEnd, bIdx: bEnd});
+    }
+    if (suffixPairs.length > 0) {
+      suffixPairs.reverse();
+      stack.push({kind: 'emit', pairs: suffixPairs});
+    }
+
+    const gapA = aEnd - aStart;
+    const gapB = bEnd - bStart;
+    if (gapA <= 0 || gapB <= 0) continue;
+
+    const uniqueLis =
+      depth < MAX_PATIENCE_DEPTH
+        ? findUniqueLIS(aStart, aEnd, bStart, bEnd)
+        : [];
+    if (uniqueLis.length > 0) {
+      const subEntries: StackEntry[] = [];
+      let curA = aStart;
+      let curB = bStart;
+      for (const u of uniqueLis) {
+        if (curA < u.aIdx && curB < u.bIdx) {
+          subEntries.push({
+            kind: 'gap',
+            aStart: curA,
+            aEnd: u.aIdx,
+            bStart: curB,
+            bEnd: u.bIdx,
+            depth: depth + 1,
+          });
+        }
+        subEntries.push({kind: 'emit', pairs: [u]});
+        curA = u.aIdx + 1;
+        curB = u.bIdx + 1;
+      }
+      if (curA < aEnd && curB < bEnd) {
+        subEntries.push({
+          kind: 'gap',
+          aStart: curA,
+          aEnd,
+          bStart: curB,
+          bEnd,
+          depth: depth + 1,
+        });
+      }
+      for (let idx = subEntries.length - 1; idx >= 0; idx--) {
+        stack.push(subEntries[idx]);
+      }
+      continue;
+    }
+
+    if (gapA * gapB <= MAX_ALIGN_ITEMS_CELLS) {
+      const cols = gapB + 1;
+      const dp = new Int32Array((gapA + 1) * cols);
+      for (let i = 0; i < gapA; i++) {
+        const keyA = keysA[aStart + i];
+        const rowOff = i * cols;
+        const nextRowOff = (i + 1) * cols;
+        for (let j = 0; j < gapB; j++) {
+          if (keyA === keysB[bStart + j]) {
+            dp[nextRowOff + j + 1] = dp[rowOff + j] + 1;
+          } else {
+            const left = dp[nextRowOff + j];
+            const up = dp[rowOff + j + 1];
+            dp[nextRowOff + j + 1] = left >= up ? left : up;
+          }
+        }
+      }
+      const gapAnchors: Array<{aIdx: number; bIdx: number}> = [];
+      let i = gapA;
+      let j = gapB;
+      while (i > 0 && j > 0) {
+        if (keysA[aStart + i - 1] === keysB[bStart + j - 1]) {
+          gapAnchors.push({aIdx: aStart + i - 1, bIdx: bStart + j - 1});
+          i--;
+          j--;
+        } else if (dp[i * cols + (j - 1)] >= dp[(i - 1) * cols + j]) {
+          j--;
+        } else {
+          i--;
+        }
+      }
+      gapAnchors.reverse();
+      for (const p of gapAnchors) anchors.push(p);
+      continue;
+    }
+
+    // Monotonic per-key index cursor fallback for huge residual gaps with zero
+    // unique keys (strictly O(gapA + gapB) amortized).
+    const positionsByKey = new Map<string, number[]>();
+    for (let j = bStart; j < bEnd; j++) {
+      const k = keysB[j];
+      let list = positionsByKey.get(k);
+      if (!list) {
+        list = [];
+        positionsByKey.set(k, list);
+      }
+      list.push(j);
+    }
+    const cursorByKey = new Map<string, number>();
+    let bCursor = bStart;
+    for (let i = aStart; i < aEnd; i++) {
+      const k = keysA[i];
+      const list = positionsByKey.get(k);
+      if (!list) continue;
+      let posIdx = cursorByKey.get(k) ?? 0;
+      while (posIdx < list.length && list[posIdx] < bCursor) {
+        posIdx++;
+      }
+      if (posIdx < list.length) {
+        const matchB = list[posIdx];
+        anchors.push({aIdx: i, bIdx: matchB});
+        bCursor = matchB + 1;
+        cursorByKey.set(k, posIdx + 1);
+      } else {
+        cursorByKey.set(k, posIdx);
+      }
+    }
+  }
+
+  return anchors;
+}
+
+type AlignedHomologousItem =
+  | {
+      type: 'unchanged';
+      textA: string;
+      textB: string;
+      aIdx: number;
+      bIdx: number;
+    }
+  | {type: 'modified'; textA: string; textB: string; aIdx: number; bIdx: number}
+  | {type: 'deleted'; textA: string; aIdx: number}
+  | {type: 'added'; textB: string; bIdx: number};
+
+/**
+ * Align a contiguous sub-interval `[offsetA, offsetA + lenA)` x `[offsetB, offsetB + lenB)`
+ * via fuzzy normalized edit distance DP, emitting paired `modified` items when
+ * `distance <= maxDistance`.
+ */
+function alignHomologousGapWithFuzzyDp(
+  itemsA: string[],
+  itemsB: string[],
+  offsetA: number,
+  lenA: number,
+  offsetB: number,
+  lenB: number,
+  tokenizer: (text: string) => string[],
+  maxDistance: number,
+  isContentToken: (tok: string) => boolean,
+  result: AlignedHomologousItem[]
+) {
+  const sliceA = itemsA.slice(offsetA, offsetA + lenA);
+  const sliceB = itemsB.slice(offsetB, offsetB + lenB);
+  const tokensCacheA = sliceA.map(tokenizer);
+  const tokensCacheB = sliceB.map(tokenizer);
+
+  // Score matrix: pairing (i, j) yields a positive score of (1 - distance)
+  // when distance <= maxDistance.
+  const pairScore: number[][] = Array.from({length: lenA}, (_, i) =>
+    Array.from({length: lenB}, (__, j) => {
+      if (sliceA[i] === sliceB[j]) return 2; // Strongly prefer exact matches
+      const dist = computeNormalizedEditDistance(
+        tokensCacheA[i],
+        tokensCacheB[j],
+        isContentToken
+      );
+      return dist <= maxDistance ? 1 - dist : -1;
+    })
+  );
+
+  const dp: number[][] = Array.from({length: lenA + 1}, () =>
+    new Array(lenB + 1).fill(0)
+  );
+
+  for (let i = 0; i < lenA; i++) {
+    for (let j = 0; j < lenB; j++) {
+      let best = Math.max(dp[i][j + 1], dp[i + 1][j]);
+      if (pairScore[i][j] >= 0) {
+        best = Math.max(best, dp[i][j] + pairScore[i][j]);
+      }
+      dp[i + 1][j + 1] = best;
+    }
+  }
+
+  const gapResult: AlignedHomologousItem[] = [];
+  let i = lenA;
+  let j = lenB;
+  while (i > 0 || j > 0) {
+    if (
+      i > 0 &&
+      j > 0 &&
+      pairScore[i - 1][j - 1] >= 0 &&
+      Math.abs(dp[i][j] - (dp[i - 1][j - 1] + pairScore[i - 1][j - 1])) < 1e-9
+    ) {
+      const aIdx = offsetA + i - 1;
+      const bIdx = offsetB + j - 1;
+      gapResult.push({
+        type: itemsA[aIdx] === itemsB[bIdx] ? 'unchanged' : 'modified',
+        textA: itemsA[aIdx],
+        textB: itemsB[bIdx],
+        aIdx,
+        bIdx,
+      });
+      i--;
+      j--;
+    } else if (j > 0 && (i === 0 || dp[i][j - 1] >= dp[i - 1][j])) {
+      const bIdx = offsetB + j - 1;
+      gapResult.push({type: 'added', textB: itemsB[bIdx], bIdx});
+      j--;
+    } else {
+      const aIdx = offsetA + i - 1;
+      gapResult.push({type: 'deleted', textA: itemsA[aIdx], aIdx});
+      i--;
+    }
+  }
+  for (let k = gapResult.length - 1; k >= 0; k--) {
+    result.push(gapResult[k]);
+  }
+}
+
+/**
+ * Align two lists of items using dynamic programming over normalized edit
+ * distance, pairing items only when their distance is <= maxDistance.
+ */
+export function alignHomologousItems(
+  itemsA: string[],
+  itemsB: string[],
+  tokenizer: (text: string) => string[] = tokenizeWords,
+  maxDistance = DEFAULT_MAX_HOMOLOGOUS_DISTANCE,
+  isContentToken: (tok: string) => boolean = defaultIsContentToken
+): AlignedHomologousItem[] {
+  const m = itemsA.length;
+  const n = itemsB.length;
+  if (m === 0 && n === 0) return [];
+
+  // Trim exact common prefix and suffix first.
+  let prefixLen = 0;
+  while (
+    prefixLen < m &&
+    prefixLen < n &&
+    itemsA[prefixLen] === itemsB[prefixLen]
+  ) {
+    prefixLen++;
+  }
+  let suffixLen = 0;
+  while (
+    suffixLen < m - prefixLen &&
+    suffixLen < n - prefixLen &&
+    itemsA[m - 1 - suffixLen] === itemsB[n - 1 - suffixLen]
+  ) {
+    suffixLen++;
+  }
+
+  const result: AlignedHomologousItem[] = [];
+  for (let p = 0; p < prefixLen; p++) {
+    result.push({
+      type: 'unchanged',
+      textA: itemsA[p],
+      textB: itemsB[p],
+      aIdx: p,
+      bIdx: p,
+    });
+  }
+
+  const mm = m - prefixLen - suffixLen;
+  const nn = n - prefixLen - suffixLen;
+
+  if (mm === 0) {
+    for (let j = 0; j < nn; j++) {
+      result.push({
+        type: 'added',
+        textB: itemsB[prefixLen + j],
+        bIdx: prefixLen + j,
+      });
+    }
+  } else if (nn === 0) {
+    for (let i = 0; i < mm; i++) {
+      result.push({
+        type: 'deleted',
+        textA: itemsA[prefixLen + i],
+        aIdx: prefixLen + i,
+      });
+    }
+  } else if (mm * nn > MAX_ALIGN_ITEMS_CELLS) {
+    // Patience-style exact-anchor decomposition with a shared fuzzy-DP cell
+    // budget across residual gaps so edits near both ends of >100-line blocks
+    // keep word-level inline diffs while staying bounded in worst-case cost.
+    const midA = itemsA.slice(prefixLen, m - suffixLen);
+    const midB = itemsB.slice(prefixLen, n - suffixLen);
+    const anchors = computeLinearExactAnchors(midA, midB);
+    let remainingCells = MAX_ALIGN_ITEMS_CELLS;
+
+    const processGap = (
+      gapAStart: number,
+      gapAEnd: number,
+      gapBStart: number,
+      gapBEnd: number
+    ) => {
+      const gapA = gapAEnd - gapAStart;
+      const gapB = gapBEnd - gapBStart;
+      if (gapA === 0 && gapB === 0) return;
+      if (gapA === 0) {
+        for (let j = gapBStart; j < gapBEnd; j++) {
+          result.push({
+            type: 'added',
+            textB: itemsB[prefixLen + j],
+            bIdx: prefixLen + j,
+          });
+        }
+        return;
+      }
+      if (gapB === 0) {
+        for (let i = gapAStart; i < gapAEnd; i++) {
+          result.push({
+            type: 'deleted',
+            textA: itemsA[prefixLen + i],
+            aIdx: prefixLen + i,
+          });
+        }
+        return;
+      }
+      const cells = gapA * gapB;
+      if (cells <= remainingCells) {
+        remainingCells -= cells;
+        alignHomologousGapWithFuzzyDp(
+          itemsA,
+          itemsB,
+          prefixLen + gapAStart,
+          gapA,
+          prefixLen + gapBStart,
+          gapB,
+          tokenizer,
+          maxDistance,
+          isContentToken,
+          result
+        );
+        return;
+      }
+      for (let i = gapAStart; i < gapAEnd; i++) {
+        result.push({
+          type: 'deleted',
+          textA: itemsA[prefixLen + i],
+          aIdx: prefixLen + i,
+        });
+      }
+      for (let j = gapBStart; j < gapBEnd; j++) {
+        result.push({
+          type: 'added',
+          textB: itemsB[prefixLen + j],
+          bIdx: prefixLen + j,
+        });
+      }
+    };
+
+    let aCursor = 0;
+    let bCursor = 0;
+    for (const anchor of anchors) {
+      processGap(aCursor, anchor.aIdx, bCursor, anchor.bIdx);
+      result.push({
+        type: 'unchanged',
+        textA: itemsA[prefixLen + anchor.aIdx],
+        textB: itemsB[prefixLen + anchor.bIdx],
+        aIdx: prefixLen + anchor.aIdx,
+        bIdx: prefixLen + anchor.bIdx,
+      });
+      aCursor = anchor.aIdx + 1;
+      bCursor = anchor.bIdx + 1;
+    }
+    processGap(aCursor, mm, bCursor, nn);
+  } else {
+    alignHomologousGapWithFuzzyDp(
+      itemsA,
+      itemsB,
+      prefixLen,
+      mm,
+      prefixLen,
+      nn,
+      tokenizer,
+      maxDistance,
+      isContentToken,
+      result
+    );
+  }
+
+  for (let s = 0; s < suffixLen; s++) {
+    const aIdx = m - suffixLen + s;
+    const bIdx = n - suffixLen + s;
+    result.push({
+      type: 'unchanged',
+      textA: itemsA[aIdx],
+      textB: itemsB[bIdx],
+      aIdx,
+      bIdx,
+    });
+  }
+
+  return result;
+}
+
+function renderListContainer(
+  listTok: Tokens.List,
+  items: TemplateResult[]
+): TemplateResult {
+  if (!listTok.ordered) {
+    return html`<ul>
+      ${items}
+    </ul>`;
+  }
+  return typeof listTok.start === 'number' && listTok.start !== 1
+    ? html`<ol start=${listTok.start}>
+        ${items}
+      </ol>`
+    : html`<ol>
+        ${items}
+      </ol>`;
+}
+
+/** Render a single marked block token to a Lit TemplateResult. */
+export function renderTokenToHtml(token?: Token): TemplateResult {
+  if (!token) return html``;
+  switch (token.type) {
+    case 'heading': {
+      const heading = token as Tokens.Heading;
+      const depth = Math.min(Math.max(heading.depth, 1), 6);
+      const tag = `h${depth}` as WrapperTag;
+      const content = heading.tokens
+        ? renderInlineAstTokens(heading.tokens, {includeLinks: true})
+        : renderInlineMarkdown(heading.text);
+      return renderWrapperTag(tag, content);
+    }
+    case 'paragraph': {
+      const para = token as Tokens.Paragraph;
+      const content = para.tokens
+        ? renderInlineAstTokens(para.tokens, {includeLinks: true})
+        : renderInlineMarkdown(para.text);
+      return html`<p>${content}</p>`;
+    }
+    case 'text': {
+      const textTok = token as Tokens.Text;
+      return textTok.tokens
+        ? renderInlineAstTokens(textTok.tokens, {includeLinks: true})
+        : renderInlineMarkdown(textTok.text);
+    }
+    case 'code': {
+      const codeTok = token as Tokens.Code;
+      const langClass = sanitizeCodeLanguage(codeTok.lang);
+      return langClass
+        ? html`<pre><code class=${langClass}>${codeTok.text}</code></pre>`
+        : html`<pre><code>${codeTok.text}</code></pre>`;
+    }
+    case 'blockquote': {
+      const bq = token as Tokens.Blockquote;
+      const children = bq.tokens
+        ? bq.tokens.map(t => renderTokenToHtml(t))
+        : html`<p>${renderInlineMarkdown(bq.text.trim())}</p>`;
+      return html`<blockquote>${children}</blockquote>`;
+    }
+    case 'list': {
+      const listTok = token as Tokens.List;
+      const items = listTok.items.map(item => {
+        const itemContent = item.tokens
+          ? item.tokens.map(t =>
+              t.type === 'text'
+                ? (t as Tokens.Text).tokens
+                  ? renderInlineAstTokens((t as Tokens.Text).tokens!, {
+                      includeLinks: true,
+                    })
+                  : renderInlineMarkdown((t as Tokens.Text).text)
+                : renderTokenToHtml(t)
+            )
+          : renderInlineMarkdown(item.text);
+        return html`<li>${itemContent}</li>`;
+      });
+      return renderListContainer(listTok, items);
+    }
+    case 'table': {
+      const tableTok = token as Tokens.Table;
+      const headerCells = tableTok.header.map(cell => {
+        const content = cell.tokens
+          ? renderInlineAstTokens(cell.tokens, {includeLinks: true})
+          : renderInlineMarkdown(cell.text);
+        return html`<th>${content}</th>`;
+      });
+      const bodyRows = tableTok.rows.map(row => {
+        const cells = row.map(cell => {
+          const content = cell.tokens
+            ? renderInlineAstTokens(cell.tokens, {includeLinks: true})
+            : renderInlineMarkdown(cell.text);
+          return html`<td>${content}</td>`;
+        });
+        return html`<tr>
+          ${cells}
+        </tr>`;
+      });
+      return html`<table>
+        <thead>
+          <tr>
+            ${headerCells}
+          </tr>
+        </thead>
+        <tbody>
+          ${bodyRows}
+        </tbody>
+      </table>`;
+    }
+    case 'hr':
+      return html`<hr />`;
+    case 'space':
+    case 'def':
+      return html``;
+    default:
+      return html`<p>${token.raw}</p>`;
+  }
+}
+
+function renderTokensWithDiffRanges(
+  tokens: Token[],
+  baseOffset: number,
+  isEditedAt: boolean[],
+  highlightTag: 'del' | 'ins',
+  highlightClass: string
+): TemplateResult {
+  const result: Array<TemplateResult | string> = [];
+  let activeHighlight: Array<TemplateResult | string> = [];
+  const flushHighlight = () => {
+    if (activeHighlight.length > 0) {
+      result.push(
+        renderHighlightTag(
+          highlightTag,
+          highlightClass,
+          html`${activeHighlight}`
+        )
+      );
+      activeHighlight = [];
+    }
+  };
+
+  let offset = baseOffset;
+  for (const token of tokens) {
+    const tokStart = offset;
+    const tokEnd = offset + token.raw.length;
+    offset = tokEnd;
+
+    let anyEdited = false;
+    let allEdited = token.raw.length > 0;
+    for (let p = tokStart; p < tokEnd; p++) {
+      if (isEditedAt[p]) {
+        anyEdited = true;
+      } else {
+        allEdited = false;
+      }
+    }
+
+    if (allEdited || (anyEdited && token.type === 'escape')) {
+      activeHighlight.push(
+        renderInlineAstTokens([token], {includeLinks: true})
+      );
+    } else if (!anyEdited) {
+      flushHighlight();
+      result.push(renderInlineAstTokens([token], {includeLinks: true}));
+    } else if (isInlineContainerToken(token)) {
+      const {openDelim, closeDelim} = getContainerDelimiters(token);
+      const innerStart = tokStart + openDelim.length;
+      const innerEnd = tokEnd - closeDelim.length;
+      let innerAnyEdited = false;
+      for (let p = innerStart; p < innerEnd; p++) {
+        if (isEditedAt[p]) {
+          innerAnyEdited = true;
+          break;
+        }
+      }
+      if (!innerAnyEdited) {
+        activeHighlight.push(
+          renderInlineAstTokens([token], {includeLinks: true})
+        );
+      } else {
+        flushHighlight();
+        const innerTemplate = renderTokensWithDiffRanges(
+          token.tokens,
+          innerStart,
+          isEditedAt,
+          highlightTag,
+          highlightClass
+        );
+        result.push(renderInlineContainerTag(token.type, innerTemplate));
+      }
+    } else {
+      let runStart = tokStart;
+      while (runStart < tokEnd) {
+        const runEdited = isEditedAt[runStart];
+        let runEnd = runStart + 1;
+        while (runEnd < tokEnd && isEditedAt[runEnd] === runEdited) {
+          runEnd++;
+        }
+        const sliceText = token.raw.slice(
+          runStart - tokStart,
+          runEnd - tokStart
+        );
+        if (runEdited) {
+          activeHighlight.push(sliceText);
+        } else {
+          flushHighlight();
+          result.push(sliceText);
+        }
+        runStart = runEnd;
+      }
+    }
+  }
+  flushHighlight();
+  return html`${result}`;
+}
+
+function renderSideInlineDiff(
+  fullText: string,
+  segments: InlineDiffSegment[],
+  editType: 'deleted' | 'added',
+  highlightTag: 'del' | 'ins',
+  highlightClass: string
+): TemplateResult {
+  if (!fullText) return html``;
+  const isEditedAt = new Array<boolean>(fullText.length).fill(false);
+  let pos = 0;
+  for (const seg of segments) {
+    if (seg.type === 'common' || seg.type === editType) {
+      if (seg.type === editType) {
+        for (let i = 0; i < seg.text.length && pos + i < fullText.length; i++) {
+          isEditedAt[pos + i] = true;
+        }
+      }
+      pos += seg.text.length;
+    }
+  }
+  return renderTokensWithDiffRanges(
+    lexInlineIsolated(fullText),
+    0,
+    isEditedAt,
+    highlightTag,
+    highlightClass
+  );
+}
+
+function renderInlineTextDiffContent(
+  textA: string,
+  textB: string
+): {leftContent: TemplateResult; rightContent: TemplateResult} {
+  const wordsA = tokenizeWords(textA);
+  const wordsB = tokenizeWords(textB);
+  const distance = computeNormalizedEditDistance(wordsA, wordsB);
+
+  let mergedSegments: InlineDiffSegment[];
+  if (distance > DEFAULT_MAX_HOMOLOGOUS_DISTANCE) {
+    // Non-homologous lines/blocks: highlight as whole replacements rather than
+    // producing noisy "ransom-note" diffs across incidental stop words.
+    mergedSegments = [];
+    if (textA) mergedSegments.push({text: textA, type: 'deleted'});
+    if (textB) mergedSegments.push({text: textB, type: 'added'});
+  } else {
+    const diff = computeSequenceDiff(wordsA, wordsB);
+    mergedSegments = coalesceInlineDiffSegments(diff);
+  }
+
+  const leftContent = renderSideInlineDiff(
+    textA,
+    mergedSegments,
+    'deleted',
+    'del',
+    'diff-highlight-del'
+  );
+  const rightContent = renderSideInlineDiff(
+    textB,
+    mergedSegments,
+    'added',
+    'ins',
+    'diff-highlight-add'
+  );
+
+  return {leftContent, rightContent};
 }
 
 /** Render an inline diff for modified text in headings or paragraphs. */
 export function renderInlineTextDiff(
   textA: string,
   textB: string,
-  wrapperTag = 'p'
-): {leftHtml: string; rightHtml: string} {
-  const wordsA = tokenizeWords(textA);
-  const wordsB = tokenizeWords(textB);
-  const diff = computeSequenceDiff(wordsA, wordsB);
-
-  // Merge consecutive segments of the same type
-  const mergedSegments: InlineDiffSegment[] = [];
-  for (const seg of diff) {
-    const last = mergedSegments[mergedSegments.length - 1];
-    if (last && last.type === seg.type) {
-      last.text += seg.text;
-    } else {
-      mergedSegments.push({...seg});
-    }
-  }
-
-  let leftContent = '';
-  let rightContent = '';
-
-  for (const seg of mergedSegments) {
-    const escaped = htmlEscape(seg.text).toString();
-    if (seg.type === 'common') {
-      leftContent += escaped;
-      rightContent += escaped;
-    } else if (seg.type === 'deleted') {
-      leftContent += `<del class="diff-highlight-del">${escaped}</del>`;
-    } else if (seg.type === 'added') {
-      rightContent += `<ins class="diff-highlight-add">${escaped}</ins>`;
-    }
-  }
-
+  wrapperTag: WrapperTag = 'p',
+  rightWrapperTag: WrapperTag = wrapperTag
+): {leftHtml: TemplateResult; rightHtml: TemplateResult} {
+  const {leftContent, rightContent} = renderInlineTextDiffContent(textA, textB);
   return {
-    leftHtml: `<${wrapperTag}>${leftContent}</${wrapperTag}>`,
-    rightHtml: `<${wrapperTag}>${rightContent}</${wrapperTag}>`,
+    leftHtml: renderWrapperTag(wrapperTag, leftContent),
+    rightHtml: renderWrapperTag(rightWrapperTag, rightContent),
   };
 }
 
-/** Render a modified code block with line-by-line diff highlights. */
+/**
+ * Render a modified code block with two-tier dandavison/delta-style highlights:
+ * homologous modified lines get a subtle full-line background plus within-line
+ * token emphasis on the specific tokens that changed.
+ */
 export function renderCodeBlockDiff(
   tokenA: Tokens.Code,
   tokenB: Tokens.Code
-): {leftHtml: string; rightHtml: string} {
+): {leftHtml: TemplateResult; rightHtml: TemplateResult} {
   const linesA = tokenA.text.split('\n');
   const linesB = tokenB.text.split('\n');
-  const lineDiff = computeSequenceDiff(linesA, linesB);
+  const aligned = alignHomologousItems(
+    linesA,
+    linesB,
+    tokenizeCodeWords,
+    DEFAULT_MAX_HOMOLOGOUS_DISTANCE
+  );
 
-  let leftLines = '';
-  let rightLines = '';
+  const leftLineEntries: Array<TemplateResult | string> = [];
+  const rightLineEntries: Array<TemplateResult | string> = [];
 
-  for (const seg of lineDiff) {
-    const escaped = htmlEscape(seg.text).toString();
-    if (seg.type === 'common') {
-      leftLines += `${escaped}\n`;
-      rightLines += `${escaped}\n`;
-    } else if (seg.type === 'deleted') {
-      leftLines += `<span class="diff-highlight-del">${escaped}</span>\n`;
-    } else if (seg.type === 'added') {
-      rightLines += `<span class="diff-highlight-add">${escaped}</span>\n`;
+  for (const item of aligned) {
+    if (item.type === 'unchanged') {
+      leftLineEntries.push(item.textA);
+      rightLineEntries.push(item.textA);
+    } else if (item.type === 'deleted') {
+      leftLineEntries.push(
+        html`<span class="diff-highlight-del">${item.textA}</span>`
+      );
+    } else if (item.type === 'added') {
+      rightLineEntries.push(
+        html`<span class="diff-highlight-add">${item.textB}</span>`
+      );
+    } else {
+      const wordsA = tokenizeCodeWords(item.textA);
+      const wordsB = tokenizeCodeWords(item.textB);
+      const rawDiff = computeSequenceDiff(wordsA, wordsB);
+      const commonNonWsCount = rawDiff.filter(
+        s => s.type === 'common' && !/^\s+$/.test(s.text)
+      ).length;
+
+      if (commonNonWsCount < 2) {
+        leftLineEntries.push(
+          html`<span class="diff-highlight-del">${item.textA}</span>`
+        );
+        rightLineEntries.push(
+          html`<span class="diff-highlight-add">${item.textB}</span>`
+        );
+      } else {
+        const coalesced = coalesceInlineDiffSegments(rawDiff);
+        const leftParts: Array<TemplateResult | string> = [];
+        const rightParts: Array<TemplateResult | string> = [];
+        for (const seg of coalesced) {
+          if (seg.type === 'common') {
+            leftParts.push(seg.text);
+            rightParts.push(seg.text);
+          } else if (seg.type === 'deleted') {
+            leftParts.push(
+              html`<del class="diff-highlight-del">${seg.text}</del>`
+            );
+          } else if (seg.type === 'added') {
+            rightParts.push(
+              html`<ins class="diff-highlight-add">${seg.text}</ins>`
+            );
+          }
+        }
+        leftLineEntries.push(
+          html`<span class="diff-code-line-del">${leftParts}</span>`
+        );
+        rightLineEntries.push(
+          html`<span class="diff-code-line-add">${rightParts}</span>`
+        );
+      }
     }
   }
 
-  const langClass = tokenB.lang
-    ? ` class="language-${htmlEscape(tokenB.lang)}"`
-    : '';
+  const joinLinesWithNewline = (
+    entries: Array<TemplateResult | string>
+  ): Array<TemplateResult | string> => {
+    const out: Array<TemplateResult | string> = [];
+    for (let i = 0; i < entries.length; i++) {
+      if (i > 0) out.push('\n');
+      out.push(entries[i]);
+    }
+    return out;
+  };
+
+  const leftCodeContent = joinLinesWithNewline(leftLineEntries);
+  const rightCodeContent = joinLinesWithNewline(rightLineEntries);
+  const langA = sanitizeCodeLanguage(tokenA.lang);
+  const langB = sanitizeCodeLanguage(tokenB.lang);
+
   return {
-    leftHtml: `<pre><code${langClass}>${leftLines.trimEnd()}</code></pre>`,
-    rightHtml: `<pre><code${langClass}>${rightLines.trimEnd()}</code></pre>`,
+    leftHtml: langA
+      ? html`<pre><code class=${langA}>${leftCodeContent}</code></pre>`
+      : html`<pre><code>${leftCodeContent}</code></pre>`,
+    rightHtml: langB
+      ? html`<pre><code class=${langB}>${rightCodeContent}</code></pre>`
+      : html`<pre><code>${rightCodeContent}</code></pre>`,
+  };
+}
+
+function splitListItemTokens(item: Tokens.ListItem): {
+  headText: string;
+  sublists: Tokens.List[];
+  otherBlocks: Token[];
+} {
+  if (!item.tokens || item.tokens.length === 0) {
+    return {headText: item.text, sublists: [], otherBlocks: []};
+  }
+  const headParts: string[] = [];
+  const sublists: Tokens.List[] = [];
+  const otherBlocks: Token[] = [];
+  for (const t of item.tokens) {
+    if (t.type === 'text' || t.type === 'paragraph') {
+      headParts.push((t as Tokens.Text | Tokens.Paragraph).text);
+    } else if (t.type === 'list') {
+      sublists.push(t as Tokens.List);
+    } else if (t.type !== 'space') {
+      otherBlocks.push(t);
+    }
+  }
+  return {
+    headText: headParts.join('\n'),
+    sublists,
+    otherBlocks,
+  };
+}
+
+/**
+ * Render a modified markdown list (<ul> or <ol>) by aligning homologous list
+ * items and highlighting within-item word/code/link diffs as well as added or
+ * deleted items. Emits placeholder <li> elements on the opposing side so
+ * side-by-side alignment and <ol> numbering stay in sync.
+ */
+export function renderListDiff(
+  tokenA: Tokens.List,
+  tokenB: Tokens.List
+): {leftHtml: TemplateResult; rightHtml: TemplateResult} {
+  const splitItemsA = tokenA.items.map(splitListItemTokens);
+  const splitItemsB = tokenB.items.map(splitListItemTokens);
+  const itemsA = splitItemsA.map(
+    (s, idx) => s.headText || tokenA.items[idx].text
+  );
+  const itemsB = splitItemsB.map(
+    (s, idx) => s.headText || tokenB.items[idx].text
+  );
+  const aligned = alignHomologousItems(
+    itemsA,
+    itemsB,
+    tokenizeWords,
+    DEFAULT_MAX_HOMOLOGOUS_DISTANCE
+  );
+
+  const leftItems: TemplateResult[] = [];
+  const rightItems: TemplateResult[] = [];
+
+  for (const item of aligned) {
+    if (item.type === 'unchanged' || item.type === 'modified') {
+      const splitA = splitItemsA[item.aIdx];
+      const splitB = splitItemsB[item.bIdx];
+      let leftHead: TemplateResult;
+      let rightHead: TemplateResult;
+      if (splitA.headText === splitB.headText) {
+        leftHead = renderInlineMarkdown(splitA.headText);
+        rightHead = leftHead;
+      } else {
+        const diffContent = renderInlineTextDiffContent(
+          splitA.headText,
+          splitB.headText
+        );
+        leftHead = diffContent.leftContent;
+        rightHead = diffContent.rightContent;
+      }
+
+      const leftSublists: TemplateResult[] = [];
+      const rightSublists: TemplateResult[] = [];
+      const maxSub = Math.max(splitA.sublists.length, splitB.sublists.length);
+      for (let s = 0; s < maxSub; s++) {
+        const subA = splitA.sublists[s];
+        const subB = splitB.sublists[s];
+        if (subA && subB) {
+          const subDiff = renderListDiff(subA, subB);
+          leftSublists.push(subDiff.leftHtml);
+          rightSublists.push(subDiff.rightHtml);
+        } else if (subA) {
+          leftSublists.push(
+            renderListDiff(subA, {...subA, items: []}).leftHtml
+          );
+        } else if (subB) {
+          rightSublists.push(
+            renderListDiff({...subB, items: []}, subB).rightHtml
+          );
+        }
+      }
+
+      const leftOther = splitA.otherBlocks.map(t => renderTokenToHtml(t));
+      const rightOther = splitB.otherBlocks.map(t => renderTokenToHtml(t));
+      leftItems.push(html`<li>${leftHead}${leftOther}${leftSublists}</li>`);
+      rightItems.push(html`<li>${rightHead}${rightOther}${rightSublists}</li>`);
+    } else if (item.type === 'deleted') {
+      const splitA = splitItemsA[item.aIdx];
+      const sublists = splitA.sublists.map(
+        sub => renderListDiff(sub, {...sub, items: []}).leftHtml
+      );
+      const other = splitA.otherBlocks.map(t => renderTokenToHtml(t));
+      leftItems.push(
+        html`<li class="diff-list-item-del">
+          <del class="diff-highlight-del"
+            >${renderInlineMarkdown(splitA.headText)}</del
+          >${other}${sublists}
+        </li>`
+      );
+      rightItems.push(
+        html`<li class="diff-list-item-placeholder" aria-hidden="true"></li>`
+      );
+    } else if (item.type === 'added') {
+      const splitB = splitItemsB[item.bIdx];
+      const sublists = splitB.sublists.map(
+        sub => renderListDiff({...sub, items: []}, sub).rightHtml
+      );
+      const other = splitB.otherBlocks.map(t => renderTokenToHtml(t));
+      leftItems.push(
+        html`<li class="diff-list-item-placeholder" aria-hidden="true"></li>`
+      );
+      rightItems.push(
+        html`<li class="diff-list-item-add">
+          <ins class="diff-highlight-add"
+            >${renderInlineMarkdown(splitB.headText)}</ins
+          >${other}${sublists}
+        </li>`
+      );
+    }
+  }
+
+  return {
+    leftHtml: renderListContainer(tokenA, leftItems),
+    rightHtml: renderListContainer(tokenB, rightItems),
+  };
+}
+
+/** Render a modified blockquote with inline word/code/link diff highlights. */
+export function renderBlockquoteDiff(
+  tokenA: Tokens.Blockquote,
+  tokenB: Tokens.Blockquote
+): {leftHtml: TemplateResult; rightHtml: TemplateResult} {
+  const childTokensA = (
+    tokenA.tokens && tokenA.tokens.length > 0
+      ? tokenA.tokens
+      : parseMarkdownBlocks(tokenA.text)
+  ).filter(t => t.type !== 'space') as MarkdownToken[];
+  const childTokensB = (
+    tokenB.tokens && tokenB.tokens.length > 0
+      ? tokenB.tokens
+      : parseMarkdownBlocks(tokenB.text)
+  ).filter(t => t.type !== 'space') as MarkdownToken[];
+
+  if (
+    childTokensA.length <= 1 &&
+    childTokensB.length <= 1 &&
+    (childTokensA[0]?.type ?? 'paragraph') === 'paragraph' &&
+    (childTokensB[0]?.type ?? 'paragraph') === 'paragraph'
+  ) {
+    const {leftHtml, rightHtml} = renderInlineTextDiff(
+      tokenA.text.trim(),
+      tokenB.text.trim(),
+      'p'
+    );
+    return {
+      leftHtml: html`<blockquote>${leftHtml}</blockquote>`,
+      rightHtml: html`<blockquote>${rightHtml}</blockquote>`,
+    };
+  }
+
+  const alignedChildren = alignMarkdownTokens(childTokensA, childTokensB);
+  const leftBlocks: TemplateResult[] = [];
+  const rightBlocks: TemplateResult[] = [];
+  for (const row of alignedChildren) {
+    if (row.status === 'unchanged' || row.status === 'modified') {
+      if (row.leftHtml) leftBlocks.push(row.leftHtml);
+      if (row.rightHtml) rightBlocks.push(row.rightHtml);
+    } else if (row.status === 'deleted' && row.leftToken) {
+      if (row.leftToken.type === 'paragraph') {
+        leftBlocks.push(
+          renderInlineTextDiff(
+            (row.leftToken as Tokens.Paragraph).text,
+            '',
+            'p'
+          ).leftHtml
+        );
+      } else if (row.leftHtml) {
+        leftBlocks.push(
+          html`<del class="diff-highlight-del">${row.leftHtml}</del>`
+        );
+      }
+    } else if (row.status === 'added' && row.rightToken) {
+      if (row.rightToken.type === 'paragraph') {
+        rightBlocks.push(
+          renderInlineTextDiff(
+            '',
+            (row.rightToken as Tokens.Paragraph).text,
+            'p'
+          ).rightHtml
+        );
+      } else if (row.rightHtml) {
+        rightBlocks.push(
+          html`<ins class="diff-highlight-add">${row.rightHtml}</ins>`
+        );
+      }
+    }
+  }
+
+  return {
+    leftHtml: html`<blockquote>${leftBlocks}</blockquote>`,
+    rightHtml: html`<blockquote>${rightBlocks}</blockquote>`,
+  };
+}
+
+/**
+ * Render a modified markdown table by aligning homologous rows and performing
+ * cell-by-cell inline diffs on modified header and body cells, emitting
+ * placeholder cells and rows on the opposing side when columns or rows are
+ * added or deleted.
+ */
+export function renderTableDiff(
+  tokenA: Tokens.Table,
+  tokenB: Tokens.Table
+): {leftHtml: TemplateResult; rightHtml: TemplateResult} {
+  const colCount = Math.max(
+    tokenA.header.length,
+    tokenB.header.length,
+    ...tokenA.rows.map(r => r.length),
+    ...tokenB.rows.map(r => r.length)
+  );
+  const leftHeaderCells: TemplateResult[] = [];
+  const rightHeaderCells: TemplateResult[] = [];
+
+  for (let c = 0; c < colCount; c++) {
+    const cellA = tokenA.header[c]?.text;
+    const cellB = tokenB.header[c]?.text;
+    if (cellA !== undefined && cellB !== undefined) {
+      if (cellA === cellB) {
+        const th = html`<th>${renderInlineMarkdown(cellA)}</th>`;
+        leftHeaderCells.push(th);
+        rightHeaderCells.push(th);
+      } else {
+        const {leftHtml, rightHtml} = renderInlineTextDiff(cellA, cellB, 'th');
+        leftHeaderCells.push(leftHtml);
+        rightHeaderCells.push(rightHtml);
+      }
+    } else if (cellA !== undefined) {
+      leftHeaderCells.push(
+        html`<th>
+          <del class="diff-highlight-del">${renderInlineMarkdown(cellA)}</del>
+        </th>`
+      );
+      rightHeaderCells.push(
+        html`<th class="diff-table-cell-placeholder" aria-hidden="true"></th>`
+      );
+    } else if (cellB !== undefined) {
+      leftHeaderCells.push(
+        html`<th class="diff-table-cell-placeholder" aria-hidden="true"></th>`
+      );
+      rightHeaderCells.push(
+        html`<th>
+          <ins class="diff-highlight-add">${renderInlineMarkdown(cellB)}</ins>
+        </th>`
+      );
+    } else {
+      leftHeaderCells.push(
+        html`<th class="diff-table-cell-placeholder" aria-hidden="true"></th>`
+      );
+      rightHeaderCells.push(
+        html`<th class="diff-table-cell-placeholder" aria-hidden="true"></th>`
+      );
+    }
+  }
+
+  const rowsTextA = tokenA.rows.map(r => r.map(c => c.text).join(' '));
+  const rowsTextB = tokenB.rows.map(r => r.map(c => c.text).join(' '));
+  const alignedRows = alignHomologousItems(
+    rowsTextA,
+    rowsTextB,
+    tokenizeWords,
+    DEFAULT_MAX_HOMOLOGOUS_DISTANCE
+  );
+
+  const leftBodyRows: TemplateResult[] = [];
+  const rightBodyRows: TemplateResult[] = [];
+
+  for (const row of alignedRows) {
+    if (row.type === 'unchanged') {
+      const trLeft: TemplateResult[] = [];
+      const trRight: TemplateResult[] = [];
+      const cellsA = tokenA.rows[row.aIdx];
+      const cellsB = tokenB.rows[row.bIdx];
+      for (let c = 0; c < colCount; c++) {
+        const cellA = cellsA[c]?.text;
+        const cellB = cellsB[c]?.text;
+        trLeft.push(
+          cellA !== undefined
+            ? html`<td>${renderInlineMarkdown(cellA)}</td>`
+            : html`<td
+                class="diff-table-cell-placeholder"
+                aria-hidden="true"
+              ></td>`
+        );
+        trRight.push(
+          cellB !== undefined
+            ? html`<td>${renderInlineMarkdown(cellB)}</td>`
+            : html`<td
+                class="diff-table-cell-placeholder"
+                aria-hidden="true"
+              ></td>`
+        );
+      }
+      leftBodyRows.push(
+        html`<tr>
+          ${trLeft}
+        </tr>`
+      );
+      rightBodyRows.push(
+        html`<tr>
+          ${trRight}
+        </tr>`
+      );
+    } else if (row.type === 'modified') {
+      const cellsA = tokenA.rows[row.aIdx];
+      const cellsB = tokenB.rows[row.bIdx];
+      const trLeft: TemplateResult[] = [];
+      const trRight: TemplateResult[] = [];
+      for (let c = 0; c < colCount; c++) {
+        const textA = cellsA[c]?.text;
+        const textB = cellsB[c]?.text;
+        if (textA !== undefined && textB !== undefined) {
+          if (textA === textB) {
+            const td = html`<td>${renderInlineMarkdown(textA)}</td>`;
+            trLeft.push(td);
+            trRight.push(td);
+          } else {
+            const {leftHtml, rightHtml} = renderInlineTextDiff(
+              textA,
+              textB,
+              'td'
+            );
+            trLeft.push(leftHtml);
+            trRight.push(rightHtml);
+          }
+        } else if (textA !== undefined) {
+          trLeft.push(
+            html`<td>
+              <del class="diff-highlight-del"
+                >${renderInlineMarkdown(textA)}</del
+              >
+            </td>`
+          );
+          trRight.push(
+            html`<td
+              class="diff-table-cell-placeholder"
+              aria-hidden="true"
+            ></td>`
+          );
+        } else if (textB !== undefined) {
+          trLeft.push(
+            html`<td
+              class="diff-table-cell-placeholder"
+              aria-hidden="true"
+            ></td>`
+          );
+          trRight.push(
+            html`<td>
+              <ins class="diff-highlight-add"
+                >${renderInlineMarkdown(textB)}</ins
+              >
+            </td>`
+          );
+        } else {
+          trLeft.push(
+            html`<td
+              class="diff-table-cell-placeholder"
+              aria-hidden="true"
+            ></td>`
+          );
+          trRight.push(
+            html`<td
+              class="diff-table-cell-placeholder"
+              aria-hidden="true"
+            ></td>`
+          );
+        }
+      }
+      leftBodyRows.push(
+        html`<tr>
+          ${trLeft}
+        </tr>`
+      );
+      rightBodyRows.push(
+        html`<tr>
+          ${trRight}
+        </tr>`
+      );
+    } else if (row.type === 'deleted') {
+      const cellsA = tokenA.rows[row.aIdx];
+      const trLeft: TemplateResult[] = [];
+      const trRight: TemplateResult[] = [];
+      for (let c = 0; c < colCount; c++) {
+        const cellA = cellsA[c]?.text;
+        trLeft.push(
+          cellA !== undefined
+            ? html`<td>
+                <del class="diff-highlight-del"
+                  >${renderInlineMarkdown(cellA)}</del
+                >
+              </td>`
+            : html`<td
+                class="diff-table-cell-placeholder"
+                aria-hidden="true"
+              ></td>`
+        );
+        trRight.push(
+          html`<td class="diff-table-cell-placeholder" aria-hidden="true"></td>`
+        );
+      }
+      leftBodyRows.push(
+        html`<tr class="diff-table-row-del">
+          ${trLeft}
+        </tr>`
+      );
+      rightBodyRows.push(
+        html`<tr class="diff-table-row-placeholder" aria-hidden="true">
+          ${trRight}
+        </tr>`
+      );
+    } else if (row.type === 'added') {
+      const cellsB = tokenB.rows[row.bIdx];
+      const trLeft: TemplateResult[] = [];
+      const trRight: TemplateResult[] = [];
+      for (let c = 0; c < colCount; c++) {
+        const cellB = cellsB[c]?.text;
+        trLeft.push(
+          html`<td class="diff-table-cell-placeholder" aria-hidden="true"></td>`
+        );
+        trRight.push(
+          cellB !== undefined
+            ? html`<td>
+                <ins class="diff-highlight-add"
+                  >${renderInlineMarkdown(cellB)}</ins
+                >
+              </td>`
+            : html`<td
+                class="diff-table-cell-placeholder"
+                aria-hidden="true"
+              ></td>`
+        );
+      }
+      leftBodyRows.push(
+        html`<tr class="diff-table-row-placeholder" aria-hidden="true">
+          ${trLeft}
+        </tr>`
+      );
+      rightBodyRows.push(
+        html`<tr class="diff-table-row-add">
+          ${trRight}
+        </tr>`
+      );
+    }
+  }
+
+  return {
+    leftHtml: html`<table>
+      <thead>
+        <tr>
+          ${leftHeaderCells}
+        </tr>
+      </thead>
+      <tbody>
+        ${leftBodyRows}
+      </tbody>
+    </table>`,
+    rightHtml: html`<table>
+      <thead>
+        <tr>
+          ${rightHeaderCells}
+        </tr>
+      </thead>
+      <tbody>
+        ${rightBodyRows}
+      </tbody>
+    </table>`,
   };
 }
 
@@ -215,85 +2098,173 @@
   const m = blocksA.length;
   const n = blocksB.length;
 
-  // DP table to find LCS of exact matches
-  const dp: number[][] = Array.from({length: m + 1}, () =>
-    new Array(n + 1).fill(0)
-  );
+  // Extract exact match anchor pairs (bounded to prevent O(m * n) DoS).
+  const anchorPairs: {aIdx: number; bIdx: number}[] = [];
+  if (m * n <= MAX_SEQUENCE_DIFF_CELLS) {
+    const cols = n + 1;
+    const dp = new Int32Array((m + 1) * cols);
 
-  for (let i = 0; i < m; i++) {
-    for (let j = 0; j < n; j++) {
-      if (blocksA[i].raw === blocksB[j].raw) {
-        dp[i + 1][j + 1] = dp[i][j] + 1;
-      } else {
-        dp[i + 1][j + 1] = Math.max(dp[i + 1][j], dp[i][j + 1]);
+    for (let i = 0; i < m; i++) {
+      const rawA = blocksA[i].raw;
+      const rowOffset = i * cols;
+      const nextRowOffset = (i + 1) * cols;
+      for (let j = 0; j < n; j++) {
+        if (rawA === blocksB[j].raw) {
+          dp[nextRowOffset + j + 1] = dp[rowOffset + j] + 1;
+        } else {
+          const left = dp[nextRowOffset + j];
+          const up = dp[rowOffset + j + 1];
+          dp[nextRowOffset + j + 1] = left >= up ? left : up;
+        }
       }
     }
-  }
 
-  // Backtrack to extract exact match pairs
-  const anchorPairs: {aIdx: number; bIdx: number}[] = [];
-  let i = m;
-  let j = n;
-  while (i > 0 && j > 0) {
-    if (blocksA[i - 1].raw === blocksB[j - 1].raw) {
-      anchorPairs.unshift({aIdx: i - 1, bIdx: j - 1});
-      i--;
-      j--;
-    } else if (dp[i][j - 1] >= dp[i - 1][j]) {
-      j--;
-    } else {
-      i--;
+    let i = m;
+    let j = n;
+    while (i > 0 && j > 0) {
+      if (blocksA[i - 1].raw === blocksB[j - 1].raw) {
+        anchorPairs.push({aIdx: i - 1, bIdx: j - 1});
+        i--;
+        j--;
+      } else if (dp[i * cols + (j - 1)] >= dp[(i - 1) * cols + j]) {
+        j--;
+      } else {
+        i--;
+      }
     }
+    anchorPairs.reverse();
+  } else {
+    anchorPairs.push(
+      ...computeLinearExactAnchors(
+        blocksA.map(b => b.raw),
+        blocksB.map(b => b.raw)
+      )
+    );
   }
 
   const rows: AlignedDiffRow[] = [];
   let lastA = 0;
   let lastB = 0;
 
+  function renderPairedBlocks(
+    tokA: MarkdownToken,
+    tokB: MarkdownToken
+  ): {leftHtml: TemplateResult; rightHtml: TemplateResult} {
+    if (tokA.type === 'code' && tokB.type === 'code') {
+      return renderCodeBlockDiff(tokA as Tokens.Code, tokB as Tokens.Code);
+    }
+    if (tokA.type === 'heading' && tokB.type === 'heading') {
+      const depthA = Math.min(Math.max((tokA as Tokens.Heading).depth, 1), 6);
+      const depthB = Math.min(Math.max((tokB as Tokens.Heading).depth, 1), 6);
+      return renderInlineTextDiff(
+        tokA.text,
+        tokB.text,
+        `h${depthA}` as WrapperTag,
+        `h${depthB}` as WrapperTag
+      );
+    }
+    if (tokA.type === 'paragraph' && tokB.type === 'paragraph') {
+      return renderInlineTextDiff(tokA.text, tokB.text, 'p');
+    }
+    if (tokA.type === 'list' && tokB.type === 'list') {
+      return renderListDiff(tokA as Tokens.List, tokB as Tokens.List);
+    }
+    if (tokA.type === 'blockquote' && tokB.type === 'blockquote') {
+      return renderBlockquoteDiff(
+        tokA as Tokens.Blockquote,
+        tokB as Tokens.Blockquote
+      );
+    }
+    if (tokA.type === 'table' && tokB.type === 'table') {
+      return renderTableDiff(tokA as Tokens.Table, tokB as Tokens.Table);
+    }
+    return {
+      leftHtml: renderTokenToHtml(tokA),
+      rightHtml: renderTokenToHtml(tokB),
+    };
+  }
+
   function processInterval(endA: number, endB: number) {
     const unalignedA = blocksA.slice(lastA, endA);
     const unalignedB = blocksB.slice(lastB, endB);
+    const uA = unalignedA.length;
+    const uB = unalignedB.length;
+    if (uA === 0 && uB === 0) return;
 
-    let idxA = 0;
-    let idxB = 0;
-
-    // Greedily pair up adjacent tokens of compatible type as 'modified'
-    while (idxA < unalignedA.length && idxB < unalignedB.length) {
-      const tokA = unalignedA[idxA];
-      const tokB = unalignedB[idxB];
-
-      const canPair =
-        tokA.type === tokB.type ||
-        (tokA.type === 'paragraph' && tokB.type === 'paragraph') ||
-        (tokA.type === 'heading' && tokB.type === 'heading') ||
-        (tokA.type === 'code' && tokB.type === 'code');
-
-      if (canPair) {
-        let leftHtml: string;
-        let rightHtml: string;
-
-        if (tokA.type === 'code' && tokB.type === 'code') {
-          const diff = renderCodeBlockDiff(
-            tokA as Tokens.Code,
-            tokB as Tokens.Code
-          );
-          leftHtml = diff.leftHtml;
-          rightHtml = diff.rightHtml;
-        } else if (tokA.type === 'heading' && tokB.type === 'heading') {
-          const depth = (tokB as Tokens.Heading).depth;
-          const diff = renderInlineTextDiff(tokA.text, tokB.text, `h${depth}`);
-          leftHtml = diff.leftHtml;
-          rightHtml = diff.rightHtml;
-        } else if (tokA.type === 'paragraph' && tokB.type === 'paragraph') {
-          const diff = renderInlineTextDiff(tokA.text, tokB.text, 'p');
-          leftHtml = diff.leftHtml;
-          rightHtml = diff.rightHtml;
-        } else {
-          leftHtml = renderTokenToHtml(tokA);
-          rightHtml = renderTokenToHtml(tokB);
-        }
-
+    if (uA * uB > MAX_ALIGN_ITEMS_CELLS) {
+      for (const tokA of unalignedA) {
         rows.push({
+          status: 'deleted',
+          leftToken: tokA,
+          leftHtml: renderTokenToHtml(tokA),
+          leftStartLine: tokA.startLine,
+          leftEndLine: tokA.endLine,
+        });
+      }
+      for (const tokB of unalignedB) {
+        rows.push({
+          status: 'added',
+          rightToken: tokB,
+          rightHtml: renderTokenToHtml(tokB),
+          rightStartLine: tokB.startLine,
+          rightEndLine: tokB.endLine,
+        });
+      }
+      return;
+    }
+
+    const tokenizeBlock = (t: MarkdownToken): string[] =>
+      t.type === 'code'
+        ? tokenizeCodeWords((t as Tokens.Code).text)
+        : tokenizeWords(t.raw);
+    const wordsCacheA = unalignedA.map(tokenizeBlock);
+    const wordsCacheB = unalignedB.map(tokenizeBlock);
+
+    // Score compatible block pairs by homologous similarity so inserted or
+    // deleted blocks do not shift adjacent modified blocks out of alignment.
+    const pairScore: number[][] = Array.from({length: uA}, (_, a) =>
+      Array.from({length: uB}, (__, b) => {
+        if (unalignedA[a].type !== unalignedB[b].type) return -1;
+        const dist = computeNormalizedEditDistance(
+          wordsCacheA[a],
+          wordsCacheB[b]
+        );
+        if (dist <= DEFAULT_MAX_HOMOLOGOUS_DISTANCE) {
+          return 1 + (1 - dist);
+        }
+        return uA === 1 && uB === 1 ? 0.01 + 0.1 * (1 - dist) : -1;
+      })
+    );
+
+    const subDp: number[][] = Array.from({length: uA + 1}, () =>
+      new Array(uB + 1).fill(0)
+    );
+    for (let a = 0; a < uA; a++) {
+      for (let b = 0; b < uB; b++) {
+        let best = Math.max(subDp[a][b + 1], subDp[a + 1][b]);
+        if (pairScore[a][b] >= 0) {
+          best = Math.max(best, subDp[a][b] + pairScore[a][b]);
+        }
+        subDp[a + 1][b + 1] = best;
+      }
+    }
+
+    const intervalRows: AlignedDiffRow[] = [];
+    let a = uA;
+    let b = uB;
+    while (a > 0 || b > 0) {
+      if (
+        a > 0 &&
+        b > 0 &&
+        pairScore[a - 1][b - 1] >= 0 &&
+        Math.abs(
+          subDp[a][b] - (subDp[a - 1][b - 1] + pairScore[a - 1][b - 1])
+        ) < 1e-9
+      ) {
+        const tokA = unalignedA[a - 1];
+        const tokB = unalignedB[b - 1];
+        const {leftHtml, rightHtml} = renderPairedBlocks(tokA, tokB);
+        intervalRows.unshift({
           status: 'modified',
           leftToken: tokA,
           rightToken: tokB,
@@ -304,46 +2275,32 @@
           rightStartLine: tokB.startLine,
           rightEndLine: tokB.endLine,
         });
-        idxA++;
-        idxB++;
+        a--;
+        b--;
+      } else if (b > 0 && (a === 0 || subDp[a][b - 1] >= subDp[a - 1][b])) {
+        const tokB = unalignedB[b - 1];
+        intervalRows.unshift({
+          status: 'added',
+          rightToken: tokB,
+          rightHtml: renderTokenToHtml(tokB),
+          rightStartLine: tokB.startLine,
+          rightEndLine: tokB.endLine,
+        });
+        b--;
       } else {
-        // Output deleted block on left
-        rows.push({
+        const tokA = unalignedA[a - 1];
+        intervalRows.unshift({
           status: 'deleted',
           leftToken: tokA,
           leftHtml: renderTokenToHtml(tokA),
           leftStartLine: tokA.startLine,
           leftEndLine: tokA.endLine,
         });
-        idxA++;
+        a--;
       }
     }
 
-    // Remaining unmatched in A
-    while (idxA < unalignedA.length) {
-      const tokA = unalignedA[idxA];
-      rows.push({
-        status: 'deleted',
-        leftToken: tokA,
-        leftHtml: renderTokenToHtml(tokA),
-        leftStartLine: tokA.startLine,
-        leftEndLine: tokA.endLine,
-      });
-      idxA++;
-    }
-
-    // Remaining unmatched in B
-    while (idxB < unalignedB.length) {
-      const tokB = unalignedB[idxB];
-      rows.push({
-        status: 'added',
-        rightToken: tokB,
-        rightHtml: renderTokenToHtml(tokB),
-        rightStartLine: tokB.startLine,
-        rightEndLine: tokB.endLine,
-      });
-      idxB++;
-    }
+    rows.push(...intervalRows);
   }
 
   // Interleave intervals between anchor pairs
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-markdown-viewer/markdown-diff-util_test.ts b/polygerrit-ui/app/elements/diff/gr-diff-markdown-viewer/markdown-diff-util_test.ts
index dd112a4..fa60b0f 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-markdown-viewer/markdown-diff-util_test.ts
+++ b/polygerrit-ui/app/elements/diff/gr-diff-markdown-viewer/markdown-diff-util_test.ts
@@ -4,6 +4,8 @@
  * SPDX-License-Identifier: Apache-2.0
  */
 import {assert} from '@open-wc/testing';
+import {render, TemplateResult} from 'lit';
+import {marked, Tokens} from 'marked';
 import '../../../test/common-test-setup';
 import {DiffInfo} from '../../../types/diff';
 import {CommentSide, Side} from '../../../constants/constants';
@@ -14,14 +16,36 @@
 } from '../../../test/test-data-generators';
 import {CommentThread, UrlEncodedCommentId} from '../../../types/common';
 import {
+  alignHomologousItems,
   alignMarkdownTokens,
   attachThreadsToRows,
+  coalesceInlineDiffSegments,
+  computeLinearExactAnchors,
+  computeNormalizedEditDistance,
   computeSequenceDiff,
   parseMarkdownBlocks,
   reconstructFileContent,
+  renderBlockquoteDiff,
+  renderCodeBlockDiff,
+  renderInlineCodeSpans,
+  renderInlineMarkdown,
+  renderInlineTextDiff,
+  renderListDiff,
+  renderTableDiff,
+  renderTokenToHtml,
+  sanitizeCodeLanguage,
+  sanitizeMarkdownUrl,
+  tokenizeCodeWords,
   tokenizeWords,
 } from './markdown-diff-util';
 
+function renderToHtmlString(template?: TemplateResult): string {
+  if (!template) return '';
+  const container = document.createElement('div');
+  render(template, container);
+  return container.innerHTML.replace(/<!--[\s\S]*?-->/g, '');
+}
+
 suite('markdown-diff-util tests', () => {
   test('reconstructFileContent', () => {
     const diff: DiffInfo = {
@@ -69,6 +93,382 @@
     ]);
   });
 
+  test('tokenizeWords keeps markdown links and inline code spans atomic and separates adjacent punctuation', () => {
+    const words = tokenizeWords(
+      'Located at [`scripts/run_experiment.py`](scripts/run_experiment.py) (`<SKILL_DIR>`, `--workspace-root`, `` `code` ``).'
+    );
+    assert.include(
+      words,
+      '[`scripts/run_experiment.py`](scripts/run_experiment.py)'
+    );
+    assert.include(words, '`<SKILL_DIR>`');
+    assert.include(words, '`--workspace-root`');
+    assert.include(words, '`` `code` ``');
+    assert.equal(
+      words[4],
+      '[`scripts/run_experiment.py`](scripts/run_experiment.py)'
+    );
+  });
+
+  test('renderInlineCodeSpans converts backtick blocks to <code> and escapes HTML', () => {
+    const rendered = renderToHtmlString(
+      renderInlineCodeSpans(
+        'Relative to `SKILL.md` (`<SKILL_DIR>`), `--workspace-root`, `$ANDROID_BUILD_TOP`, `.repo/`, and `` `code` ``.'
+      )
+    );
+    assert.equal(
+      rendered,
+      'Relative to <code>SKILL.md</code> (<code>&lt;SKILL_DIR&gt;</code>), <code>--workspace-root</code>, <code>$ANDROID_BUILD_TOP</code>, <code>.repo/</code>, and <code>`code`</code>.'
+    );
+  });
+
+  test('tokenizeWords and renderInlineTextDiff handle autolinks and nested links/code inside formatted text', () => {
+    const words = tokenizeWords(
+      'Check **old `flag` and [Docs](https://example.com)** and <https://auto.example.com>.'
+    );
+    assert.include(words, '`flag`');
+    assert.include(words, '[Docs](https://example.com)');
+    assert.include(words, '<https://auto.example.com>');
+
+    const {leftHtml, rightHtml} = renderInlineTextDiff(
+      'Check **old `flag` and [Docs](https://example.com)** and <https://auto.example.com/v1>.',
+      'Check **new `flag` and [Docs](https://example.com)** and <https://auto.example.com/v2>.',
+      'p'
+    );
+    assert.include(
+      renderToHtmlString(leftHtml),
+      '<strong><del class="diff-highlight-del">old</del> <code>flag</code> and <a target="_blank" rel="noopener noreferrer" href="https://example.com">Docs</a></strong>'
+    );
+    assert.include(
+      renderToHtmlString(rightHtml),
+      '<strong><ins class="diff-highlight-add">new</ins> <code>flag</code> and <a target="_blank" rel="noopener noreferrer" href="https://example.com">Docs</a></strong>'
+    );
+    assert.include(
+      renderToHtmlString(leftHtml),
+      '<del class="diff-highlight-del"><a target="_blank" rel="noopener noreferrer" href="https://auto.example.com/v1">https://auto.example.com/v1</a></del>'
+    );
+    assert.include(
+      renderToHtmlString(rightHtml),
+      '<ins class="diff-highlight-add"><a target="_blank" rel="noopener noreferrer" href="https://auto.example.com/v2">https://auto.example.com/v2</a></ins>'
+    );
+  });
+
+  test('renderInlineMarkdown converts markdown links and code spans to HTML and escapes attributes', () => {
+    const rendered = renderToHtmlString(
+      renderInlineMarkdown(
+        'Located at [`scripts/run_experiment.py`](scripts/run_experiment.py) and [Docs](https://example.com/docs "Documentation") (relative to `SKILL.md`).'
+      )
+    );
+    assert.equal(
+      rendered,
+      'Located at <a rel="noopener noreferrer" href="scripts/run_experiment.py"><code>scripts/run_experiment.py</code></a> and <a target="_blank" rel="noopener noreferrer" href="https://example.com/docs">Docs</a> (relative to <code>SKILL.md</code>).'
+    );
+  });
+
+  test('renderInlineMarkdown handles parenthesized URLs, angle-bracket URLs, bracketed code labels, and ignores images', () => {
+    const rendered = renderToHtmlString(
+      renderInlineMarkdown(
+        'See [Wiki](https://en.wikipedia.org/wiki/Fn_(math)), [Angle](<https://example.com/path>), [`arr[0]`](https://example.com/arr), and ![alt](https://example.com/img.png).'
+      )
+    );
+    assert.equal(
+      rendered,
+      'See <a target="_blank" rel="noopener noreferrer" href="https://en.wikipedia.org/wiki/Fn_(math)">Wiki</a>, <a target="_blank" rel="noopener noreferrer" href="https://example.com/path">Angle</a>, <a target="_blank" rel="noopener noreferrer" href="https://example.com/arr"><code>arr[0]</code></a>, and ![alt](https://example.com/img.png).'
+    );
+  });
+
+  test('sanitizeMarkdownUrl and Lit templates harden against XSS and unsafe URL schemes', () => {
+    assert.equal(
+      sanitizeMarkdownUrl('javascript:alert(1)'),
+      'about:invalid#zClosurez'
+    );
+    assert.equal(
+      sanitizeMarkdownUrl('  JAVASCRIPT:alert(1) '),
+      'about:invalid#zClosurez'
+    );
+    assert.equal(
+      sanitizeMarkdownUrl('data:text/html,<script>alert(1)</script>'),
+      'about:invalid#zClosurez'
+    );
+    assert.equal(
+      sanitizeMarkdownUrl('file:///etc/passwd'),
+      'about:invalid#zClosurez'
+    );
+    assert.equal(
+      sanitizeMarkdownUrl('http://example.com/safe'),
+      'http://example.com/safe'
+    );
+    assert.equal(
+      sanitizeMarkdownUrl('https://example.com/safe'),
+      'https://example.com/safe'
+    );
+    assert.equal(
+      sanitizeMarkdownUrl('scripts/run_experiment.py'),
+      'scripts/run_experiment.py'
+    );
+
+    const rendered = renderToHtmlString(
+      renderInlineMarkdown(
+        'Click [evil](javascript:alert(1)) or <img src=x onerror=alert(1)>'
+      )
+    );
+    assert.include(
+      rendered,
+      '<a rel="noopener noreferrer" href="about:invalid#zClosurez">evil</a>'
+    );
+    assert.include(rendered, '&lt;img src=x onerror=alert(1)&gt;');
+  });
+
+  test('renderInlineTextDiff renders single backtick code blocks and markdown links inside modified paragraphs', () => {
+    const textA =
+      'The generalized runner script is located at [run_experiment.py](https://example.com/tools/build_experimentation/scripts/run_experiment.py).';
+    const textB =
+      'The generalized runner script is located at [`scripts/run_experiment.py`](scripts/run_experiment.py) (relative to this `SKILL.md` directory, `<SKILL_DIR>`). It automatically resolves the workspace root from `--workspace-root`, `workspace_root` in the JSON config, `$ANDROID_BUILD_TOP`, or the nearest ancestor directory containing `.repo/`.';
+
+    const {leftHtml, rightHtml} = renderInlineTextDiff(textA, textB, 'p');
+    const leftStr = renderToHtmlString(leftHtml);
+    const rightStr = renderToHtmlString(rightHtml);
+    assert.include(
+      leftStr,
+      '<a target="_blank" rel="noopener noreferrer" href="https://example.com/tools/build_experimentation/scripts/run_experiment.py">run_experiment.py</a>'
+    );
+    assert.include(
+      rightStr,
+      '<a rel="noopener noreferrer" href="scripts/run_experiment.py"><code>scripts/run_experiment.py</code></a>'
+    );
+    assert.include(rightStr, '<code>SKILL.md</code>');
+    assert.include(rightStr, '<code>&lt;SKILL_DIR&gt;</code>');
+    assert.include(rightStr, '<code>--workspace-root</code>');
+    assert.include(rightStr, '<code>workspace_root</code>');
+    assert.include(rightStr, '<code>$ANDROID_BUILD_TOP</code>');
+    assert.include(rightStr, '<code>.repo/</code>');
+  });
+
+  test('computeNormalizedEditDistance and coalesceInlineDiffSegments follow delta-style edit inference', () => {
+    assert.equal(
+      computeNormalizedEditDistance(
+        tokenizeWords('same sentence'),
+        tokenizeWords('same sentence')
+      ),
+      0
+    );
+    assert.equal(
+      computeNormalizedEditDistance(
+        tokenizeWords('alpha beta'),
+        tokenizeWords('gamma delta')
+      ),
+      1
+    );
+
+    const rawSegments = computeSequenceDiff(
+      tokenizeWords('Run old legacy command now.'),
+      tokenizeWords('Run new modern command now.')
+    );
+    const coalesced = coalesceInlineDiffSegments(rawSegments);
+    // The space between 'old'/'legacy' and 'new'/'modern' is coalesced into a single edit span.
+    assert.deepEqual(coalesced, [
+      {text: 'Run ', type: 'common'},
+      {text: 'old legacy', type: 'deleted'},
+      {text: 'new modern', type: 'added'},
+      {text: ' command now.', type: 'common'},
+    ]);
+  });
+
+  test('alignHomologousItems pairs modified items across insertions', () => {
+    const itemsA = ['Configure timeout in default.yaml'];
+    const itemsB = [
+      'Brand new prerequisite step',
+      'Configure timeout in production.yaml',
+    ];
+    const aligned = alignHomologousItems(itemsA, itemsB);
+    assert.equal(aligned.length, 2);
+    assert.equal(aligned[0].type, 'added');
+    assert.equal(aligned[1].type, 'modified');
+    if (aligned[1].type === 'modified') {
+      assert.equal(aligned[1].textA, 'Configure timeout in default.yaml');
+      assert.equal(aligned[1].textB, 'Configure timeout in production.yaml');
+    }
+  });
+
+  test('renderCodeBlockDiff performs within-line token diffing on homologous code lines', () => {
+    const tokensA = parseMarkdownBlocks(
+      '```bash\npython3 tools/build_experimentation/scripts/run_experiment.py --config path/to/config.json\n```'
+    );
+    const tokensB = parseMarkdownBlocks(
+      '```bash\npython3 <SKILL_DIR>/scripts/run_experiment.py --config path/to/config.json\n```'
+    );
+    assert.deepEqual(tokenizeCodeWords('python3 <SKILL_DIR>/run.py --flag'), [
+      'python3',
+      ' ',
+      '<SKILL_DIR>',
+      '/',
+      'run',
+      '.',
+      'py',
+      ' ',
+      '--flag',
+    ]);
+
+    const {leftHtml, rightHtml} = renderCodeBlockDiff(
+      tokensA[0] as never,
+      tokensB[0] as never
+    );
+    const leftStr = renderToHtmlString(leftHtml);
+    const rightStr = renderToHtmlString(rightHtml);
+    assert.include(leftStr, 'class="diff-code-line-del"');
+    assert.include(
+      leftStr,
+      '<del class="diff-highlight-del">tools/build_experimentation</del>'
+    );
+    assert.include(rightStr, 'class="diff-code-line-add"');
+    assert.include(
+      rightStr,
+      '<ins class="diff-highlight-add">&lt;SKILL_DIR&gt;</ins>'
+    );
+  });
+
+  test('renderListDiff, renderBlockquoteDiff, and renderTableDiff highlight within-element changes and emit placeholders', () => {
+    const listA = parseMarkdownBlocks(
+      '- Enable `--legacy-auth` on startup\n- Unchanged item'
+    )[0];
+    const listB = parseMarkdownBlocks(
+      '- Enable `--oauth2-auth` on startup\n- Unchanged item\n- Added item'
+    )[0];
+    const listDiff = renderListDiff(listA as never, listB as never);
+    const listLeftStr = renderToHtmlString(listDiff.leftHtml);
+    const listRightStr = renderToHtmlString(listDiff.rightHtml);
+    assert.include(
+      listLeftStr,
+      '<del class="diff-highlight-del"><code>--legacy-auth</code></del>'
+    );
+    assert.include(
+      listLeftStr,
+      '<li class="diff-list-item-placeholder" aria-hidden="true"></li>'
+    );
+    assert.include(
+      listRightStr,
+      '<ins class="diff-highlight-add"><code>--oauth2-auth</code></ins>'
+    );
+    assert.include(listRightStr, 'class="diff-list-item-add"');
+
+    const quoteA = parseMarkdownBlocks('> Removed in Q3.')[0];
+    const quoteB = parseMarkdownBlocks('> Removed in Q4.')[0];
+    const quoteDiff = renderBlockquoteDiff(quoteA as never, quoteB as never);
+    assert.include(
+      renderToHtmlString(quoteDiff.leftHtml),
+      '<blockquote><p>Removed in <del class="diff-highlight-del">Q3</del>.</p></blockquote>'
+    );
+    assert.include(
+      renderToHtmlString(quoteDiff.rightHtml),
+      '<blockquote><p>Removed in <ins class="diff-highlight-add">Q4</ins>.</p></blockquote>'
+    );
+
+    const tableA = parseMarkdownBlocks(
+      '| Flag | Default |\n| --- | --- |\n| `--threads` | `4` |'
+    )[0];
+    const tableB = parseMarkdownBlocks(
+      '| Flag | Default | Notes |\n| --- | --- | --- |\n| `--threads` | `8` | Fast |\n| `--verbose` | `true` | Logs |'
+    )[0];
+    const tableDiff = renderTableDiff(tableA as never, tableB as never);
+    const tableLeftStr = renderToHtmlString(tableDiff.leftHtml);
+    const tableRightStr = renderToHtmlString(tableDiff.rightHtml);
+    assert.include(
+      tableLeftStr,
+      '<th class="diff-table-cell-placeholder" aria-hidden="true"></th>'
+    );
+    assert.include(tableLeftStr, '<td><code>--threads</code></td>');
+    assert.include(
+      tableLeftStr,
+      '<td><del class="diff-highlight-del"><code>4</code></del></td>'
+    );
+    assert.include(
+      tableLeftStr,
+      '<td class="diff-table-cell-placeholder" aria-hidden="true"></td>'
+    );
+    assert.include(
+      tableLeftStr,
+      '<tr class="diff-table-row-placeholder" aria-hidden="true">'
+    );
+    assert.include(
+      tableRightStr,
+      '<td><ins class="diff-highlight-add"><code>8</code></ins></td>'
+    );
+    assert.include(tableRightStr, '<tr class="diff-table-row-add">');
+  });
+
+  test('handles combined bold+italic delimiters, backslash escapes, nested lists, ordered list start, and multi-paragraph blockquotes', () => {
+    assert.deepEqual(tokenizeWords('***old italic***'), [
+      '*',
+      '**',
+      'old',
+      ' ',
+      'italic',
+      '**',
+      '*',
+    ]);
+    const boldItalicDiff = renderInlineTextDiff(
+      'Prefix ***old italic*** suffix.',
+      'Prefix ***new italic*** suffix.',
+      'p'
+    );
+    assert.include(
+      renderToHtmlString(boldItalicDiff.leftHtml),
+      '<em><strong><del class="diff-highlight-del">old</del> italic</strong></em>'
+    );
+    assert.include(
+      renderToHtmlString(boldItalicDiff.rightHtml),
+      '<em><strong><ins class="diff-highlight-add">new</ins> italic</strong></em>'
+    );
+
+    assert.equal(
+      renderToHtmlString(
+        renderInlineMarkdown('Escaped \\*star\\* and \\[brackets\\]')
+      ),
+      'Escaped *star* and [brackets]'
+    );
+
+    const nestedListA = parseMarkdownBlocks(
+      '3. Parent item\n   - Old child\n4. Second item'
+    )[0];
+    const nestedListB = parseMarkdownBlocks(
+      '3. Parent item\n   - New child\n4. Second item'
+    )[0];
+    const nestedListDiff = renderListDiff(
+      nestedListA as never,
+      nestedListB as never
+    );
+    const nestedLeftStr = renderToHtmlString(nestedListDiff.leftHtml);
+    const nestedRightStr = renderToHtmlString(nestedListDiff.rightHtml);
+    assert.include(nestedLeftStr, '<ol start="3">');
+    assert.match(
+      nestedLeftStr,
+      /<ul>\s*<li><del class="diff-highlight-del">Old<\/del> child<\/li>\s*<\/ul>/
+    );
+    assert.match(
+      nestedRightStr,
+      /<ul>\s*<li><ins class="diff-highlight-add">New<\/ins> child<\/li>\s*<\/ul>/
+    );
+
+    const multiQuoteA = parseMarkdownBlocks(
+      '> First paragraph old.\n>\n> Second paragraph.'
+    )[0];
+    const multiQuoteB = parseMarkdownBlocks(
+      '> First paragraph new.\n>\n> Second paragraph.'
+    )[0];
+    const multiQuoteDiff = renderBlockquoteDiff(
+      multiQuoteA as never,
+      multiQuoteB as never
+    );
+    assert.include(
+      renderToHtmlString(multiQuoteDiff.leftHtml),
+      '<blockquote><p>First paragraph <del class="diff-highlight-del">old</del>.</p><p>Second paragraph.</p></blockquote>'
+    );
+    assert.include(
+      renderToHtmlString(multiQuoteDiff.rightHtml),
+      '<blockquote><p>First paragraph <ins class="diff-highlight-add">new</ins>.</p><p>Second paragraph.</p></blockquote>'
+    );
+  });
+
   test('computeSequenceDiff', () => {
     const seqA = ['a', 'b', 'c'];
     const seqB = ['a', 'x', 'c'];
@@ -104,7 +504,10 @@
       assert.equal(rows[1].status, 'added');
       assert.isUndefined(rows[1].leftToken);
       assert.isDefined(rows[1].rightToken);
-      assert.include(rows[1].rightHtml!, 'Inserted paragraph');
+      assert.include(
+        renderToHtmlString(rows[1].rightHtml),
+        'Inserted paragraph'
+      );
       assert.equal(rows[2].status, 'unchanged');
     });
 
@@ -120,7 +523,7 @@
       assert.equal(rows[1].status, 'deleted');
       assert.isDefined(rows[1].leftToken);
       assert.isUndefined(rows[1].rightToken);
-      assert.include(rows[1].leftHtml!, 'Deleted paragraph');
+      assert.include(renderToHtmlString(rows[1].leftHtml), 'Deleted paragraph');
       assert.equal(rows[2].status, 'unchanged');
     });
 
@@ -133,9 +536,18 @@
       const rows = alignMarkdownTokens(tokensA, tokensB);
       assert.equal(rows.length, 1);
       assert.equal(rows[0].status, 'modified');
-      assert.include(rows[0].leftHtml!, 'Follow this structure');
-      assert.include(rows[0].rightHtml!, 'diff-highlight-add');
-      assert.include(rows[0].rightHtml!, 'Only the first block is required');
+      assert.include(
+        renderToHtmlString(rows[0].leftHtml),
+        'Follow this structure'
+      );
+      assert.include(
+        renderToHtmlString(rows[0].rightHtml),
+        'diff-highlight-add'
+      );
+      assert.include(
+        renderToHtmlString(rows[0].rightHtml),
+        'Only the first block is required'
+      );
     });
 
     test('modified code block generates line diff highlights', () => {
@@ -147,10 +559,16 @@
       const rows = alignMarkdownTokens(tokensA, tokensB);
       assert.equal(rows.length, 1);
       assert.equal(rows[0].status, 'modified');
-      assert.include(rows[0].leftHtml!, 'diff-highlight-del');
-      assert.include(rows[0].leftHtml!, 'old code');
-      assert.include(rows[0].rightHtml!, 'diff-highlight-add');
-      assert.include(rows[0].rightHtml!, 'new code');
+      assert.include(
+        renderToHtmlString(rows[0].leftHtml),
+        'diff-highlight-del'
+      );
+      assert.include(renderToHtmlString(rows[0].leftHtml), 'old code');
+      assert.include(
+        renderToHtmlString(rows[0].rightHtml),
+        'diff-highlight-add'
+      );
+      assert.include(renderToHtmlString(rows[0].rightHtml), 'new code');
     });
 
     test('line numbers are correctly assigned to tokens and rows', () => {
@@ -175,6 +593,23 @@
       assert.equal(rows[1].rightStartLine, 3);
       assert.equal(rows[1].rightEndLine, 4);
     });
+
+    test('does not cross-pair unrelated blocks when uA === uB > 1', () => {
+      const docA =
+        'Alpha beta gamma.\n\n```bash\npython3 run_experiment.py --old-flag --config a.json\n```';
+      const docB =
+        '```bash\npython3 run_experiment.py --new-flag --config a.json\n```\n\nDelta epsilon zeta.';
+      const tokensA = parseMarkdownBlocks(docA);
+      const tokensB = parseMarkdownBlocks(docB);
+
+      const rows = alignMarkdownTokens(tokensA, tokensB);
+      assert.equal(rows.length, 3);
+      assert.equal(rows[0].status, 'deleted');
+      assert.equal(rows[1].status, 'modified');
+      assert.equal(rows[1].leftToken?.type, 'code');
+      assert.equal(rows[1].rightToken?.type, 'code');
+      assert.equal(rows[2].status, 'added');
+    });
   });
 
   suite('attachThreadsToRows', () => {
@@ -226,4 +661,264 @@
       assert.equal(result.rowsWithThreads[1].leftThreads[0].rootId, 'left-1');
     });
   });
+
+  suite('adversarial security and DoS hardening', () => {
+    test('sanitizeCodeLanguage blocks CSS class injection and Shadow DOM selector hijacking', () => {
+      assert.equal(
+        sanitizeCodeLanguage('lean selection-action-box diff-cell'),
+        'language-lean'
+      );
+      assert.equal(sanitizeCodeLanguage('c++'), 'language-c++');
+      assert.equal(sanitizeCodeLanguage('ts_2.0-beta'), 'language-ts_2.0-beta');
+      assert.isUndefined(sanitizeCodeLanguage('   '));
+      assert.equal(sanitizeCodeLanguage('"><script>'), 'language-script');
+      assert.isUndefined(sanitizeCodeLanguage('"><!@$%^'));
+      assert.equal(sanitizeCodeLanguage('a'.repeat(100))?.length, 9 + 40);
+
+      const tokens = parseMarkdownBlocks(
+        '```lean selection-action-box diff-cell hygiene-pill verified\n#eval 1\n```'
+      );
+      const rendered = renderToHtmlString(renderTokenToHtml(tokens[0]));
+      assert.include(rendered, '<code class="language-lean">');
+      assert.notInclude(rendered, 'selection-action-box');
+      assert.notInclude(rendered, 'diff-cell');
+      assert.notInclude(rendered, 'hygiene-pill');
+
+      const codeTokenA = parseMarkdownBlocks(
+        '```lean selection-action-box\na\n```'
+      )[0] as Tokens.Code;
+      const codeTokenB = parseMarkdownBlocks(
+        '```lean diff-cell\nb\n```'
+      )[0] as Tokens.Code;
+      const {leftHtml, rightHtml} = renderCodeBlockDiff(codeTokenA, codeTokenB);
+      assert.include(
+        renderToHtmlString(leftHtml),
+        '<code class="language-lean">'
+      );
+      assert.notInclude(renderToHtmlString(leftHtml), 'selection-action-box');
+      assert.include(
+        renderToHtmlString(rightHtml),
+        '<code class="language-lean">'
+      );
+      assert.notInclude(renderToHtmlString(rightHtml), 'diff-cell');
+    });
+
+    test('sanitizeMarkdownUrl blocks protocol-relative, backslash, control-char, entity-encoded, and exotic schemes', () => {
+      const blockedUrls = [
+        '//evil.com/phish',
+        '///evil.com/phish',
+        '/\\evil.com/phish',
+        '\\/evil.com/phish',
+        '\\\\evil.com/phish',
+        '\\evil.com/phish',
+        'java\tscript:alert(1)',
+        'java\nscript:alert(1)',
+        'java\rscript:alert(1)',
+        'javascript\u0000:alert(1)',
+        '\u0000//evil.com',
+        'ht\ttps://evil.com',
+        '&#106;avascript:alert(1)',
+        '&#x6a;avascript:alert(1)',
+        'javascript&colon;alert(1)',
+        'http:evil.com',
+        'https:evil.com',
+        'vbscript:msgbox(1)',
+        'blob:https://example.com/123',
+        'javascript :alert(1)',
+        'mailto:user@example.com',
+        'ftp://example.com/file',
+      ];
+      for (const bad of blockedUrls) {
+        assert.equal(
+          sanitizeMarkdownUrl(bad),
+          'about:invalid#zClosurez',
+          `Expected URL to be blocked: ${JSON.stringify(bad)}`
+        );
+      }
+      assert.equal(sanitizeMarkdownUrl(''), '');
+      assert.equal(sanitizeMarkdownUrl('   '), '');
+
+      // Safe absolute and relative URLs still pass
+      assert.equal(
+        sanitizeMarkdownUrl('https://lean-lang.org/doc/reference/latest/'),
+        'https://lean-lang.org/doc/reference/latest/'
+      );
+      assert.equal(
+        sanitizeMarkdownUrl('https://example.com/?a=1&amp;b=2'),
+        'https://example.com/?a=1&amp;b=2'
+      );
+      assert.equal(sanitizeMarkdownUrl('./Spec.lean#L42'), './Spec.lean#L42');
+      assert.equal(sanitizeMarkdownUrl('#section-1'), '#section-1');
+    });
+
+    test('inline markdown lexing is isolated from global marked.setOptions mutations', () => {
+      const prevDefaults = marked.defaults;
+      try {
+        marked.setOptions({pedantic: true, gfm: false});
+        const rendered = renderToHtmlString(
+          renderInlineMarkdown('~~old~~ and [Safe](https://example.com)')
+        );
+        assert.include(rendered, '<del>old</del>');
+        assert.include(
+          rendered,
+          '<a target="_blank" rel="noopener noreferrer" href="https://example.com">Safe</a>'
+        );
+      } finally {
+        marked.setOptions(prevDefaults);
+      }
+    });
+
+    test('diff and alignment utilities stay bounded on large adversarial inputs', () => {
+      const start = performance.now();
+
+      const bigA = Array.from({length: 1000}, (_, i) => `a_${i}`);
+      const bigB = Array.from({length: 1000}, (_, i) => `b_${i}`);
+      const seqOps = computeSequenceDiff(bigA, bigB);
+      assert.equal(seqOps.length, 2000);
+
+      const dist = computeNormalizedEditDistance(
+        bigA.slice(0, 400),
+        bigB.slice(0, 400)
+      );
+      assert.equal(dist, 1);
+
+      const alternating = Array.from({length: 2000}, (_, i) => {
+        return {
+          text: i % 2 === 0 ? 'x' : ' ',
+          type: i % 2 === 0 ? ('deleted' as const) : ('common' as const),
+        };
+      });
+      const coalesced = coalesceInlineDiffSegments(alternating);
+      assert.isAtLeast(coalesced.length, 1);
+
+      const itemsA = Array.from({length: 200}, (_, i) => `item_a_${i}`);
+      const itemsB = Array.from({length: 200}, (_, i) => `item_b_${i}`);
+      const aligned = alignHomologousItems(itemsA, itemsB, s => [s]);
+      assert.equal(aligned.length, 400);
+
+      const elapsedMs = performance.now() - start;
+      assert.isBelow(
+        elapsedMs,
+        1000,
+        `Bounded diff utilities took too long: ${elapsedMs}ms`
+      );
+    });
+
+    test('computeLinearExactAnchors and alignHomologousItems use Patience anchoring on >100-line proofs with repeated lines', () => {
+      // Deleting a leading repeated line (`simp`) that also occurs at EOF must
+      // not jump the cursor to the bottom and mark all middle lines changed.
+      const middle = Array.from({length: 120}, (_, i) => `  have h${i} := rfl`);
+      const base = ['  simp', ...middle, '  simp'];
+      const rev = [...middle, '  simp'];
+
+      const aligned = alignHomologousItems(base, rev, s => s.split(/\s+/));
+      const unchangedCount = aligned.filter(a => a.type === 'unchanged').length;
+      const deletedCount = aligned.filter(a => a.type === 'deleted').length;
+      const addedCount = aligned.filter(a => a.type === 'added').length;
+
+      assert.equal(unchangedCount, 121);
+      assert.equal(deletedCount, 1);
+      assert.equal(addedCount, 0);
+
+      // Large input with 5,000 repeated lines must run in linear time.
+      const start = performance.now();
+      const repA = Array.from({length: 5000}, (_, i) =>
+        i % 3 === 0 ? '' : i % 3 === 1 ? 'end' : 'simp'
+      );
+      const repB = ['extra', ...repA.slice(1)];
+      const anchors = computeLinearExactAnchors(repA, repB);
+      assert.isAbove(anchors.length, 4900);
+      assert.isBelow(performance.now() - start, 500);
+    });
+
+    test('alignHomologousItems preserves fuzzy word-level diffs in >100-line blocks with top/bottom edits while respecting cell budget', async () => {
+      // >100-line block where line 1 and line 120 are edited inside a 122-line
+      // block so `mm * nn > MAX_ALIGN_ITEMS_CELLS`.
+      const unchangedMiddle = Array.from(
+        {length: 118},
+        (_, i) => `  have step_${i} : True := trivial`
+      );
+      const base = [
+        '  have h_top : a = oldAlpha',
+        ...unchangedMiddle,
+        '  exact Nat.add_comm a oldOmega',
+      ];
+      const rev = [
+        '  have h_top : a = newAlpha',
+        ...unchangedMiddle,
+        '  exact Nat.add_comm a newOmega',
+      ];
+
+      const aligned = alignHomologousItems(base, rev, s =>
+        s.split(/(\s+)/).filter(Boolean)
+      );
+      assert.equal(aligned.length, 120);
+      assert.deepEqual(aligned[0], {
+        type: 'modified',
+        textA: '  have h_top : a = oldAlpha',
+        textB: '  have h_top : a = newAlpha',
+        aIdx: 0,
+        bIdx: 0,
+      });
+      assert.deepEqual(aligned[119], {
+        type: 'modified',
+        textA: '  exact Nat.add_comm a oldOmega',
+        textB: '  exact Nat.add_comm a newOmega',
+        aIdx: 119,
+        bIdx: 119,
+      });
+      assert.equal(aligned.filter(a => a.type === 'unchanged').length, 118);
+
+      // End-to-end >100-line Markdown code block renders inline <del>/<ins>.
+      const codeA = parseMarkdownBlocks(
+        ['```lean', ...base, '```'].join('\n')
+      )[0] as Tokens.Code;
+      const codeB = parseMarkdownBlocks(
+        ['```lean', ...rev, '```'].join('\n')
+      )[0] as Tokens.Code;
+      const {leftHtml, rightHtml} = renderCodeBlockDiff(codeA, codeB);
+      const leftStr = renderToHtmlString(leftHtml);
+      const rightStr = renderToHtmlString(rightHtml);
+      assert.include(leftStr, '<del');
+      assert.include(leftStr, 'oldAlpha');
+      assert.include(leftStr, 'oldOmega');
+      assert.include(rightStr, '<ins');
+      assert.include(rightStr, 'newAlpha');
+      assert.include(rightStr, 'newOmega');
+
+      // Shared cell budget: a huge 150x150 rewritten gap exceeds remainingCells
+      // and falls back to deleted+added WITHOUT starving a subsequent 1x1 edit.
+      const hugeGapA = Array.from({length: 150}, (_, i) => `old_item_${i}`);
+      const hugeGapB = Array.from({length: 150}, (_, i) => `new_item_${i}`);
+      const anchoredMid = Array.from({length: 10}, (_, i) => `anchor_${i}`);
+      const mixedA = [...hugeGapA, ...anchoredMid, '  exact tailOld'];
+      const mixedB = [...hugeGapB, ...anchoredMid, '  exact tailNew'];
+      const mixedAligned = alignHomologousItems(mixedA, mixedB, s =>
+        s.split(/(\s+)/).filter(Boolean)
+      );
+      const lastItem = mixedAligned[mixedAligned.length - 1];
+      assert.equal(lastItem.type, 'modified');
+      assert.equal(
+        mixedAligned.filter(a => a.type === 'unchanged').length,
+        anchoredMid.length
+      );
+    });
+
+    test('computeNormalizedEditDistance preserves Unicode identifiers and supports custom content filters', () => {
+      assert.equal(
+        computeNormalizedEditDistance(['α', '=', 'β'], ['α', '=', 'β']),
+        0
+      );
+      assert.isAbove(
+        computeNormalizedEditDistance(['have', 'α', 'β'], ['have', 'γ', 'δ']),
+        0.5
+      );
+      const withMath = computeNormalizedEditDistance(
+        ['∀', 'α', '≤', 'β'],
+        ['∃', 'α', '≥', 'β'],
+        t => /[\p{L}\p{N}_]/u.test(t) || '∀∃≤≥'.includes(t)
+      );
+      assert.equal(withMath, 0.5);
+    });
+  });
 });
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.ts b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.ts
index 188e3e5..261ac98 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.ts
+++ b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.ts
@@ -5,6 +5,7 @@
  */
 import '../../plugins/gr-endpoint-decorator/gr-endpoint-decorator';
 import '../../plugins/gr-endpoint-param/gr-endpoint-param';
+import '../../chat-panel/chat-panel';
 import '../../../styles/gr-a11y-styles';
 import '../../../styles/shared-styles';
 import '../../shared/gr-button/gr-button';
@@ -37,6 +38,7 @@
 import {CommentAnchorTapEventDetail} from '../../shared/gr-comment/gr-comment';
 import {ChangeComments} from '../../diff/gr-comment-api/gr-comment-api';
 import {
+  ActionNameToActionInfoMap,
   BasePatchSetNum,
   Comment,
   CommentMap,
@@ -49,10 +51,11 @@
   PatchSetNumber,
   PreferencesInfo,
   RepoName,
+  RevisionInfo,
   RevisionPatchSetNum,
 } from '../../../types/common';
 import {DiffInfo, DiffPreferencesInfo, WebLinkInfo} from '../../../types/diff';
-import {ParsedChangeInfo} from '../../../types/types';
+import {EditRevisionInfo, ParsedChangeInfo} from '../../../types/types';
 import {
   FilesWebLinks,
   PatchRangeChangeEvent,
@@ -60,7 +63,11 @@
 import {GrDiffCursor} from '../../../embed/diff/gr-diff-cursor/gr-diff-cursor';
 import {CommentSide, DiffViewMode, Side} from '../../../constants/constants';
 import {GrApplyFixDialog} from '../gr-apply-fix-dialog/gr-apply-fix-dialog';
-import {OpenFixPreviewEvent, ValueChangedEvent} from '../../../types/events';
+import {
+  ExplainCodeRequestedEvent,
+  OpenFixPreviewEvent,
+  ValueChangedEvent,
+} from '../../../types/events';
 import {fire, fireAlert} from '../../../utils/event-util';
 import {assertIsDefined} from '../../../utils/common-util';
 import {whenVisible} from '../../../utils/dom-util';
@@ -81,6 +88,7 @@
 import {GrDownloadDialog} from '../../change/gr-download-dialog/gr-download-dialog';
 import {commentsModelToken} from '../../../models/comments/comments-model';
 import {changeModelToken} from '../../../models/change/change-model';
+import {chatModelToken} from '../../../models/chat/chat-model';
 import {resolve} from '../../../models/dependency';
 import {css, html, LitElement, nothing, PropertyValues} from 'lit';
 import {ShortcutController} from '../../lit/shortcut-controller';
@@ -104,7 +112,15 @@
   FileNameToNormalizedFileInfoMap,
   filesModelToken,
 } from '../../../models/change/files-model';
-import {isImageDiff, isMarkdownDiff} from '../../../utils/diff-util';
+import {
+  canBlameFile,
+  computeBlameToggleLabel,
+  isImageDiff,
+  isLeanDiff,
+  isMarkdownDiff,
+} from '../../../utils/diff-util';
+import '../gr-diff-lean-viewer/gr-diff-lean-viewer';
+import type {GrDiffLeanViewer} from '../gr-diff-lean-viewer/gr-diff-lean-viewer';
 import '../gr-diff-markdown-viewer/gr-diff-markdown-viewer';
 import type {GrDiffMarkdownViewer} from '../gr-diff-markdown-viewer/gr-diff-markdown-viewer';
 import {formStyles} from '../../../styles/form-styles';
@@ -124,6 +140,10 @@
 // Files larger than this cannot be downloaded.
 const FILE_DOWNLOAD_LIMIT_BYTES = 50 * 1000 * 1000;
 
+// Reserved sidebar key for chat-panel in shownSidebar.
+// visible for testing
+export const CHAT_PANEL_SIDEBAR = 'chat-panel';
+
 // visible for testing
 export interface Files {
   /** All file paths sorted by `specialFilePathCompare`. */
@@ -146,12 +166,27 @@
   @query('#markdownViewer')
   markdownViewer?: GrDiffMarkdownViewer;
 
+  @query('#leanViewer')
+  leanViewer?: GrDiffLeanViewer;
+
   @state()
   reviewed = false;
 
   @state()
   showRichMarkdown = false;
 
+  @state()
+  showRichLean = false;
+
+  @state()
+  private staleRichDiff = false;
+
+  private diffUpdatedFromHost = false;
+
+  private awaitingNavReload = false;
+
+  private navReloadGeneration = 0;
+
   @query('#downloadModal')
   downloadModal?: HTMLDialogElement;
 
@@ -204,6 +239,23 @@
 
   // Private but used in tests.
   @state()
+  revision?: RevisionInfo | EditRevisionInfo;
+
+  // Private but used in tests.
+  @state()
+  revisionActions?: ActionNameToActionInfoMap;
+
+  // Whether any plugin has registered via plugin.aiCodeReview().register(),
+  // matching gr-change-actions. Private but used in tests.
+  @state()
+  aiPluginsRegistered = false;
+
+  private lastRevisionActionsKey?: string;
+
+  private hasInitializedSidebarFromPrefs = false;
+
+  // Private but used in tests.
+  @state()
   changeComments?: ChangeComments;
 
   // Private but used in tests.
@@ -282,10 +334,14 @@
 
   private readonly reporting = getAppContext().reportingService;
 
+  private readonly restApiService = getAppContext().restApiService;
+
   private readonly getUserModel = resolve(this, userModelToken);
 
   private readonly getChangeModel = resolve(this, changeModelToken);
 
+  private readonly getChatModel = resolve(this, chatModelToken);
+
   private readonly getCommentsModel = resolve(this, commentsModelToken);
 
   private readonly getFilesModel = resolve(this, filesModelToken);
@@ -318,6 +374,21 @@
     }
   });
 
+  private readonly handleCloseChatPanel = () => {
+    this.getChatModel().setChatPanelOpen(false);
+  };
+
+  private readonly handleOpenChatPanel = () => {
+    this.getChatModel().setChatPanelOpen(true);
+  };
+
+  private readonly handleExplainCodeRequested = (
+    e: ExplainCodeRequestedEvent
+  ) => {
+    this.getChatModel().setChatPanelOpen(true);
+    this.getChatModel().processChatRequest(e.detail);
+  };
+
   constructor() {
     super();
     this.setupKeyboardShortcuts();
@@ -444,6 +515,29 @@
     );
     subscribe(
       this,
+      () => this.getChangeModel().revision$,
+      revision => (this.revision = revision)
+    );
+    subscribe(
+      this,
+      () => this.getPluginLoader().pluginsModel.aiCodeReviewPlugins$,
+      plugins => {
+        this.aiPluginsRegistered = plugins.length > 0;
+      }
+    );
+    subscribe(
+      this,
+      () => this.getChatModel().chatPanelOpen$,
+      open => {
+        if (open) {
+          this.shownSidebar = CHAT_PANEL_SIDEBAR;
+        } else if (this.shownSidebar === CHAT_PANEL_SIDEBAR) {
+          this.shownSidebar = undefined;
+        }
+      }
+    );
+    subscribe(
+      this,
       () => this.getChangeModel().reviewedFiles$,
       reviewedFiles => {
         this.reviewedFiles = new Set(reviewedFiles) ?? new Set();
@@ -575,7 +669,7 @@
           display: block;
           background-color: var(--view-background-color);
           --sidebar-top: calc(
-            var(--main-header-height) + var(--diff-header-height, 80px)
+            var(--main-header-height, 0px) + var(--diff-header-height, 80px)
           );
         }
         .hidden {
@@ -761,11 +855,32 @@
           display: inline-block;
           margin-right: var(--spacing-m);
         }
+        .chatButton {
+          display: inline-flex;
+          align-items: center;
+          margin-right: var(--spacing-m);
+        }
+        .chatButton gr-icon {
+          color: inherit;
+          margin-right: var(--spacing-xs);
+        }
+        .sidebar {
+          height: 100%;
+        }
         .sidebarContents {
           background: var(--background-color-secondary);
           box-sizing: border-box;
           height: 100%;
         }
+        .sidebarContents gr-endpoint-decorator[name='chat-panel'] {
+          display: block;
+          height: 100%;
+        }
+        .sidebarContents
+          gr-endpoint-decorator[name='chat-panel']
+          > :not(gr-endpoint-param) {
+          height: 100%;
+        }
         md-checkbox {
           --md-checkbox-container-size: 15px;
           --md-checkbox-icon-size: 15px;
@@ -795,30 +910,128 @@
       this.handleToggleFileReviewed()
     );
     this.addEventListener('open-fix-preview', e => this.onOpenFixPreview(e));
+    this.addEventListener('close-chat-panel', this.handleCloseChatPanel);
+    this.addEventListener(
+      'explain-code-requested',
+      this.handleExplainCodeRequested
+    );
+    document.addEventListener('open-chat-panel', this.handleOpenChatPanel);
     this.cursor = new GrDiffCursor();
     if (this.diffHost) this.reInitCursor();
-    this.getUserModel()
-      .preferences$.pipe(
-        map(p => p.diff_page_sidebar),
-        take(1)
-      )
-      .toPromise()
-      .then(initialSidebar => {
-        if (initialSidebar === 'NONE' || initialSidebar === undefined) {
-          this.shownSidebar = undefined;
-        } else {
-          this.shownSidebar = initialSidebar.substring('plugin-'.length);
-        }
-      });
+    if (!this.hasInitializedSidebarFromPrefs) {
+      this.hasInitializedSidebarFromPrefs = true;
+      this.getUserModel()
+        .preferences$.pipe(
+          map(p => p.diff_page_sidebar),
+          take(1)
+        )
+        .toPromise()
+        .then(initialSidebar => {
+          if (this.shownSidebar === CHAT_PANEL_SIDEBAR) return;
+          if (initialSidebar === 'NONE' || initialSidebar === undefined) {
+            this.shownSidebar = undefined;
+          } else {
+            this.shownSidebar = initialSidebar.substring('plugin-'.length);
+          }
+        });
+    }
   }
 
   override disconnectedCallback() {
+    this.removeEventListener('close-chat-panel', this.handleCloseChatPanel);
+    this.removeEventListener(
+      'explain-code-requested',
+      this.handleExplainCodeRequested
+    );
+    document.removeEventListener('open-chat-panel', this.handleOpenChatPanel);
     this.cursor?.dispose();
     this.headerResizeObserver.disconnect();
     document.documentElement.style.setProperty('--diff-header-height', '0px');
     super.disconnectedCallback();
   }
 
+  private async loadRevisionActions() {
+    const patchNum =
+      this.patchNum && this.patchNum !== EDIT
+        ? this.patchNum
+        : this.latestPatchNum;
+    if (!this.changeNum || !patchNum) {
+      this.lastRevisionActionsKey = undefined;
+      this.revisionActions = undefined;
+      return;
+    }
+    const key = `${this.changeNum}:${patchNum}`;
+    if (this.lastRevisionActionsKey === key) {
+      return;
+    }
+    this.lastRevisionActionsKey = key;
+    this.revisionActions = undefined;
+    try {
+      const revisionActions =
+        await this.restApiService.getChangeRevisionActions(
+          this.changeNum,
+          patchNum
+        );
+      if (this.lastRevisionActionsKey !== key) return;
+      this.revisionActions = revisionActions ?? {};
+    } catch {
+      if (this.lastRevisionActionsKey !== key) return;
+      this.revisionActions = {};
+    }
+  }
+
+  protected override willUpdate(changedProperties: PropertyValues): void {
+    super.willUpdate(changedProperties);
+    const navChanged =
+      (changedProperties.has('change') &&
+        changedProperties.get('change') !== undefined) ||
+      (changedProperties.has('path') &&
+        changedProperties.get('path') !== undefined) ||
+      (changedProperties.has('patchNum') &&
+        changedProperties.get('patchNum') !== undefined) ||
+      (changedProperties.has('basePatchNum') &&
+        changedProperties.get('basePatchNum') !== undefined);
+    if (navChanged) {
+      this.navReloadGeneration++;
+      // Only treat `diff` as fresh in the same Lit cycle when assigned
+      // directly (not via a late `diff-changed` event from `<gr-diff-host>`
+      // racing with a navigation update).
+      if (changedProperties.has('diff') && !this.diffUpdatedFromHost) {
+        this.staleRichDiff = this.diff === undefined;
+        this.awaitingNavReload = false;
+      } else {
+        this.staleRichDiff = true;
+        this.awaitingNavReload = true;
+      }
+    } else if (changedProperties.has('diff')) {
+      if (this.diff === undefined) {
+        this.staleRichDiff = true;
+      } else if (!this.awaitingNavReload) {
+        this.staleRichDiff = false;
+      }
+    }
+    this.diffUpdatedFromHost = false;
+    if (
+      changedProperties.has('changeNum') ||
+      changedProperties.has('latestPatchNum') ||
+      changedProperties.has('patchNum')
+    ) {
+      void this.loadRevisionActions();
+    }
+    if (
+      (changedProperties.has('change') || changedProperties.has('patchNum')) &&
+      this.change &&
+      this.patchNum
+    ) {
+      const matchingRevision = Object.values(this.change.revisions ?? {}).find(
+        r => r._number === this.patchNum
+      );
+      if (matchingRevision && this.revision !== matchingRevision) {
+        this.revision = matchingRevision;
+      }
+    }
+  }
+
   private reInitCursor() {
     if (!this.diffHost) return;
     this.cursor?.replaceDiffs([this.diffHost]);
@@ -833,6 +1046,7 @@
       changedProperties.has('patchNum') ||
       changedProperties.has('basePatchNum')
     ) {
+      this.awaitingNavReload = false;
       this.reloadDiff();
     } else if (
       changedProperties.has('isActiveChildView') &&
@@ -847,7 +1061,10 @@
     ) {
       this.initCursor();
     }
-    if (changedProperties.has('showRichMarkdown') && !this.showRichMarkdown) {
+    if (
+      (changedProperties.has('showRichMarkdown') && !this.showRichMarkdown) ||
+      (changedProperties.has('showRichLean') && !this.showRichLean)
+    ) {
       this.reInitCursor();
     }
     if (
@@ -857,12 +1074,14 @@
       changedProperties.has('patchNum') ||
       changedProperties.has('basePatchNum') ||
       changedProperties.has('files') ||
-      changedProperties.has('showRichMarkdown')
+      changedProperties.has('diff') ||
+      changedProperties.has('showRichMarkdown') ||
+      changedProperties.has('showRichLean')
     ) {
       if (this.change && this.changeComments && this.path && this.patchRange) {
         assertIsDefined(this.diffHost, 'diffHost');
         const file = this.files?.changeFilesByPath?.[this.path];
-        if (!this.isShowingRichMarkdown()) {
+        if (!this.isShowingRichDiff()) {
           this.diffHost.disabledThreads = false;
           this.diffHost.updateComplete.then(() => {
             assertIsDefined(this.path);
@@ -934,7 +1153,7 @@
             () => html`
               <gr-diff-markdown-viewer
                 id="markdownViewer"
-                .diff=${this.diff}
+                .diff=${this.freshRichDiff}
                 .path=${this.path}
                 .patchRange=${this.patchRange}
                 .threads=${this.threadsForFile}
@@ -942,14 +1161,27 @@
               ></gr-diff-markdown-viewer>
             `
           )}
+          ${when(
+            this.isShowingRichLean(),
+            () => html`
+              <gr-diff-lean-viewer
+                id="leanViewer"
+                .diff=${this.freshRichDiff}
+                .path=${this.path}
+                .patchRange=${this.patchRange}
+                .threads=${this.threadsForFile}
+                .loggedIn=${this.loggedIn}
+              ></gr-diff-lean-viewer>
+            `
+          )}
           <gr-endpoint-decorator
             name="diff-content"
-            ?hidden=${this.isShowingRichMarkdown()}
+            ?hidden=${this.isShowingRichDiff()}
           >
             <gr-diff-host
               id="diffHost"
-              ?hidden=${this.isShowingRichMarkdown()}
-              ?disabledThreads=${this.isShowingRichMarkdown()}
+              ?hidden=${this.isShowingRichDiff()}
+              ?disabledThreads=${this.isShowingRichDiff()}
               .changeNum=${this.changeNum}
               .change=${this.change}
               .patchRange=${this.patchRange}
@@ -968,7 +1200,7 @@
             </gr-diff-host>
           </gr-endpoint-decorator>
         </div>
-        <div slot="side">${this.renderSidebarContent()}</div>
+        <div class="sidebar" slot="side">${this.renderSidebarContent()}</div>
       </gr-content-with-sidebar>
       ${this.renderDialogs()}
     `;
@@ -1084,7 +1316,11 @@
             name="onTrigger"
             .value=${(pluginName: string) => {
               const closeSidebar = this.shownSidebar === pluginName;
+              const wasChatOpen = this.shownSidebar === CHAT_PANEL_SIDEBAR;
               this.shownSidebar = closeSidebar ? undefined : pluginName;
+              if (!closeSidebar && wasChatOpen) {
+                this.getChatModel().setChatPanelOpen(false);
+              }
               this.getUserModel().updatePreferences({
                 diff_page_sidebar: closeSidebar
                   ? 'NONE'
@@ -1103,6 +1339,9 @@
   }
 
   private getSidebarSide(): 'left' | 'right' {
+    if (this.shownSidebar === CHAT_PANEL_SIDEBAR) {
+      return 'right';
+    }
     if (!this.shownSidebar) {
       return 'left';
     }
@@ -1125,6 +1364,23 @@
   }
 
   private renderSidebarContent() {
+    if (this.shownSidebar === CHAT_PANEL_SIDEBAR) {
+      return html`
+        <div class="sidebarContents">
+          <gr-endpoint-decorator name="chat-panel">
+            <gr-endpoint-param
+              name="change"
+              .value=${this.change}
+            ></gr-endpoint-param>
+            <gr-endpoint-param
+              name="revision"
+              .value=${this.revision}
+            ></gr-endpoint-param>
+            <chat-panel></chat-panel>
+          </gr-endpoint-decorator>
+        </div>
+      `;
+    }
     return html`
       ${when(this.shownSidebar !== undefined, () =>
         keyed(
@@ -1227,8 +1483,9 @@
       <gr-endpoint-decorator
         name="diff-header-controls"
       ></gr-endpoint-decorator>
-      ${this.renderSidebarTriggers()} ${this.renderShowEntireFileButton()}
-      ${this.renderBlameButton()} ${this.renderRichMarkdownToggle()}
+      ${this.renderSidebarTriggers()} ${this.renderChatButton()}
+      ${this.renderShowEntireFileButton()} ${this.renderBlameButton()}
+      ${this.renderRichMarkdownToggle()} ${this.renderRichLeanToggle()}
       ${when(
         this.computeCanEdit(),
         () => html`
@@ -1296,6 +1553,31 @@
     </div>`;
   }
 
+  private canShowChat(): boolean {
+    if (!this.loggedIn) return false;
+    if (this.revisionActions === undefined) return false;
+    if (this.revisionActions.aiReview?.enabled === false) return false;
+    if (!this.aiPluginsRegistered) return false;
+    return true;
+  }
+
+  private toggleChat() {
+    this.getChatModel().setChatPanelOpen(
+      this.shownSidebar !== CHAT_PANEL_SIDEBAR
+    );
+  }
+
+  private renderChatButton() {
+    if (!this.canShowChat()) return nothing;
+    return html`<gr-button
+      link=""
+      id="toggleChat"
+      class="chatButton"
+      @click=${this.toggleChat}
+      ><gr-icon icon="ai"></gr-icon>Agent Chat</gr-button
+    >`;
+  }
+
   private renderShowEntireFileButton() {
     if (isImageDiff(this.diff) || isMagicPath(this.path)) return;
     return html`<gr-button
@@ -1313,13 +1595,11 @@
   }
 
   private renderBlameButton() {
-    if (!this.allowBlame) return;
-    const showBlameLoader = !isMagicPath(this.path) && !isImageDiff(this.diff);
-    if (!showBlameLoader) return;
-    let blameToggleLabel = 'Loading blame ...';
-    if (!this.isBlameLoading) {
-      blameToggleLabel = this.isBlameLoaded ? 'Hide Blame' : 'Show Blame';
-    }
+    if (!canBlameFile(this.allowBlame, this.path, this.file, this.diff)) return;
+    const blameToggleLabel = computeBlameToggleLabel(
+      this.isBlameLoading,
+      !!this.isBlameLoaded
+    );
     return html`<span class="separator"></span
       ><span class="blameLoader">
         <gr-button
@@ -1336,8 +1616,12 @@
       </span>`;
   }
 
+  private get freshRichDiff(): DiffInfo | undefined {
+    return this.staleRichDiff ? undefined : this.diff;
+  }
+
   private renderRichMarkdownToggle() {
-    if (!isMarkdownDiff(this.path, this.diff)) return nothing;
+    if (!isMarkdownDiff(this.path, this.freshRichDiff)) return nothing;
     return html`<span class="separator"></span
       ><span class="richMarkdownToggle">
         <gr-tooltip-content
@@ -1372,7 +1656,58 @@
   }
 
   private isShowingRichMarkdown(): boolean {
-    return this.showRichMarkdown && isMarkdownDiff(this.path, this.diff);
+    return (
+      this.showRichMarkdown && isMarkdownDiff(this.path, this.freshRichDiff)
+    );
+  }
+
+  private isEligibleForRichLean(): boolean {
+    const diff = this.freshRichDiff;
+    return (
+      isLeanDiff(this.path, diff) &&
+      !diff?.binary &&
+      !this.file?.binary &&
+      !this.file?.diffs_too_expensive_to_compute
+    );
+  }
+
+  private renderRichLeanToggle() {
+    if (!this.isEligibleForRichLean()) return nothing;
+    return html`<span class="separator"></span
+      ><span class="richLeanToggle">
+        <gr-tooltip-content
+          has-tooltip=""
+          position-below=""
+          title=${this.showRichLean
+            ? 'Switch to source diff'
+            : 'Switch to rich rendered Lean diff'}
+        >
+          <gr-button link="" id="toggleRichLean" @click=${this.toggleRichLean}>
+            <gr-icon
+              icon=${this.showRichLean ? 'code' : 'preview'}
+              filled=""
+            ></gr-icon>
+            ${this.showRichLean ? 'Source diff' : 'Rich diff'}
+          </gr-button>
+        </gr-tooltip-content>
+      </span>`;
+  }
+
+  async toggleRichLean() {
+    if (this.isShowingRichLean()) {
+      await this.leanViewer?.autoSaveDrafts();
+    } else {
+      await this.diffHost?.autoSaveDrafts();
+    }
+    this.showRichLean = !this.showRichLean;
+  }
+
+  private isShowingRichLean(): boolean {
+    return this.showRichLean && this.isEligibleForRichLean();
+  }
+
+  private isShowingRichDiff(): boolean {
+    return this.isShowingRichMarkdown() || this.isShowingRichLean();
   }
 
   private renderDialogs() {
@@ -1460,7 +1795,12 @@
     this.isBlameLoaded = e.detail.value;
   }
 
-  private onDiffChanged(e: ValueChangedEvent<DiffInfo>) {
+  private onDiffChanged(e: ValueChangedEvent<DiffInfo | undefined>) {
+    if (this.awaitingNavReload && e.detail.value !== undefined) {
+      return;
+    }
+    this.diffUpdatedFromHost = true;
+    this.staleRichDiff = e.detail.value === undefined;
     this.diff = e.detail.value;
   }
 
@@ -1498,6 +1838,10 @@
       this.markdownViewer?.createCommentFromSelectionOrHover();
       return;
     }
+    if (this.isShowingRichLean()) {
+      this.leanViewer?.createCommentFromSelectionOrHover();
+      return;
+    }
     this.cursor?.createCommentInPlace();
   }
 
@@ -1739,7 +2083,9 @@
 
   async reloadDiff() {
     if (!this.diffHost) return;
+    const gen = this.navReloadGeneration;
     await this.diffHost.reload(true);
+    if (gen !== this.navReloadGeneration) return;
     this.reporting.diffViewDisplayed();
     if (this.isBlameLoaded) this.loadBlame();
     this.isShowingEntireFile = this.diffHost?.isShowFullContext() ?? false;
@@ -2018,7 +2364,7 @@
    * Otherwise hide it.
    */
   private toggleBlame() {
-    if (!this.allowBlame) return;
+    if (!canBlameFile(this.allowBlame, this.path, this.file, this.diff)) return;
     assertIsDefined(this.diffHost, 'diffHost');
     if (this.isBlameLoaded) {
       this.diffHost.clearBlame();
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view_test.ts b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view_test.ts
index d015b62..93b01cd 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view_test.ts
+++ b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view_test.ts
@@ -14,6 +14,7 @@
 } from '../../../constants/constants';
 import {
   isVisible,
+  mockPromise,
   pressKey,
   query,
   queryAll,
@@ -52,9 +53,9 @@
   UrlEncodedCommentId,
 } from '../../../types/common';
 import {CursorMoveResult} from '../../../api/core';
-import {Side} from '../../../api/diff';
+import {DiffInfo, Side} from '../../../api/diff';
 import {PluginApi} from '../../../api/plugin';
-import {Files, GrDiffView} from './gr-diff-view';
+import {CHAT_PANEL_SIDEBAR, Files, GrDiffView} from './gr-diff-view';
 import {GrContentWithSidebar} from '../../shared/gr-content-with-sidebar/gr-content-with-sidebar';
 import {DropdownItem} from '../../shared/gr-dropdown-list/gr-dropdown-list';
 import {SinonFakeTimers, SinonStub, SinonStubbedMember} from 'sinon';
@@ -62,6 +63,8 @@
   ChangeModel,
   changeModelToken,
 } from '../../../models/change/change-model';
+import {chatModelToken} from '../../../models/chat/chat-model';
+import {GrEndpointParam} from '../../plugins/gr-endpoint-param/gr-endpoint-param';
 import {assertIsDefined} from '../../../utils/common-util';
 import {GrDiffModeSelector} from '../gr-diff-mode-selector/gr-diff-mode-selector';
 import {assert, fixture, html} from '@open-wc/testing';
@@ -411,7 +414,7 @@
                 <gr-diff-host id="diffHost"> </gr-diff-host>
               </gr-endpoint-decorator>
             </div>
-            <div slot="side"></div>
+            <div class="sidebar" slot="side"></div>
           </gr-content-with-sidebar>
           <gr-apply-fix-dialog id="applyFixDialog"> </gr-apply-fix-dialog>
           <gr-diff-preferences-dialog id="diffPreferencesDialog">
@@ -2241,6 +2244,274 @@
       });
     });
 
+    suite('rich lean diff', () => {
+      test('toggle rich lean diff', async () => {
+        element.path = 'BoundedLattice.lean';
+        element.diff = {
+          ...createDiff(),
+          content: [
+            {ab: ['theorem id_eq (n : Nat) : n = n := by']},
+            {a: ['  sorry'], b: ['  rfl']},
+          ],
+        };
+        await element.updateComplete;
+
+        const toggleBtn =
+          element.shadowRoot!.querySelector<GrButton>('#toggleRichLean');
+        assert.isNotNull(toggleBtn);
+        assert.isFalse(element.showRichLean);
+
+        await element.toggleRichLean();
+        await element.updateComplete;
+
+        assert.isTrue(element.showRichLean);
+        const leanViewer = element.shadowRoot!.querySelector('#leanViewer');
+        assert.isNotNull(leanViewer);
+
+        await element.toggleRichLean();
+        await element.updateComplete;
+
+        assert.isFalse(element.showRichLean);
+      });
+
+      test('toggle is hidden for non-lean files', async () => {
+        element.path = 'foo.txt';
+        element.diff = createDiff();
+        await element.updateComplete;
+
+        const toggleBtn = element.shadowRoot!.querySelector('#toggleRichLean');
+        assert.isNull(toggleBtn);
+      });
+
+      test('handleNewComment delegates to leanViewer when rich lean is active', async () => {
+        element.path = 'BoundedLattice.lean';
+        element.diff = {
+          ...createDiff(),
+          content: [{ab: ['theorem t : True := by trivial']}],
+        };
+        element.showRichLean = true;
+        await element.updateComplete;
+
+        assert.isDefined(element.leanViewer);
+        const createCommentSpy = sinon.spy(
+          element.leanViewer,
+          'createCommentFromSelectionOrHover'
+        );
+
+        // eslint-disable-next-line @typescript-eslint/no-explicit-any
+        (element as any).handleNewComment();
+
+        assert.isTrue(createCommentSpy.calledOnce);
+      });
+
+      test('c and C shortcuts delegate to leanViewer when rich lean is active', async () => {
+        element.path = 'BoundedLattice.lean';
+        element.diff = {
+          ...createDiff(),
+          content: [{ab: ['theorem t : True := by trivial']}],
+        };
+        element.showRichLean = true;
+        await element.updateComplete;
+
+        assert.isDefined(element.leanViewer);
+        const createCommentSpy = sinon.spy(
+          element.leanViewer,
+          'createCommentFromSelectionOrHover'
+        );
+
+        pressKey(element, 'c');
+        assert.isTrue(createCommentSpy.calledOnce);
+
+        pressKey(element, 'C');
+        assert.isTrue(createCommentSpy.calledTwice);
+      });
+
+      test('toggleRichLean flushes diffHost drafts before switching to rich mode', async () => {
+        element.path = 'BoundedLattice.lean';
+        element.diff = {
+          ...createDiff(),
+          content: [{ab: ['theorem t : True := by trivial']}],
+        };
+        element.showRichLean = false;
+        await element.updateComplete;
+
+        assert.isDefined(element.diffHost);
+        const autoSaveSpy = sinon.spy(element.diffHost, 'autoSaveDrafts');
+
+        await element.toggleRichLean();
+        await element.updateComplete;
+
+        assert.isTrue(autoSaveSpy.calledOnce);
+        assert.isTrue(element.showRichLean);
+      });
+
+      test('toggleRichLean flushes leanViewer drafts before switching to source mode', async () => {
+        element.path = 'BoundedLattice.lean';
+        element.diff = {
+          ...createDiff(),
+          content: [{ab: ['theorem t : True := by trivial']}],
+        };
+        element.showRichLean = true;
+        await element.updateComplete;
+
+        assert.isDefined(element.leanViewer);
+        const autoSaveSpy = sinon.spy(element.leanViewer, 'autoSaveDrafts');
+
+        await element.toggleRichLean();
+        await element.updateComplete;
+
+        assert.isTrue(autoSaveSpy.calledOnce);
+        assert.isFalse(element.showRichLean);
+      });
+
+      test('toggling from rich lean back to source diff updates diffHost threads', async () => {
+        element.path = 'BoundedLattice.lean';
+        element.diff = {
+          ...createDiff(),
+          content: [{ab: ['theorem t : True := by trivial']}],
+        };
+        element.showRichLean = true;
+        await element.updateComplete;
+
+        commentsModel.setState({
+          comments: {},
+          drafts: {
+            'BoundedLattice.lean': [
+              createDraft({
+                id: 'draft_lean_1' as UrlEncodedCommentId,
+                line: 1,
+                message: 'Draft from rich lean mode',
+                patch_set: 1 as RevisionPatchSetNum,
+              }),
+            ],
+          },
+          portedComments: {},
+          portedDrafts: {},
+          discardedDrafts: [],
+        });
+        await element.updateComplete;
+        await element.diffHost?.updateComplete;
+
+        assert.isDefined(element.diffHost);
+        assert.isTrue(element.diffHost.hidden);
+        assert.equal(element.diffHost.threads.length, 0);
+
+        // Toggle back to source diff
+        element.showRichLean = false;
+        await element.updateComplete;
+        await element.diffHost?.updateComplete;
+
+        assert.isFalse(element.diffHost.hidden);
+        assert.equal(element.diffHost.threads.length, 1);
+        assert.equal(element.diffHost.threads[0].line, 1);
+      });
+
+      test('hides toggle and viewer for binary or too-expensive lean files', async () => {
+        element.path = 'Huge.lean';
+        element.diff = {
+          ...createDiff(),
+          binary: true,
+          content: [],
+        };
+        element.showRichLean = true;
+        await element.updateComplete;
+
+        assert.isNull(element.shadowRoot!.querySelector('#toggleRichLean'));
+        assert.isNull(element.shadowRoot!.querySelector('#leanViewer'));
+
+        element.diff = {
+          ...createDiff(),
+          binary: false,
+          content: [{ab: ['theorem t : True := trivial']}],
+        };
+        element.file = {
+          __path: 'Huge.lean',
+          diffs_too_expensive_to_compute: true,
+        };
+        await element.updateComplete;
+
+        assert.isNull(element.shadowRoot!.querySelector('#toggleRichLean'));
+        assert.isNull(element.shadowRoot!.querySelector('#leanViewer'));
+      });
+
+      test('does not leak stale diff into leanViewer when navigating across files', async () => {
+        element.path = 'A.lean';
+        element.diff = {
+          ...createDiff(),
+          meta_b: {name: 'A.lean', content_type: 'text/x-lean', lines: 1},
+          content: [{ab: ['theorem t : True := by trivial']}],
+        };
+        element.showRichLean = true;
+        await element.updateComplete;
+
+        assert.isNotNull(element.shadowRoot!.querySelector('#leanViewer'));
+        assert.isTrue(element.diffHost!.hidden);
+
+        // Navigate to another Lean file before its diff arrives: leanViewer
+        // must receive `undefined`, never A.lean's stale diff.
+        element.path = 'B.lean';
+        await element.updateComplete;
+        assert.isUndefined(element.leanViewer?.diff);
+
+        // Navigate to a non-Lean file without immediately supplying a new diff:
+        // stale `content_type: 'text/x-lean'` must not keep Lean viewer active.
+        element.path = 'B.ts';
+        await element.updateComplete;
+
+        assert.isNull(element.shadowRoot!.querySelector('#leanViewer'));
+        assert.isFalse(element.diffHost!.hidden);
+      });
+
+      test('ignores superseded in-flight reload and same-cycle late diff-changed when navigating between Lean files', async () => {
+        const diffA: DiffInfo = {
+          ...createDiff(),
+          meta_b: {name: 'A.lean', content_type: 'text/x-lean', lines: 1},
+          content: [{ab: ['theorem only_in_a : True := trivial']}],
+        };
+        const diffB: DiffInfo = {
+          ...createDiff(),
+          meta_b: {name: 'B.lean', content_type: 'text/x-lean', lines: 1},
+          content: [{ab: ['theorem only_in_b : True := trivial']}],
+        };
+        const diffAPromise = mockPromise<DiffInfo>();
+        const diffBPromise = mockPromise<DiffInfo>();
+        const requestedPaths: string[] = [];
+        getDiffRestApiStub.callsFake((_c, _base, _patch, path) => {
+          requestedPaths.push(path);
+          if (path === 'A.lean') return diffAPromise;
+          if (path === 'B.lean') return diffBPromise;
+          return Promise.resolve(element.diff);
+        });
+
+        element.showRichLean = true;
+        element.path = 'A.lean';
+        await element.updateComplete;
+        await waitUntil(() => requestedPaths.includes('A.lean'));
+
+        // Navigate to B.lean before A.lean finishes loading.
+        element.path = 'B.lean';
+        // Simulate a late host `diff-changed` arriving in the same Lit cycle as `path`.
+        element.diffHost!.dispatchEvent(
+          new CustomEvent('diff-changed', {detail: {value: diffA}})
+        );
+        await element.updateComplete;
+        assert.isUndefined(element.leanViewer?.diff);
+
+        // Wait until B.lean's reload is also in flight, then resolve A.lean late:
+        // must NOT leak A.lean into B.lean!
+        await waitUntil(() => requestedPaths.includes('B.lean'));
+        diffAPromise.resolve(diffA);
+        await element.updateComplete;
+        await element.diffHost!.updateComplete;
+        assert.isUndefined(element.leanViewer?.diff);
+
+        // Once B.lean resolves, leanViewer receives B.lean's diff.
+        diffBPromise.resolve(diffB);
+        await waitUntil(() => element.leanViewer?.diff === diffB);
+        assert.equal(element.leanViewer?.diff, diffB);
+      });
+    });
+
     suite('editMode behavior', () => {
       setup(async () => {
         element.loggedIn = true;
@@ -2692,5 +2963,407 @@
         assert.equal(contentWithSidebar?.side, 'right');
       });
     });
+
+    suite('chat panel', () => {
+      test('Agent Chat button visibility depends on login, AI plugins, and revision actions', async () => {
+        element.loggedIn = false;
+        element.aiPluginsRegistered = true;
+        element.revisionActions = {};
+        await element.updateComplete;
+        assert.isUndefined(query(element, 'gr-button#toggleChat'));
+
+        element.loggedIn = true;
+        element.aiPluginsRegistered = false;
+        await element.updateComplete;
+        assert.isUndefined(query(element, 'gr-button#toggleChat'));
+
+        element.aiPluginsRegistered = true;
+        element.revisionActions = undefined;
+        await element.updateComplete;
+        assert.isUndefined(query(element, 'gr-button#toggleChat'));
+
+        element.revisionActions = {aiReview: {enabled: false}};
+        await element.updateComplete;
+        assert.isUndefined(query(element, 'gr-button#toggleChat'));
+
+        element.revisionActions = {aiReview: {enabled: true}};
+        await element.updateComplete;
+        const chatBtn = queryAndAssert<GrButton>(
+          element,
+          'gr-button#toggleChat'
+        );
+        assert.include(chatBtn.textContent, 'Agent Chat');
+        const icon = queryAndAssert(chatBtn, 'gr-icon');
+        assert.equal(icon.getAttribute('icon'), 'ai');
+      });
+
+      test('loads revision actions for active patchNum rather than latestPatchNum', async () => {
+        const getRevisionActionsStub = stubRestApi(
+          'getChangeRevisionActions'
+        ).resolves({aiReview: {enabled: false}});
+        element.loggedIn = true;
+        element.aiPluginsRegistered = true;
+        element.latestPatchNum = 3 as PatchSetNumber;
+        element.patchNum = 2 as RevisionPatchSetNum;
+        await element.updateComplete;
+        await waitEventLoop();
+
+        assert.isTrue(
+          getRevisionActionsStub.calledOnceWithExactly(
+            TEST_NUMERIC_CHANGE_ID,
+            2 as RevisionPatchSetNum
+          )
+        );
+        assert.isUndefined(query(element, 'gr-button#toggleChat'));
+
+        getRevisionActionsStub.resolves({aiReview: {enabled: true}});
+        element.patchNum = 3 as RevisionPatchSetNum;
+        await element.updateComplete;
+        await waitEventLoop();
+
+        assert.isTrue(
+          getRevisionActionsStub.calledWithExactly(
+            TEST_NUMERIC_CHANGE_ID,
+            3 as RevisionPatchSetNum
+          )
+        );
+        assert.isDefined(query(element, 'gr-button#toggleChat'));
+      });
+
+      test('falls back to latestPatchNum for revision actions when viewing edit patchset', async () => {
+        const getRevisionActionsStub = stubRestApi(
+          'getChangeRevisionActions'
+        ).resolves({aiReview: {enabled: true}});
+        element.loggedIn = true;
+        element.aiPluginsRegistered = true;
+        element.patchNum = EDIT;
+        await element.updateComplete;
+        await waitEventLoop();
+
+        assert.isFalse(getRevisionActionsStub.called);
+        assert.isUndefined(query(element, 'gr-button#toggleChat'));
+
+        element.latestPatchNum = 3 as PatchSetNumber;
+        await element.updateComplete;
+        await waitEventLoop();
+
+        assert.isTrue(
+          getRevisionActionsStub.calledOnceWithExactly(
+            TEST_NUMERIC_CHANGE_ID,
+            3 as RevisionPatchSetNum
+          )
+        );
+        assert.isDefined(query(element, 'gr-button#toggleChat'));
+      });
+
+      test('clicking Agent Chat toggles chat panel in right sidebar', async () => {
+        const chatModel = testResolver(chatModelToken);
+        element.loggedIn = true;
+        element.aiPluginsRegistered = true;
+        element.revisionActions = {};
+        await element.updateComplete;
+
+        const contentWithSidebar = queryAndAssert<GrContentWithSidebar>(
+          element,
+          'gr-content-with-sidebar'
+        );
+        const diffContainer = queryAndAssert(element, '.diffContainer');
+        assert.isTrue(contentWithSidebar.hideSide);
+        assert.isFalse(diffContainer.classList.contains('sidebarOpen'));
+
+        const chatBtn = queryAndAssert<GrButton>(
+          element,
+          'gr-button#toggleChat'
+        );
+        chatBtn.click();
+        await element.updateComplete;
+
+        assert.equal(element.shownSidebar, CHAT_PANEL_SIDEBAR);
+        assert.isFalse(contentWithSidebar.hideSide);
+        assert.equal(contentWithSidebar.side, 'right');
+        assert.isTrue(diffContainer.classList.contains('sidebarOpen'));
+        assert.isTrue(chatModel.getState().chatPanelOpen);
+        const decorator = queryAndAssert(
+          element,
+          'gr-endpoint-decorator[name="chat-panel"]'
+        );
+        queryAndAssert(decorator, 'chat-panel');
+
+        chatBtn.click();
+        await element.updateComplete;
+
+        assert.isUndefined(element.shownSidebar);
+        assert.isTrue(contentWithSidebar.hideSide);
+        assert.isFalse(diffContainer.classList.contains('sidebarOpen'));
+        assert.isFalse(chatModel.getState().chatPanelOpen);
+      });
+
+      test('close-chat-panel event closes the chat panel', async () => {
+        const chatModel = testResolver(chatModelToken);
+        chatModel.setChatPanelOpen(true);
+        await element.updateComplete;
+
+        const contentWithSidebar = queryAndAssert<GrContentWithSidebar>(
+          element,
+          'gr-content-with-sidebar'
+        );
+        assert.isFalse(contentWithSidebar.hideSide);
+
+        element.dispatchEvent(
+          new CustomEvent('close-chat-panel', {
+            bubbles: true,
+            composed: true,
+          })
+        );
+        await element.updateComplete;
+
+        assert.isUndefined(element.shownSidebar);
+        assert.isTrue(contentWithSidebar.hideSide);
+        assert.isFalse(chatModel.getState().chatPanelOpen);
+      });
+
+      test('explain-code-requested opens chat panel and processes request', async () => {
+        const chatModel = testResolver(chatModelToken);
+        const processChatRequestStub = sinon.stub(
+          chatModel,
+          'processChatRequest'
+        );
+        const contentWithSidebar = queryAndAssert<GrContentWithSidebar>(
+          element,
+          'gr-content-with-sidebar'
+        );
+        assert.isTrue(contentWithSidebar.hideSide);
+
+        const event = new CustomEvent('explain-code-requested', {
+          detail: {prompt: 'Explain this code'},
+          bubbles: true,
+          composed: true,
+        });
+        element.dispatchEvent(event);
+        await element.updateComplete;
+
+        assert.isFalse(contentWithSidebar.hideSide);
+        assert.equal(contentWithSidebar.side, 'right');
+        assert.isTrue(
+          processChatRequestStub.calledOnceWithExactly({
+            prompt: 'Explain this code',
+          })
+        );
+      });
+
+      test('open-chat-panel on document opens chat panel without calling processChatRequest', async () => {
+        const chatModel = testResolver(chatModelToken);
+        const processChatRequestStub = sinon.stub(
+          chatModel,
+          'processChatRequest'
+        );
+        const contentWithSidebar = queryAndAssert<GrContentWithSidebar>(
+          element,
+          'gr-content-with-sidebar'
+        );
+        assert.isTrue(contentWithSidebar.hideSide);
+
+        document.dispatchEvent(new CustomEvent('open-chat-panel'));
+        await element.updateComplete;
+
+        assert.isFalse(contentWithSidebar.hideSide);
+        assert.equal(contentWithSidebar.side, 'right');
+        assert.isFalse(processChatRequestStub.called);
+      });
+
+      test('plugin sidebar takes priority over chat panel and opening chat closes plugin sidebar', async () => {
+        const chatModel = testResolver(chatModelToken);
+        chatModel.setChatPanelOpen(true);
+        await element.updateComplete;
+        assert.equal(element.shownSidebar, CHAT_PANEL_SIDEBAR);
+
+        const triggerDecorator = queryAndAssert(
+          element,
+          'gr-endpoint-decorator[name="sidebarTrigger"]'
+        );
+        const openSidebarParam = queryAndAssert<GrEndpointParam>(
+          triggerDecorator,
+          'gr-endpoint-param[name="openSidebar"]'
+        );
+        assert.deepEqual(openSidebarParam.value, {name: CHAT_PANEL_SIDEBAR});
+
+        const onTriggerParam = queryAndAssert<GrEndpointParam>(
+          triggerDecorator,
+          'gr-endpoint-param[name="onTrigger"]'
+        );
+        const onTrigger = onTriggerParam.value as (pluginName: string) => void;
+        onTrigger('comments2code');
+        await element.updateComplete;
+
+        assert.equal(element.shownSidebar, 'comments2code');
+        assert.deepEqual(openSidebarParam.value, {name: 'comments2code'});
+        assert.isFalse(chatModel.getState().chatPanelOpen);
+
+        chatModel.setChatPanelOpen(true);
+        await element.updateComplete;
+
+        assert.equal(element.shownSidebar, CHAT_PANEL_SIDEBAR);
+
+        // Clicking Agent Chat after switching to a plugin sidebar re-opens chat.
+        element.loggedIn = true;
+        element.aiPluginsRegistered = true;
+        element.revisionActions = {};
+        onTrigger('comments2code');
+        await element.updateComplete;
+        assert.equal(element.shownSidebar, 'comments2code');
+        assert.isFalse(chatModel.getState().chatPanelOpen);
+
+        queryAndAssert<GrButton>(element, 'gr-button#toggleChat').click();
+        await element.updateComplete;
+        assert.equal(element.shownSidebar, CHAT_PANEL_SIDEBAR);
+        assert.isTrue(chatModel.getState().chatPanelOpen);
+      });
+
+      test('chat panel open state overrides diff_page_sidebar preference on initial load', async () => {
+        const chatModel = testResolver(chatModelToken);
+        chatModel.setChatPanelOpen(true);
+        userModel.setState({
+          ...userModel.getState(),
+          preferences: {
+            ...createDefaultPreferences(),
+            diff_page_sidebar: 'plugin-comments2code',
+          },
+        });
+
+        const freshDiffView = await fixture<GrDiffView>(
+          html`<gr-diff-view></gr-diff-view>`
+        );
+        await freshDiffView.updateComplete;
+        await waitEventLoop();
+
+        assert.equal(freshDiffView.shownSidebar, CHAT_PANEL_SIDEBAR);
+      });
+
+      test('does not reopen plugin sidebar when cached diff view reconnects after closing chat', async () => {
+        const chatModel = testResolver(chatModelToken);
+        const updatePreferencesStub = sinon.stub(
+          userModel,
+          'updatePreferences'
+        );
+        userModel.setState({
+          ...userModel.getState(),
+          preferences: {
+            ...createDefaultPreferences(),
+            diff_page_sidebar: 'plugin-ai-rationale',
+          },
+        });
+
+        const cachedDiffView = await fixture<GrDiffView>(
+          html`<gr-diff-view></gr-diff-view>`
+        );
+        await cachedDiffView.updateComplete;
+        await waitEventLoop();
+        assert.equal(cachedDiffView.shownSidebar, 'ai-rationale');
+
+        chatModel.setChatPanelOpen(true);
+        await cachedDiffView.updateComplete;
+        assert.equal(cachedDiffView.shownSidebar, CHAT_PANEL_SIDEBAR);
+
+        chatModel.setChatPanelOpen(false);
+        await cachedDiffView.updateComplete;
+        assert.isUndefined(cachedDiffView.shownSidebar);
+
+        const parent = cachedDiffView.parentElement!;
+        parent.removeChild(cachedDiffView);
+        parent.appendChild(cachedDiffView);
+        await cachedDiffView.updateComplete;
+        await waitEventLoop();
+
+        assert.isUndefined(cachedDiffView.shownSidebar);
+        assert.isFalse(updatePreferencesStub.called);
+        assert.equal(
+          userModel.getState().preferences?.diff_page_sidebar,
+          'plugin-ai-rationale'
+        );
+      });
+
+      test('chat-panel endpoint passes change and revision and can be replaced by a plugin', async () => {
+        const revision = createRevision(1);
+        element.change = {
+          ...createParsedChange(),
+          revisions: {rev1: revision},
+        };
+        element.patchNum = 1 as RevisionPatchSetNum;
+        await element.updateComplete;
+
+        const promise = mockPromise();
+        window.Gerrit.install(
+          promise.resolve,
+          '0.1',
+          'http://some/plugins/diff-chat-plugin.js'
+        );
+        const plugin = (await promise) as PluginApi;
+
+        class CustomDiffPluginChatPanel extends HTMLElement {
+          change?: unknown;
+
+          revision?: unknown;
+        }
+
+        const customChatTagName = 'custom-diff-plugin-chat-panel';
+        if (!customElements.get(customChatTagName)) {
+          customElements.define(customChatTagName, CustomDiffPluginChatPanel);
+        }
+
+        plugin.registerCustomComponent('chat-panel', customChatTagName, {
+          replace: true,
+        });
+
+        const chatModel = testResolver(chatModelToken);
+        chatModel.setChatPanelOpen(true);
+        await element.updateComplete;
+
+        const decorator = queryAndAssert(
+          element,
+          'gr-endpoint-decorator[name="chat-panel"]'
+        );
+        await waitUntil(() => !!decorator.querySelector(customChatTagName));
+
+        const customChat = queryAndAssert<CustomDiffPluginChatPanel>(
+          decorator,
+          customChatTagName
+        );
+        assert.isNull(decorator.querySelector('chat-panel'));
+        assert.equal(customChat.change, element.change);
+        assert.equal(customChat.revision, revision);
+      });
+
+      test('preserves fetched revisionActions when disconnected while in flight', async () => {
+        const actionsPromise = mockPromise<{aiReview: {enabled: boolean}}>();
+        const getRevisionActionsStub = stubRestApi(
+          'getChangeRevisionActions'
+        ).returns(actionsPromise);
+
+        viewModel.updateState({
+          diffView: {path: 'some/path.txt'},
+          patchNum: 2 as RevisionPatchSetNum,
+        });
+        await element.updateComplete;
+        assert.isTrue(
+          getRevisionActionsStub.calledWith(TEST_NUMERIC_CHANGE_ID, 2)
+        );
+
+        const parent = element.parentElement!;
+        parent.removeChild(element);
+        assert.isFalse(element.isConnected);
+
+        actionsPromise.resolve({aiReview: {enabled: true}});
+        await waitEventLoop();
+
+        parent.appendChild(element);
+        element.loggedIn = true;
+        element.aiPluginsRegistered = true;
+        await element.updateComplete;
+
+        assert.deepEqual(element.revisionActions, {aiReview: {enabled: true}});
+        assert.isDefined(query(element, 'gr-button#toggleChat'));
+        assert.isTrue(getRevisionActionsStub.calledOnce);
+      });
+    });
   });
 });
diff --git a/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select_test.ts b/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select_test.ts
index c19e8a7..d3b910e 100644
--- a/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select_test.ts
+++ b/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select_test.ts
@@ -155,13 +155,13 @@
         deemphasizeReason: undefined,
         label: undefined,
         vote: undefined,
-      } as DropdownItem,
+      },
       {
         triggerText: 'Base',
         value: PARENT,
         bottomText: '',
         text: 'Base | ',
-      } as DropdownItem,
+      },
     ];
     element.patchNum = 2 as PatchSetNumber;
     element.basePatchNum = PARENT;
@@ -185,7 +185,7 @@
       {num: EDIT, sha: '4'} as PatchSet,
     ];
     element.patchNum = 2 as PatchSetNumber;
-    element.basePatchNum = PARENT as BasePatchSetNum;
+    element.basePatchNum = PARENT;
     await element.updateComplete;
 
     const baseDropDownStub = sinon.stub(element, 'computeBaseDropdownContent');
@@ -210,7 +210,7 @@
       {num: 1, sha: '4'} as PatchSet,
     ];
     element.patchNum = 2 as PatchSetNumber;
-    element.basePatchNum = PARENT as BasePatchSetNum;
+    element.basePatchNum = PARENT;
     await element.updateComplete;
 
     // Should be recomputed for each available patch
@@ -236,7 +236,7 @@
       {num: EDIT, sha: '4'} as PatchSet,
     ];
     element.patchNum = 2 as PatchSetNumber;
-    element.basePatchNum = PARENT as BasePatchSetNum;
+    element.basePatchNum = PARENT;
     await element.updateComplete;
 
     // Should be recomputed for each available patch
@@ -285,7 +285,7 @@
         deemphasizeReason: undefined,
         vote: undefined,
         label: undefined,
-      } as DropdownItem,
+      },
       {
         triggerText: 'Patchset 2',
         text: 'Patchset 2 | 3',
@@ -297,7 +297,7 @@
         deemphasizeReason: undefined,
         vote: undefined,
         label: undefined,
-      } as DropdownItem,
+      },
     ];
 
     assert.deepEqual(element.computePatchDropdownContent(), expectedResult);
diff --git a/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view.ts b/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view.ts
index 9c9709d..ad74ea2 100644
--- a/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view.ts
+++ b/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view.ts
@@ -122,7 +122,7 @@
   constructor() {
     super();
     this.addEventListener('content-change', e => {
-      this.handleContentChange(e as CustomEvent<{value: string}>);
+      this.handleContentChange(e);
     });
     subscribe(
       this,
diff --git a/polygerrit-ui/app/elements/gr-app.ts b/polygerrit-ui/app/elements/gr-app.ts
index fa8ee18..a9c80fa 100644
--- a/polygerrit-ui/app/elements/gr-app.ts
+++ b/polygerrit-ui/app/elements/gr-app.ts
@@ -26,12 +26,17 @@
   ServiceWorkerInstaller,
   serviceWorkerInstallerToken,
 } from '../services/service-worker-installer';
-import {pluginLoaderToken} from './shared/gr-js-api-interface/gr-plugin-loader';
+import {
+  PluginLoader,
+  pluginLoaderToken,
+} from './shared/gr-js-api-interface/gr-plugin-loader';
 import {getAppContext} from '../services/app-context';
 import {Finalizable} from '../types/types';
 
 initGlobalVariables(createAppContext(), true);
 
+const INITIAL_THEME_TIMEOUT_MS = 250;
+
 export const SCROLL_PADDING_TOP_CALC =
   'calc(var(--main-header-height) + var(--change-header-height) + var(--diff-header-height))';
 
@@ -41,6 +46,8 @@
 
   private serviceWorkerInstaller?: ServiceWorkerInstaller;
 
+  private unresolvedTimerId?: number;
+
   override connectedCallback() {
     super.connectedCallback();
     const dependencies = new Map<DependencyToken<unknown>, Provider<unknown>>();
@@ -80,7 +87,9 @@
       provide(this, token, provider);
     }
 
-    initGerrit(resolver(pluginLoaderToken));
+    const pluginLoader = resolver(pluginLoaderToken);
+    initGerrit(pluginLoader);
+    this.revealBodyWhenReady(pluginLoader);
 
     if (!this.serviceWorkerInstaller) {
       this.serviceWorkerInstaller = resolver(serviceWorkerInstallerToken);
@@ -97,6 +106,10 @@
   }
 
   override disconnectedCallback() {
+    if (this.unresolvedTimerId !== undefined) {
+      this.clearUnresolvedTimer();
+      document.body?.removeAttribute('unresolved');
+    }
     document.removeEventListener('focusin', this.handleFocusIn);
     document.removeEventListener('focusout', this.handleFocusOut);
     for (const f of this.finalizables) {
@@ -142,6 +155,33 @@
     return false;
   }
 
+  private clearUnresolvedTimer() {
+    if (this.unresolvedTimerId !== undefined) {
+      window.clearTimeout(this.unresolvedTimerId);
+      this.unresolvedTimerId = undefined;
+    }
+  }
+
+  private revealBodyWhenReady(pluginLoader: PluginLoader) {
+    if (!document.body?.hasAttribute('unresolved')) return;
+    const reveal = () => {
+      this.clearUnresolvedTimer();
+      document.body?.removeAttribute('unresolved');
+    };
+    this.unresolvedTimerId = window.setTimeout(
+      reveal,
+      INITIAL_THEME_TIMEOUT_MS
+    );
+    Promise.all([this.updateComplete, pluginLoader.awaitInitialTheme()])
+      .then(async () => {
+        for (let i = 0; i < 10; i++) {
+          await Promise.resolve();
+        }
+        reveal();
+      })
+      .catch(reveal);
+  }
+
   override render() {
     return html`<gr-app-element id="app-element"></gr-app-element>`;
   }
diff --git a/polygerrit-ui/app/elements/gr-app_test.ts b/polygerrit-ui/app/elements/gr-app_test.ts
index 17c64d7..acad14c 100644
--- a/polygerrit-ui/app/elements/gr-app_test.ts
+++ b/polygerrit-ui/app/elements/gr-app_test.ts
@@ -21,6 +21,10 @@
 import {resolve} from '../models/dependency';
 import {removeRequestDependencyListener} from '../test/common-test-setup';
 import {ReactiveElement} from 'lit';
+import {
+  PluginLoader,
+  pluginLoaderToken,
+} from './shared/gr-js-api-interface/gr-plugin-loader';
 
 suite('gr-app callback tests', () => {
   const requestUpdateStub = sinon.stub(
@@ -204,4 +208,45 @@
 
     secondSticky.remove();
   });
+
+  test('removes body unresolved attribute once initial theme settles', async () => {
+    let resolveTheme!: () => void;
+    sinon
+      .stub(PluginLoader.prototype, 'awaitInitialTheme')
+      .returns(new Promise<void>(r => (resolveTheme = r)));
+    document.body.setAttribute('unresolved', '');
+    try {
+      const app = await fixture<GrApp>(html`<gr-app></gr-app>`);
+      assert.isTrue(document.body.hasAttribute('unresolved'));
+
+      resolveTheme();
+      for (let i = 0; i < 12; i++) {
+        await Promise.resolve();
+      }
+      assert.isFalse(document.body.hasAttribute('unresolved'));
+      assert.ok(resolve(app, pluginLoaderToken)());
+    } finally {
+      document.body.removeAttribute('unresolved');
+    }
+  });
+
+  test('removes body unresolved attribute after 250ms safety timeout', async () => {
+    const clock = sinon.useFakeTimers();
+    sinon
+      .stub(PluginLoader.prototype, 'awaitInitialTheme')
+      .returns(new Promise<void>(() => {}));
+    document.body.setAttribute('unresolved', '');
+    try {
+      const el = document.createElement('gr-app');
+      document.body.appendChild(el);
+      assert.isTrue(document.body.hasAttribute('unresolved'));
+
+      clock.tick(250);
+      assert.isFalse(document.body.hasAttribute('unresolved'));
+      el.remove();
+    } finally {
+      document.body.removeAttribute('unresolved');
+      clock.restore();
+    }
+  });
 });
diff --git a/polygerrit-ui/app/elements/plugins/gr-endpoint-decorator/gr-endpoint-decorator.ts b/polygerrit-ui/app/elements/plugins/gr-endpoint-decorator/gr-endpoint-decorator.ts
index 9aa9eec..ae3eaa1 100644
--- a/polygerrit-ui/app/elements/plugins/gr-endpoint-decorator/gr-endpoint-decorator.ts
+++ b/polygerrit-ui/app/elements/plugins/gr-endpoint-decorator/gr-endpoint-decorator.ts
@@ -9,6 +9,7 @@
   EndpointType,
   ModuleInfo,
 } from '../../shared/gr-js-api-interface/gr-plugin-endpoints';
+import {THEME_NAME} from '../../shared/gr-js-api-interface/gr-api-utils';
 import {PluginApi} from '../../../api/plugin';
 import {HookApi, PluginElement} from '../../../api/hook';
 import {getAppContext} from '../../../services/app-context';
@@ -37,8 +38,15 @@
 
   private readonly domHooks = new Map<PluginElement, HookApi<PluginElement>>();
 
+  private readonly decorationMeta = new WeakMap<
+    Node,
+    {slot: string; order?: number; pluginName: string}
+  >();
+
   private readonly initializedPlugins = new Map<string, boolean>();
 
+  private hasReplacement = false;
+
   private readonly timeoutIds = new Set<number>();
 
   private readonly reporting = getAppContext().reportingService;
@@ -52,10 +60,20 @@
   override connectedCallback() {
     super.connectedCallback();
     assertIsDefined(this.name);
+    for (const [el, domHook] of this.domHooks) {
+      domHook.handleInstanceAttached(el);
+    }
     this.getPluginLoader().pluginEndPoints.onNewEndpoint(
       this.name,
       this.initModule
     );
+    for (const module of this.getPluginLoader().pluginEndPoints.getDetails(
+      this.name
+    )) {
+      if (module.plugin.getPluginName() === THEME_NAME) {
+        this.initModule(module);
+      }
+    }
     this.getPluginLoader()
       .awaitPluginsLoaded()
       .then(() => {
@@ -88,8 +106,9 @@
   private initDecoration(
     name: string,
     plugin: PluginApi,
-    slot?: string
-  ): Promise<HTMLElement> {
+    slot?: string,
+    order?: number
+  ): Promise<HTMLElement | null> {
     const el = document.createElement(name) as PluginElement;
     return this.initProperties(
       el,
@@ -98,18 +117,74 @@
       // this.shadowRoot.querySelector('slot').assignedElements()[0].
       this.firstElementChild
     ).then(el => {
+      if (this.hasReplacement) return null;
       const slotEl = slot
         ? this.querySelector(`gr-endpoint-slot[name=${slot}]`)
         : null;
-      if (slot && slotEl?.parentNode) {
-        slotEl.parentNode.insertBefore(el, slotEl.nextSibling);
+      const effectiveSlot = slot && slotEl?.parentNode ? slot : '';
+      const effectiveOrder =
+        order !== undefined && Number.isFinite(order) ? order : undefined;
+      const pluginName = plugin.getPluginName();
+      this.decorationMeta.set(el, {
+        slot: effectiveSlot,
+        order: effectiveOrder,
+        pluginName,
+      });
+      if (effectiveSlot && slotEl?.parentNode) {
+        let refNode = slotEl.nextSibling;
+        while (refNode) {
+          const meta = this.decorationMeta.get(refNode);
+          if (
+            !meta ||
+            meta.slot !== effectiveSlot ||
+            this.shouldInsertBefore(
+              meta,
+              effectiveSlot,
+              effectiveOrder,
+              pluginName
+            )
+          ) {
+            break;
+          }
+          refNode = refNode.nextSibling;
+        }
+        slotEl.parentNode.insertBefore(el, refNode);
       } else {
-        this.appendChild(el);
+        const refNode = Array.from(this.children).find(child => {
+          const meta = this.decorationMeta.get(child);
+          return (
+            !!meta &&
+            this.shouldInsertBefore(meta, '', effectiveOrder, pluginName)
+          );
+        });
+        if (refNode) {
+          this.insertBefore(el, refNode);
+        } else {
+          this.appendChild(el);
+        }
       }
       return el;
     });
   }
 
+  private shouldInsertBefore(
+    meta: {slot: string; order?: number; pluginName: string},
+    slot: string,
+    order: number | undefined,
+    pluginName: string
+  ): boolean {
+    if (meta.slot !== slot) return false;
+    if (order === undefined) {
+      if (meta.order !== undefined) return false;
+      // Preserve existing LIFO insertion right after <gr-endpoint-slot> for
+      // unordered slotted components, and FIFO append for non-slotted ones.
+      return slot !== '';
+    }
+    if (meta.order === undefined) return true;
+    if (meta.order !== order) return meta.order > order;
+    return meta.pluginName.localeCompare(pluginName) > 0;
+  }
+
   private initReplacement(
     name: string,
     plugin: PluginApi
@@ -221,6 +296,7 @@
     type,
     domHook,
     slot,
+    order,
   }: ModuleInfo) => {
     const name = plugin.getPluginName() + '.' + moduleName;
     if (this.targetPlugin) {
@@ -229,12 +305,16 @@
     if (this.initializedPlugins.get(name)) {
       return;
     }
+    if (this.hasReplacement) {
+      return;
+    }
     let initPromise;
     switch (type) {
       case EndpointType.DECORATE:
-        initPromise = this.initDecoration(moduleName, plugin, slot);
+        initPromise = this.initDecoration(moduleName, plugin, slot, order);
         break;
       case EndpointType.REPLACE:
+        this.hasReplacement = true;
         initPromise = this.initReplacement(moduleName, plugin);
         break;
     }
@@ -243,10 +323,11 @@
     }
     this.initializedPlugins.set(name, true);
     initPromise.then(el => {
-      if (!this.isConnected) return;
-      if (domHook) {
-        domHook.handleInstanceAttached(el);
+      if (el && domHook) {
         this.domHooks.set(el, domHook);
+        if (this.isConnected) {
+          domHook.handleInstanceAttached(el);
+        }
       }
     });
   };
diff --git a/polygerrit-ui/app/elements/plugins/gr-endpoint-decorator/gr-endpoint-decorator_test.ts b/polygerrit-ui/app/elements/plugins/gr-endpoint-decorator/gr-endpoint-decorator_test.ts
index 2d1b9ab..6742a26 100644
--- a/polygerrit-ui/app/elements/plugins/gr-endpoint-decorator/gr-endpoint-decorator_test.ts
+++ b/polygerrit-ui/app/elements/plugins/gr-endpoint-decorator/gr-endpoint-decorator_test.ts
@@ -14,6 +14,8 @@
 import {HookApi, PluginElement} from '../../../api/hook';
 import {GrEndpointParam} from '../gr-endpoint-param/gr-endpoint-param';
 import {getAppContext} from '../../../services/app-context';
+import {testResolver} from '../../../test/common-test-setup';
+import {pluginLoaderToken} from '../../shared/gr-js-api-interface/gr-plugin-loader';
 
 interface TestModule extends PluginElement {
   'first-param'?: string;
@@ -313,4 +315,255 @@
     await param.updateComplete;
     assert.equal(hook.getAllAttached().length, 0);
   });
+
+  test('orders modules registered on the same slot even when registered late', async () => {
+    const el = await fixture<GrEndpointDecorator>(html`
+      <gr-endpoint-decorator name="ordered-slot-endpoint">
+        <gr-endpoint-slot name="below"></gr-endpoint-slot>
+      </gr-endpoint-decorator>
+    `);
+
+    const unorderedHook = plugin.registerCustomComponent(
+      'ordered-slot-endpoint',
+      'unordered-mod',
+      {slot: 'below'}
+    );
+    const unorderedAttached = mockPromise();
+    unorderedHook.onAttached(() => unorderedAttached.resolve());
+    await unorderedAttached;
+
+    const secondOrderedHook = plugin.registerCustomComponent(
+      'ordered-slot-endpoint',
+      'ordered-mod-2',
+      {slot: 'below', order: 2}
+    );
+    const secondAttached = mockPromise();
+    secondOrderedHook.onAttached(() => secondAttached.resolve());
+    await secondAttached;
+
+    const firstOrderedHook = plugin.registerCustomComponent(
+      'ordered-slot-endpoint',
+      'ordered-mod-1',
+      {slot: 'below', order: 1}
+    );
+    const firstAttached = mockPromise();
+    firstOrderedHook.onAttached(() => firstAttached.resolve());
+    await firstAttached;
+
+    const childNames = Array.from(el.children).map(c => c.nodeName);
+    assert.deepEqual(childNames, [
+      'GR-ENDPOINT-SLOT',
+      'ORDERED-MOD-1',
+      'ORDERED-MOD-2',
+      'UNORDERED-MOD',
+    ]);
+  });
+
+  test('orders non-slot modules and breaks ties by plugin name', async () => {
+    let pluginA!: PluginApi;
+    let pluginB!: PluginApi;
+    window.Gerrit.install(
+      p => {
+        pluginA = p;
+      },
+      '0.1',
+      'http://some/plugins/alpha/url.js'
+    );
+    window.Gerrit.install(
+      p => {
+        pluginB = p;
+      },
+      '0.1',
+      'http://some/plugins/beta/url.js'
+    );
+
+    const el = await fixture<GrEndpointDecorator>(html`
+      <gr-endpoint-decorator name="ordered-root-endpoint">
+      </gr-endpoint-decorator>
+    `);
+
+    const unorderedHook = pluginB.registerCustomComponent(
+      'ordered-root-endpoint',
+      'unordered-root-mod'
+    );
+    const unorderedAttached = mockPromise();
+    unorderedHook.onAttached(() => unorderedAttached.resolve());
+    await unorderedAttached;
+
+    const betaOrderedHook = pluginB.registerCustomComponent(
+      'ordered-root-endpoint',
+      'beta-ordered-mod',
+      {order: 1}
+    );
+    const betaAttached = mockPromise();
+    betaOrderedHook.onAttached(() => betaAttached.resolve());
+    await betaAttached;
+
+    const alphaOrderedHook = pluginA.registerCustomComponent(
+      'ordered-root-endpoint',
+      'alpha-ordered-mod',
+      {order: 1}
+    );
+    const alphaAttached = mockPromise();
+    alphaOrderedHook.onAttached(() => alphaAttached.resolve());
+    await alphaAttached;
+
+    const childNames = Array.from(el.children).map(c => c.nodeName);
+    assert.deepEqual(childNames, [
+      'ALPHA-ORDERED-MOD',
+      'BETA-ORDERED-MOD',
+      'UNORDERED-ROOT-MOD',
+    ]);
+  });
+
+  test('preserves LIFO for unordered slotted modules and FIFO for unordered root modules', async () => {
+    let pluginA!: PluginApi;
+    let pluginB!: PluginApi;
+    window.Gerrit.install(
+      p => {
+        pluginA = p;
+      },
+      '0.1',
+      'http://some/plugins/alpha/url.js'
+    );
+    window.Gerrit.install(
+      p => {
+        pluginB = p;
+      },
+      '0.1',
+      'http://some/plugins/beta/url.js'
+    );
+
+    const el = await fixture<GrEndpointDecorator>(html`
+      <gr-endpoint-decorator name="unordered-compat-endpoint">
+        <gr-endpoint-slot name="below"></gr-endpoint-slot>
+      </gr-endpoint-decorator>
+    `);
+
+    const slotOrderedHook = pluginB.registerCustomComponent(
+      'unordered-compat-endpoint',
+      'slot-ordered',
+      {slot: 'below', order: Number.MAX_SAFE_INTEGER}
+    );
+    const slotOrderedAttached = mockPromise();
+    slotOrderedHook.onAttached(() => slotOrderedAttached.resolve());
+    await slotOrderedAttached;
+
+    const slotUnordered1Hook = pluginA.registerCustomComponent(
+      'unordered-compat-endpoint',
+      'slot-unordered-1',
+      {slot: 'below'}
+    );
+    const slotUnordered1Attached = mockPromise();
+    slotUnordered1Hook.onAttached(() => slotUnordered1Attached.resolve());
+    await slotUnordered1Attached;
+
+    const slotUnordered2Hook = pluginB.registerCustomComponent(
+      'unordered-compat-endpoint',
+      'slot-unordered-2',
+      {slot: 'below'}
+    );
+    const slotUnordered2Attached = mockPromise();
+    slotUnordered2Hook.onAttached(() => slotUnordered2Attached.resolve());
+    await slotUnordered2Attached;
+
+    const rootUnordered1Hook = pluginB.registerCustomComponent(
+      'unordered-compat-endpoint',
+      'root-unordered-1'
+    );
+    const rootUnordered1Attached = mockPromise();
+    rootUnordered1Hook.onAttached(() => rootUnordered1Attached.resolve());
+    await rootUnordered1Attached;
+
+    const rootUnordered2Hook = pluginA.registerCustomComponent(
+      'unordered-compat-endpoint',
+      'root-unordered-2'
+    );
+    const rootUnordered2Attached = mockPromise();
+    rootUnordered2Hook.onAttached(() => rootUnordered2Attached.resolve());
+    await rootUnordered2Attached;
+
+    const childNames = Array.from(el.children).map(c => c.nodeName);
+    assert.deepEqual(childNames, [
+      'GR-ENDPOINT-SLOT',
+      'SLOT-ORDERED',
+      'SLOT-UNORDERED-2',
+      'SLOT-UNORDERED-1',
+      'ROOT-UNORDERED-1',
+      'ROOT-UNORDERED-2',
+    ]);
+  });
+
+  test('re-attaches plugin element when decorator is disconnected and reconnected', async () => {
+    const attachedElements: HTMLElement[] = [];
+    replacementHook.onAttached(el => attachedElements.push(el));
+
+    const module = Array.from(second.children).find(
+      el => el.nodeName === 'OTHER-MODULE'
+    );
+    assert.isOk(module);
+    assert.equal(replacementHook.getAllAttached().length, 1);
+
+    second.remove();
+    assert.equal(replacementHook.getAllAttached().length, 0);
+
+    container.appendChild(second);
+    assert.equal(replacementHook.getAllAttached().length, 1);
+    assert.strictEqual(replacementHook.getAllAttached()[0], module);
+    assert.equal(attachedElements.length, 1);
+    assert.strictEqual(attachedElements[0], module);
+    assert.equal(
+      Array.from(second.children).filter(el => el.nodeName === 'OTHER-MODULE')
+        .length,
+      1
+    );
+  });
+
+  test('attaches gerrit-theme replacement immediately and blocks later decorations', async () => {
+    const loader = testResolver(pluginLoaderToken);
+    sinon.stub(loader, 'awaitPluginsLoaded').returns(new Promise(() => {}));
+    (
+      loader.pluginEndPoints as unknown as {pluginLoaded: boolean}
+    ).pluginLoaded = false;
+
+    try {
+      let themePlugin!: PluginApi;
+      window.Gerrit.install(
+        p => {
+          themePlugin = p;
+        },
+        '0.1',
+        `${window.location.origin}/static/gerrit-theme.js`
+      );
+      const replaceHook = themePlugin.registerCustomComponent(
+        'header-title',
+        'custom-theme-header',
+        {replace: true}
+      );
+      const attached = mockPromise();
+      replaceHook.onAttached(() => attached.resolve());
+
+      const headerDecorator = await fixture<GrEndpointDecorator>(html`
+        <gr-endpoint-decorator name="header-title">
+          <div class="titleText"></div>
+        </gr-endpoint-decorator>
+      `);
+      await attached;
+
+      assert.deepEqual(
+        Array.from(headerDecorator.children).map(c => c.nodeName),
+        ['CUSTOM-THEME-HEADER']
+      );
+
+      loader.pluginEndPoints.setPluginsReady();
+      plugin.registerCustomComponent('header-title', 'extra-decoration');
+      await headerDecorator.updateComplete;
+      assert.deepEqual(
+        Array.from(headerDecorator.children).map(c => c.nodeName),
+        ['CUSTOM-THEME-HEADER']
+      );
+    } finally {
+      loader.pluginEndPoints.setPluginsReady();
+    }
+  });
 });
diff --git a/polygerrit-ui/app/elements/plugins/gr-plugin-host/gr-plugin-host.ts b/polygerrit-ui/app/elements/plugins/gr-plugin-host/gr-plugin-host.ts
index 80765a8..22c53bc 100644
--- a/polygerrit-ui/app/elements/plugins/gr-plugin-host/gr-plugin-host.ts
+++ b/polygerrit-ui/app/elements/plugins/gr-plugin-host/gr-plugin-host.ts
@@ -32,10 +32,18 @@
           ? [config.default_theme]
           : [];
         const instanceId = config?.gerrit?.instance_id;
-        this.getPluginLoader().loadPlugins(
-          [...themes, ...jsPlugins],
-          instanceId
-        );
+        if (config?.default_theme) {
+          this.getPluginLoader().loadPlugins(
+            [...themes, ...jsPlugins],
+            instanceId,
+            config.default_theme
+          );
+        } else {
+          this.getPluginLoader().loadPlugins(
+            [...themes, ...jsPlugins],
+            instanceId
+          );
+        }
       }
     );
   }
diff --git a/polygerrit-ui/app/elements/settings/gr-identities/gr-identities_test.ts b/polygerrit-ui/app/elements/settings/gr-identities/gr-identities_test.ts
index 068fd48..53d5d8f 100644
--- a/polygerrit-ui/app/elements/settings/gr-identities/gr-identities_test.ts
+++ b/polygerrit-ui/app/elements/settings/gr-identities/gr-identities_test.ts
@@ -114,8 +114,8 @@
 
     const nameCells = rows.map(row => queryAll(row, 'td')[2].textContent);
 
-    assert.equal(nameCells[0]!.trim(), 'gerrit:gerrit');
-    assert.equal(nameCells[1]!.trim(), '');
+    assert.equal(nameCells[0].trim(), 'gerrit:gerrit');
+    assert.equal(nameCells[1].trim(), '');
   });
 
   test('renders email', () => {
@@ -125,8 +125,8 @@
 
     const nameCells = rows.map(row => queryAll(row, 'td')[1].textContent);
 
-    assert.equal(nameCells[0]!, 'gerrit@example.com');
-    assert.equal(nameCells[1]!, 'gerrit2@example.com');
+    assert.equal(nameCells[0], 'gerrit@example.com');
+    assert.equal(nameCells[1], 'gerrit2@example.com');
   });
 
   test('filterIdentities', () => {
diff --git a/polygerrit-ui/app/elements/settings/gr-preferences/gr-preferences.ts b/polygerrit-ui/app/elements/settings/gr-preferences/gr-preferences.ts
index bd738ee..579994f 100644
--- a/polygerrit-ui/app/elements/settings/gr-preferences/gr-preferences.ts
+++ b/polygerrit-ui/app/elements/settings/gr-preferences/gr-preferences.ts
@@ -489,7 +489,7 @@
       this.flagsService.isEnabled(
         KnownExperimentId.ML_SUGGESTED_EDIT_UNCHECK_BY_DEFAULT
       ) ||
-      !this.suggestionsProvider
+      !this.suggestionsProvider?.suggestFix
     )
       return nothing;
     return html`
@@ -528,7 +528,7 @@
   // When the experiment is over, move this back to render(),
   // removing this function.
   private renderAiCommentAutocompletion() {
-    if (!this.suggestionsProvider) return nothing;
+    if (!this.suggestionsProvider?.autocompleteComment) return nothing;
     return html`
       <section id="allowAiCommentAutocompletionSection">
         <div class="title">
diff --git a/polygerrit-ui/app/elements/settings/gr-preferences/gr-preferences_test.ts b/polygerrit-ui/app/elements/settings/gr-preferences/gr-preferences_test.ts
index 66b2388..9aa09c2 100644
--- a/polygerrit-ui/app/elements/settings/gr-preferences/gr-preferences_test.ts
+++ b/polygerrit-ui/app/elements/settings/gr-preferences/gr-preferences_test.ts
@@ -6,12 +6,17 @@
 import '../../../test/common-test-setup';
 import './gr-preferences';
 import {
+  query,
   queryAll,
   queryAndAssert,
   stubFlags,
   stubRestApi,
   waitUntil,
 } from '../../../test/test-utils';
+import {KnownExperimentId} from '../../../services/flags/flags';
+import {ResponseCode} from '../../../api/suggestions';
+import {testResolver} from '../../../test/common-test-setup';
+import {pluginLoaderToken} from '../../shared/gr-js-api-interface/gr-plugin-loader';
 import {GrPreferences} from './gr-preferences';
 import {PreferencesInfo, TopMenuItemInfo} from '../../../types/common';
 import {
@@ -583,4 +588,75 @@
     await element.save();
     assert.isFalse(element.hasUnsavedChanges());
   });
+
+  test('shows suggest-while-commenting preference only when provider implements suggestFix', async () => {
+    stubFlags('isEnabled').callsFake(
+      flag => flag === KnownExperimentId.ML_SUGGESTED_EDIT_V2
+    );
+    const pluginsModel = testResolver(pluginLoaderToken).pluginsModel;
+
+    pluginsModel.updateState({
+      suggestionsPlugins: [
+        {
+          pluginName: 'chat-only-plugin',
+          provider: {
+            requestAiFix: async () => {
+              return {responseCode: ResponseCode.OK, fix_suggestions: []};
+            },
+          },
+        },
+      ],
+    });
+    await element.updateComplete;
+    assert.isNotOk(query(element, '#allowSuggestCodeWhileCommentingSection'));
+
+    pluginsModel.updateState({
+      suggestionsPlugins: [
+        {
+          pluginName: 'inline-fix-plugin',
+          provider: {
+            suggestFix: async () => {
+              return {responseCode: ResponseCode.OK, fix_suggestions: []};
+            },
+          },
+        },
+      ],
+    });
+    await element.updateComplete;
+    queryAndAssert(element, '#allowSuggestCodeWhileCommentingSection');
+  });
+
+  test('shows comment-autocompletion preference only when provider implements autocompleteComment', async () => {
+    const pluginsModel = testResolver(pluginLoaderToken).pluginsModel;
+
+    pluginsModel.updateState({
+      suggestionsPlugins: [
+        {
+          pluginName: 'chat-only-plugin',
+          provider: {
+            requestAiFix: async () => {
+              return {responseCode: ResponseCode.OK, fix_suggestions: []};
+            },
+          },
+        },
+      ],
+    });
+    await element.updateComplete;
+    assert.isNotOk(query(element, '#allowAiCommentAutocompletionSection'));
+
+    pluginsModel.updateState({
+      suggestionsPlugins: [
+        {
+          pluginName: 'autocomplete-plugin',
+          provider: {
+            autocompleteComment: async () => {
+              return {responseCode: ResponseCode.OK};
+            },
+          },
+        },
+      ],
+    });
+    await element.updateComplete;
+    queryAndAssert(element, '#allowAiCommentAutocompletionSection');
+  });
 });
diff --git a/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-view.ts b/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-view.ts
index cd27153..2a61fac 100644
--- a/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-view.ts
+++ b/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-view.ts
@@ -212,7 +212,7 @@
           );
         }
 
-        if (this.serverConfig?.receive?.enable_signed_push) {
+        if (this.serverConfig?.gerrit?.edit_gpg_keys) {
           configPromises.push(
             this.gpgEditorPromise.then(gpgEditor => gpgEditor.loadData())
           );
@@ -319,7 +319,7 @@
               () => html`<li><a href="#SSHKeys"> SSH Keys </a></li>`
             )}
             ${when(
-              this.serverConfig?.receive?.enable_signed_push,
+              this.serverConfig?.gerrit?.edit_gpg_keys,
               () => html`<li><a href="#GPGKeys"> GPG Keys </a></li>`
             )}
             <li><a href="#Groups">Groups</a></li>
@@ -358,13 +358,16 @@
               ?disabled=${!this.accountInfoChanged}
               >Save Changes</gr-button
             >
-            <gr-button
-              class="account-button"
-              @click=${() => {
-                this.confirmDeleteAccount();
-              }}
-              >Delete Account</gr-button
-            >
+            ${when(
+              this.deleteAccountEnabled(),
+              () => html`<gr-button
+                class="account-button"
+                @click=${() => {
+                  this.confirmDeleteAccount();
+                }}
+                >Delete Account</gr-button
+              >`
+            )}
             <gr-button
               class="account-button"
               @click=${() => {
@@ -372,25 +375,30 @@
               }}
               >Dump Account State</gr-button
             >
-            <dialog id="confirm-account-deletion">
-              <gr-dialog
-                @cancel=${() => this.deleteAccountConfirmationDialog?.close()}
-                @confirm=${() => this.deleteAccount()}
-                .loading=${this.isDeletingAccount}
-                .loadingLabel=${'Deleting account'}
-                .confirmLabel=${'Delete account'}
-              >
-                <div class="confirm-account-deletion-header" slot="header">
-                  Are you sure you wish to delete your account?
-                </div>
-                <div class="confirm-account-deletion-main" slot="main">
-                  <ul>
-                    <li>Deleting your account is not reversible.</li>
-                    <li>Deleting your account will not delete your changes.</li>
-                  </ul>
-                </div>
-              </gr-dialog>
-            </dialog>
+            ${when(
+              this.deleteAccountEnabled(),
+              () => html`<dialog id="confirm-account-deletion">
+                <gr-dialog
+                  @cancel=${() => this.deleteAccountConfirmationDialog?.close()}
+                  @confirm=${() => this.deleteAccount()}
+                  .loading=${this.isDeletingAccount}
+                  .loadingLabel=${'Deleting account'}
+                  .confirmLabel=${'Delete account'}
+                >
+                  <div class="confirm-account-deletion-header" slot="header">
+                    Are you sure you wish to delete your account?
+                  </div>
+                  <div class="confirm-account-deletion-main" slot="main">
+                    <ul>
+                      <li>Deleting your account is not reversible.</li>
+                      <li>
+                        Deleting your account will not delete your changes.
+                      </li>
+                    </ul>
+                  </div>
+                </gr-dialog>
+              </dialog>`
+            )}
             <dialog id="dump-account-state">
               <gr-dialog
                 cancel-label=""
@@ -576,7 +584,7 @@
               ></gr-ssh-editor>`
           )}
           ${when(
-            this.serverConfig?.receive?.enable_signed_push,
+            this.serverConfig?.gerrit?.edit_gpg_keys,
             () => html`<div>
               <h2
                 id="GPGKeys"
@@ -685,6 +693,11 @@
     this.deleteAccountConfirmationDialog?.showModal();
   }
 
+  // private but used in test
+  deleteAccountEnabled() {
+    return this.serverConfig?.accounts.enable_delete !== false;
+  }
+
   private async deleteAccount() {
     this.isDeletingAccount = true;
     await this.accountInfo.delete();
diff --git a/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-view_test.ts b/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-view_test.ts
index 6e4ff88..01048a8 100644
--- a/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-view_test.ts
+++ b/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-view_test.ts
@@ -393,6 +393,33 @@
     assert.isFalse(element.showHttpAuth());
   });
 
+  test('delete account action depends on enable_delete', async () => {
+    const deleteAccountButton = () =>
+      [...element.shadowRoot!.querySelectorAll('gr-button')].find(
+        button => button.textContent?.trim() === 'Delete Account'
+      );
+
+    assert.isOk(deleteAccountButton());
+
+    // Servers that don't return the field keep the old behaviour.
+    const serverInfo = createServerInfo();
+    delete serverInfo.accounts.enable_delete;
+    element.serverConfig = serverInfo;
+    await element.updateComplete;
+    assert.isOk(deleteAccountButton());
+
+    element.serverConfig = {
+      ...createServerInfo(),
+      accounts: {...serverInfo.accounts, enable_delete: false},
+    };
+    await element.updateComplete;
+
+    assert.isNotOk(deleteAccountButton());
+    assert.isNotOk(
+      element.shadowRoot!.querySelector('#confirm-account-deletion')
+    );
+  });
+
   suite('when email verification token is provided', () => {
     let resolveConfirm: (
       value: string | PromiseLike<string | null> | null
@@ -430,4 +457,35 @@
       );
     });
   });
+
+  for (const {editGpgKeys, enableSignedPush, visible} of [
+    {editGpgKeys: true, enableSignedPush: true, visible: true},
+    {editGpgKeys: undefined, enableSignedPush: false, visible: false},
+    {editGpgKeys: undefined, enableSignedPush: true, visible: false},
+  ]) {
+    test(`GPG keys with edit_gpg_keys=${editGpgKeys} and enable_signed_push=${enableSignedPush}`, async () => {
+      if (editGpgKeys) {
+        config.gerrit.edit_gpg_keys = editGpgKeys;
+      } else {
+        delete config.gerrit.edit_gpg_keys;
+      }
+      config.receive = {enable_signed_push: enableSignedPush};
+      const getKeysStub = stubRestApi('getAccountGPGKeys').resolves({});
+      element.remove();
+      element = await fixture(html`<gr-settings-view></gr-settings-view>`);
+      await element._testOnly_loadingPromise;
+      await element.updateComplete;
+
+      assert.equal(
+        !!element.shadowRoot!.querySelector('a[href="#GPGKeys"]'),
+        visible
+      );
+      assert.equal(!!element.shadowRoot!.querySelector('#GPGKeys'), visible);
+      assert.equal(
+        !!element.shadowRoot!.querySelector('gr-gpg-editor'),
+        visible
+      );
+      assert.equal(getKeysStub.callCount, visible ? 1 : 0);
+    });
+  }
 });
diff --git a/polygerrit-ui/app/elements/shared/gr-account-list/gr-account-list.ts b/polygerrit-ui/app/elements/shared/gr-account-list/gr-account-list.ts
index 18fd4e8..f35ebb4 100644
--- a/polygerrit-ui/app/elements/shared/gr-account-list/gr-account-list.ts
+++ b/polygerrit-ui/app/elements/shared/gr-account-list/gr-account-list.ts
@@ -13,9 +13,13 @@
   GroupInfo,
   isAccount,
   isGroup,
+  isReviewerAccountSuggestion,
+  isReviewerGroupSuggestion,
+  SuggestedReviewerAccountInfo,
   SuggestedReviewerGroupInfo,
   SuggestedReviewerInfo,
   Suggestion,
+  UserId,
 } from '../../../types/common';
 import {ReviewerSuggestionsProvider} from '../../../services/gr-reviewer-suggestions-provider/gr-reviewer-suggestions-provider';
 import {GrAccountEntry} from '../gr-account-entry/gr-account-entry';
@@ -46,6 +50,14 @@
 const VALID_EMAIL_ALERT = 'Please input a valid email.';
 const VALID_USER_GROUP_ALERT = 'Please input a valid user or group.';
 
+interface ActiveChipDrag {
+  account: AccountInfo;
+  sourceList: GrAccountList;
+  dragOverLists: Set<GrAccountList>;
+}
+
+let activeChipDrag: ActiveChipDrag | null = null;
+
 declare global {
   interface HTMLElementEventMap {
     'account-drag-start': CustomEvent<{account: AccountInfo}>;
@@ -129,12 +141,19 @@
     this.addEventListener('remove-account', e =>
       this.handleRemove(e as CustomEvent<{account: AccountInput}>)
     );
+    this.addEventListener('dragover', e => this.handleDragOver(e));
+    this.addEventListener('dragleave', e => this.handleDragLeave(e));
+    this.addEventListener('drop', e => this.handleDrop(e));
   }
 
   static override get styles() {
     return [
       sharedStyles,
       css`
+        :host(.drag-over) {
+          background-color: var(--table-header-background-color);
+          outline: 2px dashed var(--border-color);
+        }
         gr-account-chip {
           display: inline-block;
           margin: var(--spacing-xs) var(--spacing-xs) var(--spacing-xs) 0;
@@ -178,9 +197,13 @@
                 ),
               })}
               ?removable=${this.computeRemovable(account)}
-              ?draggable=${this.chipDraggable}
+              ?draggable=${this.chipDraggable &&
+              !this.disabled &&
+              isAccount(account) &&
+              this.computeRemovable(account)}
               @keydown=${this.handleChipKeydown}
               @dragstart=${this.handleChipDragStart}
+              @dragend=${this.handleChipDragEnd}
               tabindex="-1"
             >
             </gr-account-chip>
@@ -227,6 +250,10 @@
     if (!provider) return Promise.resolve([]);
     return provider.getSuggestions(input).then(suggestions => {
       if (!suggestions) return [];
+      suggestions = [
+        ...suggestions,
+        ...this.getRemovedAccountSuggestions(suggestions, input),
+      ];
       if (this.filter) {
         suggestions = suggestions.filter(this.filter);
       }
@@ -236,6 +263,30 @@
     });
   }
 
+  private getRemovedAccountSuggestions(
+    existingSuggestions: Suggestion[],
+    input: string
+  ): SuggestedReviewerAccountInfo[] {
+    const existingKeys = new Set(
+      existingSuggestions
+        .map(suggestion => getSuggestionKey(suggestion))
+        .filter((key): key is UserId => key !== undefined)
+    );
+    return this.removals()
+      .filter(
+        account =>
+          isAccount(account) &&
+          (!this.change?.owner ||
+            !isAccount(this.change.owner) ||
+            getUserId(account) !== getUserId(this.change.owner)) &&
+          !existingKeys.has(getUserId(account)) &&
+          accountMatchesInput(account, input)
+      )
+      .map(account => {
+        return {account, count: 1};
+      });
+  }
+
   // private but used in test
   handleAdd(e: ValueChangedEvent<string>) {
     // TODO(TS) this is temporary hack to avoid cascade of ts issues
@@ -325,7 +376,7 @@
   }
 
   removeAccount(toRemove?: AccountInput) {
-    if (!toRemove || !this.computeRemovable(toRemove)) {
+    if (this.disabled || !toRemove || !this.computeRemovable(toRemove)) {
       return false;
     }
     const index = this.accounts.findIndex(
@@ -366,8 +417,17 @@
   private handleChipDragStart(e: DragEvent) {
     const chip = e.target as GrAccountChip;
     const account = chip.account;
-    if (!account || !isAccount(account)) return;
+    if (
+      !this.chipDraggable ||
+      this.disabled ||
+      !account ||
+      !isAccount(account) ||
+      !this.computeRemovable(account)
+    ) {
+      return;
+    }
 
+    activeChipDrag = {account, sourceList: this, dragOverLists: new Set()};
     if (e.dataTransfer) {
       e.dataTransfer.setData('text/plain', getUserId(account) as string);
       e.dataTransfer.effectAllowed = 'move';
@@ -376,6 +436,112 @@
     fire(this, 'account-drag-start', {account});
   }
 
+  private handleChipDragEnd() {
+    if (activeChipDrag) {
+      for (const list of activeChipDrag.dragOverLists) {
+        list.classList.remove('drag-over');
+      }
+      activeChipDrag = null;
+    }
+  }
+
+  private getListDisplayName(): string {
+    if (this.id === 'ccs') return 'CCs';
+    if (this.id === 'reviewers') return 'reviewers';
+    const siblingLabel = this.previousElementSibling?.classList.contains(
+      'peopleListLabel'
+    )
+      ? this.previousElementSibling
+      : null;
+    const labelEl =
+      siblingLabel ??
+      this.closest('.peopleList')?.querySelector('.peopleListLabel') ??
+      this.parentElement?.querySelector('.peopleListLabel');
+    return labelEl?.textContent?.trim() || this.id || 'list';
+  }
+
+  private canAcceptDrop(drag: ActiveChipDrag | null): drag is ActiveChipDrag {
+    if (
+      !this.chipDraggable ||
+      this.readonly ||
+      this.disabled ||
+      !drag ||
+      drag.sourceList === this
+    ) {
+      return false;
+    }
+    if (this.filter && !this.filter({account: drag.account, count: 1})) {
+      return false;
+    }
+    return true;
+  }
+
+  private handleDragOver(e: DragEvent) {
+    if (!this.canAcceptDrop(activeChipDrag)) return;
+    e.preventDefault();
+    e.stopPropagation();
+    if (e.dataTransfer) {
+      e.dataTransfer.dropEffect = 'move';
+    }
+    this.classList.add('drag-over');
+    activeChipDrag.dragOverLists.add(this);
+  }
+
+  private handleDragLeave(e: DragEvent) {
+    if (!this.chipDraggable) return;
+    if (
+      e.relatedTarget instanceof Node &&
+      (this.contains(e.relatedTarget) ||
+        this.shadowRoot?.contains(e.relatedTarget))
+    ) {
+      return;
+    }
+    e.preventDefault();
+    e.stopPropagation();
+    this.classList.remove('drag-over');
+    activeChipDrag?.dragOverLists.delete(this);
+  }
+
+  private handleDrop(e: DragEvent) {
+    if (
+      !activeChipDrag ||
+      !this.chipDraggable ||
+      this.readonly ||
+      this.disabled
+    ) {
+      return;
+    }
+    e.preventDefault();
+    e.stopPropagation();
+    this.classList.remove('drag-over');
+
+    const drag = activeChipDrag;
+    activeChipDrag = null;
+    for (const list of drag.dragOverLists) {
+      list.classList.remove('drag-over');
+    }
+    if (!this.canAcceptDrop(drag)) {
+      return;
+    }
+
+    const {account, sourceList} = drag;
+    if (!sourceList.removeAccount(account)) {
+      return;
+    }
+    if (
+      !this.accounts.some(
+        existing => getUserId(existing) === getUserId(account)
+      )
+    ) {
+      this.addAccountItem({account, count: 1});
+    }
+
+    const moveFrom = sourceList.getListDisplayName();
+    const moveTo = this.getListDisplayName();
+    const id = account.name || getUserId(account);
+    fireAlert(this, `${id} moved from ${moveFrom} to ${moveTo}.`);
+  }
+
   private handleChipKeydown(e: KeyboardEvent) {
     const chip = e.target as GrAccountChip;
     const chips = this.accountChips;
@@ -450,3 +616,38 @@
     );
   }
 }
+
+function getSuggestionKey(suggestion: Suggestion): UserId | undefined {
+  if (isReviewerAccountSuggestion(suggestion)) {
+    return isAccount(suggestion.account)
+      ? getUserId(suggestion.account)
+      : undefined;
+  }
+  if (isReviewerGroupSuggestion(suggestion)) {
+    return suggestion.group.id;
+  }
+  if (isAccount(suggestion)) {
+    return getUserId(suggestion);
+  }
+  return undefined;
+}
+
+function accountMatchesInput(account: AccountInfo, input: string): boolean {
+  const query = input.trim().toLowerCase();
+  if (!query) return true;
+  const searchableFields = [
+    account.name,
+    account.display_name,
+    account.email,
+    account.username,
+    ...(account.secondary_emails ?? []),
+    account.name && account.email
+      ? `${account.name} <${account.email}>`
+      : undefined,
+    account.display_name && account.email
+      ? `${account.display_name} <${account.email}>`
+      : undefined,
+    account._account_id !== undefined ? String(account._account_id) : undefined,
+  ];
+  return searchableFields.some(field => field?.toLowerCase().includes(query));
+}
diff --git a/polygerrit-ui/app/elements/shared/gr-account-list/gr-account-list_test.ts b/polygerrit-ui/app/elements/shared/gr-account-list/gr-account-list_test.ts
index 40c1774..ca16b31 100644
--- a/polygerrit-ui/app/elements/shared/gr-account-list/gr-account-list_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-account-list/gr-account-list_test.ts
@@ -14,6 +14,7 @@
   GroupBaseInfo,
   GroupId,
   GroupName,
+  isReviewerAccountSuggestion,
   SuggestedReviewerInfo,
   Suggestion,
 } from '../../../types/common';
@@ -47,7 +48,7 @@
       value: {
         account: {
           _account_id: 1 as AccountId,
-        } as AccountInfo,
+        },
         count: 1,
       },
     };
@@ -229,7 +230,7 @@
       .stub(suggestionsProvider, 'makeSuggestionItem')
       .callsFake(suggestion => {
         return {
-          name: ((suggestion as AccountInfo).email as string) ?? '',
+          name: (suggestion as AccountInfo).email ?? '',
           value: {
             account: suggestion as AccountInfo,
             count: 1,
@@ -254,7 +255,7 @@
       .then(suggestions => {
         assert.deepEqual(suggestions, [
           {
-            name: (originalSuggestions[0] as AccountInfo).email as string,
+            name: (originalSuggestions[0] as AccountInfo).email,
             value: {
               account: originalSuggestions[0] as AccountInfo,
               count: 1,
@@ -264,6 +265,61 @@
       });
   });
 
+  test('getSuggestions includes locally removed accounts matching input', async () => {
+    const removedReviewer: AccountInfo = {
+      _account_id: 101 as AccountId,
+      name: 'Alice Smith',
+      email: 'alice@example.com' as EmailAddress,
+      username: 'alices',
+    };
+    element.accounts = [removedReviewer, existingAccount2];
+    element.change = {
+      ...createChange(),
+      reviewers: {
+        [ReviewerState.REVIEWER]: [removedReviewer, existingAccount2],
+      },
+    };
+    await element.updateComplete;
+
+    // Remove the reviewer locally before saving the reply.
+    element.removeAccount(removedReviewer);
+    await element.updateComplete;
+    assert.deepEqual(element.removals(), [removedReviewer]);
+
+    // Backend omits removedReviewer because it is still persisted on the change.
+    sinon.stub(suggestionsProvider, 'getSuggestions').resolves([]);
+    sinon
+      .stub(suggestionsProvider, 'makeSuggestionItem')
+      .callsFake(suggestion => {
+        const account = isReviewerAccountSuggestion(suggestion)
+          ? suggestion.account
+          : (suggestion as AccountInfo);
+        return {
+          name: `${account.name} <${account.email}>`,
+          value: {
+            account,
+            count: 1,
+          },
+        };
+      });
+
+    // Matching query returns the locally removed reviewer.
+    const matchingSuggestions = await element.getSuggestions('alice');
+    assert.deepEqual(matchingSuggestions, [
+      {
+        name: 'Alice Smith <alice@example.com>',
+        value: {
+          account: removedReviewer,
+          count: 1,
+        },
+      },
+    ]);
+
+    // Non-matching query does not return the removed reviewer.
+    const nonMatchingSuggestions = await element.getSuggestions('bob');
+    assert.deepEqual(nonMatchingSuggestions, []);
+  });
+
   test('computeRemovable', async () => {
     const newAccount = makeAccount() as AccountInfoInput;
     element.readonly = false;
@@ -495,4 +551,247 @@
       assert.isTrue(removeSpy.calledTwice);
     });
   });
+
+  suite('drag and drop between gr-account-list instances', () => {
+    let sourceList: GrAccountList;
+    let targetList: GrAccountList;
+
+    setup(async () => {
+      sourceList = await fixture(
+        html`<gr-account-list
+          id="reviewers"
+          .chipDraggable=${true}
+        ></gr-account-list>`
+      );
+      targetList = await fixture(
+        html`<gr-account-list
+          id="ccs"
+          .chipDraggable=${true}
+        ></gr-account-list>`
+      );
+      sourceList.accounts = [existingAccount1, existingAccount2];
+      targetList.accounts = [];
+      await sourceList.updateComplete;
+      await targetList.updateComplete;
+    });
+
+    test('dragging a chip from sourceList to targetList moves account and fires events', async () => {
+      const sourceChangedSpy = sinon.spy();
+      const targetChangedSpy = sinon.spy();
+      const alertSpy = sinon.spy();
+      sourceList.addEventListener('accounts-changed', sourceChangedSpy);
+      targetList.addEventListener('accounts-changed', targetChangedSpy);
+      targetList.addEventListener('show-alert', alertSpy);
+
+      const chip = sourceList.accountChips[0];
+      chip.dispatchEvent(
+        new DragEvent('dragstart', {bubbles: true, cancelable: true})
+      );
+
+      targetList.dispatchEvent(
+        new DragEvent('dragover', {bubbles: true, cancelable: true})
+      );
+      assert.isTrue(targetList.classList.contains('drag-over'));
+
+      targetList.dispatchEvent(
+        new DragEvent('drop', {bubbles: true, cancelable: true})
+      );
+      await sourceList.updateComplete;
+      await targetList.updateComplete;
+
+      assert.isFalse(targetList.classList.contains('drag-over'));
+      assert.deepEqual(sourceList.accounts, [existingAccount2]);
+      assert.deepEqual(targetList.accounts, [existingAccount1]);
+      assert.isTrue(sourceChangedSpy.calledOnce);
+      assert.isTrue(targetChangedSpy.calledOnce);
+      assert.isTrue(alertSpy.calledOnce);
+    });
+
+    test('dropping onto the same list is a no-op', async () => {
+      const chip = sourceList.accountChips[0];
+      chip.dispatchEvent(
+        new DragEvent('dragstart', {bubbles: true, cancelable: true})
+      );
+
+      const dragOverEvent = new DragEvent('dragover', {
+        bubbles: true,
+        cancelable: true,
+      });
+      sourceList.dispatchEvent(dragOverEvent);
+      assert.isFalse(dragOverEvent.defaultPrevented);
+      assert.isFalse(sourceList.classList.contains('drag-over'));
+
+      sourceList.dispatchEvent(
+        new DragEvent('drop', {bubbles: true, cancelable: true})
+      );
+      await sourceList.updateComplete;
+
+      assert.deepEqual(sourceList.accounts, [
+        existingAccount1,
+        existingAccount2,
+      ]);
+    });
+
+    test('dropping onto a targetList whose filter rejects the account does not move it', async () => {
+      targetList.filter = () => false;
+
+      const chip = sourceList.accountChips[0];
+      chip.dispatchEvent(
+        new DragEvent('dragstart', {bubbles: true, cancelable: true})
+      );
+      const dragOverEvent = new DragEvent('dragover', {
+        bubbles: true,
+        cancelable: true,
+      });
+      targetList.dispatchEvent(dragOverEvent);
+      assert.isFalse(dragOverEvent.defaultPrevented);
+      assert.isFalse(targetList.classList.contains('drag-over'));
+
+      targetList.dispatchEvent(
+        new DragEvent('drop', {bubbles: true, cancelable: true})
+      );
+      await sourceList.updateComplete;
+      await targetList.updateComplete;
+
+      assert.deepEqual(sourceList.accounts, [
+        existingAccount1,
+        existingAccount2,
+      ]);
+      assert.deepEqual(targetList.accounts, []);
+    });
+
+    test('dragleave into a child node keeps drag-over class', async () => {
+      const child = document.createElement('span');
+      targetList.appendChild(child);
+
+      const chip = sourceList.accountChips[0];
+      chip.dispatchEvent(
+        new DragEvent('dragstart', {bubbles: true, cancelable: true})
+      );
+      targetList.dispatchEvent(
+        new DragEvent('dragover', {bubbles: true, cancelable: true})
+      );
+      assert.isTrue(targetList.classList.contains('drag-over'));
+
+      targetList.dispatchEvent(
+        new DragEvent('dragleave', {
+          bubbles: true,
+          cancelable: true,
+          relatedTarget: child,
+        })
+      );
+      assert.isTrue(targetList.classList.contains('drag-over'));
+
+      targetList.dispatchEvent(
+        new DragEvent('dragleave', {
+          bubbles: true,
+          cancelable: true,
+          relatedTarget: document.body,
+        })
+      );
+      assert.isFalse(targetList.classList.contains('drag-over'));
+    });
+
+    test('toast uses preceding sibling peopleListLabel when multiple lists share a parent', async () => {
+      const container = await fixture<HTMLDivElement>(html`
+        <div>
+          <div class="peopleListLabel">First List</div>
+          <gr-account-list
+            id="first-list"
+            .chipDraggable=${true}
+          ></gr-account-list>
+          <div class="peopleListLabel">After AI review</div>
+          <gr-account-list
+            id="second-list"
+            .chipDraggable=${true}
+          ></gr-account-list>
+        </div>
+      `);
+      const firstList = container.querySelector<GrAccountList>('#first-list')!;
+      const secondList =
+        container.querySelector<GrAccountList>('#second-list')!;
+      firstList.accounts = [existingAccount1];
+      secondList.accounts = [];
+      await firstList.updateComplete;
+      await secondList.updateComplete;
+
+      const alertSpy = sinon.spy();
+      secondList.addEventListener('show-alert', alertSpy);
+
+      firstList.accountChips[0].dispatchEvent(
+        new DragEvent('dragstart', {bubbles: true, cancelable: true})
+      );
+      secondList.dispatchEvent(
+        new DragEvent('drop', {bubbles: true, cancelable: true})
+      );
+      await firstList.updateComplete;
+      await secondList.updateComplete;
+
+      assert.isTrue(alertSpy.calledOnce);
+      assert.include(
+        alertSpy.firstCall.args[0].detail.message,
+        'moved from First List to After AI review.'
+      );
+    });
+
+    test('canceling a drag clears drag-over class and resets active drag state', async () => {
+      const chip = sourceList.accountChips[0];
+      chip.dispatchEvent(
+        new DragEvent('dragstart', {bubbles: true, cancelable: true})
+      );
+      targetList.dispatchEvent(
+        new DragEvent('dragover', {bubbles: true, cancelable: true})
+      );
+      assert.isTrue(targetList.classList.contains('drag-over'));
+
+      chip.dispatchEvent(
+        new DragEvent('dragend', {bubbles: true, cancelable: true})
+      );
+      assert.isFalse(targetList.classList.contains('drag-over'));
+
+      targetList.dispatchEvent(
+        new DragEvent('drop', {bubbles: true, cancelable: true})
+      );
+      await sourceList.updateComplete;
+      await targetList.updateComplete;
+
+      assert.deepEqual(sourceList.accounts, [
+        existingAccount1,
+        existingAccount2,
+      ]);
+      assert.deepEqual(targetList.accounts, []);
+    });
+
+    test('dragging from a disabled sourceList is a no-op', async () => {
+      sourceList.disabled = true;
+      await sourceList.updateComplete;
+
+      const chip = sourceList.accountChips[0];
+      assert.isFalse(chip.draggable);
+
+      chip.dispatchEvent(
+        new DragEvent('dragstart', {bubbles: true, cancelable: true})
+      );
+      const dragOverEvent = new DragEvent('dragover', {
+        bubbles: true,
+        cancelable: true,
+      });
+      targetList.dispatchEvent(dragOverEvent);
+      assert.isFalse(dragOverEvent.defaultPrevented);
+      assert.isFalse(targetList.classList.contains('drag-over'));
+
+      targetList.dispatchEvent(
+        new DragEvent('drop', {bubbles: true, cancelable: true})
+      );
+      await sourceList.updateComplete;
+      await targetList.updateComplete;
+
+      assert.isFalse(sourceList.removeAccount(existingAccount1));
+      assert.deepEqual(sourceList.accounts, [
+        existingAccount1,
+        existingAccount2,
+      ]);
+      assert.deepEqual(targetList.accounts, []);
+    });
+  });
 });
diff --git a/polygerrit-ui/app/elements/shared/gr-autosubmit-checkbox/gr-autosubmit-checkbox_test.ts b/polygerrit-ui/app/elements/shared/gr-autosubmit-checkbox/gr-autosubmit-checkbox_test.ts
index 726f48f..dae281d 100644
--- a/polygerrit-ui/app/elements/shared/gr-autosubmit-checkbox/gr-autosubmit-checkbox_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-autosubmit-checkbox/gr-autosubmit-checkbox_test.ts
@@ -112,7 +112,7 @@
       });
 
       // Case 1: user is NOT owner
-      userModel.setAccount(createAccountDetailWithId(123 as AccountId));
+      userModel.setAccount(createAccountDetailWithId(123));
       changeModel.updateStateChange({
         ...createParsedChange(),
         owner: {_account_id: 456 as AccountId},
@@ -121,7 +121,7 @@
       assert.isFalse(element.isAutosubmitEnabled);
 
       // Case 2: user IS owner
-      userModel.setAccount(createAccountDetailWithId(456 as AccountId));
+      userModel.setAccount(createAccountDetailWithId(456));
       await element.updateComplete;
       assert.isTrue(element.isAutosubmitEnabled);
     });
@@ -147,7 +147,7 @@
         status: ChangeStatus.NEW,
         owner: {_account_id: 456 as AccountId},
       };
-      userModel.setAccount(createAccountDetailWithId(456 as AccountId));
+      userModel.setAccount(createAccountDetailWithId(456));
       changeModel.updateStateChange(change);
       await element.updateComplete;
       assert.isTrue(element.isAutosubmitEnabled);
diff --git a/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread.ts b/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread.ts
index 7e6f45c..cf52fc81 100644
--- a/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread.ts
+++ b/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread.ts
@@ -25,6 +25,7 @@
   getLastComment,
   hasUserSuggestion,
   id,
+  isFileLevelComment,
   NEWLINE_PATTERN,
 } from '../../../utils/comment-util';
 import {ChangeMessageId, FixSuggestionInfo} from '../../../api/rest-api';
@@ -61,7 +62,7 @@
   copyToClipboard,
   uuid,
 } from '../../../utils/common-util';
-import {fire, fireAlert} from '../../../utils/event-util';
+import {fire} from '../../../utils/event-util';
 import {GrSyntaxLayerWorker} from '../../../embed/diff/gr-syntax-layer/gr-syntax-layer-worker';
 import {TokenHighlightLayer} from '../../../embed/diff/gr-diff-builder/token-highlight-layer';
 import {getUserName} from '../../../utils/display-name-util';
@@ -1066,27 +1067,38 @@
   }
 
   private async handleAIFix(): Promise<void> {
-    if (!this.thread || !this.account) return;
+    if (!this.thread || !this.account || !this.isOwner) return;
     const comment = this.thread.comments[0];
-    if (!comment?.message) return;
+    const filePath = comment?.path ?? this.thread.path;
+    const patchsetNumber =
+      comment?.patch_set ?? this.thread.patchNum ?? this.latestPatchNum;
+    const side = comment?.side ?? this.thread.commentSide;
+    if (
+      !comment?.message ||
+      !filePath ||
+      !patchsetNumber ||
+      side === CommentSide.PARENT
+    ) {
+      return;
+    }
     this.suggestionLoading = true;
     this.generatedSuggestionId = uuid();
     let suggestion: FixSuggestionInfo | undefined;
     try {
-      suggestion =
-        await this.getSuggestionsService().generateSuggestedFixForComment(
-          comment,
-          comment.message,
-          this.generatedSuggestionId,
-          ReportSource.GET_AI_FIX_FOR_COMMENT
-        );
+      suggestion = await this.getSuggestionsService().requestAiFix({
+        prompt: comment.message,
+        patchsetNumber,
+        filePath,
+        range: comment.range,
+        lineNumber: comment.line,
+        generatedSuggestionId: this.generatedSuggestionId,
+        commentId: id(comment),
+        reportSource: ReportSource.GET_AI_FIX_FOR_COMMENT,
+      });
     } finally {
       this.suggestionLoading = false;
     }
-    if (!suggestion) {
-      fireAlert(this, 'No suitable AI fix could be found');
-      return;
-    }
+    if (!suggestion) return;
     // Description is used to identify the suggestion source in logs.
     suggestion.description =
       ReportSource.GET_AI_FIX_FOR_COMMENT + ' ' + suggestion.description;
@@ -1104,10 +1116,17 @@
     if (!this.thread || !this.account) return false;
     if (this.thread.comments.length !== 1) return false;
     const comment = this.thread.comments[0];
+    const filePath = comment?.path ?? this.thread.path;
+    const patchsetNumber =
+      comment?.patch_set ?? this.thread.patchNum ?? this.latestPatchNum;
+    const side = comment?.side ?? this.thread.commentSide;
     if (
-      !this.getSuggestionsService()?.isGeneratedSuggestedFixEnabledForComment(
-        comment
-      )
+      !comment?.message ||
+      !filePath ||
+      !patchsetNumber ||
+      !this.getSuggestionsService()?.isRequestAiFixEnabled(filePath) ||
+      side === CommentSide.PARENT ||
+      isFileLevelComment(comment)
     ) {
       return false;
     }
diff --git a/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread_test.ts b/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread_test.ts
index 137b874..d0a3a5f 100644
--- a/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread_test.ts
@@ -753,9 +753,7 @@
   suite('Get AI fix button', () => {
     setup(async () => {
       const suggestionsService = testResolver(suggestionsServiceToken);
-      sinon
-        .stub(suggestionsService, 'isGeneratedSuggestedFixEnabled')
-        .returns(true);
+      sinon.stub(suggestionsService, 'isRequestAiFixEnabled').returns(true);
       stubFlags('isEnabled').returns(true);
 
       element.isOwner = true;
@@ -852,6 +850,89 @@
       assert.isNotOk(query(element, '#aiFixBtn'));
     });
 
+    test('not show get ai fix if user is not change owner', async () => {
+      element.isOwner = false;
+      await element.updateComplete;
+      assert.isNotOk(query(element, '#aiFixBtn'));
+    });
+
+    test('not show get ai fix on parent side or file-level comment', async () => {
+      element.thread = createThread({
+        ...c1,
+        side: CommentSide.PARENT,
+        unresolved: true,
+      });
+      await element.updateComplete;
+      assert.isNotOk(query(element, '#aiFixBtn'));
+
+      element.thread = createThread({
+        ...c1,
+        line: undefined,
+        range: undefined,
+        unresolved: true,
+      });
+      await element.updateComplete;
+      assert.isNotOk(query(element, '#aiFixBtn'));
+    });
+
+    test('clicking Get AI Fix calls suggestionsService.requestAiFix', async () => {
+      const suggestionsService = testResolver(suggestionsServiceToken);
+      const requestAiFixStub = sinon
+        .stub(suggestionsService, 'requestAiFix')
+        .resolves(undefined);
+      element.thread = createThread({
+        ...c1,
+        path: 'src/foo.ts',
+        patch_set: 2 as RevisionPatchSetNum,
+        line: 15,
+        unresolved: true,
+      });
+      await element.updateComplete;
+
+      queryAndAssert<GrButton>(element, '#aiFixBtn').click();
+      await waitUntil(() => requestAiFixStub.calledOnce);
+
+      assert.include(requestAiFixStub.firstCall.args[0], {
+        prompt: 'start the conversation',
+        patchsetNumber: 2 as RevisionPatchSetNum,
+        filePath: 'src/foo.ts',
+        lineNumber: 15,
+        commentId: 'the-root',
+      });
+    });
+
+    test('clicking Get AI Fix falls back to thread path and latestPatchNum', async () => {
+      const suggestionsService = testResolver(suggestionsServiceToken);
+      const requestAiFixStub = sinon
+        .stub(suggestionsService, 'requestAiFix')
+        .resolves(undefined);
+      element.showPatchset = false;
+      element.latestPatchNum = 4 as PatchSetNumber;
+      element.thread = {
+        ...createThread({
+          ...c1,
+          path: undefined,
+          patch_set: undefined,
+          line: 22,
+          unresolved: true,
+        }),
+        path: 'src/fallback.ts',
+        patchNum: undefined,
+      };
+      await element.updateComplete;
+
+      queryAndAssert<GrButton>(element, '#aiFixBtn').click();
+      await waitUntil(() => requestAiFixStub.calledOnce);
+
+      assert.include(requestAiFixStub.firstCall.args[0], {
+        prompt: 'start the conversation',
+        patchsetNumber: 4 as RevisionPatchSetNum,
+        filePath: 'src/fallback.ts',
+        lineNumber: 22,
+        commentId: 'the-root',
+      });
+    });
+
     test('handleAppliedFix creates a "Fix applied" reply', async () => {
       const thread: CommentThread = {
         ...createThread(c1),
diff --git a/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.ts b/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.ts
index 24ca939..dd955ad 100644
--- a/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.ts
+++ b/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.ts
@@ -327,19 +327,19 @@
    * This is triggered when the user types into the editing textarea. We then
    * debounce it and call autoSave().
    */
-  private autoSaveTrigger$ = new Subject();
+  private autoSaveTrigger$ = new Subject<void>();
 
   /**
    * This is triggered when the user types into the editing textarea. We then
    * debounce it and call generateSuggestEdit().
    */
-  private generateSuggestionTrigger$ = new Subject();
+  private generateSuggestionTrigger$ = new Subject<void>();
 
   /**
    * This is triggered when the user types into the editing textarea. We then
    * debounce it and call autocompleteComment().
    */
-  private autocompleteTrigger$ = new Subject();
+  private autocompleteTrigger$ = new Subject<void>();
 
   /**
    * Set to the content of DraftInfo when entering editing mode.
diff --git a/polygerrit-ui/app/elements/shared/gr-comment/gr-comment_test.ts b/polygerrit-ui/app/elements/shared/gr-comment/gr-comment_test.ts
index b437a74..d6a3853 100644
--- a/polygerrit-ui/app/elements/shared/gr-comment/gr-comment_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-comment/gr-comment_test.ts
@@ -25,7 +25,6 @@
   EmailAddress,
   FixId,
   NumericChangeId,
-  PatchSetNum,
   SavingState,
   Timestamp,
   UrlEncodedCommentId,
@@ -492,12 +491,7 @@
     );
     element.handleConfirmDeleteComment();
     assert.isTrue(
-      stub.calledWith(
-        42 as NumericChangeId,
-        1 as PatchSetNum,
-        'baf0414d_60047215' as UrlEncodedCommentId,
-        'removal reason'
-      )
+      stub.calledWith(42, 1, 'baf0414d_60047215', 'removal reason')
     );
   });
 
diff --git a/polygerrit-ui/app/elements/shared/gr-content-with-sidebar/gr-content-with-sidebar.ts b/polygerrit-ui/app/elements/shared/gr-content-with-sidebar/gr-content-with-sidebar.ts
index 869f9df..b24d818 100644
--- a/polygerrit-ui/app/elements/shared/gr-content-with-sidebar/gr-content-with-sidebar.ts
+++ b/polygerrit-ui/app/elements/shared/gr-content-with-sidebar/gr-content-with-sidebar.ts
@@ -4,7 +4,7 @@
  * SPDX-License-Identifier: Apache-2.0
  */
 import {customElement, property, query, state} from 'lit/decorators.js';
-import {css, html, LitElement, nothing} from 'lit';
+import {css, html, LitElement, nothing, PropertyValues} from 'lit';
 import {styleMap} from 'lit/directives/style-map.js';
 
 const SIDEBAR_MIN_WIDTH = 250;
@@ -20,6 +20,8 @@
 export class GrContentWithSidebar extends LitElement {
   @query('.sidebar-wrapper') sidebarWrapper?: HTMLElement;
 
+  @query('.top-reference') topReference?: HTMLElement;
+
   @state()
   private sidebarWidthPx = 400;
 
@@ -43,20 +45,76 @@
 
   private readonly boundStopSidebarResize = () => this.stopSidebarResize();
 
+  private readonly handleScroll = () => {
+    this.updateSidebarTop();
+  };
+
+  override connectedCallback() {
+    super.connectedCallback();
+    window.addEventListener('scroll', this.handleScroll, {passive: true});
+    window.addEventListener('resize', this.handleScroll, {passive: true});
+    if (this.hasUpdated) {
+      this.updateSidebarTop();
+    }
+  }
+
+  override disconnectedCallback() {
+    window.removeEventListener('scroll', this.handleScroll);
+    window.removeEventListener('resize', this.handleScroll);
+    this.style.removeProperty('--sidebar-wrapper-top');
+    super.disconnectedCallback();
+  }
+
+  override updated(changedProperties: PropertyValues) {
+    super.updated(changedProperties);
+    if (changedProperties.has('hideSide')) {
+      if (this.hideSide) {
+        this.style.removeProperty('--sidebar-wrapper-top');
+      } else {
+        this.updateSidebarTop();
+      }
+    }
+  }
+
+  updateSidebarTop() {
+    if (this.hideSide || !this.topReference) {
+      return;
+    }
+    const rect = this.getBoundingClientRect();
+    const sidebarTop = this.topReference.getBoundingClientRect().top;
+    const topStr =
+      rect.top > sidebarTop + 0.5 ? `${Math.round(rect.top)}px` : '';
+    if (this.style.getPropertyValue('--sidebar-wrapper-top') !== topStr) {
+      if (topStr) {
+        this.style.setProperty('--sidebar-wrapper-top', topStr);
+      } else {
+        this.style.removeProperty('--sidebar-wrapper-top');
+      }
+    }
+  }
+
   static override get styles() {
     return [
       css`
         :host {
           display: block;
           position: relative;
-          --sidebar-height: calc(100vh - var(--sidebar-top, 0px));
+          --sidebar-height: 100%;
+        }
+        .top-reference {
+          position: fixed;
+          top: var(--sidebar-top, 0px);
+          visibility: hidden;
+          pointer-events: none;
+          height: 0;
+          width: 0;
         }
         .sidebar-wrapper {
           z-index: 50;
-          position: absolute;
+          position: fixed;
           display: flex;
-          top: 0;
-          bottom: calc(0px - var(--sidebar-bottom-overflow, 0px));
+          top: max(var(--sidebar-wrapper-top, 0px), var(--sidebar-top, 0px));
+          bottom: 0px;
           min-width: 250px;
           max-width: 100%;
           background-color: var(--background-color-secondary);
@@ -70,18 +128,15 @@
           right: auto;
         }
         .sidebar {
-          position: sticky;
-          top: var(--sidebar-top, 0px);
-          height: var(--sidebar-height);
+          height: 100%;
           box-sizing: border-box;
           overflow: auto;
           flex-grow: 1;
           font-size: 14px;
         }
         .resizer-wrapper {
-          position: sticky;
-          top: var(--sidebar-top, 0px);
-          height: var(--sidebar-height);
+          position: relative;
+          height: 100%;
           z-index: 51;
         }
         .resizer {
@@ -127,6 +182,7 @@
             width: `calc(100% - ${widthPx}px)`,
           });
     return html`
+      <div class="top-reference" aria-hidden="true"></div>
       <div>
         <div style=${mainStyle}>
           <slot name="main"></slot>
diff --git a/polygerrit-ui/app/elements/shared/gr-content-with-sidebar/gr-content-with-sidebar_test.ts b/polygerrit-ui/app/elements/shared/gr-content-with-sidebar/gr-content-with-sidebar_test.ts
index 626e3dc..0bba833 100644
--- a/polygerrit-ui/app/elements/shared/gr-content-with-sidebar/gr-content-with-sidebar_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-content-with-sidebar/gr-content-with-sidebar_test.ts
@@ -25,6 +25,7 @@
     assert.shadowDom.equal(
       element,
       /* HTML */ `
+        <div aria-hidden="true" class="top-reference"></div>
         <div>
           <div style="width:calc(100% - 0px);">
             <slot name="main"></slot>
@@ -42,6 +43,7 @@
     assert.shadowDom.equal(
       element,
       /* HTML */ `
+        <div aria-hidden="true" class="top-reference"></div>
         <div>
           <div style="width: calc(100% - 400px);">
             <slot name="main"> </slot>
@@ -74,6 +76,7 @@
     assert.shadowDom.equal(
       element,
       /* HTML */ `
+        <div aria-hidden="true" class="top-reference"></div>
         <div>
           <div style="width: calc(100% - 400px); margin-left: 400px;">
             <slot name="main"> </slot>
@@ -97,4 +100,218 @@
       `
     );
   });
+
+  test('sidebar-wrapper has fixed position', async () => {
+    element.hideSide = false;
+    await element.updateComplete;
+
+    const wrapper = element.sidebarWrapper!;
+    const style = getComputedStyle(wrapper);
+    assert.equal(style.position, 'fixed');
+  });
+
+  test('updateSidebarTop sets --sidebar-wrapper-top when top offset exceeds sidebar-top', async () => {
+    element.hideSide = false;
+    element.style.setProperty('--sidebar-top', '80px');
+    await element.updateComplete;
+
+    // Simulate content being pushed down by 40px (e.g. 120px top from banner)
+    sinon.stub(element, 'getBoundingClientRect').returns({
+      top: 120,
+      bottom: 800,
+      left: 0,
+      right: 1200,
+      width: 1200,
+      height: 680,
+      x: 0,
+      y: 120,
+      toJSON: () => {},
+    });
+
+    sinon.stub(element.topReference!, 'getBoundingClientRect').returns({
+      top: 80,
+      bottom: 80,
+      left: 0,
+      right: 0,
+      width: 0,
+      height: 0,
+      x: 0,
+      y: 80,
+      toJSON: () => {},
+    });
+
+    element.updateSidebarTop();
+
+    assert.equal(
+      element.style.getPropertyValue('--sidebar-wrapper-top'),
+      '120px'
+    );
+  });
+
+  test('updateSidebarTop clears --sidebar-wrapper-top when scrolled past banner', async () => {
+    element.hideSide = false;
+    element.style.setProperty('--sidebar-top', '80px');
+    element.style.setProperty('--sidebar-wrapper-top', '120px');
+    await element.updateComplete;
+
+    sinon.stub(element, 'getBoundingClientRect').returns({
+      top: 20, // scrolled past 80px
+      bottom: 800,
+      left: 0,
+      right: 1200,
+      width: 1200,
+      height: 780,
+      x: 0,
+      y: 20,
+      toJSON: () => {},
+    });
+
+    sinon.stub(element.topReference!, 'getBoundingClientRect').returns({
+      top: 80,
+      bottom: 80,
+      left: 0,
+      right: 0,
+      width: 0,
+      height: 0,
+      x: 0,
+      y: 80,
+      toJSON: () => {},
+    });
+
+    element.updateSidebarTop();
+
+    assert.equal(element.style.getPropertyValue('--sidebar-wrapper-top'), '');
+  });
+
+  test('subpixel differences <= 0.5px do not set --sidebar-wrapper-top', async () => {
+    element.hideSide = false;
+    element.style.setProperty('--sidebar-top', '80px');
+    await element.updateComplete;
+
+    sinon.stub(element, 'getBoundingClientRect').returns({
+      top: 80.3,
+      bottom: 800,
+      left: 0,
+      right: 1200,
+      width: 1200,
+      height: 720,
+      x: 0,
+      y: 80.3,
+      toJSON: () => {},
+    });
+
+    sinon.stub(element.topReference!, 'getBoundingClientRect').returns({
+      top: 80.0,
+      bottom: 80.0,
+      left: 0,
+      right: 0,
+      width: 0,
+      height: 0,
+      x: 0,
+      y: 80.0,
+      toJSON: () => {},
+    });
+
+    element.updateSidebarTop();
+
+    assert.equal(element.style.getPropertyValue('--sidebar-wrapper-top'), '');
+  });
+
+  test('window scroll and resize events trigger updateSidebarTop', async () => {
+    element.hideSide = false;
+    element.style.setProperty('--sidebar-top', '80px');
+    await element.updateComplete;
+
+    const elementStub = sinon.stub(element, 'getBoundingClientRect').returns({
+      top: 120,
+      bottom: 800,
+      left: 0,
+      right: 1200,
+      width: 1200,
+      height: 680,
+      x: 0,
+      y: 120,
+      toJSON: () => {},
+    });
+
+    sinon.stub(element.topReference!, 'getBoundingClientRect').returns({
+      top: 80,
+      bottom: 80,
+      left: 0,
+      right: 0,
+      width: 0,
+      height: 0,
+      x: 0,
+      y: 80,
+      toJSON: () => {},
+    });
+
+    window.dispatchEvent(new Event('scroll'));
+    assert.equal(
+      element.style.getPropertyValue('--sidebar-wrapper-top'),
+      '120px'
+    );
+
+    elementStub.returns({
+      top: 20,
+      bottom: 800,
+      left: 0,
+      right: 1200,
+      width: 1200,
+      height: 780,
+      x: 0,
+      y: 20,
+      toJSON: () => {},
+    });
+
+    window.dispatchEvent(new Event('resize'));
+    assert.equal(element.style.getPropertyValue('--sidebar-wrapper-top'), '');
+  });
+
+  test('disconnectedCallback cleans up --sidebar-wrapper-top', async () => {
+    element.style.setProperty('--sidebar-wrapper-top', '120px');
+
+    element.disconnectedCallback();
+
+    assert.equal(element.style.getPropertyValue('--sidebar-wrapper-top'), '');
+  });
+
+  test('connectedCallback recomputes --sidebar-wrapper-top if hasUpdated', async () => {
+    element.hideSide = false;
+    element.style.setProperty('--sidebar-top', '80px');
+    await element.updateComplete;
+
+    sinon.stub(element, 'getBoundingClientRect').returns({
+      top: 120,
+      bottom: 800,
+      left: 0,
+      right: 1200,
+      width: 1200,
+      height: 680,
+      x: 0,
+      y: 120,
+      toJSON: () => {},
+    });
+
+    sinon.stub(element.topReference!, 'getBoundingClientRect').returns({
+      top: 80,
+      bottom: 80,
+      left: 0,
+      right: 0,
+      width: 0,
+      height: 0,
+      x: 0,
+      y: 80,
+      toJSON: () => {},
+    });
+
+    element.disconnectedCallback();
+    assert.equal(element.style.getPropertyValue('--sidebar-wrapper-top'), '');
+
+    element.connectedCallback();
+    assert.equal(
+      element.style.getPropertyValue('--sidebar-wrapper-top'),
+      '120px'
+    );
+  });
 });
diff --git a/polygerrit-ui/app/elements/shared/gr-copy-clipboard/gr-copy-clipboard.ts b/polygerrit-ui/app/elements/shared/gr-copy-clipboard/gr-copy-clipboard.ts
index 8e8ec47..849b902 100644
--- a/polygerrit-ui/app/elements/shared/gr-copy-clipboard/gr-copy-clipboard.ts
+++ b/polygerrit-ui/app/elements/shared/gr-copy-clipboard/gr-copy-clipboard.ts
@@ -97,16 +97,16 @@
         :host([nowrap]) .text {
           flex-wrap: nowrap;
         }
-        :host([multiline]) .text {
+        :host([multiline]:not([hideinput])) .text {
           align-items: flex-start;
         }
-        :host([multiline]) .text label {
+        :host([multiline]:not([hideinput])) .text label {
           margin-top: var(--spacing-s);
         }
-        :host([multiline]) .text .shortcut {
+        :host([multiline]:not([hideinput])) .text .shortcut {
           margin-top: var(--spacing-s);
         }
-        :host([multiline]) gr-button {
+        :host([multiline]:not([hideinput])) gr-button {
           margin-top: 0;
         }
         .text label {
diff --git a/polygerrit-ui/app/elements/shared/gr-copy-clipboard/gr-copy-clipboard_test.ts b/polygerrit-ui/app/elements/shared/gr-copy-clipboard/gr-copy-clipboard_test.ts
index 9ea0ee2..8e2e68b 100644
--- a/polygerrit-ui/app/elements/shared/gr-copy-clipboard/gr-copy-clipboard_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-copy-clipboard/gr-copy-clipboard_test.ts
@@ -157,6 +157,20 @@
     assert.equal(getComputedStyle(mdOutlinedTextField).display, 'none');
   });
 
+  test('multiline with hideInput keeps symmetric button margins', async () => {
+    const button = queryAndAssert<GrButton>(element, 'gr-button');
+    element.multiline = true;
+    await element.updateComplete;
+    assert.equal(getComputedStyle(button).marginTop, '0px');
+
+    element.hideInput = true;
+    await element.updateComplete;
+    assert.equal(
+      getComputedStyle(button).marginTop,
+      getComputedStyle(button).marginBottom
+    );
+  });
+
   test('stop events propagation', () => {
     const divParent = document.createElement('div');
     divParent.appendChild(element);
diff --git a/polygerrit-ui/app/elements/shared/gr-dropdown/gr-dropdown_test.ts b/polygerrit-ui/app/elements/shared/gr-dropdown/gr-dropdown_test.ts
index 16757a8..618fe6f 100644
--- a/polygerrit-ui/app/elements/shared/gr-dropdown/gr-dropdown_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-dropdown/gr-dropdown_test.ts
@@ -260,7 +260,7 @@
         element.shadowRoot?.querySelectorAll('md-menu-item')
       );
       const el = queryAndAssert<HTMLAnchorElement>(
-        element.cursor.target as HTMLElement,
+        element.cursor.target,
         ':not([hidden])'
       );
       const stub = sinon.stub(el, 'click');
diff --git a/polygerrit-ui/app/elements/shared/gr-editable-content/gr-editable-content.ts b/polygerrit-ui/app/elements/shared/gr-editable-content/gr-editable-content.ts
index 6a6118c..58a7faf 100644
--- a/polygerrit-ui/app/elements/shared/gr-editable-content/gr-editable-content.ts
+++ b/polygerrit-ui/app/elements/shared/gr-editable-content/gr-editable-content.ts
@@ -63,6 +63,7 @@
   interface HTMLElementEventMap {
     'content-changed': ValueChangedEvent<string>;
     'editing-changed': ValueChangedEvent<boolean>;
+    'markdown-changed': ValueChangedEvent<boolean>;
     /** Fired when the 'cancel' button is pressed. */
     'editable-content-cancel': CustomEvent<{}>;
     /** Fired when the 'save' button is pressed. */
@@ -93,6 +94,9 @@
   })
   editing = false;
 
+  @property({type: Boolean})
+  markdown = false;
+
   @property({type: Boolean, attribute: 'remove-zero-width-space'})
   removeZeroWidthSpace?: boolean;
 
@@ -106,6 +110,9 @@
   @property({type: Boolean, attribute: 'hide-edit-commit-message'})
   hideEditCommitMessage?: boolean;
 
+  @property({type: Boolean, attribute: 'hide-markdown-toggle'})
+  hideMarkdownToggle?: boolean;
+
   /** If false, then the "Show more" button was used to expand. */
   @state() commitCollapsed = true;
 
@@ -353,7 +360,12 @@
   }
 
   private renderButtons() {
-    if (!this.editing && !this.commitCollapsible && this.hideEditCommitMessage)
+    if (
+      !this.editing &&
+      !this.commitCollapsible &&
+      this.hideEditCommitMessage &&
+      this.hideMarkdownToggle
+    )
       return nothing;
 
     return html`
@@ -382,6 +394,26 @@
           `
         )}
         ${when(
+          !this.hideMarkdownToggle && !this.editing,
+          () => html`
+            <gr-button
+              link
+              class="markdown-toggle"
+              title=${this.markdown
+                ? 'Render commit message as plaintext'
+                : 'Render commit message as markdown'}
+              @click=${this.toggleMarkdown}
+              ><div>
+                <gr-icon
+                  icon=${this.markdown ? 'notes' : 'markdown'}
+                  small
+                ></gr-icon>
+                <span>${this.markdown ? 'Plaintext' : 'Markdown'}</span>
+              </div></gr-button
+            >
+          `
+        )}
+        ${when(
           !this.hideEditCommitMessage,
           () => html`
             <gr-button
@@ -632,6 +664,13 @@
     }
   }
 
+  toggleMarkdown() {
+    this.markdown = !this.markdown;
+    fire(this, 'markdown-changed', {
+      value: this.markdown,
+    });
+  }
+
   async handleEditCommitMessage() {
     if (this.editMode) {
       assertIsDefined(this.changeNum, 'changeNum');
diff --git a/polygerrit-ui/app/elements/shared/gr-editable-content/gr-editable-content_test.ts b/polygerrit-ui/app/elements/shared/gr-editable-content/gr-editable-content_test.ts
index 1eb6bca..2726d1f 100644
--- a/polygerrit-ui/app/elements/shared/gr-editable-content/gr-editable-content_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-editable-content/gr-editable-content_test.ts
@@ -71,6 +71,19 @@
           <div class="flex-space"></div>
           <gr-button
             aria-disabled="false"
+            class="markdown-toggle"
+            link=""
+            role="button"
+            tabindex="0"
+            title="Render commit message as markdown"
+          >
+            <div>
+              <gr-icon icon="markdown" small></gr-icon>
+              <span>Markdown</span>
+            </div>
+          </gr-button>
+          <gr-button
+            aria-disabled="false"
             class="edit-commit-message"
             link=""
             role="button"
@@ -92,9 +105,15 @@
     element.editing = false;
     element.commitCollapsible = false;
     element.hideEditCommitMessage = true;
+    element.hideMarkdownToggle = true;
     await element.updateComplete;
     assert.isNotOk(query(element, '.show-all-container'));
 
+    element.hideMarkdownToggle = false;
+    await element.updateComplete;
+    assert.isOk(query(element, '.show-all-container'));
+
+    element.hideMarkdownToggle = true;
     element.hideEditCommitMessage = false;
     await element.updateComplete;
     assert.isOk(query(element, '.show-all-container'));
@@ -110,6 +129,83 @@
     assert.isOk(query(element, '.show-all-container'));
   });
 
+  test('markdown toggle', async () => {
+    const handler = sinon.spy();
+    element.addEventListener('markdown-changed', handler);
+
+    // Programmatic updates to .markdown should not dispatch markdown-changed
+    element.markdown = true;
+    await element.updateComplete;
+    assert.isFalse(handler.called);
+    element.markdown = false;
+    await element.updateComplete;
+    assert.isFalse(handler.called);
+
+    const toggleButton = queryAndAssert<GrButton>(
+      element,
+      'gr-button.markdown-toggle'
+    );
+    assert.isFalse(element.markdown);
+    assert.equal(toggleButton.textContent?.trim(), 'Markdown');
+
+    toggleButton.click();
+    await element.updateComplete;
+
+    assert.isTrue(element.markdown);
+    assert.isTrue(handler.calledOnce);
+    assert.deepEqual(handler.lastCall.args[0].detail, {value: true});
+    assert.equal(toggleButton.textContent?.trim(), 'Plaintext');
+
+    toggleButton.click();
+    await element.updateComplete;
+
+    assert.isFalse(element.markdown);
+    assert.isTrue(handler.calledTwice);
+    assert.deepEqual(handler.lastCall.args[0].detail, {value: false});
+    assert.equal(toggleButton.textContent?.trim(), 'Markdown');
+  });
+
+  test('editing in markdown mode hides markdown toggle and preserves markdown state', async () => {
+    element.content = '### Heading\n\nBody text';
+    await element.updateComplete;
+
+    const toggleButton = queryAndAssert<GrButton>(
+      element,
+      'gr-button.markdown-toggle'
+    );
+    toggleButton.click();
+    await element.updateComplete;
+    assert.isTrue(element.markdown);
+    assert.isOk(query(element, '.viewer'));
+
+    sinon.stub(element, 'loadEmails').resolves();
+    const editButton = queryAndAssert<GrButton>(
+      element,
+      'gr-button.edit-commit-message'
+    );
+    editButton.click();
+    await waitUntil(() => element.editing);
+    await element.updateComplete;
+
+    assert.isNotOk(query(element, '.viewer'));
+    assert.isOk(query(element, '.editor gr-autogrow-textarea'));
+    assert.isNotOk(query(element, 'gr-button.markdown-toggle'));
+
+    queryAndAssert<GrButton>(element, 'gr-button.cancel-button').click();
+    await element.updateComplete;
+
+    assert.isFalse(element.editing);
+    assert.isTrue(element.markdown);
+    assert.isOk(query(element, '.viewer'));
+    assert.equal(
+      queryAndAssert<GrButton>(
+        element,
+        'gr-button.markdown-toggle'
+      ).textContent?.trim(),
+      'Plaintext'
+    );
+  });
+
   test('save event', async () => {
     element.content = '';
     // Needed because contentChanged resets newContent
diff --git a/polygerrit-ui/app/elements/shared/gr-formatted-text/gr-formatted-text.ts b/polygerrit-ui/app/elements/shared/gr-formatted-text/gr-formatted-text.ts
index acc0d38..ff0abe3 100644
--- a/polygerrit-ui/app/elements/shared/gr-formatted-text/gr-formatted-text.ts
+++ b/polygerrit-ui/app/elements/shared/gr-formatted-text/gr-formatted-text.ts
@@ -102,8 +102,18 @@
         :not(pre) > code {
           display: inline;
         }
-        li {
-          margin-left: var(--spacing-xl);
+        /* Indent on the list element, the way GitHub's markdown css does, so
+         every nesting level adds one step instead of stacking the browser's
+         list padding on top of a margin on every item. */
+        ul,
+        ol {
+          padding-left: var(--spacing-xl);
+        }
+        ul ul,
+        ul ol,
+        ol ol,
+        ol ul {
+          margin-bottom: 0;
         }
         gr-account-chip {
           display: inline;
diff --git a/polygerrit-ui/app/elements/shared/gr-formatted-text/gr-formatted-text_test.ts b/polygerrit-ui/app/elements/shared/gr-formatted-text/gr-formatted-text_test.ts
index 7c260be..a771567 100644
--- a/polygerrit-ui/app/elements/shared/gr-formatted-text/gr-formatted-text_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-formatted-text/gr-formatted-text_test.ts
@@ -329,6 +329,20 @@
       assert.equal(style.overflowWrap, 'break-word');
     });
 
+    test('indents lists on the list element instead of on every item', async () => {
+      element.content = '- one\n  - nested\n- two';
+      await element.updateComplete;
+
+      const ul = queryAndAssert<HTMLUListElement>(element, 'ul');
+      const nestedUl = queryAndAssert<HTMLUListElement>(element, 'ul ul');
+      const li = queryAndAssert<HTMLLIElement>(element, 'li');
+      const step = getComputedStyle(ul).paddingLeft;
+
+      assert.isAbove(parseFloat(step), 0);
+      assert.equal(getComputedStyle(nestedUl).paddingLeft, step);
+      assert.equal(getComputedStyle(li).marginLeft, '0px');
+    });
+
     test('renders text with links and rewrites', async () => {
       element.content = `text
         \ntext with plain link: http://google.com
diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-api-utils.ts b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-api-utils.ts
index 1396157..a0d1363 100644
--- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-api-utils.ts
+++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-api-utils.ts
@@ -9,7 +9,7 @@
 
 export const THEME_JS = '/static/gerrit-theme.js';
 
-const THEME_NAME = 'gerrit-theme';
+export const THEME_NAME = 'gerrit-theme';
 
 export function isThemeFile(path: string) {
   return path.endsWith(THEME_JS);
diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-flows-api.ts b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-flows-api.ts
index 027280d..2c77620 100644
--- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-flows-api.ts
+++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-flows-api.ts
@@ -4,17 +4,24 @@
  * SPDX-License-Identifier: Apache-2.0
  */
 import {PluginsModel} from '../../../models/plugins/plugins-model';
+import {FlowsModel} from '../../../models/flows/flows-model';
 import {
   FlowsAutosubmitProvider,
   FlowsPluginApi,
   FlowsProvider,
+  FlowsStateInfo,
 } from '../../../api/flows';
+import {FlowInfo, FlowInput} from '../../../api/rest-api';
+import {ReportingService} from '../../../services/gr-reporting/gr-reporting';
+import {throwingErrorCallback} from '../gr-rest-api-interface/gr-rest-apis/gr-rest-api-helper';
 import {Plugin} from './gr-public-js-api';
 
 export class GrFlowsApi implements FlowsPluginApi {
   constructor(
+    private readonly reporting: ReportingService,
     private readonly plugins: PluginsModel,
-    private readonly plugin: Plugin
+    private readonly plugin: Plugin,
+    private readonly getFlowsModel?: () => FlowsModel
   ) {}
 
   register(provider: FlowsProvider): void {
@@ -30,4 +37,60 @@
       provider,
     });
   }
+
+  getState(): FlowsStateInfo | undefined {
+    const state = this.getFlowsModel?.()?.getState();
+    if (!state) return undefined;
+    return {
+      isEnabled: state.isEnabled,
+      flows: [...state.flows],
+      loading: state.loading,
+      errorMessage: state.errorMessage,
+    };
+  }
+
+  onStateChanged(callback: (state: FlowsStateInfo) => void): () => void {
+    const model = this.getFlowsModel?.();
+    if (!model) return () => {};
+    const sub = model.state$.subscribe(state => {
+      try {
+        callback({
+          isEnabled: state.isEnabled,
+          flows: [...state.flows],
+          loading: state.loading,
+          errorMessage: state.errorMessage,
+        });
+      } catch (err: unknown) {
+        this.reporting.error(
+          'GrFlowsApi',
+          new Error('plugin onStateChanged callback error'),
+          err
+        );
+      }
+    });
+    return () => sub.unsubscribe();
+  }
+
+  async createFlow(
+    flowInput: FlowInput,
+    reload = true
+  ): Promise<FlowInfo | undefined> {
+    const model = this.getFlowsModel?.();
+    if (!model) {
+      throw new Error('FlowsModel is not available');
+    }
+    return model.createFlow(flowInput, throwingErrorCallback, reload);
+  }
+
+  async deleteFlow(flowId: string, reload = true): Promise<void> {
+    const model = this.getFlowsModel?.();
+    if (!model) {
+      throw new Error('FlowsModel is not available');
+    }
+    await model.deleteFlow(flowId, throwingErrorCallback, reload);
+  }
+
+  reload(): void {
+    this.getFlowsModel?.()?.reload();
+  }
 }
diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-js-api-interface_test.ts b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-js-api-interface_test.ts
index fd022dc..a683b50 100644
--- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-js-api-interface_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-js-api-interface_test.ts
@@ -20,6 +20,7 @@
 import {SinonFakeTimers, SinonStub, stub, useFakeTimers} from 'sinon';
 import {GrJsApiInterface} from './gr-js-api-interface-element';
 import {Plugin} from './gr-public-js-api';
+import {GrFlowsApi} from './gr-flows-api';
 import {
   ChangeInfo,
   NumericChangeId,
@@ -30,9 +31,13 @@
 import {ParsedChangeInfo} from '../../../types/types';
 import {
   createChange,
+  createFlow,
   createParsedChange,
   createRevision,
 } from '../../../test/test-data-generators';
+import {FlowsModel, flowsModelToken} from '../../../models/flows/flows-model';
+import {PluginsModel} from '../../../models/plugins/plugins-model';
+import {FlowsStateInfo} from '../../../api/flows';
 import {EventCallback} from './gr-js-api-types';
 import {EmojiSuggestion} from '../gr-suggestion-textarea/gr-suggestion-textarea';
 
@@ -389,4 +394,97 @@
       );
     });
   });
+
+  suite('flows', () => {
+    test('exposes state, subscription, and CRUD methods', async () => {
+      const flowsModel = testResolver(flowsModelToken);
+      const sampleFlow = createFlow({uuid: 'flow-123', stages: []});
+      flowsModel.updateState({
+        isEnabled: true,
+        flows: [sampleFlow],
+        loading: false,
+      });
+
+      const flowsApi = plugin.flows();
+      const snapshot = flowsApi.getState();
+      assert.deepEqual(snapshot, {
+        isEnabled: true,
+        flows: [sampleFlow],
+        loading: false,
+        errorMessage: undefined,
+      });
+      snapshot!.flows.pop();
+      assert.equal(flowsModel.getState().flows.length, 1);
+
+      const observedStates: FlowsStateInfo[] = [];
+      const unsubscribe = flowsApi.onStateChanged(state => {
+        observedStates.push(state);
+      });
+      assert.equal(observedStates.length, 1);
+      assert.equal(observedStates[0].flows[0].uuid, 'flow-123');
+
+      flowsModel.updateState({isEnabled: false, flows: []});
+      assert.equal(observedStates.length, 2);
+      assert.isFalse(observedStates[1].isEnabled);
+      unsubscribe();
+
+      flowsModel.updateState({isEnabled: true});
+      assert.equal(observedStates.length, 2);
+
+      const createFlowStub = stub(flowsModel, 'createFlow').resolves(
+        sampleFlow
+      );
+      const deleteFlowStub = stub(flowsModel, 'deleteFlow').resolves();
+      const reloadStub = stub(flowsModel, 'reload');
+
+      const created = await flowsApi.createFlow({stage_expressions: []});
+      assert.equal(created?.uuid, 'flow-123');
+      assert.isTrue(createFlowStub.calledOnce);
+      assert.equal(createFlowStub.firstCall.args[2], true);
+
+      await flowsApi.deleteFlow('flow-123', false);
+      assert.isTrue(deleteFlowStub.calledOnce);
+      assert.equal(deleteFlowStub.firstCall.args[0], 'flow-123');
+      assert.equal(deleteFlowStub.firstCall.args[2], false);
+
+      flowsApi.reload();
+      assert.isTrue(reloadStub.calledOnce);
+    });
+
+    test('catches and reports errors thrown in onStateChanged callback without disrupting other subscribers', () => {
+      const flowsModel = testResolver(flowsModelToken);
+      const flowsApi = plugin.flows();
+      const observedStates: FlowsStateInfo[] = [];
+
+      const unsubThrowing = flowsApi.onStateChanged(throwErrFn);
+      const unsubObserving = flowsApi.onStateChanged(state => {
+        observedStates.push(state);
+      });
+
+      assert.isTrue(errorStub.calledOnce);
+      assert.equal(errorStub.firstCall.args[0], 'GrFlowsApi');
+      assert.equal(observedStates.length, 1);
+
+      flowsModel.updateState({isEnabled: true});
+      assert.isTrue(errorStub.calledTwice);
+      assert.equal(observedStates.length, 2);
+      assert.isTrue(observedStates[1].isEnabled);
+
+      unsubThrowing();
+      unsubObserving();
+    });
+
+    test('handles undefined getFlowsModel safely', async () => {
+      const flowsApiWithoutModel = new GrFlowsApi(
+        element.reporting,
+        new PluginsModel(),
+        plugin,
+        () => undefined as unknown as FlowsModel
+      );
+      assert.isUndefined(flowsApiWithoutModel.getState());
+      const unsub = flowsApiWithoutModel.onStateChanged(() => {});
+      unsub();
+      flowsApiWithoutModel.reload();
+    });
+  });
 });
diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-endpoints.ts b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-endpoints.ts
index fa50c53..924c790 100644
--- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-endpoints.ts
+++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-endpoints.ts
@@ -5,6 +5,7 @@
  */
 import {PluginApi} from '../../../api/plugin';
 import {HookApi, PluginElement} from '../../../api/hook';
+import {THEME_NAME} from './gr-api-utils';
 
 // eslint-disable-next-line @typescript-eslint/no-explicit-any
 type Callback = (value: any) => void;
@@ -16,6 +17,7 @@
   type?: EndpointType;
   domHook?: HookApi<PluginElement>;
   slot?: string;
+  order?: number;
 }
 
 /**
@@ -35,6 +37,7 @@
   endpoint: string;
   dynamicEndpoint?: string;
   slot?: string;
+  order?: number;
   type?: EndpointType;
   moduleName?: string;
   domHook?: HookApi<PluginElement>;
@@ -71,7 +74,9 @@
   }
 
   _getOrCreateModuleInfo(plugin: PluginApi, opts: Options): ModuleInfo {
-    const {endpoint, slot, type, moduleName, domHook} = opts;
+    const {endpoint, slot, order, type, moduleName, domHook} = opts;
+    const normalizedOrder =
+      order !== undefined && Number.isFinite(order) ? order : undefined;
     const existingModule = this._endpoints
       .get(endpoint)!
       .find(
@@ -79,7 +84,8 @@
           info.plugin === plugin &&
           info.moduleName === moduleName &&
           info.domHook === domHook &&
-          info.slot === slot
+          info.slot === slot &&
+          info.order === normalizedOrder
       );
     if (existingModule) {
       return existingModule;
@@ -91,6 +97,7 @@
         type,
         domHook,
         slot,
+        ...(normalizedOrder !== undefined ? {order: normalizedOrder} : {}),
       };
       this._endpoints.get(endpoint)!.push(newModule);
       return newModule;
@@ -122,7 +129,10 @@
     // one register before plugins ready
     // the other done after, then only the later one will have the callbacks
     // invoked.
-    if (this.pluginLoaded && this._callbacks.has(endpoint)) {
+    if (
+      (this.pluginLoaded || plugin.getPluginName() === THEME_NAME) &&
+      this._callbacks.has(endpoint)
+    ) {
       this._callbacks.get(endpoint)!.forEach(callback => callback(moduleInfo));
     }
   }
@@ -138,8 +148,21 @@
    * endpoint.
    */
   getDetails(name: string): ModuleInfo[] {
-    return (this._endpoints.get(name) ?? []).sort((m1, m2) =>
-      m1.plugin.getPluginName().localeCompare(m2.plugin.getPluginName())
-    );
+    return [...(this._endpoints.get(name) ?? [])].sort((m1, m2) => {
+      const o1 =
+        m1.order !== undefined && Number.isFinite(m1.order)
+          ? m1.order
+          : undefined;
+      const o2 =
+        m2.order !== undefined && Number.isFinite(m2.order)
+          ? m2.order
+          : undefined;
+      if (o1 !== o2) {
+        if (o1 === undefined) return 1;
+        if (o2 === undefined) return -1;
+        return o1 < o2 ? -1 : 1;
+      }
+      return m1.plugin.getPluginName().localeCompare(m2.plugin.getPluginName());
+    });
   }
 }
diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-endpoints_test.ts b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-endpoints_test.ts
index 329d363..3798bb0 100644
--- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-endpoints_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-endpoints_test.ts
@@ -110,4 +110,84 @@
       slot: undefined,
     });
   });
+
+  test('getDetails sorts by order before plugin name', () => {
+    instance.registerModule(replacePlugin, {
+      endpoint: 'ordered-endpoint',
+      type: EndpointType.DECORATE,
+      moduleName: 'unordered-module',
+      domHook,
+    });
+    instance.registerModule(replacePlugin, {
+      endpoint: 'ordered-endpoint',
+      type: EndpointType.DECORATE,
+      moduleName: 'ordered-second',
+      domHook,
+      order: 2,
+    });
+    instance.registerModule(decoratePlugin, {
+      endpoint: 'ordered-endpoint',
+      type: EndpointType.DECORATE,
+      moduleName: 'ordered-first',
+      domHook,
+      order: 1,
+    });
+
+    assert.deepEqual(
+      instance.getDetails('ordered-endpoint').map(m => m.moduleName),
+      ['ordered-first', 'ordered-second', 'unordered-module']
+    );
+  });
+
+  test('getDetails handles MAX_SAFE_INTEGER, non-finite orders, and does not mutate internal array', () => {
+    let pluginAlpha!: PluginApi;
+    let pluginBeta!: PluginApi;
+    window.Gerrit.install(
+      plugin => (pluginAlpha = plugin),
+      '0.1',
+      'http://test.com/plugins/alpha/static/alpha.js'
+    );
+    window.Gerrit.install(
+      plugin => (pluginBeta = plugin),
+      '0.1',
+      'http://test.com/plugins/beta/static/beta.js'
+    );
+
+    instance.registerModule(pluginBeta, {
+      endpoint: 'edge-endpoint',
+      type: EndpointType.DECORATE,
+      moduleName: 'unordered-nan',
+      domHook,
+      order: Number.NaN,
+    });
+    instance.registerModule(pluginAlpha, {
+      endpoint: 'edge-endpoint',
+      type: EndpointType.DECORATE,
+      moduleName: 'unordered-infinity',
+      domHook,
+      order: Number.POSITIVE_INFINITY,
+    });
+    instance.registerModule(pluginBeta, {
+      endpoint: 'edge-endpoint',
+      type: EndpointType.DECORATE,
+      moduleName: 'max-safe-int',
+      domHook,
+      order: Number.MAX_SAFE_INTEGER,
+    });
+
+    const details = instance.getDetails('edge-endpoint');
+    assert.deepEqual(
+      details.map(m => m.moduleName),
+      ['max-safe-int', 'unordered-infinity', 'unordered-nan']
+    );
+    assert.strictEqual(details[1].order, undefined);
+    assert.strictEqual(details[2].order, undefined);
+
+    // Mutating the returned array must not affect subsequent calls.
+    details.reverse();
+    assert.deepEqual(
+      instance.getDetails('edge-endpoint').map(m => m.moduleName),
+      ['max-safe-int', 'unordered-infinity', 'unordered-nan']
+    );
+  });
 });
diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-loader.ts b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-loader.ts
index 5074405..c4d6c8d 100644
--- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-loader.ts
+++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-loader.ts
@@ -18,6 +18,7 @@
 import {JsApiService} from './gr-js-api-types';
 import {RestApiService} from '../../../services/gr-rest-api/gr-rest-api';
 import {PluginsModel} from '../../../models/plugins/plugins-model';
+import {FlowsModel} from '../../../models/flows/flows-model';
 import {Gerrit} from '../../../api/gerrit';
 import {fontStyles} from '../../../styles/gr-font-styles';
 import {grFormStyles} from '../../../styles/gr-form-styles';
@@ -31,6 +32,7 @@
 import {Finalizable} from '../../../types/types';
 import {materialStyles} from '../../../styles/gr-material-styles';
 import {changeViewIntegrationStyles} from '../../../styles/gr-change-view-integration-shared-styles';
+import {sharedStyles} from '../../../styles/shared-styles';
 
 enum PluginState {
   /** State that indicates the plugin is pending to be loaded. */
@@ -87,6 +89,7 @@
     form: grFormStyles,
     material: materialStyles,
     menuPage: menuPageStyles,
+    shared: sharedStyles,
     spinner: spinnerStyles,
     subPage: subpageStyles,
     table: tableStyles,
@@ -104,6 +107,12 @@
   // Resolver to resolve loadingPromise once all plugins loaded
   private loadingResolver: (() => void) | null = null;
 
+  private initialThemePromise: Promise<void> | null = null;
+
+  private initialThemeResolver: (() => void) | null = null;
+
+  private defaultThemeKey?: string;
+
   private instanceId?: string;
 
   public readonly jsApiService: JsApiService;
@@ -114,16 +123,20 @@
 
   constructor(
     private readonly reportingService: ReportingService,
-    private readonly restApiService: RestApiService
+    private readonly restApiService: RestApiService,
+    private readonly getFlowsModel?: () => FlowsModel
   ) {
     this.jsApiService = new GrJsApiInterface(
       () => this.awaitPluginsLoaded(),
       this.reportingService
     );
     this.pluginsModel = new PluginsModel();
-    this.awaitPluginsLoaded().finally(() => {
-      this.pluginsModel.updateState({pluginsLoaded: true});
-    });
+    this.awaitPluginsLoaded()
+      .finally(() => {
+        this.pluginsModel.updateState({pluginsLoaded: true});
+        this.resolveInitialThemeIfReady();
+      })
+      .catch(() => {});
     this.pluginEndPoints = new GrPluginEndpoints();
   }
 
@@ -139,9 +152,16 @@
   /**
    * Load multiple plugins with certain options.
    */
-  loadPlugins(plugins: string[] = [], instanceId?: string) {
+  loadPlugins(
+    plugins: string[] = [],
+    instanceId?: string,
+    defaultTheme?: string
+  ) {
     this.instanceId = instanceId;
     this.pluginListLoaded = true;
+    this.defaultThemeKey = defaultTheme
+      ? this.getPluginKeyFromUrl(this.urlFor(defaultTheme, window.ASSETS_PATH))
+      : undefined;
 
     plugins.forEach(path => {
       const url = this.urlFor(path, window.ASSETS_PATH);
@@ -161,6 +181,7 @@
         this.failToLoad(`Unrecognized plugin path ${path}`, path);
       }
     });
+    this.resolveInitialThemeIfReady();
 
     this.awaitPluginsLoaded().then(() => {
       const loaded = this.getPluginsByState(PluginState.LOADED);
@@ -227,7 +248,8 @@
         this.reportingService,
         this.restApiService,
         this.pluginsModel,
-        this.pluginEndPoints
+        this.pluginEndPoints,
+        this.getFlowsModel
       );
     }
     try {
@@ -259,6 +281,7 @@
         this.loadingResolver = null;
         this.loadingPromise = null;
       }
+      this.resolveInitialThemeIfReady();
     }
   }
 
@@ -301,9 +324,41 @@
       });
     }
     console.debug(`Plugin ${key} ${state}`);
+    if (this.defaultThemeKey) {
+      this.resolveInitialThemeIfReady();
+    }
     return this.plugins.get(key)!;
   }
 
+  private isInitialThemeReady(): boolean {
+    if (!this.pluginListLoaded) return false;
+    if (this.defaultThemeKey) {
+      const themePlugin = this.plugins.get(this.defaultThemeKey);
+      return !themePlugin || themePlugin.state !== PluginState.PENDING;
+    }
+    return this.arePluginsLoaded();
+  }
+
+  private resolveInitialThemeIfReady() {
+    if (this.initialThemeResolver && this.isInitialThemeReady()) {
+      this.initialThemeResolver();
+      this.initialThemeResolver = null;
+      this.initialThemePromise = null;
+    }
+  }
+
+  awaitInitialTheme(): Promise<void> {
+    if (this.isInitialThemeReady()) {
+      return Promise.resolve();
+    }
+    if (!this.initialThemePromise) {
+      this.initialThemePromise = new Promise<void>(
+        resolve => (this.initialThemeResolver = resolve)
+      );
+    }
+    return this.initialThemePromise;
+  }
+
   private pluginInstalled(url: string, plugin: PluginApi) {
     const pluginObj = this.updatePluginState(url, PluginState.LOADED);
     pluginObj.plugin = plugin;
@@ -346,7 +401,10 @@
     const urlWithoutAP = this.urlFor(pluginUrl);
     let onerror = undefined;
     if (urlWithAP !== urlWithoutAP) {
-      onerror = () => this.createScriptTag(urlWithoutAP);
+      onerror = () =>
+        this.createScriptTag(urlWithoutAP, () =>
+          this.failToLoad(`${urlWithoutAP} load error`, urlWithAP)
+        );
     }
 
     this.createScriptTag(urlWithAP, onerror);
diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-loader_test.ts b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-loader_test.ts
index 211d556..d055042 100644
--- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-loader_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-loader_test.ts
@@ -418,4 +418,64 @@
     assert.isTrue(installed);
     await pluginLoader.awaitPluginsLoaded();
   });
+
+  suite('awaitInitialTheme', () => {
+    test('resolves when defaultTheme settles even while another plugin is pending', async () => {
+      let installSlowPlugin!: () => void;
+      sinon.stub(pluginLoader, 'loadJsPlugin').callsFake(pluginPath => {
+        if (pluginPath.includes('gerrit-theme.js')) {
+          pluginLoader.install(
+            () => {},
+            '0.1',
+            `${url}/static/gerrit-theme.js`
+          );
+        } else {
+          installSlowPlugin = () =>
+            pluginLoader.install(
+              () => {},
+              '0.1',
+              `${url}/plugins/slow/static/slow.js`
+            );
+        }
+      });
+
+      const themeReady = pluginLoader.awaitInitialTheme();
+      pluginLoader.loadPlugins(
+        ['/static/gerrit-theme.js', 'plugins/slow/static/slow.js'],
+        undefined,
+        '/static/gerrit-theme.js'
+      );
+
+      assert.isFalse(pluginLoader.arePluginsLoaded());
+      await themeReady;
+
+      installSlowPlugin();
+      await pluginLoader.awaitPluginsLoaded();
+      assert.isTrue(pluginLoader.arePluginsLoaded());
+    });
+
+    test('waits for JS plugins when defaultTheme is unset', async () => {
+      let resolved = false;
+      let finishPlugin!: () => void;
+      sinon.stub(pluginLoader, 'loadJsPlugin').callsFake(() => {
+        finishPlugin = () =>
+          pluginLoader.install(
+            () => {},
+            '0.1',
+            `${url}/plugins/gerrithub/static/gerrithub.js`
+          );
+      });
+
+      const themeReady = pluginLoader.awaitInitialTheme().then(() => {
+        resolved = true;
+      });
+      pluginLoader.loadPlugins(['plugins/gerrithub/static/gerrithub.js']);
+      await waitEventLoop();
+      assert.isFalse(resolved);
+
+      finishPlugin();
+      await themeReady;
+      assert.isTrue(resolved);
+    });
+  });
 });
diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-style-api.ts b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-style-api.ts
index 13eefc8..6a77392 100644
--- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-style-api.ts
+++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-style-api.ts
@@ -33,7 +33,7 @@
 
     const styleEl = getOrCreatePluginStyleEl();
     try {
-      styleEl.sheet?.insertRule(rule);
+      styleEl.sheet?.insertRule(rule, styleEl.sheet.cssRules.length);
     } catch (error) {
       console.error(
         `Failed to insert CSS rule for plugin ${this.plugin.getPluginName()}: ${error}`
diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-style-api_test.ts b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-style-api_test.ts
index 469d667..bfca5ba 100644
--- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-style-api_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-style-api_test.ts
@@ -38,7 +38,7 @@
     assert.equal(styleSheet?.cssRules.length, 1);
   });
 
-  test('insertCSSRule re-uses the <style> element', async () => {
+  test('insertCSSRule re-uses the <style> element and appends in order', async () => {
     styleApi.insertCSSRule('html{color:green;}');
     styleApi.insertCSSRule('html{margin:0px;}');
     const styleEl = queryAndAssert<HTMLStyleElement>(
@@ -47,5 +47,7 @@
     );
     const styleSheet = styleEl.sheet;
     assert.equal(styleSheet?.cssRules.length, 2);
+    assert.include(styleSheet?.cssRules[0].cssText, 'color: green');
+    assert.include(styleSheet?.cssRules[1].cssText, 'margin: 0px');
   });
 });
diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-public-js-api.ts b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-public-js-api.ts
index 6dc62034..92812d5 100644
--- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-public-js-api.ts
+++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-public-js-api.ts
@@ -32,6 +32,7 @@
 import {ReportingService} from '../../../services/gr-reporting/gr-reporting';
 import {RestApiService} from '../../../services/gr-rest-api/gr-rest-api';
 import {PluginsModel} from '../../../models/plugins/plugins-model';
+import {FlowsModel} from '../../../models/flows/flows-model';
 import {GrPluginStyleApi} from './gr-plugin-style-api';
 import {StylePluginApi} from '../../../api/styles';
 import {GrSuggestionsApi} from '../../plugins/gr-suggestions-api/gr-suggestions-api';
@@ -55,7 +56,8 @@
     private readonly report: ReportingService,
     private readonly restApiService: RestApiService,
     private readonly pluginsModel: PluginsModel,
-    private readonly pluginEndpoints: GrPluginEndpoints
+    private readonly pluginEndpoints: GrPluginEndpoints,
+    private readonly getFlowsModel?: () => FlowsModel
   ) {
     this.domHooks = new GrDomHooksManager(this);
 
@@ -121,10 +123,12 @@
       ? EndpointType.REPLACE
       : EndpointType.DECORATE;
     const slot = options?.slot ?? '';
+    const order = options?.order;
     const domHook = this.domHooks.getDomHook<T>(endpoint, moduleName);
     moduleName = moduleName || domHook.getModuleName();
     this.pluginEndpoints.registerModule(this, {
       slot,
+      order,
       endpoint,
       type,
       moduleName,
@@ -210,7 +214,12 @@
   }
 
   flows(): GrFlowsApi {
-    return new GrFlowsApi(this.pluginsModel, this);
+    return new GrFlowsApi(
+      this.report,
+      this.pluginsModel,
+      this,
+      this.getFlowsModel
+    );
   }
 
   changeUpdates(): GrChangeUpdatesApi {
diff --git a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-rest-apis/gr-rest-api-helper.ts b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-rest-apis/gr-rest-api-helper.ts
index 145be54..6fda4e2 100644
--- a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-rest-apis/gr-rest-api-helper.ts
+++ b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-rest-apis/gr-rest-api-helper.ts
@@ -76,7 +76,7 @@
       // TODO(kamilm): This implies very strict format of what is stored in
       //   INITIAL_DATA which is not clear from the name, consider renaming.
       Object.entries(window.INITIAL_DATA).forEach(e =>
-        this._cache().set(addBaseUrl(e[0]), e[1] as unknown as ParsedJSON)
+        this._cache().set(addBaseUrl(e[0]), e[1])
       );
     }
   }
@@ -431,6 +431,9 @@
     if (req.useReadScheduler !== undefined) {
       fetchReq.useReadScheduler = req.useReadScheduler;
     }
+    if (req.isHighPriority !== undefined) {
+      fetchReq.isHighPriority = req.isHighPriority;
+    }
 
     let resp: Response;
     try {
diff --git a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-rest-apis/gr-rest-api-helper_test.ts b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-rest-apis/gr-rest-api-helper_test.ts
index ea79611..0df9fb5 100644
--- a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-rest-apis/gr-rest-api-helper_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-rest-apis/gr-rest-api-helper_test.ts
@@ -231,6 +231,20 @@
       assert.deepEqual(obj, makeParsedJSON({hello: 'bonjour'}));
     });
 
+    test('POST with isHighPriority bypasses writeScheduler', async () => {
+      const promise = helper.fetchJSON({
+        fetchOptions: {
+          method: HttpMethod.POST,
+        },
+        url: '/dummy/url',
+        isHighPriority: true,
+      });
+      assert.equal(writeScheduler.scheduled.length, 0);
+      assert.isTrue(authFetchStub.called);
+      const obj = await promise;
+      assert.deepEqual(obj, makeParsedJSON({hello: 'bonjour'}));
+    });
+
     suite('error handling', () => {
       let serverErrorCalled: boolean;
       let networkErrorCalled: boolean;
diff --git a/polygerrit-ui/app/elements/shared/gr-suggestion-textarea/gr-suggestion-textarea_test.ts b/polygerrit-ui/app/elements/shared/gr-suggestion-textarea/gr-suggestion-textarea_test.ts
index 28e22a6..b495861 100644
--- a/polygerrit-ui/app/elements/shared/gr-suggestion-textarea/gr-suggestion-textarea_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-suggestion-textarea/gr-suggestion-textarea_test.ts
@@ -624,38 +624,38 @@
   suite('keyboard shortcuts', async () => {
     test('escape key', async () => {
       const resetSpy = sinon.spy(element, 'resetDropdown');
-      pressKey(element.textarea! as HTMLElement, Key.ESC);
+      pressKey(element.textarea!, Key.ESC);
       assert.isFalse(resetSpy.called);
       await setText(':1');
-      pressKey(element.textarea! as HTMLElement, Key.ESC);
+      pressKey(element.textarea!, Key.ESC);
       assert.isTrue(resetSpy.called);
       assert.isTrue(element.emojiSuggestions!.isHidden);
     });
 
     test('up key', async () => {
       const upSpy = sinon.spy(element.emojiSuggestions!, 'cursorUp');
-      pressKey(element.textarea! as HTMLElement, 'ArrowUp');
+      pressKey(element.textarea!, 'ArrowUp');
       assert.isFalse(upSpy.called);
       await setText(':1');
-      pressKey(element.textarea! as HTMLElement, 'ArrowUp');
+      pressKey(element.textarea!, 'ArrowUp');
       assert.isTrue(upSpy.called);
     });
 
     test('down key', async () => {
       const downSpy = sinon.spy(element.emojiSuggestions!, 'cursorDown');
-      pressKey(element.textarea! as HTMLElement, 'ArrowDown');
+      pressKey(element.textarea!, 'ArrowDown');
       assert.isFalse(downSpy.called);
       await setText(':1');
-      pressKey(element.textarea! as HTMLElement, 'ArrowDown');
+      pressKey(element.textarea!, 'ArrowDown');
       assert.isTrue(downSpy.called);
     });
 
     test('enter key', async () => {
       const enterSpy = sinon.spy(element.emojiSuggestions!, 'getCursorTarget');
-      pressKey(element.textarea! as HTMLElement, Key.ENTER);
+      pressKey(element.textarea!, Key.ENTER);
       assert.isFalse(enterSpy.called);
       await setText(':1');
-      pressKey(element.textarea! as HTMLElement, Key.ENTER);
+      pressKey(element.textarea!, Key.ENTER);
       assert.isTrue(enterSpy.called);
       await element.updateComplete;
       assert.equal(element.text, '💯');
diff --git a/polygerrit-ui/app/elements/shared/gr-vote-chip/gr-vote-chip.ts b/polygerrit-ui/app/elements/shared/gr-vote-chip/gr-vote-chip.ts
index 5ef3e38..57ec3ac 100644
--- a/polygerrit-ui/app/elements/shared/gr-vote-chip/gr-vote-chip.ts
+++ b/polygerrit-ui/app/elements/shared/gr-vote-chip/gr-vote-chip.ts
@@ -16,6 +16,7 @@
 import {
   classForLabelStatus,
   getLabelStatus,
+  hasOnlyAiVotes,
   LabelStatus,
   valueString,
 } from '../../../utils/label-util';
@@ -50,6 +51,9 @@
   @property({type: Boolean, attribute: 'tooltip-with-who-voted'})
   tooltipWithWhoVoted = false;
 
+  @property({type: Boolean, attribute: 'is-ai', reflect: true})
+  isAi = false;
+
   /** Include the label abbreviation inside a self-contained vote badge. */
   @property({attribute: 'label-name', reflect: true})
   labelName?: string;
@@ -61,6 +65,10 @@
           border-radius: 50%;
           border: none;
           padding: 2px;
+          width: var(--gr-vote-chip-width, 16px);
+        }
+        :host([circle-shape]) .vote-chip gr-icon.ai-icon {
+          display: none;
         }
         .vote-chip.max {
           background-color: var(--vote-color-approved);
@@ -104,6 +112,16 @@
           line-height: var(--gr-vote-chip-width, 16px);
           color: var(--vote-text-color);
         }
+        .vote-chip:has(.ai-icon) {
+          width: auto;
+          align-items: center;
+          padding-left: 3px;
+          padding-right: 2px;
+        }
+        .more > .vote-chip:has(.ai-icon) {
+          padding-left: 2px;
+          padding-right: 1px;
+        }
         :host([label-name]) .vote-chip {
           width: auto;
           align-items: center;
@@ -117,6 +135,16 @@
           height: 16px;
           font-size: 16px;
         }
+        .vote-chip gr-icon.ai-icon {
+          display: flex;
+          align-items: center;
+          color: inherit;
+          width: 12px;
+          height: 12px;
+          --gr-icon-size: 12px;
+          font-size: 12px;
+          margin-left: 1px;
+        }
         .more > .vote-chip {
           position: relative;
           z-index: 2;
@@ -125,10 +153,15 @@
           position: absolute;
           top: 2px;
           left: 2px;
+          width: 100%;
+          height: 100%;
+          box-sizing: border-box;
           z-index: 1;
         }
         .container {
           position: relative;
+          display: block;
+          width: fit-content;
         }
         /* fix for firefox only */
         @supports (-moz-appearance: none) {
@@ -144,22 +177,33 @@
     const renderValue = this.renderValue();
     if (!renderValue) return;
 
+    const isAi = this.computeIsAi();
     return html`<gr-tooltip-content
       class="container ${this.more ? 'more' : ''}"
-      title=${this.computeTooltip(renderValue)}
+      title=${this.computeTooltip(renderValue, isAi)}
       has-tooltip
     >
       <div class="vote-chip ${this.computeClass()}">
-        ${this.labelName}${renderValue}
+        ${this.labelName}${renderValue}${isAi
+          ? html`<gr-icon icon="spark" class="ai-icon"></gr-icon>`
+          : ''}
       </div>
       ${this.more
-        ? html`<div class="chip-angle ${this.computeClass()}">
+        ? html`<div
+            class="chip-angle ${this.computeClass()}"
+            aria-hidden="true"
+          >
             ${renderValue}
           </div>`
         : ''}
     </gr-tooltip-content>`;
   }
 
+  private computeIsAi(): boolean {
+    if (this.isAi) return true;
+    return hasOnlyAiVotes(this.label, this.vote);
+  }
+
   private renderValue() {
     if (this.displayValue) {
       return this.displayValue;
@@ -205,7 +249,10 @@
     }
   }
 
-  private computeTooltip(renderValue: string | TemplateResult<1>) {
+  private computeTooltip(
+    renderValue: string | TemplateResult<1>,
+    isAi: boolean
+  ) {
     if (!this.label || !isDetailedLabelInfo(this.label)) {
       return '';
     }
@@ -215,7 +262,10 @@
         : this.labelName && this.vote
         ? valueString(this.vote.value)
         : '';
-    const voteDescription = this.label.values?.[value] ?? '';
+    let voteDescription = this.label.values?.[value] ?? '';
+    if (isAi) {
+      voteDescription = `${voteDescription} (AI vote)`.trim();
+    }
 
     if (this.tooltipWithWhoVoted && this.vote) {
       return `${this.vote?.name}: ${voteDescription}`;
diff --git a/polygerrit-ui/app/elements/shared/gr-vote-chip/gr-vote-chip_screenshot_test.ts b/polygerrit-ui/app/elements/shared/gr-vote-chip/gr-vote-chip_screenshot_test.ts
new file mode 100644
index 0000000..36c22b1
--- /dev/null
+++ b/polygerrit-ui/app/elements/shared/gr-vote-chip/gr-vote-chip_screenshot_test.ts
@@ -0,0 +1,130 @@
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import '../../../test/common-test-setup';
+import './gr-vote-chip';
+import {fixture, html} from '@open-wc/testing';
+// Until https://github.com/modernweb-dev/web/issues/2804 is fixed
+// @ts-ignore
+import {visualDiff} from '@web/test-runner-visual-regression';
+import {visualDiffDarkTheme} from '../../../test/test-utils';
+import {createApproval} from '../../../test/test-data-generators';
+import {DetailedLabelInfo} from '../../../api/rest-api';
+
+const labelInfo: DetailedLabelInfo = {
+  values: {
+    '-2': 'Do not submit',
+    '-1': 'I would prefer that you did not submit this',
+    ' 0': 'No score',
+    '+1': 'Looks good to me, but someone else must approve',
+    '+2': 'Looks good to me, approved',
+  },
+};
+
+suite('gr-vote-chip screenshot tests', () => {
+  test('single AI vote chips', async () => {
+    const container = await fixture<HTMLDivElement>(html`
+      <div
+        style="display: inline-flex; gap: 8px; padding: 8px; background-color: var(--view-background-color);"
+      >
+        <gr-vote-chip
+          .label=${labelInfo}
+          .vote=${{...createApproval(), value: 2}}
+          is-ai
+        ></gr-vote-chip>
+        <gr-vote-chip
+          .label=${labelInfo}
+          .vote=${{...createApproval(), value: 1}}
+          is-ai
+        ></gr-vote-chip>
+        <gr-vote-chip
+          .label=${labelInfo}
+          .vote=${{...createApproval(), value: -1}}
+          is-ai
+        ></gr-vote-chip>
+        <gr-vote-chip
+          .label=${labelInfo}
+          .vote=${{...createApproval(), value: -2}}
+          is-ai
+        ></gr-vote-chip>
+      </div>
+    `);
+
+    await visualDiff(container, 'gr-vote-chip-ai-single');
+    await visualDiffDarkTheme(container, 'gr-vote-chip-ai-single');
+  });
+
+  test('stacked AI vote chips', async () => {
+    const container = await fixture<HTMLDivElement>(html`
+      <div
+        style="display: inline-flex; gap: 8px; padding: 8px; background-color: var(--view-background-color);"
+      >
+        <gr-vote-chip
+          .label=${labelInfo}
+          .vote=${{...createApproval(), value: 2}}
+          is-ai
+          more
+        ></gr-vote-chip>
+        <gr-vote-chip
+          .label=${labelInfo}
+          .vote=${{...createApproval(), value: 1}}
+          is-ai
+          more
+        ></gr-vote-chip>
+        <gr-vote-chip
+          .label=${labelInfo}
+          .vote=${{...createApproval(), value: -1}}
+          is-ai
+          more
+        ></gr-vote-chip>
+        <gr-vote-chip
+          .label=${labelInfo}
+          .vote=${{...createApproval(), value: -2}}
+          is-ai
+          more
+        ></gr-vote-chip>
+      </div>
+    `);
+
+    await visualDiff(container, 'gr-vote-chip-ai-stacked');
+    await visualDiffDarkTheme(container, 'gr-vote-chip-ai-stacked');
+  });
+
+  test('circle-shape AI vote chips', async () => {
+    const container = await fixture<HTMLDivElement>(html`
+      <div
+        style="display: inline-flex; gap: 8px; padding: 8px; background-color: var(--view-background-color);"
+      >
+        <gr-vote-chip
+          .label=${labelInfo}
+          .vote=${{...createApproval(), value: 2}}
+          circle-shape
+          is-ai
+        ></gr-vote-chip>
+        <gr-vote-chip
+          .label=${labelInfo}
+          .vote=${{...createApproval(), value: 1}}
+          circle-shape
+          is-ai
+        ></gr-vote-chip>
+        <gr-vote-chip
+          .label=${labelInfo}
+          .vote=${{...createApproval(), value: -1}}
+          circle-shape
+          is-ai
+        ></gr-vote-chip>
+        <gr-vote-chip
+          .label=${labelInfo}
+          .vote=${{...createApproval(), value: -2}}
+          circle-shape
+          is-ai
+        ></gr-vote-chip>
+      </div>
+    `);
+
+    await visualDiff(container, 'gr-vote-chip-ai-circle');
+    await visualDiffDarkTheme(container, 'gr-vote-chip-ai-circle');
+  });
+});
diff --git a/polygerrit-ui/app/elements/shared/gr-vote-chip/gr-vote-chip_test.ts b/polygerrit-ui/app/elements/shared/gr-vote-chip/gr-vote-chip_test.ts
index b7a6e2c..c6a4619 100644
--- a/polygerrit-ui/app/elements/shared/gr-vote-chip/gr-vote-chip_test.ts
+++ b/polygerrit-ui/app/elements/shared/gr-vote-chip/gr-vote-chip_test.ts
@@ -174,7 +174,7 @@
           title=""
         >
           <div class="positive vote-chip">+2</div>
-          <div class="chip-angle positive">+2</div>
+          <div aria-hidden="true" class="chip-angle positive">+2</div>
         </gr-tooltip-content>`
       );
     });
@@ -223,5 +223,146 @@
         </gr-tooltip-content>`
       );
     });
+
+    test('renders AI sparkle inside vote-chip when is-ai is set', async () => {
+      const labelInfoWithPlus2 = {
+        ...labelInfo,
+        values: {
+          ...labelInfo.values,
+          '+2': 'Approved',
+        },
+      };
+      element = await fixture<GrVoteChip>(
+        html`<gr-vote-chip
+          .label=${labelInfoWithPlus2}
+          .vote=${vote}
+          is-ai
+        ></gr-vote-chip>`
+      );
+      assert.shadowDom.equal(
+        element,
+        /* HTML */ ` <gr-tooltip-content
+          class="container"
+          has-tooltip=""
+          title="Approved (AI vote)"
+        >
+          <div class="max vote-chip">
+            +2
+            <gr-icon class="ai-icon" custom="" icon="spark"> </gr-icon>
+          </div>
+        </gr-tooltip-content>`
+      );
+    });
+
+    test('renders AI sparkle with tooltip-with-who-voted', async () => {
+      vote.name = 'AI Reviewer';
+      const labelInfoWithPlus2 = {
+        all: [{value: 2}, {value: 1}],
+        values: {'+2': 'Approved'},
+      };
+      element = await fixture<GrVoteChip>(
+        html`<gr-vote-chip
+          .label=${labelInfoWithPlus2}
+          .vote=${vote}
+          tooltip-with-who-voted
+          is-ai
+        ></gr-vote-chip>`
+      );
+      assert.shadowDom.equal(
+        element,
+        /* HTML */ ` <gr-tooltip-content
+          class="container"
+          has-tooltip=""
+          title="AI Reviewer: Approved (AI vote)"
+        >
+          <div class="max vote-chip">
+            +2
+            <gr-icon class="ai-icon" custom="" icon="spark"> </gr-icon>
+          </div>
+        </gr-tooltip-content>`
+      );
+    });
+
+    test('renders stacked AI vote-chip when is-ai and more are set', async () => {
+      element = await fixture<GrVoteChip>(
+        html`<gr-vote-chip
+          .label=${labelInfo}
+          .vote=${vote}
+          is-ai
+          more
+        ></gr-vote-chip>`
+      );
+      assert.shadowDom.equal(
+        element,
+        /* HTML */ ` <gr-tooltip-content
+          class="container more"
+          has-tooltip=""
+          title="(AI vote)"
+        >
+          <div class="positive vote-chip">
+            +2
+            <gr-icon class="ai-icon" custom="" icon="spark"> </gr-icon>
+          </div>
+          <div aria-hidden="true" class="chip-angle positive">+2</div>
+        </gr-tooltip-content>`
+      );
+
+      const voteChip = element.shadowRoot!.querySelector('.vote-chip')!;
+      const chipAngle = element.shadowRoot!.querySelector('.chip-angle')!;
+      const voteChipStyle = getComputedStyle(voteChip);
+      const chipAngleStyle = getComputedStyle(chipAngle);
+      assert.equal(voteChipStyle.alignItems, 'center');
+      assert.equal(voteChipStyle.paddingLeft, '2px');
+      assert.equal(voteChipStyle.paddingRight, '1px');
+      assert.equal(chipAngleStyle.boxSizing, 'border-box');
+      const voteChipRect = voteChip.getBoundingClientRect();
+      const chipAngleRect = chipAngle.getBoundingClientRect();
+      assert.equal(chipAngleRect.width, voteChipRect.width);
+      assert.equal(chipAngleRect.height, voteChipRect.height);
+    });
+
+    test('resolves AI status from label and vote without is-ai attribute', async () => {
+      const aiVote: ApprovalInfo = {...createApproval(), value: 2, is_ai: true};
+      const aiLabelInfo = {
+        ...createDetailedLabelInfo(),
+        all: [aiVote],
+      };
+      element = await fixture<GrVoteChip>(
+        html`<gr-vote-chip
+          .label=${aiLabelInfo}
+          .vote=${aiVote}
+        ></gr-vote-chip>`
+      );
+      assert.isNotNull(element.shadowRoot!.querySelector('gr-icon.ai-icon'));
+
+      // Mixed AI and non-AI votes of the same value should not render AI sparkle
+      const humanVote: ApprovalInfo = {
+        ...createApproval(),
+        value: 2,
+      };
+      element.label = {
+        ...createDetailedLabelInfo(),
+        all: [aiVote, humanVote],
+      };
+      await element.updateComplete;
+      assert.isNull(element.shadowRoot!.querySelector('gr-icon.ai-icon'));
+    });
+
+    test('retains fixed width when circle-shape and is-ai are both set', async () => {
+      element = await fixture<GrVoteChip>(
+        html`<gr-vote-chip
+          .label=${labelInfo}
+          .vote=${vote}
+          circle-shape
+          is-ai
+        ></gr-vote-chip>`
+      );
+      const voteChip = element.shadowRoot!.querySelector('.vote-chip')!;
+      const aiIcon = element.shadowRoot!.querySelector('gr-icon.ai-icon')!;
+      const voteChipStyle = getComputedStyle(voteChip);
+      const aiIconStyle = getComputedStyle(aiIcon);
+      assert.equal(voteChipStyle.width, '16px');
+      assert.equal(aiIconStyle.display, 'none');
+    });
   });
 });
diff --git a/polygerrit-ui/app/embed/diff/gr-context-controls/gr-context-controls-section_test.ts b/polygerrit-ui/app/embed/diff/gr-context-controls/gr-context-controls-section_test.ts
index 00c45ae..91135b7 100644
--- a/polygerrit-ui/app/embed/diff/gr-context-controls/gr-context-controls-section_test.ts
+++ b/polygerrit-ui/app/embed/diff/gr-context-controls/gr-context-controls-section_test.ts
@@ -11,6 +11,7 @@
 import {
   createContextGroup,
   createDiff,
+  createSkipContextGroup,
 } from '../../../test/test-data-generators';
 import {DiffModel, diffModelToken} from '../gr-diff-model/gr-diff-model';
 import './gr-context-controls-section';
@@ -138,4 +139,23 @@
       `
     );
   });
+
+  test('render skipped lines without padding rows', async () => {
+    element.group = createSkipContextGroup({offset: 0, count: 10});
+    await element.updateComplete;
+    assert.lightDom.equal(
+      element,
+      /* HTML */ `
+        <table>
+          <tbody>
+            <tr class="dividerRow show-none">
+              <td class="dividerCell" colspan="4">
+                <gr-context-controls showconfig="none"> </gr-context-controls>
+              </td>
+            </tr>
+          </tbody>
+        </table>
+      `
+    );
+  });
 });
diff --git a/polygerrit-ui/app/embed/diff/gr-context-controls/gr-context-controls.ts b/polygerrit-ui/app/embed/diff/gr-context-controls/gr-context-controls.ts
index eb65e1c..17af8e6 100644
--- a/polygerrit-ui/app/embed/diff/gr-context-controls/gr-context-controls.ts
+++ b/polygerrit-ui/app/embed/diff/gr-context-controls/gr-context-controls.ts
@@ -71,17 +71,25 @@
  * 'both': Typically for the context controls in the middle of a file. So show
  *         two buttons, one for expanding from the top and one for expanding
  *         from the bottom.
+ * 'none': For context controls that cannot be expanded partially, because
+ *         the lines next to them were skipped by the server (file too large).
+ *         So only show the button for loading the full content, in its own
+ *         row.
  */
-export type GrContextControlsShowConfig = 'above' | 'below' | 'both';
+export type GrContextControlsShowConfig = 'above' | 'below' | 'both' | 'none';
 
-export function getShowConfig(group?: GrDiffGroup, lineCountLeft = 0) {
+export function getShowConfig(
+  group?: GrDiffGroup,
+  lineCountLeft = 0
+): GrContextControlsShowConfig {
   const above = showAbove(group, lineCountLeft);
   const below = showBelow(group, lineCountLeft);
 
   if (above && !below) return 'above';
   if (!above && below) return 'below';
+  if (!above && !below && group?.hasSkipGroup()) return 'none';
 
-  // Note that !showAbove && !showBelow also intentionally returns 'both'.
+  // Note that otherwise !showAbove && !showBelow intentionally returns 'both'.
   // This means the file is completely collapsed, which is unusual, but at least
   // happens in one test.
   return 'both';
@@ -375,11 +383,12 @@
         text = `+${pluralize(linesToExpand, 'common line')}`;
         ariaLabel = `Show ${pluralize(linesToExpand, 'common line')}`;
       }
-      classes += this.showBoth()
-        ? 'centeredButton'
-        : this.showAbove()
-        ? 'aboveButton'
-        : 'belowButton';
+      classes +=
+        this.showBoth() || this.showConfig === 'none'
+          ? 'centeredButton'
+          : this.showAbove()
+          ? 'aboveButton'
+          : 'belowButton';
       if (this.group?.hasSkipGroup()) {
         // Expanding content would require load of more data
         text += ' (too large)';
diff --git a/polygerrit-ui/app/embed/diff/gr-context-controls/gr-context-controls_test.ts b/polygerrit-ui/app/embed/diff/gr-context-controls/gr-context-controls_test.ts
index f09e077..d084d3e 100644
--- a/polygerrit-ui/app/embed/diff/gr-context-controls/gr-context-controls_test.ts
+++ b/polygerrit-ui/app/embed/diff/gr-context-controls/gr-context-controls_test.ts
@@ -6,13 +6,14 @@
 import '../../../test/common-test-setup';
 import '../gr-diff/gr-diff-group';
 import './gr-context-controls';
-import {GrContextControls} from './gr-context-controls';
+import {getShowConfig, GrContextControls} from './gr-context-controls';
 import {SyntaxBlock} from '../../../api/diff';
 import {assert, fixture, html} from '@open-wc/testing';
 import {waitEventLoop} from '../../../test/test-utils';
 import {
   createContextGroup,
   createContextGroupWithDelta,
+  createSkipContextGroup,
 } from '../../../test/test-data-generators';
 import {GrTooltipContent} from '../../../elements/shared/gr-tooltip-content/gr-tooltip-content';
 
@@ -35,7 +36,7 @@
 
     const buttons = element.shadowRoot!.querySelectorAll('button.showContext');
     assert.equal(buttons.length, 1);
-    assert.equal(buttons[0].textContent!.trim(), '+10 common lines');
+    assert.equal(buttons[0].textContent.trim(), '+10 common lines');
   });
 
   test('context control at the top', async () => {
@@ -46,8 +47,8 @@
     const buttons = element.shadowRoot!.querySelectorAll('button.showContext');
 
     assert.equal(buttons.length, 2);
-    assert.equal(buttons[0].textContent!.trim(), '+20 common lines');
-    assert.equal(buttons[1].textContent!.trim(), '+10');
+    assert.equal(buttons[0].textContent.trim(), '+20 common lines');
+    assert.equal(buttons[1].textContent.trim(), '+10');
 
     assert.include([...buttons[0].classList.values()], 'belowButton');
     assert.include([...buttons[1].classList.values()], 'belowButton');
@@ -61,9 +62,9 @@
     const buttons = element.shadowRoot!.querySelectorAll('button.showContext');
 
     assert.equal(buttons.length, 3);
-    assert.equal(buttons[0].textContent!.trim(), '+20 common lines');
-    assert.equal(buttons[1].textContent!.trim(), '+10');
-    assert.equal(buttons[2].textContent!.trim(), '+10');
+    assert.equal(buttons[0].textContent.trim(), '+20 common lines');
+    assert.equal(buttons[1].textContent.trim(), '+10');
+    assert.equal(buttons[2].textContent.trim(), '+10');
 
     assert.include([...buttons[0].classList.values()], 'centeredButton');
     assert.include([...buttons[1].classList.values()], 'aboveButton');
@@ -78,13 +79,70 @@
     const buttons = element.shadowRoot!.querySelectorAll('button.showContext');
 
     assert.equal(buttons.length, 2);
-    assert.equal(buttons[0].textContent!.trim(), '+20 common lines');
-    assert.equal(buttons[1].textContent!.trim(), '+10');
+    assert.equal(buttons[0].textContent.trim(), '+20 common lines');
+    assert.equal(buttons[1].textContent.trim(), '+10');
 
     assert.include([...buttons[0].classList.values()], 'aboveButton');
     assert.include([...buttons[1].classList.values()], 'aboveButton');
   });
 
+  test('context control for skipped lines at the top', async () => {
+    element.group = createSkipContextGroup({offset: 0, count: 20});
+
+    await waitEventLoop();
+
+    const buttons = element.shadowRoot!.querySelectorAll('button.showContext');
+
+    assert.equal(element.showConfig, 'none');
+    assert.equal(buttons.length, 1);
+    assert.equal(buttons[0].textContent.trim(), '+20 common lines (too large)');
+    assert.include([...buttons[0].classList.values()], 'centeredButton');
+  });
+
+  test('context control for skipped lines in the middle', async () => {
+    element.group = createSkipContextGroup({offset: 10, count: 20});
+
+    await waitEventLoop();
+
+    const buttons = element.shadowRoot!.querySelectorAll('button.showContext');
+
+    assert.equal(element.showConfig, 'none');
+    assert.equal(buttons.length, 1);
+    assert.include([...buttons[0].classList.values()], 'centeredButton');
+  });
+
+  test('getShowConfig', () => {
+    assert.equal(
+      getShowConfig(createContextGroup({offset: 0, count: 20}), 50),
+      'below'
+    );
+    assert.equal(
+      getShowConfig(createContextGroup({offset: 10, count: 20}), 50),
+      'both'
+    );
+    assert.equal(
+      getShowConfig(createContextGroup({offset: 30, count: 20}), 50),
+      'above'
+    );
+    assert.equal(
+      getShowConfig(createSkipContextGroup({offset: 0, count: 20}), 50),
+      'none'
+    );
+    assert.equal(
+      getShowConfig(createSkipContextGroup({offset: 10, count: 20}), 50),
+      'none'
+    );
+    assert.equal(
+      getShowConfig(createSkipContextGroup({offset: 30, count: 20}), 50),
+      'none'
+    );
+    // Unknown line count still falls back to 'both'.
+    assert.equal(
+      getShowConfig(createContextGroup({offset: 0, count: 20}), 0),
+      'both'
+    );
+  });
+
   function prepareForBlockExpansion(syntaxTree: SyntaxBlock[]) {
     element.renderPreferences!.use_block_expansion = true;
     element.syntaxTreeRight = syntaxTree;
@@ -109,7 +167,7 @@
     assert.equal(partialExpansionButtons.length, 1);
     assert.equal(blockExpansionButtons.length, 1);
     assert.equal(
-      blockExpansionButtons[0].querySelector('span')!.textContent!.trim(),
+      blockExpansionButtons[0].querySelector('span')!.textContent.trim(),
       '+Block'
     );
     assert.include(
@@ -137,11 +195,11 @@
     assert.equal(partialExpansionButtons.length, 2);
     assert.equal(blockExpansionButtons.length, 2);
     assert.equal(
-      blockExpansionButtons[0].querySelector('span')!.textContent!.trim(),
+      blockExpansionButtons[0].querySelector('span')!.textContent.trim(),
       '+Block'
     );
     assert.equal(
-      blockExpansionButtons[1].querySelector('span')!.textContent!.trim(),
+      blockExpansionButtons[1].querySelector('span')!.textContent.trim(),
       '+Block'
     );
     assert.include(
@@ -173,7 +231,7 @@
     assert.equal(partialExpansionButtons.length, 1);
     assert.equal(blockExpansionButtons.length, 1);
     assert.equal(
-      blockExpansionButtons[0].querySelector('span')!.textContent!.trim(),
+      blockExpansionButtons[0].querySelector('span')!.textContent.trim(),
       '+Block'
     );
     assert.include(
@@ -317,7 +375,7 @@
 
     const buttons = element.shadowRoot!.querySelectorAll('button.showContext');
     assert.equal(buttons.length, 1);
-    assert.equal(buttons[0].textContent!.trim(), '+ Unrelated changes');
+    assert.equal(buttons[0].textContent.trim(), '+ Unrelated changes');
     assert.include([...buttons[0].classList.values()], 'unrelatedChanges');
   });
 });
diff --git a/polygerrit-ui/app/embed/diff/gr-diff-highlight/gr-diff-highlight_test.ts b/polygerrit-ui/app/embed/diff/gr-diff-highlight/gr-diff-highlight_test.ts
index 2156d7e..dbcbf36 100644
--- a/polygerrit-ui/app/embed/diff/gr-diff-highlight/gr-diff-highlight_test.ts
+++ b/polygerrit-ui/app/embed/diff/gr-diff-highlight/gr-diff-highlight_test.ts
@@ -22,7 +22,7 @@
   waitUntil,
 } from '../../../test/test-utils';
 import {GrSelectionActionBox} from '../gr-selection-action-box/gr-selection-action-box';
-import {DiffModel, DiffState} from '../gr-diff-model/gr-diff-model';
+import {DiffModel} from '../gr-diff-model/gr-diff-model';
 
 // Splitting long lines in html into shorter rows breaks tests:
 // zero-length text nodes and new lines are not expected in some places
@@ -325,7 +325,7 @@
       const diffModel = (element as any).diffBuilder.diffModel;
       const getStateStub = sinon.stub(diffModel, 'getState').returns({
         path: 'foo/bar.txt',
-      } as unknown as DiffState);
+      });
 
       if (!content?.firstChild) assert.fail('content first child not found');
       emulateSelection(content.firstChild, 5, content.firstChild, 12);
@@ -725,6 +725,23 @@
       assert.equal(result, 0);
     });
 
+    test('whole-line selection with element endpoints', () => {
+      const content = stubContent(2, Side.RIGHT);
+      if (!content) assert.fail('content element not found');
+
+      emulateSelection(content, 0, content, content.childNodes.length);
+
+      assert.deepEqual(element.selectedRange, {
+        range: {
+          start_line: 2,
+          start_character: 0,
+          end_line: 2,
+          end_character: element.getLength(content),
+        },
+        side: Side.RIGHT,
+      });
+    });
+
     test('fixTripleClickSelection', () => {
       const startContent = stubContent(119, Side.RIGHT);
       const endContent = stubContent(120, Side.RIGHT);
diff --git a/polygerrit-ui/app/embed/diff/gr-diff-highlight/gr-range-normalizer.ts b/polygerrit-ui/app/embed/diff/gr-diff-highlight/gr-range-normalizer.ts
index b177e14..e9d6125 100644
--- a/polygerrit-ui/app/embed/diff/gr-diff-highlight/gr-range-normalizer.ts
+++ b/polygerrit-ui/app/embed/diff/gr-diff-highlight/gr-range-normalizer.ts
@@ -26,11 +26,17 @@
  */
 export function normalize(range: Range): NormalizedRange {
   const startContainer = getContentTextParent(range.startContainer);
-  const startOffset =
-    range.startOffset + getTextOffset(startContainer, range.startContainer);
+  const startOffset = getTextOffset(
+    startContainer,
+    range.startContainer,
+    range.startOffset
+  );
   const endContainer = getContentTextParent(range.endContainer);
-  const endOffset =
-    range.endOffset + getTextOffset(endContainer, range.endContainer);
+  const endOffset = getTextOffset(
+    endContainer,
+    range.endContainer,
+    range.endOffset
+  );
   return {
     startContainer,
     startOffset,
@@ -65,10 +71,24 @@
  *
  * @param node The root DOM element to be searched through.
  * @param child The child element being searched for.
+ * @param offset The DOM range offset within the child.
  */
 // TODO(TS): Only export for test.
-export function getTextOffset(node: Node | null, child: Node): number {
-  let count = 0;
+export function getTextOffset(
+  node: Node | null,
+  child: Node,
+  offset = 0
+): number {
+  let count = offset;
+  if (
+    node instanceof Element &&
+    node.classList.contains('contentText') &&
+    child instanceof Element
+  ) {
+    count = [...child.childNodes]
+      .slice(0, offset)
+      .reduce((length, childNode) => length + getLength(childNode), 0);
+  }
   let stack = [node];
   while (stack.length) {
     const n = stack.pop();
diff --git a/polygerrit-ui/app/embed/diff/gr-diff-image-viewer/gr-image-viewer.ts b/polygerrit-ui/app/embed/diff/gr-diff-image-viewer/gr-image-viewer.ts
index 058d490..1e8f19c 100644
--- a/polygerrit-ui/app/embed/diff/gr-diff-image-viewer/gr-image-viewer.ts
+++ b/polygerrit-ui/app/embed/diff/gr-diff-image-viewer/gr-image-viewer.ts
@@ -254,6 +254,8 @@
           display: flex;
           flex-direction: column;
           align-self: flex-start;
+          position: sticky;
+          top: var(--image-viewer-controls-top, 168px);
           margin: var(--spacing-m);
           padding-bottom: var(--spacing-xl);
           --md-sys-color-surface-container-highest: var(
diff --git a/polygerrit-ui/app/embed/diff/gr-diff-selection/gr-diff-selection_test.ts b/polygerrit-ui/app/embed/diff/gr-diff-selection/gr-diff-selection_test.ts
index fa0465d..a1c5bbd 100644
--- a/polygerrit-ui/app/embed/diff/gr-diff-selection/gr-diff-selection_test.ts
+++ b/polygerrit-ui/app/embed/diff/gr-diff-selection/gr-diff-selection_test.ts
@@ -194,6 +194,26 @@
     assert.equal(element.getSelectedText(Side.LEFT), 'ba\nzin\nga');
   });
 
+  test('copies whole line with element endpoints', () => {
+    element.setClasses(['selected-left']);
+    const content = diffTable.querySelector<HTMLElement>('.contentText');
+    if (!content) assert.fail('content element missing');
+
+    const selection = document.getSelection();
+    if (!selection) assert.fail('no selection');
+    selection.removeAllRanges();
+    const range = document.createRange();
+    range.selectNodeContents(content);
+    selection.addRange(range);
+
+    const event = emulateCopyOn(content);
+    assert.deepEqual(event.clipboardData.setData.lastCall.args, [
+      'Text',
+      'ba ba',
+    ]);
+    assert.isTrue(event.preventDefault.called);
+  });
+
   test('copies content correctly when end is not a text node', () => {
     const unknownElement = document.createElement('div');
     unknownElement.appendChild(document.createTextNode('Should not be copied'));
diff --git a/polygerrit-ui/app/embed/diff/gr-diff/gr-diff-element.ts b/polygerrit-ui/app/embed/diff/gr-diff/gr-diff-element.ts
index 92c0291..b629caf 100644
--- a/polygerrit-ui/app/embed/diff/gr-diff/gr-diff-element.ts
+++ b/polygerrit-ui/app/embed/diff/gr-diff/gr-diff-element.ts
@@ -14,7 +14,12 @@
 import '../gr-diff-builder/gr-diff-builder-image';
 import '../gr-diff-builder/gr-diff-section';
 import '../gr-diff-builder/gr-diff-row';
-import {FULL_CONTEXT, FullContext, isResponsive} from './gr-diff-utils';
+import {
+  FULL_CONTEXT,
+  FullContext,
+  getLineNumberCellWidth,
+  isResponsive,
+} from './gr-diff-utils';
 import {Base64ImageFile} from '../../../types/common';
 import {DiffInfo, DiffPreferencesInfo} from '../../../types/diff';
 import {
@@ -28,6 +33,7 @@
 import {html, LitElement, nothing} from 'lit';
 import {when} from 'lit/directives/when.js';
 import {classMap} from 'lit/directives/class-map.js';
+import {styleMap} from 'lit/directives/style-map.js';
 import {expandFileMode} from '../../../utils/file-util';
 import {
   ColumnsToShow,
@@ -395,21 +401,24 @@
   }
 
   renderColumns() {
-    const lineNumberWidth = getLineNumberCellWidth(
-      this.diffPrefs ?? createDefaultDiffPrefs()
-    );
+    const lineNumberStyle = styleMap({
+      width: getLineNumberCellWidth(
+        this.diffPrefs ?? createDefaultDiffPrefs(),
+        this.diff
+      ),
+    });
     return html`
       <colgroup>
         ${when(this.columns.blame, () => html`<col class="blame" />`)}
         ${when(
           this.columns.leftNumber,
-          () => html`<col class="left" width=${lineNumberWidth} />`
+          () => html`<col class="left" style=${lineNumberStyle} />`
         )}
         ${when(this.columns.leftSign, () => html`<col class="left sign" />`)}
         ${when(this.columns.leftContent, () => html`<col class="left" />`)}
         ${when(
           this.columns.rightNumber,
-          () => html`<col class="right" width=${lineNumberWidth} />`
+          () => html`<col class="right" style=${lineNumberStyle} />`
         )}
         ${when(this.columns.rightSign, () => html`<col class="right sign" />`)}
         ${when(this.columns.rightContent, () => html`<col class="right" />`)}
@@ -418,10 +427,6 @@
   }
 }
 
-function getLineNumberCellWidth(prefs: DiffPreferencesInfo) {
-  return prefs.font_size * 4;
-}
-
 customElements.define('gr-diff-element', GrDiffElement);
 
 declare global {
diff --git a/polygerrit-ui/app/embed/diff/gr-diff/gr-diff-element_test.ts b/polygerrit-ui/app/embed/diff/gr-diff/gr-diff-element_test.ts
index f1d5a8d..68d4596 100644
--- a/polygerrit-ui/app/embed/diff/gr-diff/gr-diff-element_test.ts
+++ b/polygerrit-ui/app/embed/diff/gr-diff/gr-diff-element_test.ts
@@ -59,9 +59,15 @@
           <div class="diffContainer sideBySide">
             <table id="diffTable" contenteditable="false">
               <colgroup>
-                <col class="left" width="48" />
+                <col
+                  class="left"
+                  style="width:max(48px, calc(1ch + 2 * var(--spacing-m, 8px)));"
+                />
                 <col class="left" />
-                <col class="right" width="48" />
+                <col
+                  class="right"
+                  style="width:max(48px, calc(1ch + 2 * var(--spacing-m, 8px)));"
+                />
                 <col class="right" />
               </colgroup>
             </table>
@@ -84,8 +90,14 @@
           <div class="diffContainer unified">
             <table id="diffTable" contenteditable="false">
               <colgroup>
-                <col class="left" width="48" />
-                <col class="right" width="48" />
+                <col
+                  class="left"
+                  style="width: max(48px, calc(2ch + 2 * var(--spacing-m, 8px)));"
+                />
+                <col
+                  class="right"
+                  style="width: max(48px, calc(2ch + 2 * var(--spacing-m, 8px)));"
+                />
                 <col class="right" />
               </colgroup>
               <tbody class="both section">
@@ -1272,9 +1284,15 @@
           <div class="diffContainer sideBySide">
             <table id="diffTable" contenteditable="false">
               <colgroup>
-                <col class="left" width="48" />
+                <col
+                  class="left"
+                  style="width: max(48px, calc(2ch + 2 * var(--spacing-m, 8px)));"
+                />
                 <col class="left" />
-                <col class="right" width="48" />
+                <col
+                  class="right"
+                  style="width: max(48px, calc(2ch + 2 * var(--spacing-m, 8px)));"
+                />
                 <col class="right" />
               </colgroup>
               <tbody class="both section">
@@ -2761,9 +2779,15 @@
               <gr-diff-row class="left-FILE right-FILE"> </gr-diff-row>
               <table id="diffTable" contenteditable="false">
                 <colgroup>
-                  <col class="left" width="48" />
+                  <col
+                    class="left"
+                    style="width:max(48px, calc(1ch + 2 * var(--spacing-m, 8px)));"
+                  />
                   <col class="left" />
-                  <col class="right" width="48" />
+                  <col
+                    class="right"
+                    style="width:max(48px, calc(1ch + 2 * var(--spacing-m, 8px)));"
+                  />
                   <col class="right" />
                 </colgroup>
                 <tbody class="both section">
diff --git a/polygerrit-ui/app/embed/diff/gr-diff/gr-diff-utils.ts b/polygerrit-ui/app/embed/diff/gr-diff/gr-diff-utils.ts
index 3562732..24b9a40 100644
--- a/polygerrit-ui/app/embed/diff/gr-diff/gr-diff-utils.ts
+++ b/polygerrit-ui/app/embed/diff/gr-diff/gr-diff-utils.ts
@@ -11,6 +11,7 @@
 import {Side, SpecialFilePath} from '../../../constants/constants';
 import {
   DiffContextExpandedExternalDetail,
+  DiffInfo,
   DiffPreferencesInfo,
   DiffResponsiveMode,
   DisplayLine,
@@ -45,6 +46,25 @@
  */
 export const REGEX_TAB_OR_SURROGATE_PAIR = /\t|[\uD800-\uDBFF][\uDC00-\uDFFF]/;
 
+/**
+ * Returns the CSS width of a line number column. The width is at least
+ * `4 * font_size` pixels, and grows with the number of digits of the highest
+ * line number, so that large line numbers do not overflow into the content.
+ */
+export function getLineNumberCellWidth(
+  prefs: DiffPreferencesInfo,
+  diff?: DiffInfo
+): string {
+  const maxLineNumber = Math.max(
+    diff?.meta_a?.lines ?? 0,
+    diff?.meta_b?.lines ?? 0
+  );
+  const digits = String(maxLineNumber).length;
+  return `max(${
+    prefs.font_size * 4
+  }px, calc(${digits}ch + 2 * var(--spacing-m, 8px)))`;
+}
+
 export function getResponsiveMode(
   prefs?: DiffPreferencesInfo,
   renderPrefs?: RenderPreferences
@@ -153,7 +173,7 @@
   }
   if (sideAtt !== Side.LEFT && sideAtt !== Side.RIGHT)
     throw Error(`unexpected value for side: ${sideAtt}`);
-  return sideAtt as Side;
+  return sideAtt;
 }
 
 export function getRange(threadEl: HTMLElement): CommentRange | undefined {
diff --git a/polygerrit-ui/app/embed/diff/gr-diff/gr-diff-utils_test.ts b/polygerrit-ui/app/embed/diff/gr-diff/gr-diff-utils_test.ts
index 9501f62..6ddc6f1 100644
--- a/polygerrit-ui/app/embed/diff/gr-diff/gr-diff-utils_test.ts
+++ b/polygerrit-ui/app/embed/diff/gr-diff/gr-diff-utils_test.ts
@@ -15,6 +15,7 @@
   FullContext,
   getContentGroups,
   getDataFromCommentThreadEl,
+  getLineNumberCellWidth,
   getRange,
   getRevertedFileContent,
   GrDiffCommentThread,
@@ -22,6 +23,7 @@
 } from './gr-diff-utils';
 import {FILE, GrDiffLineType, LOST, Side} from '../../../api/diff';
 import {createDefaultDiffPrefs} from '../../../constants/constants';
+import {createDiff} from '../../../test/test-data-generators';
 import {GrDiffGroup, GrDiffGroupType} from './gr-diff-group';
 import {GrDiffLine} from './gr-diff-line';
 import {PROVIDED_FIX_ID} from '../../../utils/comment-util';
@@ -69,6 +71,29 @@
     });
   });
 
+  suite('getLineNumberCellWidth', () => {
+    const prefs = {...createDefaultDiffPrefs(), font_size: 12};
+
+    test('without diff', () => {
+      assert.equal(
+        getLineNumberCellWidth(prefs),
+        'max(48px, calc(1ch + 2 * var(--spacing-m, 8px)))'
+      );
+    });
+
+    test('uses the digits of the larger side', () => {
+      const diff = {
+        ...createDiff(),
+        meta_a: {name: 'a', content_type: 'text/plain', lines: 99999},
+        meta_b: {name: 'b', content_type: 'text/plain', lines: 100004},
+      };
+      assert.equal(
+        getLineNumberCellWidth(prefs, diff),
+        'max(48px, calc(6ch + 2 * var(--spacing-m, 8px)))'
+      );
+    });
+  });
+
   suite('computeLineLength', () => {
     test('computeLineLength(1, ...)', () => {
       assert.equal(
diff --git a/polygerrit-ui/app/embed/diff/gr-diff/gr-diff.ts b/polygerrit-ui/app/embed/diff/gr-diff/gr-diff.ts
index 1fb0664..f412215 100644
--- a/polygerrit-ui/app/embed/diff/gr-diff/gr-diff.ts
+++ b/polygerrit-ui/app/embed/diff/gr-diff/gr-diff.ts
@@ -21,6 +21,7 @@
   FullContext,
   getDataFromCommentThreadEl,
   getLineNumber,
+  getLineNumberCellWidth,
   getResponsiveMode,
   getSideByLineEl,
   GrDiffCommentThread,
@@ -432,6 +433,9 @@
       changedProperties.has('prefs')
     ) {
       this.prefsChanged();
+    } else if (changedProperties.has('diff') && this.prefs) {
+      // The line number column width depends on the line count of the diff.
+      this.updatePreferenceStyles();
     }
     if (changedProperties.has('layers')) {
       this.layersChanged();
@@ -644,7 +648,10 @@
       const contentWidth = `${sideBySide ? 2 : 1} * ${lineLimit}`;
 
       // We always have 2 columns for line number
-      const lineNumberWidth = `2 * ${getLineNumberCellWidth(this.prefs)}px`;
+      const lineNumberWidth = `2 * ${getLineNumberCellWidth(
+        this.prefs,
+        this.diff
+      )}`;
 
       // border-right in ".section" css definition (in gr-diff_html.ts)
       const sectionRightBorder = '1px';
@@ -1033,10 +1040,6 @@
   }
 }
 
-function getLineNumberCellWidth(prefs: DiffPreferencesInfo) {
-  return prefs.font_size * 4;
-}
-
 function annotateSymbols(
   contentEl: HTMLElement,
   line: GrDiffLine,
diff --git a/polygerrit-ui/app/embed/diff/gr-diff/gr-diff_screenshot_test.ts b/polygerrit-ui/app/embed/diff/gr-diff/gr-diff_screenshot_test.ts
new file mode 100644
index 0000000..3456d06
--- /dev/null
+++ b/polygerrit-ui/app/embed/diff/gr-diff/gr-diff_screenshot_test.ts
@@ -0,0 +1,71 @@
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import '../../../test/common-test-setup';
+import './gr-diff';
+import {GrDiff} from './gr-diff';
+import {fixture, html} from '@open-wc/testing';
+// Until https://github.com/modernweb-dev/web/issues/2804 is fixed
+// @ts-expect-error
+import {visualDiff} from '@web/test-runner-visual-regression';
+import {visualDiffDarkTheme} from '../../../test/test-utils';
+import {createDefaultDiffPrefs} from '../../../constants/constants';
+import {DiffInfo, DiffViewMode} from '../../../api/diff';
+
+suite('gr-diff screenshot tests', () => {
+  let element: GrDiff;
+
+  setup(async () => {
+    // Lines 99998 to 100004 straddle the 5 to 6 digit boundary. Responsive
+    // mode is used, because it gives the table a fixed layout, so the line
+    // number columns do not grow with their content.
+    const diff: DiffInfo = {
+      meta_a: {
+        name: 'large.txt',
+        content_type: 'text/plain',
+        lines: 100004,
+      },
+      meta_b: {
+        name: 'large.txt',
+        content_type: 'text/plain',
+        lines: 100004,
+      },
+      change_type: 'MODIFIED',
+      intraline_status: 'OK',
+      content: [
+        {skip: 99997},
+        {ab: ['line 99998', 'line 99999', 'line 100000']},
+        {a: ['line 100001 old'], b: ['line 100001 new']},
+        {ab: ['line 100002', 'line 100003', 'line 100004']},
+      ],
+    };
+
+    element = await fixture<GrDiff>(html`<gr-diff
+      .diff=${diff}
+      .prefs=${{
+        ...createDefaultDiffPrefs(),
+        line_length: 40,
+        responsive_mode: 'FULL_RESPONSIVE',
+      }}
+    ></gr-diff>`);
+    // The test viewport is narrow enough to trigger the compact spacing from
+    // app-theme. Use the desktop spacing, which the line number padding uses.
+    element.style.setProperty('--spacing-m', '8px');
+    await element.updateComplete;
+  });
+
+  test('line numbers above 100000', async () => {
+    await visualDiff(element, 'gr-diff-large-line-numbers');
+    await visualDiffDarkTheme(element, 'gr-diff-large-line-numbers');
+  });
+
+  test('unified line numbers above 100000', async () => {
+    element.viewMode = DiffViewMode.UNIFIED;
+    await element.updateComplete;
+
+    await visualDiff(element, 'gr-diff-large-line-numbers-unified');
+    await visualDiffDarkTheme(element, 'gr-diff-large-line-numbers-unified');
+  });
+});
diff --git a/polygerrit-ui/app/embed/diff/gr-diff/gr-diff_test.ts b/polygerrit-ui/app/embed/diff/gr-diff/gr-diff_test.ts
index 3277633..7d8d95d3 100644
--- a/polygerrit-ui/app/embed/diff/gr-diff/gr-diff_test.ts
+++ b/polygerrit-ui/app/embed/diff/gr-diff/gr-diff_test.ts
@@ -150,7 +150,7 @@
       await element.updateComplete;
       assert.equal(
         getComputedStyleValue('--diff-max-width', element),
-        'calc(2 * 80ch + 2 * 48px + 0ch + 1px + 2px)'
+        'calc(2 * 80ch + 2 * max(48px, calc(1ch + 2 * 4px)) + 0ch + 1px + 2px)'
       );
     });
 
@@ -159,7 +159,7 @@
       await element.updateComplete;
       assert.equal(
         getComputedStyleValue('--diff-max-width', element),
-        'calc(1 * 80ch + 2 * 48px + 0ch + 1px + 2px)'
+        'calc(1 * 80ch + 2 * max(48px, calc(1ch + 2 * 4px)) + 0ch + 1px + 2px)'
       );
     });
 
@@ -169,7 +169,21 @@
       // Each line number column: 4 * 13 = 52px
       assert.equal(
         getComputedStyleValue('--diff-max-width', element),
-        'calc(2 * 80ch + 2 * 52px + 0ch + 1px + 2px)'
+        'calc(2 * 80ch + 2 * max(52px, calc(1ch + 2 * 4px)) + 0ch + 1px + 2px)'
+      );
+    });
+
+    test('max-width considers the line count of the diff', async () => {
+      const diff = createDiff();
+      element.diff = {
+        ...diff,
+        meta_a: {...diff.meta_a!, lines: 100000},
+        meta_b: {...diff.meta_b!, lines: 100000},
+      };
+      await element.updateComplete;
+      assert.equal(
+        getComputedStyleValue('--diff-max-width', element),
+        'calc(2 * 80ch + 2 * max(48px, calc(6ch + 2 * 4px)) + 0ch + 1px + 2px)'
       );
     });
 
@@ -178,7 +192,7 @@
       await element.updateComplete;
       assert.equal(
         getComputedStyleValue('--diff-max-width', element),
-        'calc(2 * 80ch + 2 * 48px + 2ch + 1px + 2px)'
+        'calc(2 * 80ch + 2 * max(48px, calc(1ch + 2 * 4px)) + 2ch + 1px + 2px)'
       );
     });
   });
diff --git a/polygerrit-ui/app/embed/diff/gr-ranged-comment-hint/gr-ranged-comment-hint_test.ts b/polygerrit-ui/app/embed/diff/gr-ranged-comment-hint/gr-ranged-comment-hint_test.ts
index 47b254b..f2d3969 100644
--- a/polygerrit-ui/app/embed/diff/gr-ranged-comment-hint/gr-ranged-comment-hint_test.ts
+++ b/polygerrit-ui/app/embed/diff/gr-ranged-comment-hint/gr-ranged-comment-hint_test.ts
@@ -5,7 +5,6 @@
  */
 import '../../../test/common-test-setup';
 import './gr-ranged-comment-hint';
-import {CommentRange} from '../../../types/common';
 import {GrRangedCommentHint} from './gr-ranged-comment-hint';
 import {queryAndAssert, waitEventLoop} from '../../../test/test-utils';
 import {GrRangeHeader} from '../gr-range-header/gr-range-header';
@@ -27,7 +26,7 @@
       start_character: 1,
       end_line: 5,
       end_character: 3,
-    } as CommentRange;
+    };
     await waitEventLoop();
     const textDiv = queryAndAssert<GrRangeHeader>(element, 'gr-range-header');
     assert.equal(textDiv?.innerText.trim(), 'Long comment range 2 - 5');
diff --git a/polygerrit-ui/app/models/change/change-model.ts b/polygerrit-ui/app/models/change/change-model.ts
index bc45fcb..b627a00 100644
--- a/polygerrit-ui/app/models/change/change-model.ts
+++ b/polygerrit-ui/app/models/change/change-model.ts
@@ -7,6 +7,7 @@
   AUTO_MERGE,
   BasePatchSetNum,
   ChangeInfo,
+  ChangePermissionsInfo,
   ChangeViewChangeInfo,
   CommitId,
   EDIT,
@@ -47,6 +48,7 @@
   computeLatestPatchNum,
   computeLatestPatchNumWithEdit,
   findEdit,
+  isMergeParent,
   sortRevisions,
 } from '../../utils/patch-set-util';
 import {
@@ -61,6 +63,7 @@
   SubmittabilityInfo,
 } from '../../services/gr-rest-api/gr-rest-api';
 import {select} from '../../utils/observable-util';
+import {AccessPermissionId} from '../../utils/access-util';
 import {assertIsDefined} from '../../utils/common-util';
 import {Model} from '../base/model';
 import {UserModel} from '../user/user-model';
@@ -122,6 +125,12 @@
    * go back to `undefined` after being set for a change.
    */
   mergeable?: boolean;
+  /**
+   * Change-scoped permissions of the calling user on this change, fetched from
+   * `GET /changes/{id}/permissions`. Loaded lazily after the change itself is
+   * loaded; `undefined` while the request is still in flight.
+   */
+  permissions?: ChangePermissionsInfo;
 }
 
 export enum RevisionFileUpdateStatus {
@@ -303,6 +312,35 @@
   };
 }
 
+export function fillFromRevisionParents(
+  change?: ParsedChangeInfo,
+  changeWithParents?: ChangeInfo | ParsedChangeInfo
+): ParsedChangeInfo | undefined {
+  if (
+    !change?.revisions ||
+    !changeWithParents?.revisions ||
+    changeWithParents._number !== change._number
+  ) {
+    return change;
+  }
+  const revisions = {...change.revisions};
+  let updated = false;
+  for (const [revId, rev] of Object.entries(changeWithParents.revisions)) {
+    if (
+      revisions[revId] &&
+      revisions[revId].parents_data === undefined &&
+      rev.parents_data !== undefined
+    ) {
+      revisions[revId] = {
+        ...revisions[revId],
+        parents_data: rev.parents_data,
+      };
+      updated = true;
+    }
+  }
+  return updated ? {...change, revisions} : change;
+}
+
 /**
  * Derives the base patchset number from all the data that can potentially
  * influence it. Mostly just returns `viewModelBasePatchNum` or PARENT, but has
@@ -431,6 +469,17 @@
     changeState => changeState.mergeable
   );
 
+  public readonly permissions$ = select(
+    this.state$,
+    changeState => changeState.permissions
+  );
+
+  public readonly canAiReview$ = select(
+    this.permissions$,
+    permissions =>
+      permissions?.permissions?.includes(AccessPermissionId.AI_REVIEW) ?? false
+  );
+
   public readonly branch$ = select(this.change$, change => change?.branch);
 
   public readonly changeNum$ = select(this.change$, change => change?._number);
@@ -645,7 +694,9 @@
       this.loadChange(),
       this.loadSubmittabilityInfo(),
       this.loadMergeable(),
+      this.loadPermissions(),
       this.loadReviewedFiles(),
+      this.loadRevisionParents(),
       this.setOverviewTitle(),
       this.setDiffTitle(),
       this.setEditTitle(),
@@ -820,6 +871,78 @@
       .subscribe();
   }
 
+  private loadRevisionParents() {
+    const isPatchSetBase$ = select(
+      this.basePatchNum$,
+      bp => !!bp && bp !== PARENT && !isMergeParent(bp)
+    );
+    const fetchRequest$ = select(
+      combineLatest([this.change$, isPatchSetBase$, this.submittabilityInfo$]),
+      ([change, isPatchSetBase, submittabilityInfo]) => {
+        if (!change?._number || !change.revisions) {
+          return undefined;
+        }
+        const needsAllRevisions =
+          isPatchSetBase &&
+          Object.values(change.revisions).some(
+            rev => rev._number !== EDIT && rev.parents_data === undefined
+          );
+        if (needsAllRevisions) {
+          return `${change._number}:ALL`;
+        }
+        const currentRevId = change.current_revision;
+        const currentRev = currentRevId
+          ? change.revisions[currentRevId]
+          : undefined;
+        const isSubmittable =
+          submittabilityInfo?.changeNum === change._number &&
+          !!submittabilityInfo.submittable;
+        const needsCurrentRevision =
+          change.status === ChangeStatus.NEW &&
+          !change.work_in_progress &&
+          isSubmittable &&
+          currentRev !== undefined &&
+          currentRev._number !== EDIT &&
+          currentRev.parents_data === undefined;
+        if (needsCurrentRevision) {
+          return `${change._number}:CURRENT:${currentRevId}`;
+        }
+        return undefined;
+      }
+    );
+    return fetchRequest$
+      .pipe(
+        switchMap(fetchRequest => {
+          if (!fetchRequest) {
+            return of(undefined);
+          }
+          const [changeNumStr, scope] = fetchRequest.split(':');
+          const changeNum = Number(changeNumStr) as NumericChangeId;
+          const optionsHex = listChangesOptionsToHex(
+            scope === 'ALL'
+              ? ListChangesOption.ALL_REVISIONS
+              : ListChangesOption.CURRENT_REVISION,
+            ListChangesOption.PARENTS,
+            ListChangesOption.SKIP_DIFFSTAT
+          );
+          return from(
+            this.restApiService.getChange(changeNum, undefined, optionsHex)
+          ).pipe(catchError(() => of(undefined)));
+        })
+      )
+      .subscribe(changeWithParents => {
+        if (!changeWithParents) return;
+        const currentChange = this.getState().change;
+        const change = fillFromRevisionParents(
+          currentChange,
+          changeWithParents
+        );
+        if (change !== currentChange) {
+          this.updateState({change});
+        }
+      });
+  }
+
   private loadMergeable() {
     return this.change$
       .pipe(
@@ -838,6 +961,24 @@
       .subscribe(mergeable => this.updateState({mergeable}));
   }
 
+  private loadPermissions() {
+    return this.changeNum$
+      .pipe(
+        switchMap(changeNum => {
+          if (changeNum === undefined) {
+            this.updateState({permissions: undefined});
+            return of(undefined);
+          }
+          return from(this.restApiService.getChangePermissions(changeNum)).pipe(
+            catchError(() => of(undefined))
+          );
+        })
+      )
+      .subscribe(permissions => {
+        if (permissions !== undefined) this.updateState({permissions});
+      });
+  }
+
   public reloadSubmittability() {
     this.reloadSubmittabilityTrigger$.next();
   }
@@ -1190,6 +1331,7 @@
     }
     change = updateRevisionsWithCommitShas(change);
     change = fillFromSubmittabilityInfo(change, this.submittabilityInfo);
+    change = fillFromRevisionParents(change, this.change);
     this.updateState({
       change,
       loadingStatus: LoadingStatus.LOADED,
diff --git a/polygerrit-ui/app/models/change/change-model_test.ts b/polygerrit-ui/app/models/change/change-model_test.ts
index aa79b80..83d056d 100644
--- a/polygerrit-ui/app/models/change/change-model_test.ts
+++ b/polygerrit-ui/app/models/change/change-model_test.ts
@@ -32,10 +32,12 @@
 import {
   AUTO_MERGE,
   BasePatchSetNum,
+  BranchName,
   ChangeInfo,
   CommitId,
   EDIT,
   FIRST_PARENT,
+  ListChangesOption,
   NumericChangeId,
   PARENT,
   PatchSetNum,
@@ -69,6 +71,7 @@
 import {pluginLoaderToken} from '../../elements/shared/gr-js-api-interface/gr-plugin-loader';
 import {ShowChangeDetail} from '../../elements/shared/gr-js-api-interface/gr-js-api-types';
 import {SubmittabilityInfo} from '../../services/gr-rest-api/gr-rest-api';
+import {listChangesOptionsToHex} from '../../utils/change-util';
 
 suite('updateRevisionsWithCommitShas() tests', () => {
   test('undefined edit', async () => {
@@ -897,4 +900,340 @@
     changeModel.updateState({change: knownChange});
     await waitUntilObserved(changeModel.latestRevision$, x => x?._number === 2);
   });
+
+  suite('loadRevisionParents', () => {
+    test('does not fetch parents_data when basePatchNum is PARENT', async () => {
+      stubRestApi('getChangeDetail').resolves(knownChange);
+      const getChangeStub = stubRestApi('getChange').resolves(undefined);
+      changeViewModel.setState({
+        ...createChangeViewState(),
+        changeNum: knownChange._number,
+        basePatchNum: PARENT,
+        patchNum: 2 as PatchSetNumber,
+      });
+      await waitForLoadingStatus(LoadingStatus.LOADED);
+      assert.isFalse(getChangeStub.called);
+    });
+
+    test('lazily fetches parents_data when switching basePatchNum to a patchset', async () => {
+      stubRestApi('getChangeDetail').resolves(knownChange);
+      const parentsData1 = [
+        {
+          branch_name: 'refs/heads/main' as BranchName,
+          commit_id: 'parent1' as CommitId,
+          is_merged_in_target_branch: true,
+        },
+      ];
+      const parentsData2 = [
+        {
+          branch_name: 'refs/heads/main' as BranchName,
+          commit_id: 'parent2' as CommitId,
+          is_merged_in_target_branch: true,
+        },
+      ];
+      const getChangeStub = stubRestApi('getChange').resolves({
+        ...createChange(),
+        _number: knownChange._number,
+        revisions: {
+          sha1: {
+            ...createRevision(1),
+            description: 'patch 1',
+            parents_data: parentsData1,
+          },
+          sha2: {
+            ...createRevision(2),
+            description: 'patch 2',
+            parents_data: parentsData2,
+          },
+        },
+      });
+
+      changeViewModel.setState({
+        ...createChangeViewState(),
+        changeNum: knownChange._number,
+        basePatchNum: PARENT,
+        patchNum: 2 as PatchSetNumber,
+      });
+      await waitForLoadingStatus(LoadingStatus.LOADED);
+      assert.isFalse(getChangeStub.called);
+
+      // Switch basePatchNum to Patchset 1 in SPA mode.
+      changeViewModel.updateState({basePatchNum: 1 as BasePatchSetNum});
+
+      await waitUntilObserved(
+        changeModel.baseRevision$,
+        rev => rev?.parents_data !== undefined
+      );
+      await waitUntilObserved(
+        changeModel.revision$,
+        rev => rev?.parents_data !== undefined
+      );
+      assert.isTrue(getChangeStub.calledOnce);
+      assert.deepEqual(getChangeStub.lastCall.args, [
+        knownChange._number,
+        undefined,
+        listChangesOptionsToHex(
+          ListChangesOption.ALL_REVISIONS,
+          ListChangesOption.PARENTS,
+          ListChangesOption.SKIP_DIFFSTAT
+        ),
+      ]);
+      assert.equal(changeModel.getState().loadingStatus, LoadingStatus.LOADED);
+    });
+
+    test('does not fetch parents_data when already present on revisions', async () => {
+      const getChangeStub = stubRestApi('getChange').resolves(undefined);
+      const parentsData = [
+        {
+          branch_name: 'refs/heads/main' as BranchName,
+          commit_id: 'parent1' as CommitId,
+          is_merged_in_target_branch: true,
+        },
+      ];
+      const changeWithParents: ParsedChangeInfo = {
+        ...knownChange,
+        revisions: {
+          sha1: {...knownChange.revisions['sha1'], parents_data: parentsData},
+          sha2: {...knownChange.revisions['sha2'], parents_data: parentsData},
+        },
+      };
+      stubRestApi('getChangeDetail').resolves(changeWithParents);
+      changeViewModel.setState({
+        ...createChangeViewState(),
+        changeNum: knownChange._number,
+        basePatchNum: 1 as BasePatchSetNum,
+        patchNum: 2 as PatchSetNumber,
+      });
+      await waitForLoadingStatus(LoadingStatus.LOADED);
+      assert.isFalse(getChangeStub.called);
+    });
+
+    test('recovers and fetches parents_data after a transient getChange error', async () => {
+      stubRestApi('getChangeDetail').resolves(knownChange);
+      const parentsData = [
+        {
+          branch_name: 'refs/heads/main' as BranchName,
+          commit_id: 'parent1' as CommitId,
+          is_merged_in_target_branch: true,
+        },
+      ];
+      const getChangeStub = stubRestApi('getChange');
+      getChangeStub.onFirstCall().rejects(new Error('transient network error'));
+      getChangeStub.onSecondCall().resolves({
+        ...createChange(),
+        _number: knownChange._number,
+        revisions: {
+          sha1: {
+            ...createRevision(1),
+            description: 'patch 1',
+            parents_data: parentsData,
+          },
+          sha2: {
+            ...createRevision(2),
+            description: 'patch 2',
+            parents_data: parentsData,
+          },
+        },
+      });
+
+      changeViewModel.setState({
+        ...createChangeViewState(),
+        changeNum: knownChange._number,
+        basePatchNum: PARENT,
+        patchNum: 2 as PatchSetNumber,
+      });
+      await waitForLoadingStatus(LoadingStatus.LOADED);
+
+      // First patchset comparison fails transiently.
+      changeViewModel.updateState({basePatchNum: 1 as BasePatchSetNum});
+      await waitUntil(() => getChangeStub.callCount === 1);
+
+      // Switching back to PARENT and re-selecting patchset 1 retries and succeeds.
+      changeViewModel.updateState({basePatchNum: PARENT});
+      changeViewModel.updateState({basePatchNum: 1 as BasePatchSetNum});
+
+      await waitUntilObserved(
+        changeModel.revision$,
+        rev => rev?.parents_data !== undefined
+      );
+      assert.equal(getChangeStub.callCount, 2);
+    });
+
+    test('lazily fetches CURRENT_REVISION parents_data when open non-WIP change is submittable', async () => {
+      const openChange: ParsedChangeInfo = {
+        ...knownChange,
+        current_revision: 'sha2' as CommitId,
+      };
+      stubRestApi('getChangeDetail').resolves(openChange);
+      stubRestApi('getSubmittabilityInfo').resolves({
+        changeNum: openChange._number,
+        submittable: true,
+        submitRequirements: [],
+      });
+      const parentsData2 = [
+        {
+          branch_name: 'refs/heads/main' as BranchName,
+          commit_id: 'parent2' as CommitId,
+          is_merged_in_target_branch: false,
+          change_number: 100 as NumericChangeId,
+        },
+      ];
+      const getChangeStub = stubRestApi('getChange').resolves({
+        ...createChange(),
+        _number: openChange._number,
+        revisions: {
+          sha2: {
+            ...createRevision(2),
+            description: 'patch 2',
+            parents_data: parentsData2,
+          },
+        },
+      });
+
+      changeViewModel.setState({
+        ...createChangeViewState(),
+        changeNum: openChange._number,
+        basePatchNum: PARENT,
+        patchNum: 2 as PatchSetNumber,
+      });
+      await waitForLoadingStatus(LoadingStatus.LOADED);
+      await waitUntilObserved(
+        changeModel.revision$,
+        rev => rev?.parents_data !== undefined
+      );
+
+      assert.isTrue(getChangeStub.calledOnce);
+      assert.deepEqual(getChangeStub.lastCall.args, [
+        openChange._number,
+        undefined,
+        listChangesOptionsToHex(
+          ListChangesOption.CURRENT_REVISION,
+          ListChangesOption.PARENTS,
+          ListChangesOption.SKIP_DIFFSTAT
+        ),
+      ]);
+    });
+
+    test('does not fetch parents_data on PARENT base when WIP, merged, non-submittable, edit, or stale submittabilityInfo', async () => {
+      const getChangeStub = stubRestApi('getChange').resolves(undefined);
+      const edit = createEditInfo();
+      const baseChange: ParsedChangeInfo = {
+        ...knownChange,
+        current_revision: 'sha2' as CommitId,
+      };
+
+      // 1. Not submittable.
+      changeModel.updateState({
+        change: baseChange,
+        submittabilityInfo: {
+          changeNum: baseChange._number,
+          submittable: false,
+          submitRequirements: [],
+        },
+      });
+      // 2. Work in progress even if submittable is true.
+      changeModel.updateState({
+        change: {...baseChange, work_in_progress: true},
+        submittabilityInfo: {
+          changeNum: baseChange._number,
+          submittable: true,
+          submitRequirements: [],
+        },
+      });
+      // 3. Merged status.
+      changeModel.updateState({
+        change: {...baseChange, status: ChangeStatus.MERGED},
+        submittabilityInfo: {
+          changeNum: baseChange._number,
+          submittable: true,
+          submitRequirements: [],
+        },
+      });
+      // 4. Active EDIT as current_revision.
+      const changeWithEdit = updateChangeWithEdit({...baseChange}, edit)!;
+      changeModel.updateState({
+        change: changeWithEdit,
+        submittabilityInfo: {
+          changeNum: baseChange._number,
+          submittable: true,
+          submitRequirements: [],
+        },
+      });
+      // 5. Stale submittabilityInfo from a different changeNum.
+      changeModel.updateState({
+        change: baseChange,
+        submittabilityInfo: {
+          changeNum: 999999 as NumericChangeId,
+          submittable: true,
+          submitRequirements: [],
+        },
+      });
+
+      assert.isFalse(getChangeStub.called);
+    });
+
+    test('does not cancel or duplicate in-flight ALL_REVISIONS fetch when submittability resolves', async () => {
+      const openChange: ParsedChangeInfo = {
+        ...knownChange,
+        current_revision: 'sha2' as CommitId,
+      };
+      stubRestApi('getChangeDetail').resolves(openChange);
+      const srsPromise = mockPromise<SubmittabilityInfo | undefined>();
+      stubRestApi('getSubmittabilityInfo').callsFake(() => srsPromise);
+      const getChangePromise = mockPromise<ChangeInfo | undefined>();
+      const getChangeStub = stubRestApi('getChange').callsFake(
+        () => getChangePromise
+      );
+
+      changeViewModel.setState({
+        ...createChangeViewState(),
+        changeNum: openChange._number,
+        basePatchNum: 1 as BasePatchSetNum,
+        patchNum: 2 as PatchSetNumber,
+      });
+      await waitForLoadingStatus(LoadingStatus.LOADED);
+      assert.equal(getChangeStub.callCount, 1);
+
+      // Submittability resolves while ALL_REVISIONS fetch is still in flight.
+      srsPromise.resolve({
+        changeNum: openChange._number,
+        submittable: true,
+        submitRequirements: [],
+      });
+      await waitUntilObserved(
+        changeModel.submittable$,
+        submittable => submittable === true
+      );
+      assert.equal(getChangeStub.callCount, 1);
+
+      const parentsData = [
+        {
+          branch_name: 'refs/heads/main' as BranchName,
+          commit_id: 'parent1' as CommitId,
+          is_merged_in_target_branch: true,
+        },
+      ];
+      getChangePromise.resolve({
+        ...createChange(),
+        _number: openChange._number,
+        revisions: {
+          sha1: {
+            ...createRevision(1),
+            description: 'patch 1',
+            parents_data: parentsData,
+          },
+          sha2: {
+            ...createRevision(2),
+            description: 'patch 2',
+            parents_data: parentsData,
+          },
+        },
+      });
+      await waitUntilObserved(
+        changeModel.revision$,
+        rev => rev?.parents_data !== undefined
+      );
+      assert.equal(getChangeStub.callCount, 1);
+    });
+  });
 });
diff --git a/polygerrit-ui/app/models/change/files-model_test.ts b/polygerrit-ui/app/models/change/files-model_test.ts
index 054c5f5..7f5aecd 100644
--- a/polygerrit-ui/app/models/change/files-model_test.ts
+++ b/polygerrit-ui/app/models/change/files-model_test.ts
@@ -124,7 +124,7 @@
       'getChangeOrEditFiles'
     ).resolves({
       'file1.txt': {},
-    } as FileNameToFileInfoMap);
+    });
 
     const revision = createRevision(1);
     const singleParentCommit = {
diff --git a/polygerrit-ui/app/models/change/related-changes-model.ts b/polygerrit-ui/app/models/change/related-changes-model.ts
index 55f0b75..a49c362 100644
--- a/polygerrit-ui/app/models/change/related-changes-model.ts
+++ b/polygerrit-ui/app/models/change/related-changes-model.ts
@@ -211,7 +211,6 @@
       .pipe(
         switchMap(([changeNum, topic, config]) => {
           if (!changeNum || !topic || !config) return of(undefined);
-          if (config.change.submit_whole_topic) return of(undefined);
           return from(
             this.restApiService.getChangesWithSameTopic(topic, {
               openChangesOnly: true,
diff --git a/polygerrit-ui/app/models/chat/chat-model.ts b/polygerrit-ui/app/models/chat/chat-model.ts
index 781f67d..92fab0f 100644
--- a/polygerrit-ui/app/models/chat/chat-model.ts
+++ b/polygerrit-ui/app/models/chat/chat-model.ts
@@ -21,6 +21,7 @@
   CreateCommentAction,
   ModelInfo,
   Models,
+  ModelsLoadingErrorName,
   Reference,
 } from '../../api/ai-code-review';
 import {ChangeInfo, CommentInfo, FileInfoStatus} from '../../api/rest-api';
@@ -195,6 +196,7 @@
 
 export declare interface ChatState extends ConversationState {
   readonly mode: ChatPanelMode;
+  readonly chatPanelOpen?: boolean;
 
   /** The list of conversations for the current CL. */
   readonly conversations?: readonly Conversation[];
@@ -203,8 +205,8 @@
   readonly models?: Models;
   // Chat models for the current CL.
   readonly selectedModelId?: string;
-  // Error message if the chat models failed to load.
-  readonly modelsLoadingError?: string;
+  // Set if and only if the chat models failed to load.
+  readonly modelsLoadingError?: ModelsLoadingError;
 
   // Chat actions for the current CL.
   readonly actions?: Actions;
@@ -230,12 +232,28 @@
   },
 };
 
+export interface ModelsLoadingError {
+  // Message of the error getModels() rejected with. May be empty.
+  readonly message: string;
+  // Undefined if the provider rejected with a name that is not a
+  // ModelsLoadingErrorName.
+  readonly name?: ModelsLoadingErrorName;
+}
+
 export interface ChatTriggerParams {
   prompt?: string;
 }
 
 export const chatModelToken = define<ChatModel>('chat-model');
 
+function isModelsLoadingErrorName(
+  name: string
+): name is ModelsLoadingErrorName {
+  return Object.values(ModelsLoadingErrorName).includes(
+    name as ModelsLoadingErrorName
+  );
+}
+
 export class ChatModel extends Model<ChatState> {
   readonly models$: Observable<Models | undefined> = select(
     this.state$,
@@ -255,10 +273,8 @@
 
   readonly selectedModel$: Observable<ModelInfo | undefined>;
 
-  readonly modelsLoadingError$: Observable<string | undefined> = select(
-    this.state$,
-    chatState => chatState.modelsLoadingError
-  );
+  readonly modelsLoadingError$: Observable<ModelsLoadingError | undefined> =
+    select(this.state$, chatState => chatState.modelsLoadingError);
 
   readonly actions$: Observable<readonly Action[]> = select(
     this.state$,
@@ -339,6 +355,11 @@
     state => state.provider
   );
 
+  readonly chatPanelOpen$: Observable<boolean> = select(
+    this.state$,
+    state => !!state.chatPanelOpen
+  );
+
   private plugin?: AiCodeReviewProvider;
 
   private change?: ChangeInfo;
@@ -353,6 +374,7 @@
   ) {
     super({
       mode: ChatPanelMode.CONVERSATION,
+      chatPanelOpen: false,
       ...initialConversationState,
     });
 
@@ -405,6 +427,7 @@
 
       this.updateState({
         ...initialConversationState,
+        chatPanelOpen: false,
         // We need to explicitly clear these, because updateState does a shallow
         // merge, and initialConversationState does not contain these fields.
         models: undefined,
@@ -786,6 +809,10 @@
     }
   }
 
+  setChatPanelOpen(open: boolean) {
+    this.updateState({chatPanelOpen: open});
+  }
+
   listConversations() {
     if (!this.change) return;
     return this.plugin
@@ -838,7 +865,10 @@
       .catch((error: Error) => {
         this.updateState({
           models: undefined,
-          modelsLoadingError: error.message,
+          modelsLoadingError: {
+            message: error.message,
+            name: isModelsLoadingErrorName(error.name) ? error.name : undefined,
+          },
         });
         console.error('Failed to get chat models', error);
       });
diff --git a/polygerrit-ui/app/models/chat/chat-model_test.ts b/polygerrit-ui/app/models/chat/chat-model_test.ts
index c8d4fc0..80768c0 100644
--- a/polygerrit-ui/app/models/chat/chat-model_test.ts
+++ b/polygerrit-ui/app/models/chat/chat-model_test.ts
@@ -12,8 +12,13 @@
 import {UserModel} from '../user/user-model';
 import {BehaviorSubject} from 'rxjs';
 import {createParsedChange} from '../../test/test-data-generators';
-import {AiCodeReviewProvider, ChatRequest} from '../../api/ai-code-review';
+import {
+  AiCodeReviewProvider,
+  ChatRequest,
+  ModelsLoadingErrorName,
+} from '../../api/ai-code-review';
 
+import {waitEventLoop} from '../../test/test-utils';
 import sinon from 'sinon';
 import {ParsedChangeInfo} from '../../types/types';
 import {getAppContext} from '../../services/app-context';
@@ -69,6 +74,30 @@
     const state = model.getState();
     assert.isObject(state);
     assert.isEmpty(state.turns);
+    assert.isFalse(state.chatPanelOpen);
+  });
+
+  test('chatPanelOpen$ tracks open state and resets on new change', () => {
+    const emissions: boolean[] = [];
+    model.chatPanelOpen$.subscribe(open => emissions.push(open));
+    assert.deepEqual(emissions, [false]);
+
+    model.setChatPanelOpen(true);
+    assert.deepEqual(emissions, [false, true]);
+
+    // Updating the same change does not reset chatPanelOpen.
+    const change1 = createParsedChange();
+    changeModel.updateStateChange(change1);
+    model.setChatPanelOpen(true);
+    changeModel.updateStateChange({...change1, subject: 'Updated subject'});
+    assert.isTrue(model.getState().chatPanelOpen);
+
+    // Navigating to a different change resets chatPanelOpen to false.
+    changeModel.updateStateChange({
+      ...createParsedChange(),
+      _number: (change1._number + 1) as typeof change1._number,
+    });
+    assert.isFalse(model.getState().chatPanelOpen);
   });
 
   test('change subscription triggers API calls', () => {
@@ -137,6 +166,36 @@
     assert.deepEqual(state.customActions, customActions as any);
   });
 
+  test('getModels rejection stores message and error name', async () => {
+    const error = new Error('No API token configured.');
+    error.name = ModelsLoadingErrorName.MISSING_API_TOKEN;
+    (provider.getModels as sinon.SinonStub).rejects(error);
+
+    changeModel.updateStateChange(createParsedChange());
+    await waitEventLoop();
+
+    const state = model.getState();
+    assert.deepEqual(state.modelsLoadingError, {
+      message: 'No API token configured.',
+      name: ModelsLoadingErrorName.MISSING_API_TOKEN,
+    });
+  });
+
+  test('getModels rejection drops unknown error name', async () => {
+    const error = new Error('Something went wrong.');
+    error.name = 'SomeProviderError';
+    (provider.getModels as sinon.SinonStub).rejects(error);
+
+    changeModel.updateStateChange(createParsedChange());
+    await waitEventLoop();
+
+    const state = model.getState();
+    assert.deepEqual(state.modelsLoadingError, {
+      message: 'Something went wrong.',
+      name: undefined,
+    });
+  });
+
   test('chat uses selected model', async () => {
     // Mock getModels to return multiple models
     const models = {
@@ -282,7 +341,7 @@
     const updatedChange = {
       ...change,
       subject: 'updated subject',
-    } as unknown as ParsedChangeInfo;
+    };
     changeModel.updateStateChange(updatedChange);
 
     // API calls should not be triggered again
diff --git a/polygerrit-ui/app/models/checks/checks-util_test.ts b/polygerrit-ui/app/models/checks/checks-util_test.ts
index 7359381..ebbf187 100644
--- a/polygerrit-ui/app/models/checks/checks-util_test.ts
+++ b/polygerrit-ui/app/models/checks/checks-util_test.ts
@@ -89,7 +89,7 @@
               end_line: 1,
               start_character: 0,
               end_character: 1,
-            } as CommentRange,
+            },
             replacement: 'test-replacement-string',
           },
         ],
@@ -112,7 +112,7 @@
               end_line: 1,
               start_character: 0,
               end_character: 1,
-            } as CommentRange,
+            },
             replacement: 'test-replacement-string',
           },
         ],
diff --git a/polygerrit-ui/app/models/comments/comments-model.ts b/polygerrit-ui/app/models/comments/comments-model.ts
index db15121..90d4137 100644
--- a/polygerrit-ui/app/models/comments/comments-model.ts
+++ b/polygerrit-ui/app/models/comments/comments-model.ts
@@ -766,6 +766,7 @@
 
       const jsonTimer = this.reporting.getTimer(`${timing} - parse - json`);
       try {
+        // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
         savedComment = parsePrefixedJSON(text) as unknown as CommentInfo;
       } catch (_) {
         throw new Error(
diff --git a/polygerrit-ui/app/models/comments/comments-model_test.ts b/polygerrit-ui/app/models/comments/comments-model_test.ts
index 5689a3b..53f8ef8 100644
--- a/polygerrit-ui/app/models/comments/comments-model_test.ts
+++ b/polygerrit-ui/app/models/comments/comments-model_test.ts
@@ -13,7 +13,6 @@
   AccountInfo,
   CommentInfo,
   DraftInfo,
-  EmailAddress,
   NumericChangeId,
   Timestamp,
   UrlEncodedCommentId,
@@ -207,7 +206,7 @@
 
   test('duplicate mentions are filtered out', async () => {
     const account = {
-      ...createAccountWithEmail('abcd@def.com' as EmailAddress),
+      ...createAccountWithEmail('abcd@def.com'),
       registered_on: '2015-03-12 18:32:08.000000000' as Timestamp,
     };
     stubRestApi('getAccountDetails').returns(Promise.resolve(account));
@@ -236,7 +235,7 @@
 
   test('empty mentions are emitted', async () => {
     const account = {
-      ...createAccountWithEmail('abcd@def.com' as EmailAddress),
+      ...createAccountWithEmail('abcd@def.com'),
       registered_on: '2015-03-12 18:32:08.000000000' as Timestamp,
     };
     stubRestApi('getAccountDetails').returns(Promise.resolve(account));
diff --git a/polygerrit-ui/app/models/config/config-model.ts b/polygerrit-ui/app/models/config/config-model.ts
index 61b3bec..016a0f7 100644
--- a/polygerrit-ui/app/models/config/config-model.ts
+++ b/polygerrit-ui/app/models/config/config-model.ts
@@ -95,6 +95,7 @@
   // visible for testing
   async getDocsBaseUrl(config: ServerInfo | undefined): Promise<string> {
     if (config?.gerrit?.doc_url) return config.gerrit.doc_url;
+    if (config?.gerrit?.doc_search) return getBaseUrl() + DOCS_BASE_PATH;
 
     const ok = await this.restApiService.probePath(getBaseUrl() + PROBE_PATH);
     if (ok) return getBaseUrl() + DOCS_BASE_PATH;
diff --git a/polygerrit-ui/app/models/config/config-model_test.ts b/polygerrit-ui/app/models/config/config-model_test.ts
index bb6af87..90ede67 100644
--- a/polygerrit-ui/app/models/config/config-model_test.ts
+++ b/polygerrit-ui/app/models/config/config-model_test.ts
@@ -68,6 +68,19 @@
     assert.equal(docsBaseUrl, 'foobar');
   });
 
+  test('has doc_search config', async () => {
+    const probePathMock = sinon
+      .stub(model.restApiService, 'probePath')
+      .resolves(true);
+    const config: ServerInfo = {
+      ...createServerInfo(),
+      gerrit: {...createGerritInfo(), doc_search: true},
+    };
+    const docsBaseUrl = await model.getDocsBaseUrl(config);
+    assert.isFalse(probePathMock.called);
+    assert.equal(docsBaseUrl, `${getBaseUrl()}/Documentation`);
+  });
+
   test('no probe', async () => {
     const probePathMock = sinon
       .stub(model.restApiService, 'probePath')
diff --git a/polygerrit-ui/app/models/flows/flows-model.ts b/polygerrit-ui/app/models/flows/flows-model.ts
index f2e7802..a450128 100644
--- a/polygerrit-ui/app/models/flows/flows-model.ts
+++ b/polygerrit-ui/app/models/flows/flows-model.ts
@@ -4,7 +4,15 @@
  * SPDX-License-Identifier: Apache-2.0
  */
 import {BehaviorSubject, combineLatest, from, Observable, of} from 'rxjs';
-import {catchError, map, shareReplay, switchMap} from 'rxjs/operators';
+import {
+  catchError,
+  filter,
+  map,
+  shareReplay,
+  switchMap,
+  take,
+  tap,
+} from 'rxjs/operators';
 import {ChangeModel} from '../change/change-model';
 import {fireServerError} from '../../utils/event-util';
 import {FlowInfo, FlowInput} from '../../api/rest-api';
@@ -18,6 +26,9 @@
 import {FlowsAutosubmitProvider, FlowsProvider} from '../../api/flows';
 import {select} from '../../utils/observable-util';
 import {isDefined} from '../../types/types';
+import {getChangePrefix} from '../../utils/url-util';
+
+export {getChangePrefix};
 
 export interface FlowsState {
   isEnabled: boolean;
@@ -32,28 +43,10 @@
 
 export const SUBMIT_ACTION_NAME = 'submit';
 
-/**
- * Matches the base change path prefix up to the change number (e.g. `/c/project/+/123`),
- * ignoring any trailing patchsets, diff ranges, comment IDs, or file paths.
- *
- * @see RoutePattern.CHANGE in `gr-router.ts` for corresponding route pattern.
- */
-const CHANGE_PREFIX_PATTERN = /^(.*?\/(?:c\/.+?\/\+)\/\d+)/;
-
 export function getSubmitCondition() {
   return getChangePrefix() + ' is is:submittable';
 }
 
-/**
- * Returns the change URL prefix (e.g. `http://host/c/project/+/123`), stripping
- * patchset numbers, diff ranges, comment IDs, and file paths from pathname.
- */
-export function getChangePrefix() {
-  const match = window.location.pathname.match(CHANGE_PREFIX_PATTERN);
-  const pathname = match ? match[1] : window.location.pathname;
-  return window.location.origin + pathname;
-}
-
 export class FlowsModel extends Model<FlowsState> {
   readonly flows$ = this.state$.pipe(map(s => s.flows));
 
@@ -83,6 +76,8 @@
 
   private changeNum?: NumericChangeId;
 
+  private enabledResolvedChangeNum?: NumericChangeId;
+
   private readonly restApiService = getAppContext().restApiService;
 
   constructor(
@@ -97,8 +92,16 @@
       autosubmitProviders: [],
     });
 
+    this.subscriptions.push(
+      this.changeModel.changeNum$.subscribe(changeNum => {
+        this.changeNum = changeNum;
+      })
+    );
+
     this.enabled$ = this.changeModel.changeNum$.pipe(
       switchMap(changeNum => {
+        this.changeNum = changeNum;
+        this.enabledResolvedChangeNum = undefined;
         if (!changeNum) {
           return of(false);
         }
@@ -112,7 +115,10 @@
           this.restApiService.getIfFlowsIsEnabled(changeNum, errFn)
         ).pipe(
           map(res => res?.enabled ?? false),
-          catchError(() => of(false))
+          catchError(() => of(false)),
+          tap(() => {
+            this.enabledResolvedChangeNum = changeNum;
+          })
         );
       }),
       shareReplay(1)
@@ -125,12 +131,6 @@
     );
 
     this.subscriptions.push(
-      this.changeModel.changeNum$.subscribe(changeNum => {
-        this.changeNum = changeNum;
-      })
-    );
-
-    this.subscriptions.push(
       combineLatest([this.changeModel.changeNum$, this.reload$, this.enabled$])
         .pipe(
           switchMap(([changeNum, _, enabled]) => {
@@ -176,11 +176,55 @@
     this.reload$.next();
   }
 
-  async deleteFlow(flowId: string) {
-    if (!this.changeNum) return;
-    if (!this.getState().isEnabled) return;
-    await this.restApiService.deleteFlow(this.changeNum, flowId);
-    this.reload();
+  private isFlowsEnabled(): Promise<boolean> {
+    if (
+      this.changeNum !== undefined &&
+      this.enabledResolvedChangeNum === this.changeNum
+    ) {
+      return Promise.resolve(this.getState().isEnabled);
+    }
+    return new Promise(resolve => {
+      this.enabled$
+        .pipe(
+          filter(() => this.enabledResolvedChangeNum === this.changeNum),
+          take(1)
+        )
+        .subscribe(enabled => resolve(enabled));
+    });
+  }
+
+  async deleteFlow(
+    flowId: string,
+    errFn?: ErrorCallback,
+    reload = true
+  ): Promise<void> {
+    const changeNum = this.changeNum;
+    if (
+      !changeNum ||
+      !(await this.isFlowsEnabled()) ||
+      this.changeNum !== changeNum
+    ) {
+      if (errFn) {
+        await errFn(null, new Error('Flows are not enabled for this change'));
+      }
+      return;
+    }
+    const response = await this.restApiService.deleteFlow(
+      changeNum,
+      flowId,
+      errFn
+    );
+    if (!response.ok) {
+      if (errFn) {
+        await errFn(response);
+      } else {
+        fireServerError(response);
+      }
+      return;
+    }
+    if (reload) {
+      this.reload();
+    }
   }
 
   hasAutosubmitFlowAlready() {
@@ -223,10 +267,30 @@
     this.reload();
   }
 
-  async createFlow(flowInput: FlowInput, errFn?: ErrorCallback) {
-    if (!this.changeNum) return;
-    if (!this.getState().isEnabled) return;
-    await this.restApiService.createFlow(this.changeNum, flowInput, errFn);
-    this.reload();
+  async createFlow(
+    flowInput: FlowInput,
+    errFn?: ErrorCallback,
+    reload = true
+  ): Promise<FlowInfo | undefined> {
+    const changeNum = this.changeNum;
+    if (
+      !changeNum ||
+      !(await this.isFlowsEnabled()) ||
+      this.changeNum !== changeNum
+    ) {
+      if (errFn) {
+        await errFn(null, new Error('Flows are not enabled for this change'));
+      }
+      return undefined;
+    }
+    const created = await this.restApiService.createFlow(
+      changeNum,
+      flowInput,
+      errFn
+    );
+    if (created && reload) {
+      this.reload();
+    }
+    return created;
   }
 }
diff --git a/polygerrit-ui/app/models/flows/flows-model_test.ts b/polygerrit-ui/app/models/flows/flows-model_test.ts
index 18c9538..a0a68b6 100644
--- a/polygerrit-ui/app/models/flows/flows-model_test.ts
+++ b/polygerrit-ui/app/models/flows/flows-model_test.ts
@@ -48,7 +48,7 @@
 
     assert.equal(flows.length, 1);
     assert.equal(flows[0].uuid, 'flow1');
-    assert.isTrue(listFlowsStub.calledWith(123 as NumericChangeId));
+    assert.isTrue(listFlowsStub.calledWith(123));
   });
 
   test('deleteFlow calls API and reloads', async () => {
@@ -65,7 +65,7 @@
 
     await flowsModel.deleteFlow('flow1');
 
-    assert.isTrue(deleteFlowStub.calledWith(123 as NumericChangeId, 'flow1'));
+    assert.isTrue(deleteFlowStub.calledWith(123, 'flow1'));
     assert.isTrue(reloadSpy.called);
   });
 
@@ -84,12 +84,138 @@
     await waitUntil(() => flowsModel.getState().isEnabled);
 
     const flowInput = {stage_expressions: []};
-    await flowsModel.createFlow(flowInput);
+    const created = await flowsModel.createFlow(flowInput);
 
-    assert.isTrue(createFlowStub.calledWith(123 as NumericChangeId, flowInput));
+    assert.isTrue(createFlowStub.calledWith(123, flowInput));
+    assert.equal(created?.uuid, 'new-flow');
     assert.isTrue(reloadSpy.called);
   });
 
+  test('createFlow awaits enabled$ resolution and respects reload=false', async () => {
+    stubRestApi('getIfFlowsIsEnabled').resolves({enabled: true});
+    stubRestApi('listFlows').resolves([]);
+    const createFlowStub = stubRestApi('createFlow').resolves(
+      createFlow({uuid: 'new-flow', stages: []})
+    );
+    const reloadSpy = sinon.spy(flowsModel, 'reload');
+
+    changeModel.updateStateChange({
+      ...createParsedChange(),
+      _number: 123 as NumericChangeId,
+    });
+
+    const flowInput = {
+      stage_expressions: [
+        {
+          condition: 'wait 1d',
+          action: {name: 'add-reviewer', parameters: ['human@example.com']},
+        },
+      ],
+    };
+    const created = await flowsModel.createFlow(flowInput, undefined, false);
+
+    assert.equal(created?.uuid, 'new-flow');
+    assert.isFalse(reloadSpy.called);
+    assert.deepEqual(createFlowStub.firstCall.args[1], flowInput);
+  });
+
+  test('deleteFlow invokes errFn and skips reload on non-2xx response', async () => {
+    stubRestApi('getIfFlowsIsEnabled').resolves({enabled: true});
+    stubRestApi('listFlows').resolves([]);
+    stubRestApi('deleteFlow').resolves(
+      new Response('Not found', {status: 404})
+    );
+    const reloadSpy = sinon.spy(flowsModel, 'reload');
+    const errSpy = sinon.spy();
+
+    changeModel.updateStateChange({
+      ...createParsedChange(),
+      _number: 123 as NumericChangeId,
+    });
+
+    await flowsModel.deleteFlow('flow1', errSpy);
+
+    assert.isTrue(errSpy.calledOnce);
+    assert.isFalse(reloadSpy.called);
+  });
+
+  test('deleteFlow fires server-error and skips reload on non-2xx response when errFn is omitted', async () => {
+    stubRestApi('getIfFlowsIsEnabled').resolves({enabled: true});
+    stubRestApi('listFlows').resolves([]);
+    stubRestApi('deleteFlow').resolves(
+      new Response('Server error', {status: 500})
+    );
+    const reloadSpy = sinon.spy(flowsModel, 'reload');
+    const serverErrorStub = sinon.stub();
+    document.addEventListener('server-error', serverErrorStub);
+
+    try {
+      changeModel.updateStateChange({
+        ...createParsedChange(),
+        _number: 123 as NumericChangeId,
+      });
+
+      await flowsModel.deleteFlow('flow1');
+
+      assert.isTrue(serverErrorStub.calledOnce);
+      assert.isFalse(reloadSpy.called);
+    } finally {
+      document.removeEventListener('server-error', serverErrorStub);
+    }
+  });
+
+  test('createFlow resolves undefined if changeNum is cleared while enabled$ is pending', async () => {
+    stubRestApi('getIfFlowsIsEnabled').returns(new Promise(() => {}));
+    const createFlowStub = stubRestApi('createFlow');
+    const errSpy = sinon.spy();
+
+    changeModel.updateStateChange({
+      ...createParsedChange(),
+      _number: 123 as NumericChangeId,
+    });
+
+    const createPromise = flowsModel.createFlow(
+      {stage_expressions: []},
+      errSpy
+    );
+    changeModel.updateState({change: undefined});
+
+    const created = await createPromise;
+    assert.isUndefined(created);
+    assert.isTrue(errSpy.calledOnce);
+    assert.isFalse(createFlowStub.called);
+  });
+
+  test('createFlow does not reuse stale isEnabled from previous change', async () => {
+    stubRestApi('getIfFlowsIsEnabled').callsFake(changeNum =>
+      Promise.resolve({enabled: changeNum === (123 as NumericChangeId)})
+    );
+    stubRestApi('listFlows').resolves([]);
+    const createFlowStub = stubRestApi('createFlow');
+    const errSpy = sinon.spy();
+
+    changeModel.updateStateChange({
+      ...createParsedChange(),
+      _number: 123 as NumericChangeId,
+    });
+    await waitUntil(() => flowsModel.getState().isEnabled);
+
+    changeModel.updateState({
+      change: {
+        ...createParsedChange(),
+        _number: 456 as NumericChangeId,
+      },
+    });
+
+    const created = await flowsModel.createFlow(
+      {stage_expressions: []},
+      errSpy
+    );
+    assert.isUndefined(created);
+    assert.isTrue(errSpy.calledOnce);
+    assert.isFalse(createFlowStub.called);
+  });
+
   test('createAutosubmitFlow uses default values', async () => {
     stubRestApi('getIfFlowsIsEnabled').resolves({enabled: true});
     stubRestApi('listFlows').resolves([]);
diff --git a/polygerrit-ui/app/models/plugins/plugins-model.ts b/polygerrit-ui/app/models/plugins/plugins-model.ts
index 198ab2b..65f840f 100644
--- a/polygerrit-ui/app/models/plugins/plugins-model.ts
+++ b/polygerrit-ui/app/models/plugins/plugins-model.ts
@@ -207,7 +207,7 @@
     }
     this.updateState({
       [key]: [...list, plugin],
-    } as unknown as Partial<PluginsState>);
+    });
   }
 
   coverageRegister(plugin: CoveragePlugin) {
diff --git a/polygerrit-ui/app/models/user/user-model.ts b/polygerrit-ui/app/models/user/user-model.ts
index cc157ea..dc84931 100644
--- a/polygerrit-ui/app/models/user/user-model.ts
+++ b/polygerrit-ui/app/models/user/user-model.ts
@@ -145,7 +145,7 @@
 
   readonly preferenceTheme$: Observable<AppTheme> = select(
     this.preferences$,
-    preference => preference.theme
+    preference => preference.theme ?? AppTheme.AUTO
   );
 
   readonly myMenuItems$: Observable<TopMenuItemInfo[]> = select(
diff --git a/polygerrit-ui/app/models/views/change_test.ts b/polygerrit-ui/app/models/views/change_test.ts
index b6bf7c3..88c1854 100644
--- a/polygerrit-ui/app/models/views/change_test.ts
+++ b/polygerrit-ui/app/models/views/change_test.ts
@@ -198,7 +198,7 @@
     const params: ChangeViewState = {
       ...createEditViewState(),
       patchNum: 12 as RevisionPatchSetNum,
-      editView: {path: 'x+y/path.cpp' as RepoName, lineNum: 31},
+      editView: {path: 'x+y/path.cpp', lineNum: 31},
     };
     assert.equal(
       createEditUrl(params),
diff --git a/polygerrit-ui/app/node_modules_licenses/tsconfig.json b/polygerrit-ui/app/node_modules_licenses/tsconfig.json
index eb5ee35..4bece27 100644
--- a/polygerrit-ui/app/node_modules_licenses/tsconfig.json
+++ b/polygerrit-ui/app/node_modules_licenses/tsconfig.json
@@ -5,7 +5,7 @@
     "allowSyntheticDefaultImports": true,
     "esModuleInterop": true,
     "strict": true,
-    "moduleResolution": "node",
+    "moduleResolution": "bundler",
     "types": ["node"],
     "typeRoots": [
       "../../../tools/node_tools/node_modules/@types",
diff --git a/polygerrit-ui/app/package.json b/polygerrit-ui/app/package.json
index babc44f..fb3b505 100644
--- a/polygerrit-ui/app/package.json
+++ b/polygerrit-ui/app/package.json
@@ -11,7 +11,7 @@
     "highlight.js": "^11.12.0",
     "highlightjs-closure-templates": "https://github.com/highlightjs/highlightjs-closure-templates#02fb0646e0499084f96a99b8c6f4a0d7bd1d33ba",
     "highlightjs-epp": "https://github.com/highlightjs/highlightjs-epp#9f9e1a92f37c217c68899c7d3bdccb4d134681b9",
-    "highlightjs-structured-text": "https://github.com/highlightjs/highlightjs-structured-text#e68dd7aa829529fb6c40d6287585f43273605a9e",
+    "highlightjs-structured-text": "https://github.com/highlightjs/highlightjs-structured-text#57840b0a43d930c03706e7291e3aeef9e620694d",
     "highlightjs-ttcn3": "https://gitea.osmocom.org/ttcn3/highlightjs-ttcn3.git#6daccff309fca1e7561a43984d42fa4f829ce06d",
     "highlightjs-vue": "https://github.com/paladox/highlightjs-vue#44eed074ea0110d1ad03d2cbd77d27027cf7bb04",
     "immer": "^9.0.21",
diff --git a/polygerrit-ui/app/pnpm-lock.yaml b/polygerrit-ui/app/pnpm-lock.yaml
index 132bf37..5e3d410 100644
--- a/polygerrit-ui/app/pnpm-lock.yaml
+++ b/polygerrit-ui/app/pnpm-lock.yaml
@@ -33,8 +33,8 @@
         specifier: https://github.com/highlightjs/highlightjs-epp#9f9e1a92f37c217c68899c7d3bdccb4d134681b9
         version: https://codeload.github.com/highlightjs/highlightjs-epp/tar.gz/9f9e1a92f37c217c68899c7d3bdccb4d134681b9
       highlightjs-structured-text:
-        specifier: https://github.com/highlightjs/highlightjs-structured-text#e68dd7aa829529fb6c40d6287585f43273605a9e
-        version: https://codeload.github.com/highlightjs/highlightjs-structured-text/tar.gz/e68dd7aa829529fb6c40d6287585f43273605a9e
+        specifier: https://github.com/highlightjs/highlightjs-structured-text#57840b0a43d930c03706e7291e3aeef9e620694d
+        version: https://codeload.github.com/highlightjs/highlightjs-structured-text/tar.gz/57840b0a43d930c03706e7291e3aeef9e620694d
       highlightjs-ttcn3:
         specifier: https://gitea.osmocom.org/ttcn3/highlightjs-ttcn3.git#6daccff309fca1e7561a43984d42fa4f829ce06d
         version: git+https://gitea.osmocom.org/ttcn3/highlightjs-ttcn3.git#6daccff309fca1e7561a43984d42fa4f829ce06d
@@ -133,31 +133,28 @@
   github-from-package@0.0.0:
     resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==}
 
-  highlight.js@10.7.3:
-    resolution: {integrity: sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==}
-
   highlight.js@11.12.0:
     resolution: {integrity: sha512-nbfWpyRMcMrPMmDwJB+dhX/eiaPKtc2RB+0QZskqJ3WjRA/FDS0e9hZrx8EC/lbEv8gXy98FcDbNa/dspAaJMg==}
     engines: {node: '>=12.0.0'}
 
   highlightjs-closure-templates@https://codeload.github.com/highlightjs/highlightjs-closure-templates/tar.gz/02fb0646e0499084f96a99b8c6f4a0d7bd1d33ba:
-    resolution: {gitHosted: true, tarball: https://codeload.github.com/highlightjs/highlightjs-closure-templates/tar.gz/02fb0646e0499084f96a99b8c6f4a0d7bd1d33ba}
+    resolution: {gitHosted: true, integrity: sha512-uuzC6YEn+bxVn4snt8UlIMBwASpoMccaHz/vjrfeP3kQcwiPyWBXWDNmbwv/zr3dpbKghy9vAR9mVGH+cMeZuQ==, tarball: https://codeload.github.com/highlightjs/highlightjs-closure-templates/tar.gz/02fb0646e0499084f96a99b8c6f4a0d7bd1d33ba}
     version: 0.0.1
 
   highlightjs-epp@https://codeload.github.com/highlightjs/highlightjs-epp/tar.gz/9f9e1a92f37c217c68899c7d3bdccb4d134681b9:
-    resolution: {gitHosted: true, tarball: https://codeload.github.com/highlightjs/highlightjs-epp/tar.gz/9f9e1a92f37c217c68899c7d3bdccb4d134681b9}
+    resolution: {gitHosted: true, integrity: sha512-Fppp0fjT5RF5qBCGjG4K8Ek/s7nST54urCDmKtwaL9Q9S9TX6hZuReSCvIXsWk3aA1SUppuQv7SNC2s5OMaWLQ==, tarball: https://codeload.github.com/highlightjs/highlightjs-epp/tar.gz/9f9e1a92f37c217c68899c7d3bdccb4d134681b9}
     version: 0.0.1
 
-  highlightjs-structured-text@https://codeload.github.com/highlightjs/highlightjs-structured-text/tar.gz/e68dd7aa829529fb6c40d6287585f43273605a9e:
-    resolution: {gitHosted: true, tarball: https://codeload.github.com/highlightjs/highlightjs-structured-text/tar.gz/e68dd7aa829529fb6c40d6287585f43273605a9e}
-    version: 1.4.9
+  highlightjs-structured-text@https://codeload.github.com/highlightjs/highlightjs-structured-text/tar.gz/57840b0a43d930c03706e7291e3aeef9e620694d:
+    resolution: {gitHosted: true, integrity: sha512-lOSclLrSrfDmMq2vqOpBPSJzofwL2pRWZlesAZYa93awpsgxdQ2Lq7wYXla0M8hNF7fMFPqtNRlUBEAHuWuqeQ==, tarball: https://codeload.github.com/highlightjs/highlightjs-structured-text/tar.gz/57840b0a43d930c03706e7291e3aeef9e620694d}
+    version: 1.7.11
 
   highlightjs-ttcn3@git+https://gitea.osmocom.org/ttcn3/highlightjs-ttcn3.git#6daccff309fca1e7561a43984d42fa4f829ce06d:
     resolution: {commit: 6daccff309fca1e7561a43984d42fa4f829ce06d, repo: https://gitea.osmocom.org/ttcn3/highlightjs-ttcn3.git, type: git}
     version: 0.0.1
 
   highlightjs-vue@https://codeload.github.com/paladox/highlightjs-vue/tar.gz/44eed074ea0110d1ad03d2cbd77d27027cf7bb04:
-    resolution: {gitHosted: true, tarball: https://codeload.github.com/paladox/highlightjs-vue/tar.gz/44eed074ea0110d1ad03d2cbd77d27027cf7bb04}
+    resolution: {gitHosted: true, integrity: sha512-EP10oSEj567TL2gdVZBJcS8jxuFepAVwYfCpunj3B/le7c+klWxWLfToDrKA89c0i0pi72hwaQai/9Q/yfCTzQ==, tarball: https://codeload.github.com/paladox/highlightjs-vue/tar.gz/44eed074ea0110d1ad03d2cbd77d27027cf7bb04}
     version: 1.1.0
 
   ieee754@1.2.1:
@@ -227,7 +224,7 @@
     engines: {node: '>= 6'}
 
   resemblejs@https://codeload.github.com/rsmbl/Resemble.js/tar.gz/66a55c5bfc3bda2303ad632ee8ce3c727b415917:
-    resolution: {gitHosted: true, tarball: https://codeload.github.com/rsmbl/Resemble.js/tar.gz/66a55c5bfc3bda2303ad632ee8ce3c727b415917}
+    resolution: {gitHosted: true, integrity: sha512-pxgL9g63z/sDRcMRItA8lklYJX8hmjuPKvdXZEqyyTVc0Fu5l60HvT8eeJW35XtK/Wf79uqPc9IVFLipXDWQyQ==, tarball: https://codeload.github.com/rsmbl/Resemble.js/tar.gz/66a55c5bfc3bda2303ad632ee8ce3c727b415917}
     version: 5.0.0
 
   rxjs@6.6.7:
@@ -361,8 +358,6 @@
   github-from-package@0.0.0:
     optional: true
 
-  highlight.js@10.7.3: {}
-
   highlight.js@11.12.0: {}
 
   highlightjs-closure-templates@https://codeload.github.com/highlightjs/highlightjs-closure-templates/tar.gz/02fb0646e0499084f96a99b8c6f4a0d7bd1d33ba:
@@ -373,9 +368,9 @@
     dependencies:
       highlight.js: 11.12.0
 
-  highlightjs-structured-text@https://codeload.github.com/highlightjs/highlightjs-structured-text/tar.gz/e68dd7aa829529fb6c40d6287585f43273605a9e:
+  highlightjs-structured-text@https://codeload.github.com/highlightjs/highlightjs-structured-text/tar.gz/57840b0a43d930c03706e7291e3aeef9e620694d:
     dependencies:
-      highlight.js: 10.7.3
+      highlight.js: 11.12.0
 
   highlightjs-ttcn3@git+https://gitea.osmocom.org/ttcn3/highlightjs-ttcn3.git#6daccff309fca1e7561a43984d42fa4f829ce06d:
     dependencies:
diff --git a/polygerrit-ui/app/services/app-context-init.ts b/polygerrit-ui/app/services/app-context-init.ts
index 5237688..d92daf2 100644
--- a/polygerrit-ui/app/services/app-context-init.ts
+++ b/polygerrit-ui/app/services/app-context-init.ts
@@ -207,7 +207,8 @@
       () =>
         new PluginLoader(
           appContext.reportingService,
-          appContext.restApiService
+          appContext.restApiService,
+          () => resolver(flowsModelToken)
         ),
     ],
     [
diff --git a/polygerrit-ui/app/services/gr-rest-api/gr-rest-api-impl.ts b/polygerrit-ui/app/services/gr-rest-api/gr-rest-api-impl.ts
index 1cb848b..09881fa 100644
--- a/polygerrit-ui/app/services/gr-rest-api/gr-rest-api-impl.ts
+++ b/polygerrit-ui/app/services/gr-rest-api/gr-rest-api-impl.ts
@@ -33,6 +33,7 @@
   ChangeId,
   ChangeInfo,
   ChangeMessageId,
+  ChangePermissionsInfo,
   ChangeViewChangeInfo,
   CommentInfo,
   CommentInput,
@@ -87,6 +88,7 @@
   ProjectInfoWithName,
   ProjectInput,
   ProjectWatchInfo,
+  RefStorage,
   RelatedChangesInfo,
   RepoAccessInfoMap,
   RepoName,
@@ -326,6 +328,18 @@
     }) as Promise<ValidationOptionsInfo | undefined>;
   }
 
+  getChangePermissions(
+    changeNum: NumericChangeId
+  ): Promise<ChangePermissionsInfo | undefined> {
+    return this._restApiHelper.fetchJSON({
+      url: `/changes/${changeNum}/permissions`,
+      anonymizedUrl: '/changes/*/permissions',
+      // Best-effort: on failure keep the AI review controls hidden and
+      // don't raise a global error.
+      errFn: () => {},
+    }) as Promise<ChangePermissionsInfo | undefined>;
+  }
+
   getRepo(
     repo: RepoName,
     errFn?: ErrorCallback
@@ -352,7 +366,7 @@
     return this._restApiHelper.fetchCacheJSON({
       url: '/access/?project=' + encodeURIComponent(repo),
       anonymizedUrl: '/access/?project=*',
-    }) as Promise<RepoAccessInfoMap | undefined>;
+    });
   }
 
   getRepoDashboards(
@@ -786,6 +800,9 @@
       errFn: resp => {
         if (!resp || resp.status === 403) {
           this._cache.delete('/accounts/self/detail');
+          this._cache.delete('/accounts/self/preferences');
+          this._cache.delete('/accounts/self/preferences.diff');
+          this._cache.delete('/accounts/self/preferences.edit');
         }
       },
     }) as Promise<AccountDetailInfo | undefined>;
@@ -978,6 +995,7 @@
     let newName = undefined;
     // If the name was deleted server returns 204
     if (response.status !== 204) {
+      // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
       newName = (await readJSONResponsePayload(response))
         .parsed as unknown as string;
     }
@@ -999,6 +1017,7 @@
     let newName = undefined;
     // If the name was deleted server returns 204
     if (response.status !== 204) {
+      // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
       newName = (await readJSONResponsePayload(response))
         .parsed as unknown as string;
     }
@@ -1021,6 +1040,7 @@
     let newName = undefined;
     // If the name was deleted server returns 204
     if (response.status !== 204) {
+      // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
       newName = (await readJSONResponsePayload(response))
         .parsed as unknown as string;
     }
@@ -1042,6 +1062,7 @@
     let newStatus = undefined;
     // If the status was deleted server returns 204
     if (response.status !== 204) {
+      // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
       newStatus = (await readJSONResponsePayload(response))
         .parsed as unknown as string;
     }
@@ -1122,6 +1143,15 @@
   }
 
   getPreferences(): Promise<PreferencesInfo | undefined> {
+    if (
+      this._cache.has('/accounts/self/preferences') &&
+      this._cache.has('/accounts/self/detail')
+    ) {
+      return this._restApiHelper.fetchCacheJSON({
+        url: '/accounts/self/preferences',
+        reportUrlAsIs: true,
+      }) as unknown as Promise<PreferencesInfo | undefined>;
+    }
     return this.getLoggedIn().then(loggedIn => {
       if (loggedIn) {
         const req = {url: '/accounts/self/preferences', reportUrlAsIs: true};
@@ -1385,7 +1415,7 @@
     const config = await this.getConfig(false);
 
     // This list MUST be kept in sync with
-    // ChangeIT#changeDetailsDoesNotRequireIndex and IndexPreloadingUtil#CHANGE_DETAIL_OPTIONS
+    // ChangeIT#changeDetailsDoesNotRequireIndex and IndexPreloadingUtil#CHANGE_DETAIL_OPTIONS_WITHOUT_PARENTS
     const options = [
       ListChangesOption.ALL_COMMITS,
       ListChangesOption.ALL_REVISIONS,
@@ -1397,7 +1427,6 @@
       ListChangesOption.REVIEWER_UPDATES,
       ListChangesOption.WEB_LINKS,
       ListChangesOption.SKIP_DIFFSTAT,
-      ListChangesOption.PARENTS,
     ];
     if (config?.receive?.enable_signed_push) {
       options.push(ListChangesOption.PUSH_CERTIFICATES);
@@ -1510,7 +1539,7 @@
       url: `${url}/files`,
       params,
       anonymizedUrl: `${ANONYMIZED_REVISION_BASE_URL}/files`,
-    }) as Promise<FileNameToFileInfoMap | undefined>;
+    });
   }
 
   async getChangeEditFiles(
@@ -1568,7 +1597,7 @@
     return this._restApiHelper.fetchJSON({
       url: `${url}/actions`,
       anonymizedUrl: `${ANONYMIZED_REVISION_BASE_URL}/actions`,
-    }) as Promise<ActionNameToActionInfoMap | undefined>;
+    });
   }
 
   getChangeSuggestedReviewers(
@@ -1757,6 +1786,25 @@
     });
   }
 
+  convertRepoRefStorage(
+    repo: RepoName,
+    refStorage: RefStorage,
+    backup: boolean
+  ) {
+    // Invalidate the cached project config so the reload after a conversion
+    // reflects the new ref storage format.
+    this._cache.delete(`/projects/${encodeURIComponent(repo)}/config`);
+    return this._restApiHelper.fetch({
+      fetchOptions: getFetchOptions({
+        method: HttpMethod.POST,
+        body: {ref_storage: refStorage, backup},
+      }),
+      url: `/projects/${encodeURIComponent(repo)}/convert-ref-storage`,
+      anonymizedUrl: '/projects/*/convert-ref-storage',
+      reportServerError: true,
+    });
+  }
+
   getRepoBranches(
     filter: string,
     repo: RepoName,
@@ -1789,7 +1837,7 @@
         'name-only': true,
       },
       anonymizedUrl: '/projects/*/commits/*/diff',
-    }) as Promise<FileNameToFileInfoMap | undefined>;
+    });
   }
 
   getProjectCommitFileDiff(
@@ -2099,7 +2147,7 @@
       params,
       reportUrlAsIs: true,
       errFn,
-    }) as Promise<GroupNameToGroupInfoMap | undefined>;
+    });
   }
 
   getSuggestedRepos(
@@ -3102,12 +3150,23 @@
     return promises && promises.length;
   }
 
-  awaitPendingDiffDrafts(): Promise<void> {
-    return Promise.all(
-      this._pendingRequests[Requests.SEND_DIFF_DRAFT] || []
-    ).then(() => {
-      this._pendingRequests[Requests.SEND_DIFF_DRAFT] = [];
-    });
+  /**
+   * Resolves once all diff draft requests have settled, including ones sent
+   * while waiting. Never rejects: failed requests are already reported by the
+   * REST helper, and must be dropped so they do not block later callers.
+   */
+  async awaitPendingDiffDrafts(): Promise<void> {
+    // Copy: the live array may grow while awaiting.
+    let awaited = [...(this._pendingRequests[Requests.SEND_DIFF_DRAFT] ?? [])];
+    while (awaited.length > 0) {
+      await Promise.allSettled(awaited);
+      const settled = new Set(awaited);
+      const remaining = (
+        this._pendingRequests[Requests.SEND_DIFF_DRAFT] ?? []
+      ).filter(p => !settled.has(p));
+      this._pendingRequests[Requests.SEND_DIFF_DRAFT] = remaining;
+      awaited = [...remaining];
+    }
   }
 
   _sendDiffDraftRequest(
@@ -3516,7 +3575,7 @@
       url: '/config/server/capabilities',
       errFn,
       reportUrlAsIs: true,
-    }) as Promise<CapabilityInfoMap | undefined>;
+    });
   }
 
   getTopMenus(): Promise<TopMenuEntryInfo[] | undefined> {
diff --git a/polygerrit-ui/app/services/gr-rest-api/gr-rest-api-impl_test.ts b/polygerrit-ui/app/services/gr-rest-api/gr-rest-api-impl_test.ts
index 5f98513..ed1e2be 100644
--- a/polygerrit-ui/app/services/gr-rest-api/gr-rest-api-impl_test.ts
+++ b/polygerrit-ui/app/services/gr-rest-api/gr-rest-api-impl_test.ts
@@ -33,7 +33,7 @@
   createDefaultEditPrefs,
   HttpMethod,
 } from '../../constants/constants';
-import {FlowInput} from '../../api/rest-api';
+import {FlowInput, RefStorage} from '../../api/rest-api';
 import {
   AccountDetailInfo,
   BasePatchSetNum,
@@ -356,6 +356,17 @@
     assert.equal(params?.['context-padding'], 3);
   });
 
+  test('getChangePermissions suppresses errors', async () => {
+    const res403 = new Response(undefined, {status: 403});
+    const spy = sinon.spy();
+    addListenerForTest(document, 'server-error', spy);
+    sinon.stub(authService, 'fetch').resolves(res403);
+    const result = await element.getChangePermissions(1 as NumericChangeId);
+    await waitEventLoop();
+    assert.isUndefined(result);
+    assert.isFalse(spy.called);
+  });
+
   test('legacy n,z key in change url is replaced', async () => {
     const stub = sinon
       .stub(element._restApiHelper, 'fetchJSON')
@@ -376,6 +387,43 @@
     assert.isFalse(element._cache.has(cacheKey));
   });
 
+  test('convertRepoRefStorage invalidates project config cache', () => {
+    const cacheKey = '/projects/test-repo/config';
+    const fetchStub = sinon.stub(element._restApiHelper, 'fetch');
+    element._cache.set(cacheKey, {
+      ref_storage: RefStorage.FILES,
+    } as unknown as ParsedJSON);
+    element.convertRepoRefStorage(
+      'test-repo' as RepoName,
+      RefStorage.REFTABLE,
+      false
+    );
+    assert.isTrue(fetchStub.called);
+    assert.isFalse(element._cache.has(cacheKey));
+  });
+
+  test('convertRepoRefStorage forwards the backup flag', () => {
+    const fetchStub = sinon.stub(element._restApiHelper, 'fetch');
+    element.convertRepoRefStorage(
+      'test-repo' as RepoName,
+      RefStorage.REFTABLE,
+      false
+    );
+    assert.deepEqual(
+      JSON.parse(fetchStub.lastCall.args[0].fetchOptions?.body as string),
+      {ref_storage: RefStorage.REFTABLE, backup: false}
+    );
+    element.convertRepoRefStorage(
+      'test-repo' as RepoName,
+      RefStorage.FILES,
+      true
+    );
+    assert.deepEqual(
+      JSON.parse(fetchStub.lastCall.args[0].fetchOptions?.body as string),
+      {ref_storage: RefStorage.FILES, backup: true}
+    );
+  });
+
   suite('queryAccounts', () => {
     let fetchStub: sinon.SinonStub;
     const testProject = 'testproject';
@@ -911,6 +959,92 @@
       );
     });
 
+    test('awaitPendingDiffDrafts awaits drafts sent while waiting', async () => {
+      const obj = element._pendingRequests;
+      const responses: MockPromise<Response>[] = [];
+      sinon.stub(element, '_changeBaseURL').resolves('/changes/123/1');
+      sinon.stub(element._restApiHelper, 'fetch').callsFake(() => {
+        responses.push(mockPromise<Response>());
+        return responses[responses.length - 1];
+      });
+      const draft: CommentInput = {
+        id: 'draft-id' as UrlEncodedCommentId,
+        message: 'draft message',
+      };
+
+      element._sendDiffDraftRequest(
+        HttpMethod.PUT,
+        123 as NumericChangeId,
+        1 as PatchSetNum,
+        draft
+      );
+      let awaited = false;
+      const awaitPromise = element.awaitPendingDiffDrafts().then(() => {
+        awaited = true;
+      });
+
+      // A second draft is sent while the first one is still in flight.
+      element._sendDiffDraftRequest(
+        HttpMethod.PUT,
+        123 as NumericChangeId,
+        1 as PatchSetNum,
+        draft
+      );
+      await waitEventLoop();
+      assert.equal(responses.length, 2);
+
+      responses[0].resolve(new Response(undefined, {status: 200}));
+      await waitEventLoop();
+      assert.isFalse(awaited);
+      assert.equal(obj.sendDiffDraft.length, 1);
+
+      responses[1].resolve(new Response(undefined, {status: 200}));
+      await awaitPromise;
+      assert.isTrue(awaited);
+      assert.equal(obj.sendDiffDraft.length, 0);
+    });
+
+    test('awaitPendingDiffDrafts resolves and clears failed drafts', async () => {
+      const obj = element._pendingRequests;
+      const responses: MockPromise<Response>[] = [];
+      sinon.stub(element, '_changeBaseURL').resolves('/changes/123/1');
+      sinon.stub(element._restApiHelper, 'fetch').callsFake(() => {
+        responses.push(mockPromise<Response>());
+        return responses[responses.length - 1];
+      });
+      const draft: CommentInput = {
+        id: 'draft-id' as UrlEncodedCommentId,
+        message: 'draft message',
+      };
+
+      const failedDraft = element
+        ._sendDiffDraftRequest(
+          HttpMethod.PUT,
+          123 as NumericChangeId,
+          1 as PatchSetNum,
+          draft
+        )
+        .catch(() => {});
+      element._sendDiffDraftRequest(
+        HttpMethod.PUT,
+        123 as NumericChangeId,
+        1 as PatchSetNum,
+        draft
+      );
+      await waitEventLoop();
+      assert.equal(responses.length, 2);
+
+      const awaitPromise = element.awaitPendingDiffDrafts();
+      responses[0].reject(new Error('network error'));
+      await failedDraft;
+      responses[1].resolve(new Response(undefined, {status: 200}));
+
+      await awaitPromise;
+      assert.equal(obj.sendDiffDraft.length, 0);
+      // A later call must not be wedged by the earlier failure.
+      await element.awaitPendingDiffDrafts();
+    });
+
     suite('_failForCreate200', () => {
       test('_sendDiffDraftRequest checks for 200 on create', async () => {
         element.addRepoNameToCache(123 as NumericChangeId, TEST_PROJECT_NAME);
@@ -1394,7 +1528,7 @@
       test('signed pushes disabled', async () => {
         getConfigStub.resolves({
           ...createServerInfo(),
-          receive: {enable_signed_push: undefined},
+          receive: {enable_signed_push: false},
         });
         const change = await element.getChangeDetail(123 as NumericChangeId);
         assert.strictEqual(123, change!._number);
@@ -1402,12 +1536,15 @@
         assert.isNotOk(
           parseInt(options, 16) & (1 << ListChangesOption.PUSH_CERTIFICATES)
         );
+        assert.isNotOk(
+          parseInt(options, 16) & (1 << ListChangesOption.PARENTS)
+        );
       });
 
       test('signed pushes enabled', async () => {
         getConfigStub.resolves({
           ...createServerInfo(),
-          receive: {enable_signed_push: 'true'},
+          receive: {enable_signed_push: true},
         });
         const change = await element.getChangeDetail(123 as NumericChangeId);
         assert.strictEqual(123, change!._number);
diff --git a/polygerrit-ui/app/services/gr-rest-api/gr-rest-api.ts b/polygerrit-ui/app/services/gr-rest-api/gr-rest-api.ts
index 5bda207..fb416a7 100644
--- a/polygerrit-ui/app/services/gr-rest-api/gr-rest-api.ts
+++ b/polygerrit-ui/app/services/gr-rest-api/gr-rest-api.ts
@@ -23,6 +23,7 @@
   ChangeId,
   ChangeInfo,
   ChangeMessageId,
+  ChangePermissionsInfo,
   CommentInfo,
   CommentInput,
   CommitId,
@@ -71,6 +72,7 @@
   ProjectInfoWithName,
   ProjectInput,
   ProjectWatchInfo,
+  RefStorage,
   RelatedChangesInfo,
   RepoAccessInfoMap,
   RepoName,
@@ -755,6 +757,12 @@
   ): Promise<TagInfo[]>;
 
   setRepoHead(repo: RepoName, ref: GitRef): Promise<Response>;
+
+  convertRepoRefStorage(
+    repo: RepoName,
+    refStorage: RefStorage,
+    backup: boolean
+  ): Promise<Response>;
   deleteRepoTags(repo: RepoName, ref: GitRef): Promise<Response>;
   deleteRepoBranches(repo: RepoName, ref: GitRef): Promise<Response>;
   saveRepoConfig(repo: RepoName, config: ConfigInput): Promise<Response>;
@@ -976,6 +984,10 @@
     changeNum: NumericChangeId
   ): Promise<ValidationOptionsInfo | undefined>;
 
+  getChangePermissions(
+    changeNum: NumericChangeId
+  ): Promise<ChangePermissionsInfo | undefined>;
+
   getFlow(
     changeNum: NumericChangeId,
     flowId: string,
diff --git a/polygerrit-ui/app/services/suggestions/suggestions-service.ts b/polygerrit-ui/app/services/suggestions/suggestions-service.ts
index 45084f2..8867d73 100644
--- a/polygerrit-ui/app/services/suggestions/suggestions-service.ts
+++ b/polygerrit-ui/app/services/suggestions/suggestions-service.ts
@@ -24,6 +24,17 @@
   FIX_FOR_REVIEWER_COMMENT = 'FIX_FOR_REVIEWER_COMMENT',
 }
 
+export interface GenerateSuggestedFixData {
+  prompt: string;
+  patchsetNumber: RevisionPatchSetNum;
+  filePath: string;
+  range?: CommentRange;
+  lineNumber?: number;
+  generatedSuggestionId?: string;
+  commentId?: string;
+  reportSource?: ReportSource;
+}
+
 export interface SuggestionsService extends Finalizable {
   /**
    * Emits a boolean value whenever the enablement state of any suggestion
@@ -50,6 +61,15 @@
   isGeneratedSuggestedFixEnabledForComment(comment?: Comment): boolean;
 
   /**
+   * Checks if explicit "Get AI Fix" requests are enabled for the given path
+   * (via `requestAiFix` or fallback `suggestFix`).
+   * The enablement can change, so components should subscribe to
+   * `suggestionsServiceUpdated$` and call `this.requestUpdate()` to
+   * re-evaluate.
+   */
+  isRequestAiFixEnabled(path?: string): boolean;
+
+  /**
    * Generates a suggested fix.
    *
    * **Important:** This method should only be called if
@@ -58,16 +78,20 @@
    * `suggestionsServiceUpdated$` and call `this.requestUpdate()` when it
    * emits to ensure they only call this method when enabled.
    */
-  generateSuggestedFix(data: {
-    prompt: string;
-    patchsetNumber: RevisionPatchSetNum;
-    filePath: string;
-    range?: CommentRange;
-    lineNumber?: number;
-    generatedSuggestionId?: string;
-    commentId?: string;
-    reportSource?: ReportSource;
-  }): Promise<FixSuggestionInfo | undefined>;
+  generateSuggestedFix(
+    data: GenerateSuggestedFixData
+  ): Promise<FixSuggestionInfo | undefined>;
+
+  /**
+   * Requests an explicit "Get AI Fix" action (via `requestAiFix`, falling back
+   * to `suggestFix`) and shows a notification when no fix can be produced.
+   *
+   * **Important:** This method should only be called if
+   * `isRequestAiFixEnabled(data.filePath)` returns `true`.
+   */
+  requestAiFix(
+    data: GenerateSuggestedFixData
+  ): Promise<FixSuggestionInfo | undefined>;
 
   /**
    * Generates a suggested fix specifically for a comment.
diff --git a/polygerrit-ui/app/services/suggestions/suggestions-service_impl.ts b/polygerrit-ui/app/services/suggestions/suggestions-service_impl.ts
index 100a13e..eba42fc 100644
--- a/polygerrit-ui/app/services/suggestions/suggestions-service_impl.ts
+++ b/polygerrit-ui/app/services/suggestions/suggestions-service_impl.ts
@@ -6,26 +6,28 @@
 import {ReportingService} from '../gr-reporting/gr-reporting';
 import {
   AutocompleteCommentResponse,
+  ResponseCode,
+  SuggestCodeRequest,
+  SuggestedFixResponse,
   SuggestionsProvider,
 } from '../../api/suggestions';
 import {Interaction, Timing} from '../../constants/reporting';
-import {
-  ChangeInfo,
-  CommentRange,
-  CommentSide,
-  FixSuggestionInfo,
-  RevisionPatchSetNum,
-} from '../../api/rest-api';
+import {ChangeInfo, CommentSide, FixSuggestionInfo} from '../../api/rest-api';
 import {getFileExtension} from '../../utils/file-util';
 import {Comment} from '../../types/common';
 import {SpecialFilePath} from '../../constants/constants';
 import {hasUserSuggestion, isFileLevelComment} from '../../utils/comment-util';
 import {id} from '../../utils/comment-util';
 import {AutocompletionContext} from '../../utils/autocomplete-cache';
-import {ReportSource, SuggestionsService} from './suggestions-service';
+import {
+  GenerateSuggestedFixData,
+  ReportSource,
+  SuggestionsService,
+} from './suggestions-service';
 import {BehaviorSubject} from 'rxjs';
 import {PluginsModel} from '../../models/plugins/plugins-model';
 import {ChangeModel} from '../../models/change/change-model';
+import {fireAlert} from '../../utils/event-util';
 
 export class GrSuggestionsService implements SuggestionsService {
   private suggestionsProvider?: SuggestionsProvider;
@@ -52,7 +54,7 @@
 
   public suggestionsServiceUpdated$ = new BehaviorSubject<boolean>(false);
 
-  public isGeneratedSuggestedFixEnabled(path?: string): boolean {
+  private isPathSupportedForFix(path?: string): boolean {
     return (
       !!this.suggestionsProvider &&
       !!this.change &&
@@ -68,6 +70,12 @@
     );
   }
 
+  public isGeneratedSuggestedFixEnabled(path?: string): boolean {
+    return (
+      !!this.suggestionsProvider?.suggestFix && this.isPathSupportedForFix(path)
+    );
+  }
+
   public isGeneratedSuggestedFixEnabledForComment(comment?: Comment): boolean {
     return (
       this.isGeneratedSuggestedFixEnabled(comment?.path) &&
@@ -80,17 +88,21 @@
     );
   }
 
-  public async generateSuggestedFix(data: {
-    prompt: string;
-    patchsetNumber: RevisionPatchSetNum;
-    filePath: string;
-    range?: CommentRange;
-    lineNumber?: number;
-    generatedSuggestionId?: string;
-    commentId?: string;
-    reportSource?: ReportSource;
-  }): Promise<FixSuggestionInfo | undefined> {
-    if (!this.suggestionsProvider?.suggestFix || !this.change) return;
+  public isRequestAiFixEnabled(path?: string): boolean {
+    return (
+      !!(
+        this.suggestionsProvider?.requestAiFix ||
+        this.suggestionsProvider?.suggestFix
+      ) && this.isPathSupportedForFix(path)
+    );
+  }
+
+  private async fetchSuggestedFix(
+    data: GenerateSuggestedFixData,
+    generateFix: (request: SuggestCodeRequest) => Promise<SuggestedFixResponse>
+  ): Promise<SuggestedFixResponse | undefined> {
+    if (!this.suggestionsProvider || !this.change) return;
+
     this.reporting.reportInteraction(Interaction.GENERATE_SUGGESTION_REQUEST, {
       uuid: data.generatedSuggestionId,
       type: 'suggest-fix',
@@ -98,7 +110,7 @@
       source: data.reportSource,
       fileExtension: getFileExtension(data.filePath ?? ''),
     });
-    const suggestionResponse = await this.suggestionsProvider.suggestFix({
+    const suggestionResponse = await generateFix({
       prompt: data.prompt,
       changeInfo: this.change,
       patchsetNumber: data.patchsetNumber,
@@ -106,21 +118,58 @@
       range: data.range,
       lineNumber: data.lineNumber,
     });
-
     this.reporting.reportInteraction(Interaction.GENERATE_SUGGESTION_RESPONSE, {
       uuid: data.generatedSuggestionId,
       type: 'suggest-fix',
       commentId: data.commentId,
       source: data.reportSource,
-      response: suggestionResponse.responseCode,
-      numSuggestions: suggestionResponse.fix_suggestions.length,
+      response: suggestionResponse?.responseCode,
+      numSuggestions: suggestionResponse?.fix_suggestions?.length ?? 0,
       fileExtension: getFileExtension(data.filePath ?? ''),
-      logProbability: suggestionResponse.fix_suggestions?.[0]?.log_probability,
+      logProbability: suggestionResponse?.fix_suggestions?.[0]?.log_probability,
     });
+    return suggestionResponse;
+  }
 
-    const suggestion = suggestionResponse.fix_suggestions?.[0];
+  private getFirstValidSuggestion(
+    response?: SuggestedFixResponse
+  ): FixSuggestionInfo | undefined {
+    const suggestion = response?.fix_suggestions?.[0];
     if (!suggestion?.replacements || suggestion.replacements.length === 0) {
-      return;
+      return undefined;
+    }
+    return suggestion;
+  }
+
+  public async generateSuggestedFix(
+    data: GenerateSuggestedFixData
+  ): Promise<FixSuggestionInfo | undefined> {
+    const provider = this.suggestionsProvider;
+    const suggestFix = provider?.suggestFix;
+    if (!provider || !suggestFix) return;
+    const response = await this.fetchSuggestedFix(data, request =>
+      suggestFix.call(provider, request)
+    );
+    return this.getFirstValidSuggestion(response);
+  }
+
+  public async requestAiFix(
+    data: GenerateSuggestedFixData
+  ): Promise<FixSuggestionInfo | undefined> {
+    const provider = this.suggestionsProvider;
+    const generateFix = provider?.requestAiFix ?? provider?.suggestFix;
+    if (!provider || !generateFix) return;
+    const usedRequestAiFix = !!provider.requestAiFix;
+    const response = await this.fetchSuggestedFix(data, request =>
+      generateFix.call(provider, request)
+    );
+    if (!response) return;
+    const suggestion = this.getFirstValidSuggestion(response);
+    if (
+      !suggestion &&
+      (!usedRequestAiFix || response.responseCode !== ResponseCode.OK)
+    ) {
+      fireAlert(document, 'No suitable AI fix could be found');
     }
     return suggestion;
   }
diff --git a/polygerrit-ui/app/services/suggestions/suggestions-service_impl_test.ts b/polygerrit-ui/app/services/suggestions/suggestions-service_impl_test.ts
new file mode 100644
index 0000000..eacd788
--- /dev/null
+++ b/polygerrit-ui/app/services/suggestions/suggestions-service_impl_test.ts
@@ -0,0 +1,206 @@
+/**
+ * @license
+ * Copyright 2026 Google LLC
+ * SPDX-License-Identifier: Apache-2.0
+ */
+import * as sinon from 'sinon';
+import {assert} from '@open-wc/testing';
+import '../../test/common-test-setup';
+import {testResolver} from '../../test/common-test-setup';
+import {
+  createComment,
+  createFixSuggestionInfo,
+  createParsedChange,
+} from '../../test/test-data-generators';
+import {grReportingMock} from '../gr-reporting/gr-reporting_mock';
+import {PluginsModel} from '../../models/plugins/plugins-model';
+import {ChangeModel, changeModelToken} from '../../models/change/change-model';
+import {ResponseCode} from '../../api/suggestions';
+import {RevisionPatchSetNum} from '../../api/rest-api';
+import {GrSuggestionsService} from './suggestions-service_impl';
+
+suite('suggestions-service_impl tests', () => {
+  let pluginsModel: PluginsModel;
+  let changeModel: ChangeModel;
+  let service: GrSuggestionsService;
+  let alertListener: sinon.SinonSpy;
+
+  setup(() => {
+    pluginsModel = new PluginsModel();
+    changeModel = testResolver(changeModelToken);
+    changeModel.updateStateChange(createParsedChange());
+    service = new GrSuggestionsService(
+      grReportingMock,
+      pluginsModel,
+      changeModel
+    );
+    alertListener = sinon.spy();
+    document.addEventListener('show-alert', alertListener);
+  });
+
+  teardown(() => {
+    document.removeEventListener('show-alert', alertListener);
+    pluginsModel.finalize();
+    service.finalize();
+  });
+
+  test('enables Get AI Fix when plugin only implements requestAiFix', () => {
+    pluginsModel.suggestionsRegister({
+      pluginName: 'chat-only-plugin',
+      provider: {
+        requestAiFix: async () => {
+          return {responseCode: ResponseCode.OK, fix_suggestions: []};
+        },
+      },
+    });
+    const comment = {...createComment(), path: 'src/foo.ts', line: 10};
+
+    assert.isFalse(service.isGeneratedSuggestedFixEnabled('src/foo.ts'));
+    assert.isFalse(service.isGeneratedSuggestedFixEnabledForComment(comment));
+    assert.isTrue(service.isRequestAiFixEnabled('src/foo.ts'));
+  });
+
+  test('enables both inline fixes and Get AI Fix when plugin implements suggestFix', () => {
+    pluginsModel.suggestionsRegister({
+      pluginName: 'inline-only-plugin',
+      provider: {
+        suggestFix: async () => {
+          return {responseCode: ResponseCode.OK, fix_suggestions: []};
+        },
+      },
+    });
+    const comment = {...createComment(), path: 'src/foo.ts', line: 10};
+
+    assert.isTrue(service.isGeneratedSuggestedFixEnabled('src/foo.ts'));
+    assert.isTrue(service.isGeneratedSuggestedFixEnabledForComment(comment));
+    assert.isTrue(service.isRequestAiFixEnabled('src/foo.ts'));
+  });
+
+  test('disables fixes when plugin only implements autocompleteComment', () => {
+    pluginsModel.suggestionsRegister({
+      pluginName: 'autocomplete-only-plugin',
+      provider: {
+        autocompleteComment: async () => {
+          return {responseCode: ResponseCode.OK, completion: 'done'};
+        },
+      },
+    });
+    const comment = {...createComment(), path: 'src/foo.ts', line: 10};
+
+    assert.isFalse(service.isGeneratedSuggestedFixEnabled('src/foo.ts'));
+    assert.isFalse(service.isGeneratedSuggestedFixEnabledForComment(comment));
+    assert.isFalse(service.isRequestAiFixEnabled('src/foo.ts'));
+  });
+
+  test('requestAiFix calls provider.requestAiFix and generateSuggestedFix calls provider.suggestFix', async () => {
+    const requestAiFix = sinon
+      .stub()
+      .resolves({responseCode: ResponseCode.OK, fix_suggestions: []});
+    const suggestFix = sinon.stub().resolves({
+      responseCode: ResponseCode.OK,
+      fix_suggestions: [
+        {
+          ...createFixSuggestionInfo(),
+          replacements: [
+            {
+              path: 'src/foo.ts',
+              replacement: 'const x = 1;',
+              range: {
+                start_line: 12,
+                start_character: 0,
+                end_line: 12,
+                end_character: 10,
+              },
+            },
+          ],
+        },
+      ],
+    });
+    pluginsModel.suggestionsRegister({
+      pluginName: 'hybrid-plugin',
+      provider: {requestAiFix, suggestFix},
+    });
+
+    const aiFixResult = await service.requestAiFix({
+      prompt: 'Fix null check',
+      patchsetNumber: 1 as RevisionPatchSetNum,
+      filePath: 'src/foo.ts',
+      lineNumber: 10,
+    });
+
+    assert.isUndefined(aiFixResult);
+    assert.isTrue(requestAiFix.calledOnce);
+    assert.isFalse(suggestFix.called);
+    assert.isFalse(alertListener.called);
+
+    // Draft-comment fix generation calls suggestFix, not requestAiFix.
+    const draftResult = await service.generateSuggestedFix({
+      prompt: 'Fix typo',
+      patchsetNumber: 1 as RevisionPatchSetNum,
+      filePath: 'src/foo.ts',
+      lineNumber: 12,
+    });
+
+    assert.isDefined(draftResult);
+    assert.isTrue(requestAiFix.calledOnce);
+    assert.isTrue(suggestFix.calledOnce);
+  });
+
+  test('requestAiFix falls back to suggestFix and fires alert on NO_SUGGESTION, while generateSuggestedFix stays silent', async () => {
+    const suggestFix = sinon.stub().resolves({
+      responseCode: ResponseCode.NO_SUGGESTION,
+      fix_suggestions: [],
+    });
+    pluginsModel.suggestionsRegister({
+      pluginName: 'inline-only-plugin',
+      provider: {suggestFix},
+    });
+
+    const draftResult = await service.generateSuggestedFix({
+      prompt: 'Draft comment',
+      patchsetNumber: 1 as RevisionPatchSetNum,
+      filePath: 'src/foo.ts',
+    });
+    assert.isUndefined(draftResult);
+    assert.isFalse(alertListener.called);
+
+    const aiFixResult = await service.requestAiFix({
+      prompt: 'Fix lint warning',
+      patchsetNumber: 1 as RevisionPatchSetNum,
+      filePath: 'src/foo.ts',
+    });
+
+    assert.isUndefined(aiFixResult);
+    assert.isTrue(suggestFix.calledTwice);
+    assert.isTrue(alertListener.calledOnce);
+    assert.equal(
+      alertListener.firstCall.args[0].detail.message,
+      'No suitable AI fix could be found'
+    );
+  });
+
+  test('requestAiFix fires alert when fallback suggestFix returns empty OK', async () => {
+    const suggestFix = sinon.stub().resolves({
+      responseCode: ResponseCode.OK,
+      fix_suggestions: [],
+    });
+    pluginsModel.suggestionsRegister({
+      pluginName: 'legacy-inline-plugin',
+      provider: {suggestFix},
+    });
+
+    const aiFixResult = await service.requestAiFix({
+      prompt: 'Fix lint warning',
+      patchsetNumber: 1 as RevisionPatchSetNum,
+      filePath: 'src/foo.ts',
+    });
+
+    assert.isUndefined(aiFixResult);
+    assert.isTrue(suggestFix.calledOnce);
+    assert.isTrue(alertListener.calledOnce);
+    assert.equal(
+      alertListener.firstCall.args[0].detail.message,
+      'No suitable AI fix could be found'
+    );
+  });
+});
diff --git a/polygerrit-ui/app/styles/gr-change-list-styles.ts b/polygerrit-ui/app/styles/gr-change-list-styles.ts
index 28c95d5..4ebaf63 100644
--- a/polygerrit-ui/app/styles/gr-change-list-styles.ts
+++ b/polygerrit-ui/app/styles/gr-change-list-styles.ts
@@ -123,9 +123,6 @@
     text-align: center;
     width: 3rem;
   }
-  .truncatedRepo {
-    display: none;
-  }
   .hashtags {
     white-space: nowrap;
   }
@@ -136,12 +133,6 @@
       max-width: 18rem;
       text-overflow: ellipsis;
     }
-    .truncatedRepo {
-      display: inline-block;
-    }
-    .fullRepo {
-      display: none;
-    }
   }
   @media only screen and (max-width: 100em) {
     .branch,
diff --git a/polygerrit-ui/app/styles/main.css b/polygerrit-ui/app/styles/main.css
index 13ee241..b50c9f2 100644
--- a/polygerrit-ui/app/styles/main.css
+++ b/polygerrit-ui/app/styles/main.css
@@ -36,6 +36,25 @@
   height: 100%;
   transition: none;
 }
+:where(html.darkTheme) {
+  background-color: var(--background-color-secondary, #2f3034);
+  color: var(--primary-text-color, #e8eaed);
+}
+:where(html.lightTheme) {
+  background-color: var(--background-color-secondary, #f8f9fa);
+  color: var(--primary-text-color, #202124);
+}
+html.darkTheme:has(> body[unresolved]) {
+  background-color: var(--background-color-secondary, #2f3034);
+}
+html.lightTheme:has(> body[unresolved]) {
+  background-color: var(--background-color-secondary, #f8f9fa);
+}
+html.darkTheme body[unresolved],
+html.lightTheme body[unresolved] {
+  opacity: 0;
+  pointer-events: none;
+}
 body {
   /*
    * IE has shoddy support for the font shorthand property.
diff --git a/polygerrit-ui/app/styles/themes/app-theme.ts b/polygerrit-ui/app/styles/themes/app-theme.ts
index d4a703d..236d49a 100644
--- a/polygerrit-ui/app/styles/themes/app-theme.ts
+++ b/polygerrit-ui/app/styles/themes/app-theme.ts
@@ -423,14 +423,13 @@
     /* header and footer */
     --footer-background-color: transparent;
     --footer-border-top: none;
-    --header-background-color: var(--background-color-tertiary);
+    --header-background-color: var(--blue-tonal);
     --header-border-bottom: 1px solid var(--border-color);
     --header-border-image: '';
     --header-box-shadow: none;
     --header-padding: 0 var(--spacing-l);
-    --header-icon-size: 0em;
-    --header-icon: none;
-    --header-text-color: black;
+    --header-icon-size: 1em;
+    --header-text-color: var(--gray-50);
     --header-title-content: 'Gerrit';
     --header-title-font-size: 1.75rem;
     /* This is just an initial value. Will be updated by a ResizeObserver. */
@@ -580,7 +579,15 @@
   }
 `;
 
-const styleEl = document.createElement('style');
-styleEl.setAttribute('id', 'light-theme');
-setStyleTextContent(styleEl, appThemeCss);
-document.head.appendChild(styleEl);
+export function applyTheme() {
+  if (document.head.querySelector('#light-theme')) return;
+  const styleEl = document.createElement('style');
+  styleEl.setAttribute('id', 'light-theme');
+  setStyleTextContent(styleEl, appThemeCss);
+  const darkOrPluginStyleEl = document.head.querySelector(
+    'style#dark-theme, style#plugin-style'
+  );
+  document.head.insertBefore(styleEl, darkOrPluginStyleEl);
+}
+
+applyTheme();
diff --git a/polygerrit-ui/app/styles/themes/dark-theme.ts b/polygerrit-ui/app/styles/themes/dark-theme.ts
index 8c6bb7a..5ef5df7 100644
--- a/polygerrit-ui/app/styles/themes/dark-theme.ts
+++ b/polygerrit-ui/app/styles/themes/dark-theme.ts
@@ -205,10 +205,10 @@
     /* header and footer */
     --footer-background-color: var(--background-color-tertiary);
     --footer-border-top: 1px solid var(--border-color);
-    --header-background-color: var(--background-color-tertiary);
+    --header-background-color: var(--blue-tonal);
     --header-border-bottom: 1px solid var(--border-color);
     --header-padding: 0 var(--spacing-l);
-    --header-text-color: var(--primary-text-color);
+    --header-text-color: var(--gray-50);
 
     /* dashboard size background colors */
     --dashboard-size-xs: var(--gray-700);
@@ -342,10 +342,22 @@
   // OTOH we want to insert before any plugin provided styles, because we do NOT
   // want to override those.
   const pluginStyleEl = document.head.querySelector('style#plugin-style');
-  document.head.insertBefore(styleEl, pluginStyleEl);
+  if (pluginStyleEl) {
+    document.head.insertBefore(styleEl, pluginStyleEl);
+  } else {
+    const lightThemeEl = document.head.querySelector('#light-theme');
+    document.head.insertBefore(
+      styleEl,
+      lightThemeEl ? lightThemeEl.nextSibling : null
+    );
+  }
 }
 
 export function removeTheme() {
   const styleEl = document.head.querySelector('#dark-theme');
   styleEl?.remove();
 }
+
+if (document.documentElement.classList.contains('darkTheme')) {
+  applyTheme();
+}
diff --git a/polygerrit-ui/app/test/mocks/gr-rest-api_mock.ts b/polygerrit-ui/app/test/mocks/gr-rest-api_mock.ts
index fe87db1..0fdb600 100644
--- a/polygerrit-ui/app/test/mocks/gr-rest-api_mock.ts
+++ b/polygerrit-ui/app/test/mocks/gr-rest-api_mock.ts
@@ -21,6 +21,7 @@
   BranchInfo,
   CapabilityInfoMap,
   ChangeInfo,
+  ChangePermissionsInfo,
   CommentInfo,
   CommitInfo,
   ConfigInfo,
@@ -324,8 +325,8 @@
   },
   getDiffDrafts() {
     // NOTE: This method can not be typed properly due to overloads.
-    // eslint-disable-next-line @typescript-eslint/no-explicit-any
-    return Promise.resolve({}) as any;
+
+    return Promise.resolve({});
   },
   getDiffPreferences(): Promise<DiffPreferencesInfo | undefined> {
     return Promise.resolve(createDefaultDiffPrefs());
@@ -490,6 +491,9 @@
   getValidationOptions(): Promise<ValidationOptionsInfo | undefined> {
     return Promise.resolve(undefined);
   },
+  getChangePermissions(): Promise<ChangePermissionsInfo | undefined> {
+    return Promise.resolve(undefined);
+  },
   getVersion(): Promise<string | undefined> {
     return Promise.resolve('');
   },
@@ -635,6 +639,9 @@
   setRepoHead(): Promise<Response> {
     return Promise.resolve(new Response());
   },
+  convertRepoRefStorage(): Promise<Response> {
+    return Promise.resolve(new Response());
+  },
   updateIdentityInChangeEdit(): Promise<Response | undefined> {
     return Promise.resolve(new Response());
   },
diff --git a/polygerrit-ui/app/test/mocks/suggestions-service_mock.ts b/polygerrit-ui/app/test/mocks/suggestions-service_mock.ts
index 4a402b3..b6686c1 100644
--- a/polygerrit-ui/app/test/mocks/suggestions-service_mock.ts
+++ b/polygerrit-ui/app/test/mocks/suggestions-service_mock.ts
@@ -12,7 +12,9 @@
   suggestionsServiceUpdated$: new BehaviorSubject(false),
   isGeneratedSuggestedFixEnabled: () => true,
   isGeneratedSuggestedFixEnabledForComment: () => true,
+  isRequestAiFixEnabled: () => true,
   generateSuggestedFix: () => Promise.resolve(createFixSuggestionInfo()),
+  requestAiFix: () => Promise.resolve(createFixSuggestionInfo()),
   finalize(): void {},
 
   generateSuggestedFixForComment: () =>
diff --git a/polygerrit-ui/app/test/test-data-generators.ts b/polygerrit-ui/app/test/test-data-generators.ts
index a22d0a9..4d873f6 100644
--- a/polygerrit-ui/app/test/test-data-generators.ts
+++ b/polygerrit-ui/app/test/test-data-generators.ts
@@ -135,7 +135,6 @@
 } from '../api/ai-code-review';
 import {
   Action,
-  ActionResult,
   Category,
   Fix,
   Link,
@@ -489,6 +488,7 @@
   return {
     visibility: AccountsVisibility.ALL,
     default_display_name: DefaultDisplayNameConfig.FULL_NAME,
+    enable_delete: true,
   };
 }
 
@@ -730,6 +730,25 @@
   });
 }
 
+export function createSkipContextGroup(options: {
+  offset?: number;
+  count?: number;
+}) {
+  const offset = options.offset || 0;
+  const count = options.count || 10;
+  return new GrDiffGroup({
+    type: GrDiffGroupType.CONTEXT_CONTROL,
+    contextGroups: [
+      new GrDiffGroup({
+        type: GrDiffGroupType.BOTH,
+        skip: count,
+        offsetLeft: offset + 1,
+        offsetRight: offset + 1,
+      }),
+    ],
+  });
+}
+
 export function createContextGroupWithDelta() {
   return new GrDiffGroup({
     type: GrDiffGroupType.CONTEXT_CONTROL,
@@ -1505,10 +1524,7 @@
           tooltip: 'This check result was helpful',
           callback: () =>
             new Promise(resolve => {
-              setTimeout(
-                () => resolve({message: 'Feedback recorded.'} as ActionResult),
-                1000
-              );
+              setTimeout(() => resolve({message: 'Feedback recorded.'}), 1000);
             }),
         },
         {
@@ -1516,10 +1532,7 @@
           tooltip: 'This check result was not helpful',
           callback: () =>
             new Promise(resolve => {
-              setTimeout(
-                () => resolve({message: 'Feedback recorded.'} as ActionResult),
-                1000
-              );
+              setTimeout(() => resolve({message: 'Feedback recorded.'}), 1000);
             }),
         },
       ],
diff --git a/polygerrit-ui/app/tsconfig.json b/polygerrit-ui/app/tsconfig.json
index d4290aa..bd593ea 100644
--- a/polygerrit-ui/app/tsconfig.json
+++ b/polygerrit-ui/app/tsconfig.json
@@ -30,9 +30,10 @@
     "noFallthroughCasesInSwitch": true,/* Report errors for fallthrough cases in switch statement. */
 
     "skipLibCheck": true, /* Do not check node_modules */
+    "types": ["mocha"], /* Mocha globals for tests; prod (tsconfig_bazel) overrides with []. */
 
     /* Module Resolution Options */
-    "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
+    "moduleResolution": "bundler", /* PolyGerrit is bundled with Rollup/esbuild. */
     "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
     "preserveSymlinks": false, /* Do not resolve the real path of symlinks. */
 
diff --git a/polygerrit-ui/app/tsconfig_bazel.json b/polygerrit-ui/app/tsconfig_bazel.json
index 8cd5dfb..e9d4582 100644
--- a/polygerrit-ui/app/tsconfig_bazel.json
+++ b/polygerrit-ui/app/tsconfig_bazel.json
@@ -5,6 +5,7 @@
     // output directory to stay within the Bazel package (kept in sync with
     // out_dir of the compile_pg ts_project in the BUILD file).
     "outDir": "_pg_ts_out",
+    "types": [],
     "typeRoots": [
       "../../external/ui_npm/node_modules/@types",
       "../../external/ui_dev_npm/node_modules/@types"
diff --git a/polygerrit-ui/app/types/common.ts b/polygerrit-ui/app/types/common.ts
index 8aa53b7..8a07894 100644
--- a/polygerrit-ui/app/types/common.ts
+++ b/polygerrit-ui/app/types/common.ts
@@ -16,6 +16,7 @@
   MergeStrategy,
   NotifyType,
   PermissionAction,
+  RefStorage,
   RepoState,
   SubmitType,
   TimeFormat,
@@ -42,6 +43,7 @@
   ChangeInfoId,
   ChangeMessageId,
   ChangeMessageInfo,
+  ChangePermissionsInfo,
   ChangeSubmissionId,
   CommentInfo,
   CommentLinkInfo,
@@ -150,6 +152,7 @@
   ChangeInfoId,
   ChangeMessageId,
   ChangeMessageInfo,
+  ChangePermissionsInfo,
   ChangeSubmissionId,
   CommentLinkInfo,
   CommentInfo,
@@ -236,6 +239,7 @@
   FIRST_PARENT,
   isDetailedLabelInfo,
   isQuickLabelInfo,
+  RefStorage,
 };
 
 /*
@@ -851,6 +855,7 @@
   description?: string;
   permissions_only?: boolean;
   create_empty_commit?: boolean;
+  ref_storage?: RefStorage;
   submit_type?: SubmitType;
   branches?: BranchName[];
   owners?: GroupId[];
@@ -1117,6 +1122,7 @@
 export interface ReviewInput {
   message?: string;
   tag?: ReviewInputTag;
+  is_ai?: boolean;
   labels?: LabelNameToValueMap;
   comments?: PathToCommentsInputMap;
   drafts?: DraftsAction;
diff --git a/polygerrit-ui/app/types/events.ts b/polygerrit-ui/app/types/events.ts
index 2a2ec16..02f306e 100644
--- a/polygerrit-ui/app/types/events.ts
+++ b/polygerrit-ui/app/types/events.ts
@@ -52,6 +52,7 @@
     'line-cursor-moved-in': LineNumberEvent;
     'line-cursor-moved-out': LineNumberEvent;
     'moved-link-clicked': MovedLinkClickedEvent;
+    'open-chat-panel': CustomEvent<{}>;
     'open-diff-in-change-view': OpenDiffInChangeViewEvent;
     'open-fix-preview': OpenFixPreviewEvent;
     'reply-to-comment': ReplyToCommentEvent;
@@ -70,6 +71,7 @@
   interface DocumentEventMap {
     'gr-rpc-log': RpcLogEvent;
     'network-error': NetworkErrorEvent;
+    'open-chat-panel': CustomEvent<{}>;
     'page-error': PageErrorEvent;
     // prettier-ignore
     'reload': CustomEvent<{}>;
diff --git a/polygerrit-ui/app/utils/account-util_test.ts b/polygerrit-ui/app/utils/account-util_test.ts
index ffbebaf..3296baa 100644
--- a/polygerrit-ui/app/utils/account-util_test.ts
+++ b/polygerrit-ui/app/utils/account-util_test.ts
@@ -132,9 +132,7 @@
 
   test('isAccountEmailOnly', () => {
     assert.isFalse(isAccountEmailOnly(createAccountWithId(1)));
-    assert.isTrue(
-      isAccountEmailOnly(createAccountWithEmailOnly('a' as EmailAddress))
-    );
+    assert.isTrue(isAccountEmailOnly(createAccountWithEmailOnly('a')));
     assert.isFalse(isAccountEmailOnly(createGroupInfo()));
   });
 
diff --git a/polygerrit-ui/app/utils/attention-set-util.ts b/polygerrit-ui/app/utils/attention-set-util.ts
index b6b7bcf..7a9b393 100644
--- a/polygerrit-ui/app/utils/attention-set-util.ts
+++ b/polygerrit-ui/app/utils/attention-set-util.ts
@@ -153,6 +153,7 @@
   labels?: LabelNameToInfoMap
 ) {
   if (!account || !labels) return 0;
+  // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
   const crLabel = getCodeReviewLabel(labels) as DetailedLabelInfo | undefined;
   if (!crLabel?.all) return 0;
   return getApprovalInfo(crLabel, account)?.value ?? 0;
diff --git a/polygerrit-ui/app/utils/change-metadata-util.ts b/polygerrit-ui/app/utils/change-metadata-util.ts
index 8b208e4..50407fc 100644
--- a/polygerrit-ui/app/utils/change-metadata-util.ts
+++ b/polygerrit-ui/app/utils/change-metadata-util.ts
@@ -14,6 +14,7 @@
   MERGED_AS = 'Merged as',
   REVERT_CREATED_AS = 'Revert Created as',
   STRATEGY = 'Strategy',
+  CREATED = 'Created',
   UPDATED = 'Updated',
   CC = 'CC',
   HASHTAGS = 'Hashtags',
@@ -47,6 +48,7 @@
     Metadata.MERGED_AS,
     Metadata.REVERT_CREATED_AS,
     Metadata.STRATEGY,
+    Metadata.CREATED,
     Metadata.UPDATED,
   ],
 };
diff --git a/polygerrit-ui/app/utils/change-util.ts b/polygerrit-ui/app/utils/change-util.ts
index 446c098..e9a876e 100644
--- a/polygerrit-ui/app/utils/change-util.ts
+++ b/polygerrit-ui/app/utils/change-util.ts
@@ -16,8 +16,8 @@
 import {ParsedChangeInfo} from '../types/types';
 import {getUserId, isServiceUser} from './account-util';
 
-interface ChangeStatusesOptions {
-  mergeable: boolean;
+export interface ChangeStatusesOptions {
+  mergeable?: boolean;
   /** Is there a reverting change and if so, what status has it? */
   revertingChangeStatus?: ChangeStatus;
 }
@@ -139,7 +139,7 @@
     return states;
   }
 
-  if (change.submittable) {
+  if (change.submittable && options.mergeable !== undefined) {
     states.push(ChangeStates.READY_TO_SUBMIT);
   }
   if (states.length === 0) {
diff --git a/polygerrit-ui/app/utils/change-util_test.ts b/polygerrit-ui/app/utils/change-util_test.ts
index 45762a7..a20b3a6 100644
--- a/polygerrit-ui/app/utils/change-util_test.ts
+++ b/polygerrit-ui/app/utils/change-util_test.ts
@@ -81,6 +81,14 @@
     change.submittable = true;
     statuses = changeStatuses(change, {mergeable: false});
     assert.deepEqual(statuses, [ChangeStates.MERGE_CONFLICT]);
+
+    change.submittable = false;
+    statuses = changeStatuses(change, {mergeable: undefined});
+    assert.deepEqual(statuses, [ChangeStates.ACTIVE]);
+
+    change.submittable = true;
+    statuses = changeStatuses(change, {mergeable: undefined});
+    assert.deepEqual(statuses, [ChangeStates.ACTIVE]);
   });
 
   test('Git conflict', () => {
@@ -141,6 +149,13 @@
       }),
       [ChangeStates.MERGED, ChangeStates.REVERT_SUBMITTED]
     );
+    assert.deepEqual(
+      changeStatuses(change, {
+        revertingChangeStatus: ChangeStatus.MERGED,
+        mergeable: undefined,
+      }),
+      [ChangeStates.MERGED, ChangeStates.REVERT_SUBMITTED]
+    );
   });
 
   test('Abandoned status', () => {
diff --git a/polygerrit-ui/app/utils/comment-util_test.ts b/polygerrit-ui/app/utils/comment-util_test.ts
index 296939b..192976a 100644
--- a/polygerrit-ui/app/utils/comment-util_test.ts
+++ b/polygerrit-ui/app/utils/comment-util_test.ts
@@ -326,7 +326,7 @@
         },
         {
           id: 'new_draft' as UrlEncodedCommentId,
-          message: 'i do not like either of you' as UrlEncodedCommentId,
+          message: 'i do not like either of you',
           savingState: SavingState.OK,
           updated: '2015-12-20 15:01:20.396000000' as Timestamp,
           line: 1,
diff --git a/polygerrit-ui/app/utils/commit-message-formatter-util.ts b/polygerrit-ui/app/utils/commit-message-formatter-util.ts
index f97611a..af4e308 100644
--- a/polygerrit-ui/app/utils/commit-message-formatter-util.ts
+++ b/polygerrit-ui/app/utils/commit-message-formatter-util.ts
@@ -31,9 +31,24 @@
 const MAX_SUBJECT_LENGTH = 72;
 const MAX_LINE_LENGTH = 72;
 const INDENTATION_THRESHOLD = 4;
-const BULLET_POINT_REGEX = /^\s*[-+*#]\s/;
+const COMMENT_LINE_REGEX = /^\s*#\s/;
+const LIST_ITEM_REGEX = /^(\s*(?:[-+*]|\d{1,3}[.)])\s+)(\S.*)$/;
 const FOOTER_REGEX = /^([\w-]+)(?::[ \t]+|=)(.*)$/;
 
+interface ListItem {
+  prefix: string;
+  lines: string[];
+  lastRawLine: string;
+}
+
+function getLeadingSpacesCount(line: string): number {
+  return line.length - line.trimStart().length;
+}
+
+function getListIndentThreshold(prefixLength: number): number {
+  return Math.max(INDENTATION_THRESHOLD, prefixLength + 1);
+}
+
 /*
  * Check if last line of "Body" follows the "footer" format and if yes, then transfer it to the "footer section"
  * So if the commit message is
@@ -89,105 +104,265 @@
 function formatBody(body: string[]): string[] {
   let inCodeBlock = false;
   let paragraphLines: string[] = [];
+  let currentListItem: ListItem | null = null;
   const formattedBody: string[] = [];
-  let previousWasBulletPoint = false;
   let previousWasEmpty = true; // Track if previous line was empty
 
-  for (const line of body) {
+  const flushParagraph = () => {
+    if (paragraphLines.length > 0) {
+      formattedBody.push(...splitParagraph(paragraphLines.join(' ')));
+      paragraphLines = [];
+    }
+  };
+
+  const flushListItem = () => {
+    if (currentListItem !== null) {
+      if (
+        currentListItem.lines.length === 1 &&
+        currentListItem.lastRawLine.length <= MAX_LINE_LENGTH
+      ) {
+        formattedBody.push(currentListItem.lastRawLine);
+      } else {
+        formattedBody.push(
+          ...splitLinesWithIndent(
+            currentListItem.lines.join(' '),
+            currentListItem.prefix,
+            ' '.repeat(currentListItem.prefix.length)
+          )
+        );
+      }
+      currentListItem = null;
+    }
+  };
+
+  for (let i = 0; i < body.length; i++) {
+    const line = body[i];
     if (line.trim().startsWith('```')) {
+      flushParagraph();
+      flushListItem();
       inCodeBlock = !inCodeBlock;
       formattedBody.push(line.trimEnd());
       previousWasEmpty = false;
       continue;
     }
 
-    if (inCodeBlock || isUntouchedLine(line, previousWasEmpty)) {
-      if (!inCodeBlock) {
-        previousWasBulletPoint = BULLET_POINT_REGEX.test(line);
-      }
-      if (paragraphLines.length > 0) {
-        formattedBody.push(...splitParagraph(paragraphLines.join(' ')));
-      }
-      paragraphLines = []; // Reset paragraph
-      formattedBody.push(line.trimEnd());
-      previousWasEmpty = false;
-      continue;
-    }
-
-    if (previousWasBulletPoint && line.startsWith('  ')) {
+    if (inCodeBlock) {
       formattedBody.push(line.trimEnd());
       previousWasEmpty = false;
       continue;
     }
 
     if (line.trim() === '') {
-      if (paragraphLines.length > 0) {
-        formattedBody.push(...splitParagraph(paragraphLines.join(' ')));
-        paragraphLines = [];
-      }
+      flushParagraph();
+      flushListItem();
       formattedBody.push('');
-      previousWasBulletPoint = false;
       previousWasEmpty = true;
-    } else {
-      paragraphLines.push(line.trim());
-      previousWasEmpty = false;
+      continue;
     }
+
+    const indentThreshold: number =
+      currentListItem !== null
+        ? getListIndentThreshold(currentListItem.prefix.length)
+        : INDENTATION_THRESHOLD;
+
+    const leadingSpaces = getLeadingSpacesCount(line);
+    const listMatch =
+      leadingSpaces < indentThreshold &&
+      canStartListItem(paragraphLines, leadingSpaces, line, body[i + 1])
+        ? line.trimEnd().match(LIST_ITEM_REGEX)
+        : null;
+    if (listMatch) {
+      flushParagraph();
+      flushListItem();
+      currentListItem = {
+        prefix: listMatch[1],
+        lines: [listMatch[2].trim()],
+        lastRawLine: line.trimEnd(),
+      };
+      previousWasEmpty = false;
+      continue;
+    }
+
+    if (isUntouchedCodeOrQuoteLine(line, indentThreshold)) {
+      flushParagraph();
+      flushListItem();
+      formattedBody.push(line.trimEnd());
+      previousWasEmpty = false;
+      continue;
+    }
+
+    if (currentListItem !== null) {
+      if (
+        leadingSpaces > 0 ||
+        isUnindentedListContinuation(currentListItem, line)
+      ) {
+        currentListItem.lines.push(line.trim());
+        currentListItem.lastRawLine = line.trimEnd();
+        previousWasEmpty = false;
+        continue;
+      }
+      flushListItem();
+    }
+
+    const nextLine = body[i + 1];
+    const nextLineIsIndented =
+      nextLine !== undefined &&
+      nextLine.trim() !== '' &&
+      getLeadingSpacesCount(nextLine) > 0;
+
+    if (
+      leadingSpaces > 0 &&
+      leadingSpaces < INDENTATION_THRESHOLD &&
+      (!previousWasEmpty || nextLineIsIndented)
+    ) {
+      flushParagraph();
+      formattedBody.push(...formatIndentedLine(line, leadingSpaces));
+      previousWasEmpty = false;
+      continue;
+    }
+
+    paragraphLines.push(line.trim());
+    previousWasEmpty = false;
   }
 
-  if (paragraphLines.length > 0) {
-    formattedBody.push(...splitParagraph(paragraphLines.join(' ')));
-  }
+  flushParagraph();
+  flushListItem();
 
   return removeConsecutiveBlankLines(formattedBody);
 }
 
+function canStartListItem(
+  paragraphLines: string[],
+  leadingSpaces: number,
+  line: string,
+  nextLine: string | undefined
+): boolean {
+  if (paragraphLines.length === 0 || leadingSpaces > 0) {
+    return true;
+  }
+  const backtickCount = (paragraphLines.join(' ').match(/`/g) || []).length;
+  if (backtickCount % 2 !== 0) {
+    return false;
+  }
+  const lastParagraphLine = paragraphLines[paragraphLines.length - 1];
+  const firstWord = line.trim().split(/\s+/)[0] || '';
+  if (
+    lastParagraphLine.length + 1 + firstWord.length > 60 &&
+    !/[.:;!?)]$/.test(lastParagraphLine)
+  ) {
+    const nextIsUnindentedNonList =
+      nextLine !== undefined &&
+      nextLine.trim() !== '' &&
+      getLeadingSpacesCount(nextLine) === 0 &&
+      !LIST_ITEM_REGEX.test(nextLine.trimEnd());
+    if (nextIsUnindentedNonList) {
+      return false;
+    }
+  }
+  return true;
+}
+
+function isUnindentedListContinuation(
+  listItem: ListItem,
+  line: string
+): boolean {
+  if (getLeadingSpacesCount(listItem.prefix) > 0) {
+    return false;
+  }
+  const trimmedLine = line.trim();
+  if (
+    (trimmedLine.endsWith(':') && /^[A-Z]/.test(trimmedLine)) ||
+    FOOTER_REGEX.test(trimmedLine)
+  ) {
+    return false;
+  }
+  const lastRawLine = listItem.lastRawLine;
+  if (lastRawLine.includes('://')) {
+    return false;
+  }
+  const firstWord = trimmedLine.split(/\s+/)[0] || '';
+  return (
+    lastRawLine.length + 1 + firstWord.length > 60 &&
+    !/[.:;!?)\]"'`]$/.test(lastRawLine)
+  );
+}
+
+function formatIndentedLine(line: string, leadingSpaces: number): string[] {
+  const trimmedEnd = line.trimEnd();
+  if (
+    trimmedEnd.length <= MAX_LINE_LENGTH ||
+    trimmedEnd.includes('://') ||
+    /^[\w-]+:\s+\S+$/.test(line.trim())
+  ) {
+    return [trimmedEnd];
+  }
+  const indent = ' '.repeat(leadingSpaces);
+  return splitLinesWithIndent(line.trim(), indent, indent);
+}
+
 function formatFooter(footer: string[]): string[] {
   const formattedFooter = footer.map(line => line.trim());
   return removeConsecutiveBlankLines(formattedFooter);
 }
+
 /**
- * Returns true if the line will not be modified by the formatter.
- * For example, quotes, bullet points, and indented lines are untouched.
+ * Returns true if the line is a quote, comment, or indented code line that
+ * should not be modified by the formatter.
  */
-function isUntouchedLine(line: string, previousWasEmpty: boolean): boolean {
-  return (
-    line.trimStart().startsWith('> ') ||
-    (line.length >= INDENTATION_THRESHOLD &&
-      line.substring(0, INDENTATION_THRESHOLD).trim() === '') ||
-    BULLET_POINT_REGEX.test(line) ||
-    // Check if line is part of a list by looking for any indentation,
-    // but only if not first line in paragraph
-    (!previousWasEmpty &&
-      line.trimStart().length > 0 &&
-      line !== line.trimStart())
-  );
+function isUntouchedCodeOrQuoteLine(
+  line: string,
+  indentThreshold = INDENTATION_THRESHOLD
+): boolean {
+  if (line.trimStart().startsWith('> ') || COMMENT_LINE_REGEX.test(line)) {
+    return true;
+  }
+  return getLeadingSpacesCount(line) >= indentThreshold;
 }
 
 function splitParagraph(paragraph: string): string[] {
-  const words = paragraph.split(/\s+/);
+  return splitLinesWithIndent(paragraph);
+}
+
+function splitLinesWithIndent(
+  text: string,
+  firstLinePrefix = '',
+  continuationPrefix = firstLinePrefix
+): string[] {
+  const words = text.trim().split(/\s+/);
+  if (words.length === 0 || (words.length === 1 && words[0] === '')) {
+    return [];
+  }
   const lines: string[] = [];
-  let currentLine = '';
+  let currentPrefix = firstLinePrefix;
+  let currentContent = '';
 
   for (const word of words) {
-    if (word.length > MAX_LINE_LENGTH) {
-      if (currentLine.length > 0) {
-        lines.push(currentLine);
-        currentLine = '';
+    const maxContentLength = Math.max(
+      1,
+      MAX_LINE_LENGTH - currentPrefix.length
+    );
+    if (word.length > maxContentLength) {
+      if (currentContent.length > 0) {
+        lines.push(currentPrefix + currentContent);
+        currentPrefix = continuationPrefix;
+        currentContent = '';
       }
-      lines.push(word);
+      lines.push(currentPrefix + word);
+      currentPrefix = continuationPrefix;
     } else if (
-      currentLine.length > 0 &&
-      currentLine.length + word.length + 1 > MAX_LINE_LENGTH
+      currentContent.length > 0 &&
+      currentContent.length + word.length + 1 > maxContentLength
     ) {
-      lines.push(currentLine);
-      currentLine = word;
+      lines.push(currentPrefix + currentContent);
+      currentPrefix = continuationPrefix;
+      currentContent = word;
     } else {
-      currentLine += (currentLine ? ' ' : '') + word;
+      currentContent += (currentContent ? ' ' : '') + word;
     }
   }
 
-  if (currentLine) {
-    lines.push(currentLine);
+  if (currentContent) {
+    lines.push(currentPrefix + currentContent);
   }
 
   return lines;
@@ -288,15 +463,43 @@
   // Check body
   let lineNumber = 3;
   let inCodeBlock = false;
+  let currentListPrefixLength: number | null = null;
 
   for (const line of message.body) {
     if (line.trim().startsWith('```')) {
       inCodeBlock = !inCodeBlock;
+      currentListPrefixLength = null;
+    } else if (line.trim() === '') {
+      currentListPrefixLength = null;
+    } else if (!inCodeBlock) {
+      const prevIndentThreshold: number =
+        currentListPrefixLength !== null
+          ? getListIndentThreshold(currentListPrefixLength)
+          : INDENTATION_THRESHOLD;
+      const listMatch =
+        getLeadingSpacesCount(line) < prevIndentThreshold
+          ? line.trimEnd().match(LIST_ITEM_REGEX)
+          : null;
+      if (listMatch) {
+        currentListPrefixLength = listMatch[1].length;
+      } else if (
+        currentListPrefixLength !== null &&
+        isUntouchedCodeOrQuoteLine(line, prevIndentThreshold)
+      ) {
+        currentListPrefixLength = null;
+      } else if (getLeadingSpacesCount(line) === 0) {
+        currentListPrefixLength = null;
+      }
     }
 
+    const indentThreshold =
+      currentListPrefixLength !== null
+        ? getListIndentThreshold(currentListPrefixLength)
+        : INDENTATION_THRESHOLD;
+
     if (
       !inCodeBlock &&
-      !isUntouchedLine(line, false) &&
+      !isUntouchedCodeOrQuoteLine(line, indentThreshold) &&
       line.length > MAX_LINE_LENGTH &&
       !line.includes('://') // Don't flag long URLs
     ) {
@@ -325,7 +528,7 @@
 
     if (
       !inCodeBlock &&
-      !isUntouchedLine(line, false) &&
+      !isUntouchedCodeOrQuoteLine(line) &&
       line.length > MAX_LINE_LENGTH &&
       !line.includes('://') // Don't flag long URLs
     ) {
@@ -399,8 +602,22 @@
   // Check if footer contains any lines in the format "key: value"
   // If not, move footer lines to body and make footer empty
   // This is typically the case when creating a new commit message and the footer is not yet formatted
+  const isListOrIndentedBlock =
+    footer.some(
+      line =>
+        getLeadingSpacesCount(line) < INDENTATION_THRESHOLD &&
+        LIST_ITEM_REGEX.test(line.trimEnd())
+    ) ||
+    footer.every(line => isUntouchedCodeOrQuoteLine(line)) ||
+    (footer.length > 1 &&
+      footer.every(line => getLeadingSpacesCount(line) > 0)) ||
+    (footer.length > 1 &&
+      footer[0].trim().endsWith(':') &&
+      !FOOTER_REGEX.test(footer[0].trim()));
   const hasFormattedFooterLine = footer.some(line =>
-    FOOTER_REGEX.test(line.trim())
+    isListOrIndentedBlock
+      ? FOOTER_REGEX.test(line.trimEnd())
+      : FOOTER_REGEX.test(line.trim())
   );
   if (!hasFormattedFooterLine && footer.length > 0) {
     // If body is not empty, add a blank line before appending footer
diff --git a/polygerrit-ui/app/utils/commit-message-formatter-util_test.ts b/polygerrit-ui/app/utils/commit-message-formatter-util_test.ts
index bb8ab84..d6c14f6 100644
--- a/polygerrit-ui/app/utils/commit-message-formatter-util_test.ts
+++ b/polygerrit-ui/app/utils/commit-message-formatter-util_test.ts
@@ -188,19 +188,164 @@
 
     test('bullet points are not split', () => {
       const message =
-        'Fix the thing\n\n- Uses a test buffer to store the result to avoid issue.\n' +
+        'Fix the thing\n\n- Uses a test buffer to store the result to avoid issue with rendering.\n' +
         '  This new buffer\n' +
-        '- Test a new buffer\n' +
+        '- Test a new buffer when the input stream is reconfigured and\n' +
         '  call it.\n\nChange-Id: abcdefg\n';
       assert.equal(
         formatCommitMessageString(message),
-        'Fix the thing\n\n- Uses a test buffer to store the result to avoid issue.\n' +
+        'Fix the thing\n\n- Uses a test buffer to store the result to avoid issue with rendering.\n' +
           '  This new buffer\n' +
-          '- Test a new buffer\n' +
-          '  call it.\n\nChange-Id: abcdefg\n'
+          '- Test a new buffer when the input stream is reconfigured and call it.\n\nChange-Id: abcdefg\n'
       );
     });
 
+    test('long bullet points are wrapped with hanging indentation', () => {
+      const message =
+        'Fix the thing\n\n' +
+        '- This is a very long bullet point that exceeds the 72 character limit and should be wrapped with a two-space hanging indent.\n' +
+        '  * This is an indented bullet point that also exceeds the 72 character limit and should be wrapped with a four-space hanging indent.\n' +
+        '    - This is a third-level nested bullet that exceeds the 72 character limit and should be wrapped with a six-space hanging indent.\n\n' +
+        'Change-Id: abcdefg\n';
+      assert.equal(
+        formatCommitMessageString(message),
+        'Fix the thing\n\n' +
+          '- This is a very long bullet point that exceeds the 72 character limit\n' +
+          '  and should be wrapped with a two-space hanging indent.\n' +
+          '  * This is an indented bullet point that also exceeds the 72 character\n' +
+          '    limit and should be wrapped with a four-space hanging indent.\n' +
+          '    - This is a third-level nested bullet that exceeds the 72 character\n' +
+          '      limit and should be wrapped with a six-space hanging indent.\n\n' +
+          'Change-Id: abcdefg\n'
+      );
+    });
+
+    test('bullet points with unindented continuation lines are reflowed with hanging indent', () => {
+      const message =
+        'Fix the thing\n\n' +
+        '- First bullet point that was manually wrapped onto the next\n' +
+        'line without any leading spaces and continues even further.\n' +
+        '- Second bullet point is short.\n\n' +
+        'Change-Id: abcdefg\n';
+      assert.equal(
+        formatCommitMessageString(message),
+        'Fix the thing\n\n' +
+          '- First bullet point that was manually wrapped onto the next line\n' +
+          '  without any leading spaces and continues even further.\n' +
+          '- Second bullet point is short.\n\n' +
+          'Change-Id: abcdefg\n'
+      );
+    });
+
+    test('unindented paragraph after bullet point ending with period or short bullet is not merged', () => {
+      const message =
+        'Fix the thing\n\n' +
+        '- First bullet point is over sixty characters long and ends with period.\n' +
+        'This is a separate paragraph immediately following a long bullet.\n\n' +
+        '- Short bullet without period\n' +
+        'This is a separate paragraph immediately following a short bullet.\n\n' +
+        'Change-Id: abcdefg\n';
+      assert.equal(formatCommitMessageString(message), message);
+    });
+
+    test('4-space indented code block after bullet point is untouched', () => {
+      const message =
+        'Fix the thing\n\n' +
+        '- Update the helper function:\n' +
+        '    const veryLongCodeLine = someFunctionWithVeryLongArgumentsThatExceeds72Characters();\n' +
+        '    - diff line inside 4-space indented block that exceeds 72 characters in length\n\n' +
+        'Change-Id: abcdefg\n';
+      assert.equal(
+        formatCommitMessageString(message),
+        'Fix the thing\n\n' +
+          '- Update the helper function:\n' +
+          '    const veryLongCodeLine = someFunctionWithVeryLongArgumentsThatExceeds72Characters();\n' +
+          '    - diff line inside 4-space indented block that exceeds 72 characters in length\n\n' +
+          'Change-Id: abcdefg\n'
+      );
+    });
+
+    test('numbered lists are kept separate and wrapped with hanging indentation', () => {
+      const message =
+        'Fix the thing\n\n' +
+        '1. First item\n' +
+        '2. Second item that is very long and exceeds the 72 character limit so it should wrap with three spaces.\n' +
+        '10. Tenth item that is also very long and exceeds the 72 character limit so it should wrap with four spaces.\n' +
+        '1) Parenthesized item.\n\n' +
+        'Change-Id: abcdefg\n';
+      assert.equal(
+        formatCommitMessageString(message),
+        'Fix the thing\n\n' +
+          '1. First item\n' +
+          '2. Second item that is very long and exceeds the 72 character limit so\n' +
+          '   it should wrap with three spaces.\n' +
+          '10. Tenth item that is also very long and exceeds the 72 character limit\n' +
+          '    so it should wrap with four spaces.\n' +
+          '1) Parenthesized item.\n\n' +
+          'Change-Id: abcdefg\n'
+      );
+    });
+
+    test('indented block after blank line preserves indentation and wraps long lines', () => {
+      const message =
+        'Fix the thing\n\n' +
+        'List:\n\n' +
+        '  item1: short line\n' +
+        '  item2: very long indented line that exceeds the 72 character limit and should wrap preserving its indent\n\n' +
+        'Change-Id: abcdefg\n';
+      assert.equal(
+        formatCommitMessageString(message),
+        'Fix the thing\n\n' +
+          'List:\n\n' +
+          '  item1: short line\n' +
+          '  item2: very long indented line that exceeds the 72 character limit and\n' +
+          '  should wrap preserving its indent\n\n' +
+          'Change-Id: abcdefg\n'
+      );
+    });
+
+    test('bullet list at end of message with colon in continuation is not treated as footer', () => {
+      const message =
+        'Fix the thing\n\n' +
+        '- First bullet point that is quite long and exceeds the 72 character limit for body lines.\n' +
+        '  Note: this continuation has a colon';
+      assert.equal(
+        formatCommitMessageString(message),
+        'Fix the thing\n\n' +
+          '- First bullet point that is quite long and exceeds the 72 character\n' +
+          '  limit for body lines. Note: this continuation has a colon'
+      );
+    });
+
+    test('mid-paragraph wrapped asterisk or list marker is not treated as list item', () => {
+      const message =
+        'Fix the thing\n\n' +
+        'for `item_byte_size`, `shape`, and `strides`. Consequently, `strides[0]\n' +
+        '* item_byte_size` overflowed in 32-bit unsigned arithmetic and wrapped\n' +
+        'around modulo 2^32 before widening to `size_t`.\n\n' +
+        'Change-Id: abcdefg\n';
+      assert.equal(formatCommitMessageString(message), message);
+    });
+
+    test('short single-line bullet points preserve internal column alignment', () => {
+      const message =
+        'Fix the thing\n\n' +
+        'Speedups:\n' +
+        '* checkstyle (300 files):          8.35s -> 4.48s  (1.86x)\n' +
+        '* turbine (chrome_java header):    1.60s -> 1.07s  (1.49x)\n\n' +
+        'Change-Id: abcdefg\n';
+      assert.equal(formatCommitMessageString(message), message);
+    });
+
+    test('indented single-token footer example in body is not split', () => {
+      const message =
+        'Fix the thing\n\n' +
+        'Add the following footer to your CL description:\n' +
+        '  Include-Ci-Only-Tests: internal.client.clank:android-14-arm64-rel-tests|chrome_public_test_apk\n\n' +
+        'Change-Id: abcdefg\n';
+      assert.equal(formatCommitMessageString(message), message);
+    });
+
     test('bullet points with preceding text are not reordered', () => {
       const message =
         'Add a content scrim view\n\n' +
@@ -423,6 +568,53 @@
         "'#' at line start is a comment marker in Git. Line will be ignored"
       );
     });
+
+    test('bullet and numbered list lines exceeding 72 chars are flagged', () => {
+      const message =
+        'Fix the thing\n\n' +
+        '- This is a very long bullet point that exceeds the maximum allowed length of 72 characters.\n' +
+        '1. This is a very long numbered item that exceeds the maximum allowed length of 72 characters.\n\n' +
+        'Change-Id: abcdefg\n';
+      const errors = detectFormattingErrorsInString(message);
+      assertError(
+        errors,
+        ErrorType.LINE_TOO_LONG,
+        3,
+        'Line exceeds 72 characters'
+      );
+      assertError(
+        errors,
+        ErrorType.LINE_TOO_LONG,
+        4,
+        'Line exceeds 72 characters'
+      );
+    });
+
+    test('4-space indented code block exceeding 72 chars is not flagged', () => {
+      const message =
+        'Fix the thing\n\n' +
+        '    const veryLongCodeLine = someFunctionWithVeryLongArgumentsThatExceeds72Characters();\n' +
+        '- Bullet item followed by 4-space code block:\n' +
+        '    const anotherVeryLongCodeLine = someFunctionWithVeryLongArgumentsThatExceeds72Characters();\n\n' +
+        'Change-Id: abcdefg\n';
+      const errors = detectFormattingErrorsInString(message);
+      assert.isEmpty(errors);
+    });
+
+    test('indented bullet continuation exceeding 72 chars is flagged', () => {
+      const message =
+        'Fix the thing\n\n' +
+        '  * Indented bullet item with a 4-space continuation line\n' +
+        '    that is very long and exceeds the maximum allowed length of 72 characters.\n\n' +
+        'Change-Id: abcdefg\n';
+      const errors = detectFormattingErrorsInString(message);
+      assertError(
+        errors,
+        ErrorType.LINE_TOO_LONG,
+        4,
+        'Line exceeds 72 characters'
+      );
+    });
   });
 
   suite('parseCommitMessageString', () => {
@@ -554,5 +746,38 @@
         'footer with equals sign format line should be kept as footer'
       );
     });
+
+    test('indented list with key: value lines is kept in body', () => {
+      assertParseResult(
+        'Subject\n\nBody line\n\nList:\n  item1: val1\n  item2: val2',
+        {
+          subject: 'Subject',
+          body: ['Body line', '', 'List:', '  item1: val1', '  item2: val2'],
+          footer: [],
+          hasTrailingBlankLine: false,
+        },
+        'indented list with key: value lines should be moved to body'
+      );
+      assertParseResult(
+        'Subject\n\nList:\n\n  item1: val1\n  item2: val2',
+        {
+          subject: 'Subject',
+          body: ['List:', '', '  item1: val1', '  item2: val2'],
+          footer: [],
+          hasTrailingBlankLine: false,
+        },
+        'indented list after blank line should be moved to body'
+      );
+      assertParseResult(
+        'Subject\n\nExample:\n\n    timeout: 30s',
+        {
+          subject: 'Subject',
+          body: ['Example:', '', '    timeout: 30s'],
+          footer: [],
+          hasTrailingBlankLine: false,
+        },
+        'single-line 4-space code block with key: value should be moved to body'
+      );
+    });
   });
 });
diff --git a/polygerrit-ui/app/utils/diff-util.ts b/polygerrit-ui/app/utils/diff-util.ts
index 56313b8..960a5b9 100644
--- a/polygerrit-ui/app/utils/diff-util.ts
+++ b/polygerrit-ui/app/utils/diff-util.ts
@@ -3,8 +3,10 @@
  * Copyright 2023 Google LLC
  * SPDX-License-Identifier: Apache-2.0
  */
-import {Side} from '../constants/constants';
+import {FileInfoStatus, Side} from '../constants/constants';
+import {FileInfo} from '../types/common';
 import {DiffInfo, SkipInfo, SkipObject} from '../types/diff';
+import {isMagicPath} from './path-list-util';
 
 export function normalizeSkipInfo(skip: SkipInfo | undefined): SkipObject {
   if (!skip) return {left: 0, right: 0};
@@ -57,18 +59,27 @@
 /**
  * Get the lines of the diff for a given side.
  */
-export function getDiffLines(diff: DiffInfo, side: Side): string[] {
-  let lines: string[] = [];
+export function getDiffLines(diff: DiffInfo | undefined, side: Side): string[] {
+  if (!diff?.content) return [];
+  const lines: string[] = [];
   for (const chunk of diff.content) {
     if (chunk.skip) {
       const skip = normalizeSkipInfo(chunk.skip);
-      lines = lines.concat(Array(skip[side]).fill(''));
+      for (let i = 0; i < skip[side]; i++) {
+        lines.push('');
+      }
     } else if (chunk.ab) {
-      lines = lines.concat(chunk.ab);
+      for (const line of chunk.ab) {
+        lines.push(line);
+      }
     } else if (side === Side.LEFT && chunk.a) {
-      lines = lines.concat(chunk.a);
+      for (const line of chunk.a) {
+        lines.push(line);
+      }
     } else if (side === Side.RIGHT && chunk.b) {
-      lines = lines.concat(chunk.b);
+      for (const line of chunk.b) {
+        lines.push(line);
+      }
     }
   }
   return lines;
@@ -133,3 +144,45 @@
     !!contentTypeB?.startsWith('text/markdown')
   );
 }
+
+const LEAN_FILE_EXTENSIONS = /\.lean$/i;
+
+export function isLeanDiff(path?: string, diff?: DiffInfo): boolean {
+  if (path && LEAN_FILE_EXTENSIONS.test(path)) {
+    return true;
+  }
+  const contentTypeA = diff?.meta_a?.content_type;
+  const contentTypeB = diff?.meta_b?.content_type;
+  return (
+    !!contentTypeA?.startsWith('text/x-lean') ||
+    !!contentTypeB?.startsWith('text/x-lean') ||
+    !!contentTypeA?.startsWith('text/lean') ||
+    !!contentTypeB?.startsWith('text/lean')
+  );
+}
+
+export function computeBlameToggleLabel(isLoading: boolean, isLoaded: boolean) {
+  if (isLoading) return 'Loading blame ...';
+  return isLoaded ? 'Hide Blame' : 'Show Blame';
+}
+
+/**
+ * Whether the blame of the left side of a file can be shown, wherever its diff
+ * is displayed. Callers check their own additional conditions.
+ */
+export function canBlameFile(
+  allowBlame: boolean,
+  path?: string,
+  file?: FileInfo,
+  diff?: DiffInfo
+): boolean {
+  return (
+    allowBlame &&
+    !!path &&
+    !isMagicPath(path) &&
+    !isImageDiff(diff) &&
+    !file?.binary &&
+    !file?.diffs_too_expensive_to_compute &&
+    file?.status !== FileInfoStatus.ADDED
+  );
+}
diff --git a/polygerrit-ui/app/utils/diff-util_test.ts b/polygerrit-ui/app/utils/diff-util_test.ts
index becae05..948f3cb 100644
--- a/polygerrit-ui/app/utils/diff-util_test.ts
+++ b/polygerrit-ui/app/utils/diff-util_test.ts
@@ -7,9 +7,13 @@
 import {DiffInfo, Side} from '../api/diff';
 import '../test/common-test-setup';
 import {createDiff} from '../test/test-data-generators';
+import {FileInfoStatus, SpecialFilePath} from '../constants/constants';
 import {
+  canBlameFile,
   getContentFromDiff,
+  getDiffLines,
   isFileUnchanged,
+  isLeanDiff,
   isLineUnchanged,
   isMarkdownDiff,
 } from './diff-util';
@@ -262,4 +266,105 @@
       assert.isFalse(isMarkdownDiff('code', diffOther));
     });
   });
+
+  suite('isLeanDiff()', () => {
+    test('detects lean extensions', () => {
+      assert.isTrue(isLeanDiff('formal/BoundedLattice.lean'));
+      assert.isTrue(isLeanDiff('Main.LEAN'));
+      assert.isFalse(isLeanDiff('README.md'));
+      assert.isFalse(isLeanDiff('code.ts'));
+      assert.isFalse(isLeanDiff('leanfile'));
+      assert.isFalse(isLeanDiff(undefined));
+    });
+
+    test('detects lean content types', () => {
+      const diffA: DiffInfo = {
+        ...createDiff(),
+        meta_a: {
+          name: 'proof',
+          content_type: 'text/x-lean',
+          lines: 10,
+        },
+      };
+      assert.isTrue(isLeanDiff('proof', diffA));
+
+      const diffB: DiffInfo = {
+        ...createDiff(),
+        meta_b: {
+          name: 'proof',
+          content_type: 'text/lean; charset=utf-8',
+          lines: 10,
+        },
+      };
+      assert.isTrue(isLeanDiff('proof', diffB));
+
+      const diffOther: DiffInfo = {
+        ...createDiff(),
+        meta_a: {
+          name: 'code',
+          content_type: 'text/plain',
+          lines: 10,
+        },
+      };
+      assert.isFalse(isLeanDiff('code', diffOther));
+    });
+  });
+
+  suite('getDiffLines()', () => {
+    test('returns empty array when diff or diff.content is undefined', () => {
+      assert.deepEqual(getDiffLines(undefined, Side.LEFT), []);
+      assert.deepEqual(getDiffLines(undefined, Side.RIGHT), []);
+      const malformed = {} as DiffInfo;
+      assert.deepEqual(getDiffLines(malformed, Side.LEFT), []);
+      assert.deepEqual(getDiffLines(malformed, Side.RIGHT), []);
+    });
+
+    test('collects left and right lines across chunks without losing order', () => {
+      const diff: DiffInfo = {
+        ...createDiff(),
+        content: [
+          {ab: ['shared1']},
+          {a: ['left1', 'left2'], b: ['right1']},
+          {ab: ['shared2']},
+        ],
+      };
+      assert.deepEqual(getDiffLines(diff, Side.LEFT), [
+        'shared1',
+        'left1',
+        'left2',
+        'shared2',
+      ]);
+      assert.deepEqual(getDiffLines(diff, Side.RIGHT), [
+        'shared1',
+        'right1',
+        'shared2',
+      ]);
+    });
+  });
+
+  suite('canBlameFile()', () => {
+    const imageDiff: DiffInfo = {
+      ...createDiff(),
+      meta_a: {name: 'a.png', content_type: 'image/png', lines: 0},
+    };
+
+    test('allows a modified text file when the server allows blame', () => {
+      assert.isTrue(canBlameFile(true, 'a.txt', {}, createDiff()));
+      assert.isTrue(canBlameFile(true, 'a.txt'));
+    });
+
+    test('rejects files without a blameable left side', () => {
+      assert.isFalse(canBlameFile(false, 'a.txt'));
+      assert.isFalse(canBlameFile(true, undefined));
+      assert.isFalse(canBlameFile(true, SpecialFilePath.COMMIT_MESSAGE));
+      assert.isFalse(canBlameFile(true, 'a.png', {}, imageDiff));
+      assert.isFalse(canBlameFile(true, 'a.bin', {binary: true}));
+      assert.isFalse(
+        canBlameFile(true, 'a.txt', {diffs_too_expensive_to_compute: true})
+      );
+      assert.isFalse(
+        canBlameFile(true, 'a.txt', {status: FileInfoStatus.ADDED})
+      );
+    });
+  });
 });
diff --git a/polygerrit-ui/app/utils/label-util.ts b/polygerrit-ui/app/utils/label-util.ts
index 4c9a7a5..9e377ba 100644
--- a/polygerrit-ui/app/utils/label-util.ts
+++ b/polygerrit-ui/app/utils/label-util.ts
@@ -8,6 +8,7 @@
   isQuickLabelInfo,
   LabelNameToValuesMap,
   LabelValueToDescriptionMap,
+  SubmitRequirementExpressionInfo,
   SubmitRequirementResultInfo,
   SubmitRequirementStatus,
 } from '../api/rest-api';
@@ -22,6 +23,10 @@
 } from '../types/common';
 import {ParsedChangeInfo} from '../types/types';
 import {assertNever, hasOwnProperty, unique} from './common-util';
+import {
+  atomizeExpression,
+  SubmitRequirementExpressionAtomStatus,
+} from './submit-requirement-util';
 
 export interface Label {
   name: string;
@@ -229,6 +234,29 @@
   return false;
 }
 
+export function isAiVote(approvalInfo?: ApprovalInfo): boolean {
+  return !!approvalInfo?.is_ai;
+}
+
+export function hasOnlyAiVotes(
+  labelInfo?: LabelInfo,
+  approvalInfo?: ApprovalInfo
+): boolean {
+  if (
+    !labelInfo ||
+    !isDetailedLabelInfo(labelInfo) ||
+    !approvalInfo ||
+    !isAiVote(approvalInfo) ||
+    hasNeutralStatus(labelInfo, approvalInfo)
+  ) {
+    return false;
+  }
+  const sameValueApprovals = (labelInfo.all ?? []).filter(
+    other => other.value === approvalInfo.value
+  );
+  return sameValueApprovals.length > 0 && sameValueApprovals.every(isAiVote);
+}
+
 export function labelCompare(labelName1: string, labelName2: string) {
   if (
     labelName1 === StandardLabels.CODE_REVIEW &&
@@ -550,14 +578,44 @@
   );
 }
 
+/**
+ * Returns true if the requirement is unsatisfied because something is present
+ * that must be absent, e.g. a veto vote (`-label:Code-Review=MIN`) or a
+ * forbidden commit subject (`-subject:WIP`). Such a requirement cannot be
+ * satisfied by adding votes.
+ */
 export function isBlockingCondition(
   requirement: SubmitRequirementResultInfo
 ): boolean {
   if (requirement.status !== SubmitRequirementStatus.UNSATISFIED) return false;
 
-  return !!requirement.submittability_expression_result.passing_atoms?.some(
-    atom => atom.match(/^label[0-9]*:[\w-]+=MIN$/)
-  );
+  const result = requirement.submittability_expression_result;
+  if (
+    result.passing_atoms?.some(atom => atom.match(/^label[0-9]*:[\w-]+=MIN$/))
+  ) {
+    return true;
+  }
+  return hasPassingNegatedAtom(result);
+}
+
+function hasPassingNegatedAtom(expression: SubmitRequirementExpressionInfo) {
+  if (!expression.passing_atoms?.length) return false;
+  const parts = atomizeExpression(expression);
+  return parts.some((part, i) => {
+    if (!part.isAtom) return false;
+    // atomizeExpression() includes a unary minus in the atom and negates its
+    // status, so a passing atom that is negated is reported as failing.
+    if (part.value.startsWith('-')) {
+      return part.atomStatus === SubmitRequirementExpressionAtomStatus.FAILING;
+    }
+    const previous = i > 0 ? parts[i - 1] : undefined;
+    return (
+      part.atomStatus === SubmitRequirementExpressionAtomStatus.PASSING &&
+      !!previous &&
+      !previous.isAtom &&
+      /(^|[\s(])NOT\s+$/.test(previous.value)
+    );
+  });
 }
 
 const LABEL_PREFIX_INVALID_PROLOG = 'Invalid-Prolog-Rules-Label-Name--';
diff --git a/polygerrit-ui/app/utils/label-util_test.ts b/polygerrit-ui/app/utils/label-util_test.ts
index b73bf7c..8a5ce8e 100644
--- a/polygerrit-ui/app/utils/label-util_test.ts
+++ b/polygerrit-ui/app/utils/label-util_test.ts
@@ -23,9 +23,11 @@
   getVotingRangeOrDefault,
   hasApprovedVote,
   hasNeutralStatus,
+  hasOnlyAiVotes,
   hasRejectedVote,
   hasVoted,
   hasVotes,
+  isAiVote,
   isBlockingCondition,
   labelCompare,
   LabelStatus,
@@ -288,7 +290,7 @@
             '-2': 'terrible',
           },
           default_value: 0,
-        } as DetailedLabelInfo,
+        },
         Verified: {
           values: {
             '0': 'No score',
@@ -298,7 +300,7 @@
             '-2': 'terrible',
           },
           default_value: 0,
-        } as DetailedLabelInfo,
+        },
       } as LabelNameToInfoMap,
     };
     let labels = computeLabels(account, change);
@@ -316,8 +318,8 @@
             value: 1,
           },
         ],
-      } as DetailedLabelInfo,
-    } as LabelNameToInfoMap;
+      },
+    };
     labels = computeLabels(account, change);
     assert.deepEqual(labels, [
       {name: 'Code-Review', value: null},
@@ -910,6 +912,86 @@
       };
       assert.isFalse(isBlockingCondition(requirement));
     });
+
+    test('true for passing negated non-label atom', () => {
+      const requirement: SubmitRequirementResultInfo = {
+        name: 'Commit-Subject',
+        status: SubmitRequirementStatus.UNSATISFIED,
+        is_legacy: false,
+        submittability_expression_result: {
+          expression: '-prefixsubject:Edit',
+          fulfilled: false,
+          status: SubmitRequirementExpressionInfoStatus.FAIL,
+          passing_atoms: ['prefixsubject:Edit'],
+          failing_atoms: [],
+        },
+      };
+      assert.isTrue(isBlockingCondition(requirement));
+    });
+
+    test('true for passing atom negated with NOT', () => {
+      const requirement: SubmitRequirementResultInfo = {
+        name: 'Commit-Subject',
+        status: SubmitRequirementStatus.UNSATISFIED,
+        is_legacy: false,
+        submittability_expression_result: {
+          expression: 'label:Verified=MAX AND NOT prefixsubject:Edit',
+          fulfilled: false,
+          status: SubmitRequirementExpressionInfoStatus.FAIL,
+          passing_atoms: ['label:Verified=MAX', 'prefixsubject:Edit'],
+          failing_atoms: [],
+        },
+      };
+      assert.isTrue(isBlockingCondition(requirement));
+    });
+
+    test('false for failing non-negated non-label atom', () => {
+      const requirement: SubmitRequirementResultInfo = {
+        name: 'Commit-Subject',
+        status: SubmitRequirementStatus.UNSATISFIED,
+        is_legacy: false,
+        submittability_expression_result: {
+          expression: 'prefixsubject:Fix',
+          fulfilled: false,
+          status: SubmitRequirementExpressionInfoStatus.FAIL,
+          passing_atoms: [],
+          failing_atoms: ['prefixsubject:Fix'],
+        },
+      };
+      assert.isFalse(isBlockingCondition(requirement));
+    });
+
+    test('false for passing non-negated atom', () => {
+      const requirement: SubmitRequirementResultInfo = {
+        name: 'Commit-Subject',
+        status: SubmitRequirementStatus.UNSATISFIED,
+        is_legacy: false,
+        submittability_expression_result: {
+          expression: 'label:Verified=MAX AND prefixsubject:Fix',
+          fulfilled: false,
+          status: SubmitRequirementExpressionInfoStatus.FAIL,
+          passing_atoms: ['prefixsubject:Fix'],
+          failing_atoms: ['label:Verified=MAX'],
+        },
+      };
+      assert.isFalse(isBlockingCondition(requirement));
+    });
+
+    test('false when satisfied', () => {
+      const requirement: SubmitRequirementResultInfo = {
+        name: 'Commit-Subject',
+        status: SubmitRequirementStatus.SATISFIED,
+        is_legacy: false,
+        submittability_expression_result: {
+          expression: '-prefixsubject:Edit',
+          fulfilled: false,
+          status: SubmitRequirementExpressionInfoStatus.FAIL,
+          passing_atoms: ['prefixsubject:Edit'],
+          failing_atoms: [],
+        },
+      };
+      assert.isFalse(isBlockingCondition(requirement));
+    });
   });
 
   suite('valueString', () => {
@@ -1119,4 +1201,89 @@
       assert.deepEqual(orderSubmitRequirementNames(names), expected);
     });
   });
+
+  suite('isAiVote and hasOnlyAiVotes', () => {
+    test('isAiVote detects is_ai approvals', () => {
+      assert.isFalse(isAiVote(undefined));
+      assert.isFalse(isAiVote(createApproval()));
+      assert.isFalse(
+        isAiVote({
+          ...createApproval(),
+          is_ai: false,
+        })
+      );
+      assert.isTrue(
+        isAiVote({
+          ...createApproval(),
+          is_ai: true,
+        })
+      );
+    });
+
+    test('hasOnlyAiVotes checks single and stacked approvals by value', () => {
+      const aiPlus2a = {
+        ...createApprovalWithValue(2),
+        _account_id: 1 as AccountId,
+        is_ai: true,
+      };
+      const aiPlus2b = {
+        ...createApprovalWithValue(2),
+        _account_id: 2 as AccountId,
+        is_ai: true,
+      };
+      const humanPlus2 = {
+        ...createApprovalWithValue(2),
+        _account_id: 3 as AccountId,
+      };
+      const aiMinus1 = {
+        ...createApprovalWithValue(-1),
+        _account_id: 4 as AccountId,
+        is_ai: true,
+      };
+      const humanPlus1 = {
+        ...createApprovalWithValue(1),
+        _account_id: 5 as AccountId,
+      };
+      const neutralAi = {
+        ...createApprovalWithValue(0),
+        _account_id: 6 as AccountId,
+        is_ai: true,
+      };
+
+      assert.isFalse(hasOnlyAiVotes(undefined, aiPlus2a));
+      assert.isFalse(
+        hasOnlyAiVotes(createDetailedLabelInfoWithValues(VALUES_2), undefined)
+      );
+
+      // Neutral vote should return false even if is_ai is true
+      const neutralLabel = {
+        ...createDetailedLabelInfoWithValues(VALUES_2),
+        all: [neutralAi],
+      };
+      assert.isFalse(hasOnlyAiVotes(neutralLabel, neutralAi));
+
+      // Single AI vote (positive or negative) returns true
+      const singleAiLabel = {
+        ...createDetailedLabelInfoWithValues(VALUES_2),
+        all: [aiPlus2a, aiMinus1, humanPlus1],
+      };
+      assert.isTrue(hasOnlyAiVotes(singleAiLabel, aiPlus2a));
+      assert.isTrue(hasOnlyAiVotes(singleAiLabel, aiMinus1));
+      assert.isFalse(hasOnlyAiVotes(singleAiLabel, humanPlus1));
+
+      // Stacked votes where all votes of that value are is_ai returns true
+      const allAiStackedLabel = {
+        ...createDetailedLabelInfoWithValues(VALUES_2),
+        all: [aiPlus2a, aiPlus2b],
+      };
+      assert.isTrue(hasOnlyAiVotes(allAiStackedLabel, aiPlus2a));
+
+      // Stacked votes mixing is_ai and non-is_ai returns false
+      const mixedStackedLabel = {
+        ...createDetailedLabelInfoWithValues(VALUES_2),
+        all: [aiPlus2a, humanPlus2],
+      };
+      assert.isFalse(hasOnlyAiVotes(mixedStackedLabel, aiPlus2a));
+    });
+  });
 });
diff --git a/polygerrit-ui/app/utils/patch-set-util.ts b/polygerrit-ui/app/utils/patch-set-util.ts
index 34b7232..8d7597f 100644
--- a/polygerrit-ui/app/utils/patch-set-util.ts
+++ b/polygerrit-ui/app/utils/patch-set-util.ts
@@ -343,21 +343,25 @@
   rev?: RevisionInfo | EditRevisionInfo,
   index?: number
 ) {
-  const parents = rev?.parents_data ?? [];
-  const parent = parents[index ?? 0];
-  if (!parent) return '';
-  return shorten(parent.commit_id) ?? '';
+  const idx = index ?? 0;
+  const parentDataCommit = rev?.parents_data?.[idx]?.commit_id;
+  const commitParentCommit = rev?.commit?.parents?.[idx]?.commit;
+  return shorten(parentDataCommit ?? commitParentCommit) ?? '';
 }
 
 export function getParentInfoString(
   rev?: RevisionInfo | EditRevisionInfo,
   index?: number
 ) {
+  const idx = index ?? 0;
   const parents = rev?.parents_data ?? [];
-  const parent = parents[index ?? 0];
-  if (!parent || parent.is_merged_in_target_branch) return '';
+  const parent = parents[idx];
+  if (!parent) {
+    return idx > 0 && rev?.commit?.parents?.[idx] ? 'Other branch' : '';
+  }
+  if (parent.is_merged_in_target_branch) return '';
 
-  if (index === 0) {
+  if (idx === 0) {
     if (parent.change_number) {
       return `Patchset ${parent.patch_set_number} of Change ${parent.change_number}`;
     } else {
diff --git a/polygerrit-ui/app/utils/patch-set-util_test.ts b/polygerrit-ui/app/utils/patch-set-util_test.ts
index 8060db8..8a964d2 100644
--- a/polygerrit-ui/app/utils/patch-set-util_test.ts
+++ b/polygerrit-ui/app/utils/patch-set-util_test.ts
@@ -8,6 +8,7 @@
 import {
   createChange,
   createChangeMessageInfo,
+  createCommit,
   createRevision,
 } from '../test/test-data-generators';
 import {
@@ -15,6 +16,7 @@
   ChangeInfo,
   CommitId,
   EDIT,
+  NumericChangeId,
   PARENT,
   PatchSetNum,
   PatchSetNumber,
@@ -26,7 +28,9 @@
   computeAllPatchSets,
   findEditParentPatchNum,
   findEditParentRevision,
+  getParentCommit,
   getParentIndex,
+  getParentInfoString,
   getRevisionByPatchNum,
   isMergeParent,
   sortRevisions,
@@ -153,8 +157,8 @@
   test('isMergeParent', () => {
     assert.isFalse(isMergeParent(1 as PatchSetNum));
     assert.isFalse(isMergeParent(4321 as PatchSetNum));
-    assert.isFalse(isMergeParent(EDIT as PatchSetNum));
-    assert.isFalse(isMergeParent(PARENT as PatchSetNum));
+    assert.isFalse(isMergeParent(EDIT));
+    assert.isFalse(isMergeParent(PARENT));
     assert.isFalse(isMergeParent(0 as PatchSetNum));
 
     assert.isTrue(isMergeParent(-23 as PatchSetNum));
@@ -255,4 +259,68 @@
       assert.deepEqual(patchNums[i], expected[i]);
     }
   });
+
+  test('getParentCommit', () => {
+    assert.equal(getParentCommit(undefined), '');
+    assert.equal(getParentCommit(createRevision(1)), '');
+
+    const revWithCommitParents: RevisionInfo = {
+      ...createRevision(1),
+      commit: {
+        ...createRevision(1).commit!,
+        parents: [
+          {commit: '1234567890abcdef' as CommitId, subject: 'parent 1'},
+          {commit: 'fedcba0987654321' as CommitId, subject: 'parent 2'},
+        ],
+      },
+    };
+    assert.equal(getParentCommit(revWithCommitParents, 0), '1234567');
+    assert.equal(getParentCommit(revWithCommitParents, 1), 'fedcba0');
+    assert.equal(getParentCommit(revWithCommitParents, 2), '');
+
+    const revWithParentsData: RevisionInfo = {
+      ...revWithCommitParents,
+      parents_data: [
+        {
+          branch_name: 'refs/heads/main',
+          commit_id: 'abcdef1234567890' as CommitId,
+          is_merged_in_target_branch: true,
+        },
+      ],
+    };
+    assert.equal(getParentCommit(revWithParentsData, 0), 'abcdef1');
+  });
+
+  test('getParentInfoString', () => {
+    const revWithoutParentsData: RevisionInfo = {
+      ...createRevision(1),
+      commit: {
+        ...createCommit(),
+        parents: [
+          {commit: 'p1' as CommitId, subject: 's1'},
+          {commit: 'p2' as CommitId, subject: 's2'},
+        ],
+      },
+    };
+    assert.equal(getParentInfoString(revWithoutParentsData, 0), '');
+    assert.equal(getParentInfoString(revWithoutParentsData, 1), 'Other branch');
+    assert.equal(getParentInfoString(revWithoutParentsData, 2), '');
+
+    const revStacked: RevisionInfo = {
+      ...createRevision(1),
+      parents_data: [
+        {
+          branch_name: 'refs/heads/main',
+          commit_id: 'abcdef1234567890' as CommitId,
+          is_merged_in_target_branch: false,
+          change_number: 100 as NumericChangeId,
+          patch_set_number: 3 as PatchSetNumber,
+        },
+      ],
+    };
+    assert.equal(
+      getParentInfoString(revStacked, 0),
+      'Patchset 3 of Change 100'
+    );
+  });
 });
diff --git a/polygerrit-ui/app/utils/path-list-util.ts b/polygerrit-ui/app/utils/path-list-util.ts
index 31e17c9..a48f032 100644
--- a/polygerrit-ui/app/utils/path-list-util.ts
+++ b/polygerrit-ui/app/utils/path-list-util.ts
@@ -4,7 +4,7 @@
  * SPDX-License-Identifier: Apache-2.0
  */
 import {FileInfoStatus, SpecialFilePath} from '../constants/constants';
-import {FileInfo, FileNameToFileInfoMap} from '../types/common';
+import {FileNameToFileInfoMap} from '../types/common';
 import {hasOwnProperty} from './common-util';
 
 export function specialFilePathCompare(a: string, b: string) {
@@ -87,7 +87,7 @@
     // or fill in 0 here
     files[commentedPath] = {
       status: FileInfoStatus.UNMODIFIED,
-    } as FileInfo;
+    };
   });
 }
 
diff --git a/polygerrit-ui/app/utils/safari-selection-util.ts b/polygerrit-ui/app/utils/safari-selection-util.ts
index 6ede081..d0ba936 100644
--- a/polygerrit-ui/app/utils/safari-selection-util.ts
+++ b/polygerrit-ui/app/utils/safari-selection-util.ts
@@ -8,18 +8,13 @@
 const SUPPORTS_SHADOW_SELECTION =
   typeof window.ShadowRoot.prototype.getSelection === 'function';
 const SUPPORTS_BEFORE_INPUT =
-  typeof (window.InputEvent.prototype as InputEventExtended).getTargetRanges ===
-  'function';
+  typeof window.InputEvent.prototype.getTargetRanges === 'function';
 
 const TARGET_ID = 'diffTable';
 
 let processing = false;
 let contentEditableRange: Range | null = null;
 
-interface InputEventExtended extends InputEvent {
-  getTargetRanges(): StaticRange[];
-}
-
 if (isSafari() && !SUPPORTS_SHADOW_SELECTION && SUPPORTS_BEFORE_INPUT) {
   /**
    * This library aims at extracting the selection range in a content editable
@@ -61,7 +56,7 @@
     event => {
       if (processing) {
         // selecting
-        const inputEvent = event as InputEventExtended;
+        const inputEvent = event;
         if (typeof inputEvent.getTargetRanges !== 'function') return;
         const range = inputEvent.getTargetRanges()[0];
 
diff --git a/polygerrit-ui/app/utils/url-util.ts b/polygerrit-ui/app/utils/url-util.ts
index 905aa4c..a80a916 100644
--- a/polygerrit-ui/app/utils/url-util.ts
+++ b/polygerrit-ui/app/utils/url-util.ts
@@ -10,7 +10,7 @@
   PARENT,
   RevisionPatchSetNum,
 } from '../types/common';
-import {AuthType} from '../api/rest-api';
+import {AuthType, ChangeInfo} from '../api/rest-api';
 
 export function getBaseUrl(): string {
   // window is not defined in service worker, therefore no CANONICAL_PATH
@@ -223,3 +223,32 @@
   }
   return url.origin === window.location.origin;
 }
+
+/**
+ * Matches the base change path prefix up to the change number (e.g. `/c/project/+/123`),
+ * ignoring any trailing patchsets, diff ranges, comment IDs, or file paths.
+ *
+ * @see RoutePattern.CHANGE in `gr-router.ts` for corresponding route pattern.
+ */
+const CHANGE_PREFIX_PATTERN = /^(.*?\/(?:c\/.+?\/\+)\/\d+)/;
+
+/**
+ * Returns the change URL prefix (e.g. `https://example.com/c/project/+/123`),
+ * stripping patchset numbers, diff ranges, comment IDs, and file paths from
+ * pathname, or falling back to `change.project` and `change._number` when the
+ * current pathname is not a change URL.
+ */
+export function getChangePrefix(
+  change?: Pick<ChangeInfo, 'project' | '_number'>
+): string {
+  const match = window.location.pathname.match(CHANGE_PREFIX_PATTERN);
+  if (match) {
+    return window.location.origin + match[1];
+  }
+  if (change?.project && change?._number) {
+    return `${window.location.origin}${getBaseUrl()}/c/${encodeURL(
+      change.project
+    )}/+/${change._number}`;
+  }
+  return window.location.origin + window.location.pathname;
+}
diff --git a/polygerrit-ui/app/utils/url-util_test.ts b/polygerrit-ui/app/utils/url-util_test.ts
index 4004b2a..bbbf42d 100644
--- a/polygerrit-ui/app/utils/url-util_test.ts
+++ b/polygerrit-ui/app/utils/url-util_test.ts
@@ -7,13 +7,16 @@
   AuthType,
   AUTO_MERGE,
   BasePatchSetNum,
+  NumericChangeId,
   PARENT,
+  RepoName,
   RevisionPatchSetNum,
 } from '../api/rest-api';
 import '../test/common-test-setup';
 import {
   encodeURL,
   getBaseUrl,
+  getChangePrefix,
   getDocUrl,
   getPatchRangeExpression,
   loginUrl,
@@ -201,4 +204,57 @@
       '4'
     );
   });
+
+  suite('getChangePrefix', () => {
+    let originalPath: string;
+
+    setup(() => {
+      originalPath = window.location.pathname;
+    });
+
+    teardown(() => {
+      window.history.replaceState(null, '', originalPath);
+    });
+
+    test('strips patchset, diff range, and file path subpaths', () => {
+      const origin = window.location.origin;
+
+      window.history.replaceState(null, '', '/c/my-repo/+/123');
+      assert.equal(getChangePrefix(), `${origin}/c/my-repo/+/123`);
+
+      window.history.replaceState(null, '', '/c/my-repo/+/123/4');
+      assert.equal(getChangePrefix(), `${origin}/c/my-repo/+/123`);
+
+      window.history.replaceState(null, '', '/c/my-repo/+/123/1..4');
+      assert.equal(getChangePrefix(), `${origin}/c/my-repo/+/123`);
+
+      window.history.replaceState(
+        null,
+        '',
+        '/c/my-repo/+/123/1..4/src/file.ts'
+      );
+      assert.equal(getChangePrefix(), `${origin}/c/my-repo/+/123`);
+    });
+
+    test('falls back to change project and number when pathname is not a change URL', () => {
+      const origin = window.location.origin;
+      window.history.replaceState(null, '', '/context.html');
+
+      assert.equal(
+        getChangePrefix({
+          project: 'my/project' as RepoName,
+          _number: 456 as NumericChangeId,
+        }),
+        `${origin}/c/my/project/+/456`
+      );
+
+      assert.equal(
+        getChangePrefix({
+          project: 'my/project+special%repo' as RepoName,
+          _number: 456 as NumericChangeId,
+        }),
+        `${origin}/c/my/project%252Bspecial%2525repo/+/456`
+      );
+    });
+  });
 });
diff --git a/polygerrit-ui/app/yarn.lock b/polygerrit-ui/app/yarn.lock
index 23a8b97..e34f7f8 100644
--- a/polygerrit-ui/app/yarn.lock
+++ b/polygerrit-ui/app/yarn.lock
@@ -129,12 +129,7 @@
   resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce"
   integrity sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==
 
-highlight.js@^10.4.1:
-  version "10.7.3"
-  resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.7.3.tgz#697272e3991356e40c3cac566a74eef681756531"
-  integrity sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==
-
-highlight.js@^11.12.0, highlight.js@^11.9.0, "highlight.js@^11.9.0 || ^10.4.1":
+highlight.js@^11.11.0, highlight.js@^11.12.0, highlight.js@^11.9.0, "highlight.js@^11.9.0 || ^10.4.1":
   version "11.12.0"
   resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-11.12.0.tgz#470d918fd556a76debc40fe5e4b540b6b9cb9890"
   integrity sha512-nbfWpyRMcMrPMmDwJB+dhX/eiaPKtc2RB+0QZskqJ3WjRA/FDS0e9hZrx8EC/lbEv8gXy98FcDbNa/dspAaJMg==
@@ -151,11 +146,11 @@
   dependencies:
     highlight.js "^11.9.0"
 
-"highlightjs-structured-text@https://github.com/highlightjs/highlightjs-structured-text#e68dd7aa829529fb6c40d6287585f43273605a9e":
-  version "1.4.9"
-  resolved "https://github.com/highlightjs/highlightjs-structured-text#e68dd7aa829529fb6c40d6287585f43273605a9e"
+"highlightjs-structured-text@https://github.com/highlightjs/highlightjs-structured-text#57840b0a43d930c03706e7291e3aeef9e620694d":
+  version "1.7.11"
+  resolved "https://github.com/highlightjs/highlightjs-structured-text#57840b0a43d930c03706e7291e3aeef9e620694d"
   dependencies:
-    highlight.js "^10.4.1"
+    highlight.js "^11.11.0"
 
 "highlightjs-ttcn3@https://gitea.osmocom.org/ttcn3/highlightjs-ttcn3.git#6daccff309fca1e7561a43984d42fa4f829ce06d":
   version "0.0.1"
diff --git a/polygerrit-ui/package.json b/polygerrit-ui/package.json
index 208cc89..0bf9129 100644
--- a/polygerrit-ui/package.json
+++ b/polygerrit-ui/package.json
@@ -26,7 +26,7 @@
     "source-map-support": "^0.5.21"
   },
   "scripts": {
-    "postinstall": "playwright install",
+    "postinstall": "playwright install chromium",
     "test": "web-test-runner",
     "test:screenshot": "web-test-runner --run-screenshots",
     "test:screenshot-update": "web-test-runner --run-screenshots --update-screenshots --files",
diff --git a/polygerrit-ui/pnpm-lock.yaml b/polygerrit-ui/pnpm-lock.yaml
index ac1685a..c1721ac 100644
--- a/polygerrit-ui/pnpm-lock.yaml
+++ b/polygerrit-ui/pnpm-lock.yaml
@@ -14,10 +14,10 @@
     devDependencies:
       '@open-wc/semantic-dom-diff':
         specifier: ^0.20.1
-        version: 0.20.1
+        version: 0.20.1(supports-color@8.1.1)
       '@open-wc/testing':
         specifier: ^4.0.0
-        version: 4.0.0
+        version: 4.0.0(supports-color@8.1.1)
       '@open-wc/testing-helpers':
         specifier: 3.0.1
         version: 3.0.1
@@ -26,19 +26,19 @@
         version: 10.0.10
       '@web/dev-server-esbuild':
         specifier: ^1.0.4
-        version: 1.0.4
+        version: 1.0.5(supports-color@8.1.1)
       '@web/test-runner':
         specifier: ^0.20.2
-        version: 0.20.2
+        version: 0.20.2(supports-color@8.1.1)
       '@web/test-runner-commands':
         specifier: 0.9.0
-        version: 0.9.0
+        version: 0.9.0(supports-color@8.1.1)
       '@web/test-runner-playwright':
         specifier: ^0.11.1
-        version: 0.11.1
+        version: 0.11.1(supports-color@8.1.1)
       '@web/test-runner-visual-regression':
         specifier: ^0.10.0
-        version: 0.10.0
+        version: 0.10.0(supports-color@8.1.1)
       accessibility-developer-tools:
         specifier: ^2.12.0
         version: 2.12.0
@@ -69,166 +69,166 @@
 
 packages:
 
-  '@babel/code-frame@7.27.1':
-    resolution: {integrity: sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==}
+  '@babel/code-frame@7.29.7':
+    resolution: {integrity: sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==}
     engines: {node: '>=6.9.0'}
 
-  '@babel/helper-validator-identifier@7.27.1':
-    resolution: {integrity: sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==}
+  '@babel/helper-validator-identifier@7.29.7':
+    resolution: {integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==}
     engines: {node: '>=6.9.0'}
 
-  '@esbuild/aix-ppc64@0.25.9':
-    resolution: {integrity: sha512-OaGtL73Jck6pBKjNIe24BnFE6agGl+6KxDtTfHhy1HmhthfKouEcOhqpSL64K4/0WCtbKFLOdzD/44cJ4k9opA==}
+  '@esbuild/aix-ppc64@0.27.7':
+    resolution: {integrity: sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg==}
     engines: {node: '>=18'}
     cpu: [ppc64]
     os: [aix]
 
-  '@esbuild/android-arm64@0.25.9':
-    resolution: {integrity: sha512-IDrddSmpSv51ftWslJMvl3Q2ZT98fUSL2/rlUXuVqRXHCs5EUF1/f+jbjF5+NG9UffUDMCiTyh8iec7u8RlTLg==}
+  '@esbuild/android-arm64@0.27.7':
+    resolution: {integrity: sha512-62dPZHpIXzvChfvfLJow3q5dDtiNMkwiRzPylSCfriLvZeq0a1bWChrGx/BbUbPwOrsWKMn8idSllklzBy+dgQ==}
     engines: {node: '>=18'}
     cpu: [arm64]
     os: [android]
 
-  '@esbuild/android-arm@0.25.9':
-    resolution: {integrity: sha512-5WNI1DaMtxQ7t7B6xa572XMXpHAaI/9Hnhk8lcxF4zVN4xstUgTlvuGDorBguKEnZO70qwEcLpfifMLoxiPqHQ==}
+  '@esbuild/android-arm@0.27.7':
+    resolution: {integrity: sha512-jbPXvB4Yj2yBV7HUfE2KHe4GJX51QplCN1pGbYjvsyCZbQmies29EoJbkEc+vYuU5o45AfQn37vZlyXy4YJ8RQ==}
     engines: {node: '>=18'}
     cpu: [arm]
     os: [android]
 
-  '@esbuild/android-x64@0.25.9':
-    resolution: {integrity: sha512-I853iMZ1hWZdNllhVZKm34f4wErd4lMyeV7BLzEExGEIZYsOzqDWDf+y082izYUE8gtJnYHdeDpN/6tUdwvfiw==}
+  '@esbuild/android-x64@0.27.7':
+    resolution: {integrity: sha512-x5VpMODneVDb70PYV2VQOmIUUiBtY3D3mPBG8NxVk5CogneYhkR7MmM3yR/uMdITLrC1ml/NV1rj4bMJuy9MCg==}
     engines: {node: '>=18'}
     cpu: [x64]
     os: [android]
 
-  '@esbuild/darwin-arm64@0.25.9':
-    resolution: {integrity: sha512-XIpIDMAjOELi/9PB30vEbVMs3GV1v2zkkPnuyRRURbhqjyzIINwj+nbQATh4H9GxUgH1kFsEyQMxwiLFKUS6Rg==}
+  '@esbuild/darwin-arm64@0.27.7':
+    resolution: {integrity: sha512-5lckdqeuBPlKUwvoCXIgI2D9/ABmPq3Rdp7IfL70393YgaASt7tbju3Ac+ePVi3KDH6N2RqePfHnXkaDtY9fkw==}
     engines: {node: '>=18'}
     cpu: [arm64]
     os: [darwin]
 
-  '@esbuild/darwin-x64@0.25.9':
-    resolution: {integrity: sha512-jhHfBzjYTA1IQu8VyrjCX4ApJDnH+ez+IYVEoJHeqJm9VhG9Dh2BYaJritkYK3vMaXrf7Ogr/0MQ8/MeIefsPQ==}
+  '@esbuild/darwin-x64@0.27.7':
+    resolution: {integrity: sha512-rYnXrKcXuT7Z+WL5K980jVFdvVKhCHhUwid+dDYQpH+qu+TefcomiMAJpIiC2EM3Rjtq0sO3StMV/+3w3MyyqQ==}
     engines: {node: '>=18'}
     cpu: [x64]
     os: [darwin]
 
-  '@esbuild/freebsd-arm64@0.25.9':
-    resolution: {integrity: sha512-z93DmbnY6fX9+KdD4Ue/H6sYs+bhFQJNCPZsi4XWJoYblUqT06MQUdBCpcSfuiN72AbqeBFu5LVQTjfXDE2A6Q==}
+  '@esbuild/freebsd-arm64@0.27.7':
+    resolution: {integrity: sha512-B48PqeCsEgOtzME2GbNM2roU29AMTuOIN91dsMO30t+Ydis3z/3Ngoj5hhnsOSSwNzS+6JppqWsuhTp6E82l2w==}
     engines: {node: '>=18'}
     cpu: [arm64]
     os: [freebsd]
 
-  '@esbuild/freebsd-x64@0.25.9':
-    resolution: {integrity: sha512-mrKX6H/vOyo5v71YfXWJxLVxgy1kyt1MQaD8wZJgJfG4gq4DpQGpgTB74e5yBeQdyMTbgxp0YtNj7NuHN0PoZg==}
+  '@esbuild/freebsd-x64@0.27.7':
+    resolution: {integrity: sha512-jOBDK5XEjA4m5IJK3bpAQF9/Lelu/Z9ZcdhTRLf4cajlB+8VEhFFRjWgfy3M1O4rO2GQ/b2dLwCUGpiF/eATNQ==}
     engines: {node: '>=18'}
     cpu: [x64]
     os: [freebsd]
 
-  '@esbuild/linux-arm64@0.25.9':
-    resolution: {integrity: sha512-BlB7bIcLT3G26urh5Dmse7fiLmLXnRlopw4s8DalgZ8ef79Jj4aUcYbk90g8iCa2467HX8SAIidbL7gsqXHdRw==}
+  '@esbuild/linux-arm64@0.27.7':
+    resolution: {integrity: sha512-RZPHBoxXuNnPQO9rvjh5jdkRmVizktkT7TCDkDmQ0W2SwHInKCAV95GRuvdSvA7w4VMwfCjUiPwDi0ZO6Nfe9A==}
     engines: {node: '>=18'}
     cpu: [arm64]
     os: [linux]
 
-  '@esbuild/linux-arm@0.25.9':
-    resolution: {integrity: sha512-HBU2Xv78SMgaydBmdor38lg8YDnFKSARg1Q6AT0/y2ezUAKiZvc211RDFHlEZRFNRVhcMamiToo7bDx3VEOYQw==}
+  '@esbuild/linux-arm@0.27.7':
+    resolution: {integrity: sha512-RkT/YXYBTSULo3+af8Ib0ykH8u2MBh57o7q/DAs3lTJlyVQkgQvlrPTnjIzzRPQyavxtPtfg0EopvDyIt0j1rA==}
     engines: {node: '>=18'}
     cpu: [arm]
     os: [linux]
 
-  '@esbuild/linux-ia32@0.25.9':
-    resolution: {integrity: sha512-e7S3MOJPZGp2QW6AK6+Ly81rC7oOSerQ+P8L0ta4FhVi+/j/v2yZzx5CqqDaWjtPFfYz21Vi1S0auHrap3Ma3A==}
+  '@esbuild/linux-ia32@0.27.7':
+    resolution: {integrity: sha512-GA48aKNkyQDbd3KtkplYWT102C5sn/EZTY4XROkxONgruHPU72l+gW+FfF8tf2cFjeHaRbWpOYa/uRBz/Xq1Pg==}
     engines: {node: '>=18'}
     cpu: [ia32]
     os: [linux]
 
-  '@esbuild/linux-loong64@0.25.9':
-    resolution: {integrity: sha512-Sbe10Bnn0oUAB2AalYztvGcK+o6YFFA/9829PhOCUS9vkJElXGdphz0A3DbMdP8gmKkqPmPcMJmJOrI3VYB1JQ==}
+  '@esbuild/linux-loong64@0.27.7':
+    resolution: {integrity: sha512-a4POruNM2oWsD4WKvBSEKGIiWQF8fZOAsycHOt6JBpZ+JN2n2JH9WAv56SOyu9X5IqAjqSIPTaJkqN8F7XOQ5Q==}
     engines: {node: '>=18'}
     cpu: [loong64]
     os: [linux]
 
-  '@esbuild/linux-mips64el@0.25.9':
-    resolution: {integrity: sha512-YcM5br0mVyZw2jcQeLIkhWtKPeVfAerES5PvOzaDxVtIyZ2NUBZKNLjC5z3/fUlDgT6w89VsxP2qzNipOaaDyA==}
+  '@esbuild/linux-mips64el@0.27.7':
+    resolution: {integrity: sha512-KabT5I6StirGfIz0FMgl1I+R1H73Gp0ofL9A3nG3i/cYFJzKHhouBV5VWK1CSgKvVaG4q1RNpCTR2LuTVB3fIw==}
     engines: {node: '>=18'}
     cpu: [mips64el]
     os: [linux]
 
-  '@esbuild/linux-ppc64@0.25.9':
-    resolution: {integrity: sha512-++0HQvasdo20JytyDpFvQtNrEsAgNG2CY1CLMwGXfFTKGBGQT3bOeLSYE2l1fYdvML5KUuwn9Z8L1EWe2tzs1w==}
+  '@esbuild/linux-ppc64@0.27.7':
+    resolution: {integrity: sha512-gRsL4x6wsGHGRqhtI+ifpN/vpOFTQtnbsupUF5R5YTAg+y/lKelYR1hXbnBdzDjGbMYjVJLJTd2OFmMewAgwlQ==}
     engines: {node: '>=18'}
     cpu: [ppc64]
     os: [linux]
 
-  '@esbuild/linux-riscv64@0.25.9':
-    resolution: {integrity: sha512-uNIBa279Y3fkjV+2cUjx36xkx7eSjb8IvnL01eXUKXez/CBHNRw5ekCGMPM0BcmqBxBcdgUWuUXmVWwm4CH9kg==}
+  '@esbuild/linux-riscv64@0.27.7':
+    resolution: {integrity: sha512-hL25LbxO1QOngGzu2U5xeXtxXcW+/GvMN3ejANqXkxZ/opySAZMrc+9LY/WyjAan41unrR3YrmtTsUpwT66InQ==}
     engines: {node: '>=18'}
     cpu: [riscv64]
     os: [linux]
 
-  '@esbuild/linux-s390x@0.25.9':
-    resolution: {integrity: sha512-Mfiphvp3MjC/lctb+7D287Xw1DGzqJPb/J2aHHcHxflUo+8tmN/6d4k6I2yFR7BVo5/g7x2Monq4+Yew0EHRIA==}
+  '@esbuild/linux-s390x@0.27.7':
+    resolution: {integrity: sha512-2k8go8Ycu1Kb46vEelhu1vqEP+UeRVj2zY1pSuPdgvbd5ykAw82Lrro28vXUrRmzEsUV0NzCf54yARIK8r0fdw==}
     engines: {node: '>=18'}
     cpu: [s390x]
     os: [linux]
 
-  '@esbuild/linux-x64@0.25.9':
-    resolution: {integrity: sha512-iSwByxzRe48YVkmpbgoxVzn76BXjlYFXC7NvLYq+b+kDjyyk30J0JY47DIn8z1MO3K0oSl9fZoRmZPQI4Hklzg==}
+  '@esbuild/linux-x64@0.27.7':
+    resolution: {integrity: sha512-hzznmADPt+OmsYzw1EE33ccA+HPdIqiCRq7cQeL1Jlq2gb1+OyWBkMCrYGBJ+sxVzve2ZJEVeePbLM2iEIZSxA==}
     engines: {node: '>=18'}
     cpu: [x64]
     os: [linux]
 
-  '@esbuild/netbsd-arm64@0.25.9':
-    resolution: {integrity: sha512-9jNJl6FqaUG+COdQMjSCGW4QiMHH88xWbvZ+kRVblZsWrkXlABuGdFJ1E9L7HK+T0Yqd4akKNa/lO0+jDxQD4Q==}
+  '@esbuild/netbsd-arm64@0.27.7':
+    resolution: {integrity: sha512-b6pqtrQdigZBwZxAn1UpazEisvwaIDvdbMbmrly7cDTMFnw/+3lVxxCTGOrkPVnsYIosJJXAsILG9XcQS+Yu6w==}
     engines: {node: '>=18'}
     cpu: [arm64]
     os: [netbsd]
 
-  '@esbuild/netbsd-x64@0.25.9':
-    resolution: {integrity: sha512-RLLdkflmqRG8KanPGOU7Rpg829ZHu8nFy5Pqdi9U01VYtG9Y0zOG6Vr2z4/S+/3zIyOxiK6cCeYNWOFR9QP87g==}
+  '@esbuild/netbsd-x64@0.27.7':
+    resolution: {integrity: sha512-OfatkLojr6U+WN5EDYuoQhtM+1xco+/6FSzJJnuWiUw5eVcicbyK3dq5EeV/QHT1uy6GoDhGbFpprUiHUYggrw==}
     engines: {node: '>=18'}
     cpu: [x64]
     os: [netbsd]
 
-  '@esbuild/openbsd-arm64@0.25.9':
-    resolution: {integrity: sha512-YaFBlPGeDasft5IIM+CQAhJAqS3St3nJzDEgsgFixcfZeyGPCd6eJBWzke5piZuZ7CtL656eOSYKk4Ls2C0FRQ==}
+  '@esbuild/openbsd-arm64@0.27.7':
+    resolution: {integrity: sha512-AFuojMQTxAz75Fo8idVcqoQWEHIXFRbOc1TrVcFSgCZtQfSdc1RXgB3tjOn/krRHENUB4j00bfGjyl2mJrU37A==}
     engines: {node: '>=18'}
     cpu: [arm64]
     os: [openbsd]
 
-  '@esbuild/openbsd-x64@0.25.9':
-    resolution: {integrity: sha512-1MkgTCuvMGWuqVtAvkpkXFmtL8XhWy+j4jaSO2wxfJtilVCi0ZE37b8uOdMItIHz4I6z1bWWtEX4CJwcKYLcuA==}
+  '@esbuild/openbsd-x64@0.27.7':
+    resolution: {integrity: sha512-+A1NJmfM8WNDv5CLVQYJ5PshuRm/4cI6WMZRg1by1GwPIQPCTs1GLEUHwiiQGT5zDdyLiRM/l1G0Pv54gvtKIg==}
     engines: {node: '>=18'}
     cpu: [x64]
     os: [openbsd]
 
-  '@esbuild/openharmony-arm64@0.25.9':
-    resolution: {integrity: sha512-4Xd0xNiMVXKh6Fa7HEJQbrpP3m3DDn43jKxMjxLLRjWnRsfxjORYJlXPO4JNcXtOyfajXorRKY9NkOpTHptErg==}
+  '@esbuild/openharmony-arm64@0.27.7':
+    resolution: {integrity: sha512-+KrvYb/C8zA9CU/g0sR6w2RBw7IGc5J2BPnc3dYc5VJxHCSF1yNMxTV5LQ7GuKteQXZtspjFbiuW5/dOj7H4Yw==}
     engines: {node: '>=18'}
     cpu: [arm64]
     os: [openharmony]
 
-  '@esbuild/sunos-x64@0.25.9':
-    resolution: {integrity: sha512-WjH4s6hzo00nNezhp3wFIAfmGZ8U7KtrJNlFMRKxiI9mxEK1scOMAaa9i4crUtu+tBr+0IN6JCuAcSBJZfnphw==}
+  '@esbuild/sunos-x64@0.27.7':
+    resolution: {integrity: sha512-ikktIhFBzQNt/QDyOL580ti9+5mL/YZeUPKU2ivGtGjdTYoqz6jObj6nOMfhASpS4GU4Q/Clh1QtxWAvcYKamA==}
     engines: {node: '>=18'}
     cpu: [x64]
     os: [sunos]
 
-  '@esbuild/win32-arm64@0.25.9':
-    resolution: {integrity: sha512-mGFrVJHmZiRqmP8xFOc6b84/7xa5y5YvR1x8djzXpJBSv/UsNK6aqec+6JDjConTgvvQefdGhFDAs2DLAds6gQ==}
+  '@esbuild/win32-arm64@0.27.7':
+    resolution: {integrity: sha512-7yRhbHvPqSpRUV7Q20VuDwbjW5kIMwTHpptuUzV+AA46kiPze5Z7qgt6CLCK3pWFrHeNfDd1VKgyP4O+ng17CA==}
     engines: {node: '>=18'}
     cpu: [arm64]
     os: [win32]
 
-  '@esbuild/win32-ia32@0.25.9':
-    resolution: {integrity: sha512-b33gLVU2k11nVx1OhX3C8QQP6UHQK4ZtN56oFWvVXvz2VkDoe6fbG8TOgHFxEvqeqohmRnIHe5A1+HADk4OQww==}
+  '@esbuild/win32-ia32@0.27.7':
+    resolution: {integrity: sha512-SmwKXe6VHIyZYbBLJrhOoCJRB/Z1tckzmgTLfFYOfpMAx63BJEaL9ExI8x7v0oAO3Zh6D/Oi1gVxEYr5oUCFhw==}
     engines: {node: '>=18'}
     cpu: [ia32]
     os: [win32]
 
-  '@esbuild/win32-x64@0.25.9':
-    resolution: {integrity: sha512-PPOl1mi6lpLNQxnGoyAfschAodRFYXJ+9fs6WHXz7CSWKbOqiMZsubC+BQsVKuul+3vKLuwTHsS2c2y9EoKwxQ==}
+  '@esbuild/win32-x64@0.27.7':
+    resolution: {integrity: sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg==}
     engines: {node: '>=18'}
     cpu: [x64]
     os: [win32]
@@ -243,24 +243,28 @@
     resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==}
     engines: {node: '>=6.0.0'}
 
-  '@jridgewell/sourcemap-codec@1.5.5':
-    resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==}
+  '@jridgewell/sourcemap-codec@1.6.0':
+    resolution: {integrity: sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==}
 
-  '@jridgewell/trace-mapping@0.3.30':
-    resolution: {integrity: sha512-GQ7Nw5G2lTu/BtHTKfXhKHok2WGetd4XYcVKGx00SjAk8GMwgJM3zr6zORiPGuOE+/vkc90KtTosSSvaCjKb2Q==}
-
-  '@lit-labs/ssr-dom-shim@1.4.0':
-    resolution: {integrity: sha512-ficsEARKnmmW5njugNYKipTm4SFnbik7CXtoencDZzmzo/dQ+2Q0bgkzJuoJP20Aj0F+izzJjOqsnkd6F/o1bw==}
+  '@jridgewell/trace-mapping@0.3.31':
+    resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==}
 
   '@lit-labs/ssr-dom-shim@1.6.0':
     resolution: {integrity: sha512-VHb0ALPMTlgKjM6yIxxoQNnpKyUKLD04VzeQdsiXkMqkvYlAHxq9glGLmgbb889/1GsohSOAjvQYoiBppXFqrQ==}
 
-  '@lit/reactive-element@2.1.1':
-    resolution: {integrity: sha512-N+dm5PAYdQ8e6UlywyyrgI2t++wFGXfHx+dSJ1oBrg6FAxUj40jId++EaRm80MKX5JnlH1sBsyZ5h0bcZKemCg==}
+  '@lit/reactive-element@2.1.2':
+    resolution: {integrity: sha512-pbCDiVMnne1lYUIaYNN5wrwQXDtHaYtg7YEFPeW+hws6U47WeFvISGUWekPGKWOP1ygrs0ef0o1VJMk1exos5A==}
 
   '@mdn/browser-compat-data@4.2.1':
     resolution: {integrity: sha512-EWUguj2kd7ldmrF9F+vI5hUOralPd+sdsUnYbRy33vZTuZkduC1shE9TtEMEjAQwyfyMb4ole5KtjF8MsnQOlA==}
 
+  '@napi-rs/lzma-linux-x64-gnu@1.5.1':
+    resolution: {integrity: sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==}
+    engines: {node: ^22.20 || ^24.12 || >=25}
+    cpu: [x64]
+    os: [linux]
+    libc: [glibc]
+
   '@nodelib/fs.scandir@2.1.5':
     resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
     engines: {node: '>= 8'}
@@ -276,8 +280,8 @@
   '@open-wc/dedupe-mixin@2.0.1':
     resolution: {integrity: sha512-+R4VxvceUxHAUJXJQipkkoV9fy10vNo+OnUnGKZnVmcwxMl460KLzytnUM4S35SI073R0yZQp9ra0MbPUwVcEA==}
 
-  '@open-wc/scoped-elements@3.0.6':
-    resolution: {integrity: sha512-w1ayJaUUmBw8tALtqQ6cBueld+op+bufujzbrOdH0uCTXnSQkONYZzOH+9jyQ8auVgKLqcxZ8oU6SzfqQhQkPg==}
+  '@open-wc/scoped-elements@3.0.10':
+    resolution: {integrity: sha512-esE95vxq6Y7w9/8H/oPvqN9QVR+ys3F9J2/ITyuTWnlSYaJueQmcS5CR5OybJMjjm9R5pmSoOe6Vau/O7J6d2g==}
 
   '@open-wc/semantic-dom-diff@0.20.1':
     resolution: {integrity: sha512-mPF/RPT2TU7Dw41LEDdaeP6eyTOWBD4z0+AHP4/d0SbgcfJZVRymlIB6DQmtz0fd2CImIS9kszaMmwMt92HBPA==}
@@ -288,8 +292,8 @@
   '@open-wc/testing@4.0.0':
     resolution: {integrity: sha512-KI70O0CJEpBWs3jrTju4BFCy7V/d4tFfYWkg8pMzncsDhD7TYNHLw5cy+s1FHXIgVFetnMDhPpwlKIPvtTQW7w==}
 
-  '@puppeteer/browsers@2.10.7':
-    resolution: {integrity: sha512-wHWLkQWBjHtajZeqCB74nsa/X70KheyOhySYBRmVQDJiNj0zjZR/naPCvdWjMhcG1LmjaMV/9WtTo5mpe8qWLw==}
+  '@puppeteer/browsers@2.13.2':
+    resolution: {integrity: sha512-5EUZSUIc37H6aIXyWO0Z4y8NlF8NnjgmqeQgOGiswAU7pY0HOo16ho4+alIWmSfdZnjqBRawMsP3I5YqLSn6kw==}
     engines: {node: '>=18'}
     hasBin: true
 
@@ -302,8 +306,8 @@
       rollup:
         optional: true
 
-  '@rollup/pluginutils@5.2.0':
-    resolution: {integrity: sha512-qWJ2ZTbmumwiLFomfzTyt5Kng4hwPi9rwCYN4SHb6eaRU1KNO4ccxINHr/VhH4GgPlt1XfSTLX2LBTme8ne4Zw==}
+  '@rollup/pluginutils@5.5.1':
+    resolution: {integrity: sha512-P9ZvnfouRu4MSC+ilERaw6FmZs8zqKhpHxEs4aGDGWQAMzQGXnhvCSvoNwokfNvdt7t3Y5Y4p6gStQgezeIqug==}
     engines: {node: '>=14.0.0'}
     peerDependencies:
       rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0
@@ -311,114 +315,141 @@
       rollup:
         optional: true
 
-  '@rollup/rollup-android-arm-eabi@4.49.0':
-    resolution: {integrity: sha512-rlKIeL854Ed0e09QGYFlmDNbka6I3EQFw7iZuugQjMb11KMpJCLPFL4ZPbMfaEhLADEL1yx0oujGkBQ7+qW3eA==}
+  '@rollup/rollup-android-arm-eabi@4.64.12':
+    resolution: {integrity: sha512-Z8lz+5UOiCJLonjeqwJlhUtHA/Sr6R1AidkccQxdWF0nigNzP81aLoU+udgOaGfL5s1uzFXzcux/pCwGAMu0lw==}
     cpu: [arm]
     os: [android]
 
-  '@rollup/rollup-android-arm64@4.49.0':
-    resolution: {integrity: sha512-cqPpZdKUSQYRtLLr6R4X3sD4jCBO1zUmeo3qrWBCqYIeH8Q3KRL4F3V7XJ2Rm8/RJOQBZuqzQGWPjjvFUcYa/w==}
+  '@rollup/rollup-android-arm64@4.64.12':
+    resolution: {integrity: sha512-+tKxNa2psFmiTb0KfXlXs4Yj7vkEhzAvZ0DrQ5+0gWHQJM10jSleQ3l1FIVm5uvD53YM8lHfM4mgCLDDN9f1Gg==}
     cpu: [arm64]
     os: [android]
 
-  '@rollup/rollup-darwin-arm64@4.49.0':
-    resolution: {integrity: sha512-99kMMSMQT7got6iYX3yyIiJfFndpojBmkHfTc1rIje8VbjhmqBXE+nb7ZZP3A5skLyujvT0eIUCUsxAe6NjWbw==}
+  '@rollup/rollup-darwin-arm64@4.64.12':
+    resolution: {integrity: sha512-iiripdfvyRBugV55/Dk7GplNXQtN/PG85OcKeveU1z2UkTg0MofbBF1qk//qgPWiqJbVvQcXAVCfE56oDGO4EQ==}
     cpu: [arm64]
     os: [darwin]
 
-  '@rollup/rollup-darwin-x64@4.49.0':
-    resolution: {integrity: sha512-y8cXoD3wdWUDpjOLMKLx6l+NFz3NlkWKcBCBfttUn+VGSfgsQ5o/yDUGtzE9HvsodkP0+16N0P4Ty1VuhtRUGg==}
+  '@rollup/rollup-darwin-x64@4.64.12':
+    resolution: {integrity: sha512-BmATib8swSMAagWNIfDZMnb+k34RXR4bbGOUfZgK8lLlniuMyVoSDDXCOGkdhtUmBXL4aygDh7bhjQ+TmhTvIw==}
     cpu: [x64]
     os: [darwin]
 
-  '@rollup/rollup-freebsd-arm64@4.49.0':
-    resolution: {integrity: sha512-3mY5Pr7qv4GS4ZvWoSP8zha8YoiqrU+e0ViPvB549jvliBbdNLrg2ywPGkgLC3cmvN8ya3za+Q2xVyT6z+vZqA==}
+  '@rollup/rollup-freebsd-arm64@4.64.12':
+    resolution: {integrity: sha512-GzrO0CiUq8vcAI/hYJuIcp6wNm3T3YhOpumYtf9Z3Fz+cfN1VESCVfy7EPcM3/m2K8l+Gn2U+4XtNZjwhUXctQ==}
     cpu: [arm64]
     os: [freebsd]
 
-  '@rollup/rollup-freebsd-x64@4.49.0':
-    resolution: {integrity: sha512-C9KzzOAQU5gU4kG8DTk+tjdKjpWhVWd5uVkinCwwFub2m7cDYLOdtXoMrExfeBmeRy9kBQMkiyJ+HULyF1yj9w==}
+  '@rollup/rollup-freebsd-x64@4.64.12':
+    resolution: {integrity: sha512-Dpta6gigm4o6SYioXtTkZBlGLA/Sl6OpzgLqY+51uafJE2blPejAtR1w82CVLPN+F9cvo1+/em92x/zcOgY0uQ==}
     cpu: [x64]
     os: [freebsd]
 
-  '@rollup/rollup-linux-arm-gnueabihf@4.49.0':
-    resolution: {integrity: sha512-OVSQgEZDVLnTbMq5NBs6xkmz3AADByCWI4RdKSFNlDsYXdFtlxS59J+w+LippJe8KcmeSSM3ba+GlsM9+WwC1w==}
+  '@rollup/rollup-linux-arm-gnueabihf@4.64.12':
+    resolution: {integrity: sha512-YpeDwQ5uFaogRvytNC8RK0keDO65kI5wNEhGSs+4GiJc3KHhxj4j5cnQh2nCu9ybJj6RP0/ycB6bkN0yFJ9I+w==}
     cpu: [arm]
     os: [linux]
     libc: [glibc]
 
-  '@rollup/rollup-linux-arm-musleabihf@4.49.0':
-    resolution: {integrity: sha512-ZnfSFA7fDUHNa4P3VwAcfaBLakCbYaxCk0jUnS3dTou9P95kwoOLAMlT3WmEJDBCSrOEFFV0Y1HXiwfLYJuLlA==}
+  '@rollup/rollup-linux-arm-musleabihf@4.64.12':
+    resolution: {integrity: sha512-LQrB3/sImIr1ycrlEyaApOLH1rAy8JV4/dH4eoK817aWATdcs4fESXz53/w72NwDnwPM5zEUpoL7socH4ZDnwA==}
     cpu: [arm]
     os: [linux]
     libc: [musl]
 
-  '@rollup/rollup-linux-arm64-gnu@4.49.0':
-    resolution: {integrity: sha512-Z81u+gfrobVK2iV7GqZCBfEB1y6+I61AH466lNK+xy1jfqFLiQ9Qv716WUM5fxFrYxwC7ziVdZRU9qvGHkYIJg==}
+  '@rollup/rollup-linux-arm64-gnu@4.64.12':
+    resolution: {integrity: sha512-iAF2iYu9S4SBfNsb4k0ewNBjO83WxHEltIuKQBGMzEKFgrYfmJn+gatBDXR2t/0zJN0UW0kzR4rfvQ1UHzkZ1A==}
     cpu: [arm64]
     os: [linux]
     libc: [glibc]
 
-  '@rollup/rollup-linux-arm64-musl@4.49.0':
-    resolution: {integrity: sha512-zoAwS0KCXSnTp9NH/h9aamBAIve0DXeYpll85shf9NJ0URjSTzzS+Z9evmolN+ICfD3v8skKUPyk2PO0uGdFqg==}
+  '@rollup/rollup-linux-arm64-musl@4.64.12':
+    resolution: {integrity: sha512-0MQdRtdbirJCXPIVeW/hd/LXLR8Qz96pc+2EBptuuV5q/zSGOzND7SZt8gBTE58NC9cUG/8UxcUXQiKRZ2WzzA==}
     cpu: [arm64]
     os: [linux]
     libc: [musl]
 
-  '@rollup/rollup-linux-loongarch64-gnu@4.49.0':
-    resolution: {integrity: sha512-2QyUyQQ1ZtwZGiq0nvODL+vLJBtciItC3/5cYN8ncDQcv5avrt2MbKt1XU/vFAJlLta5KujqyHdYtdag4YEjYQ==}
+  '@rollup/rollup-linux-loong64-gnu@4.64.12':
+    resolution: {integrity: sha512-yGDEwn0AGnrY/KCz2oY8R9KKNiQnTcwNuCWXeSXF0VLxXzlqoCgaS5QHsf1lbQvKWwPuN2Czkjk1wXRCBONTOQ==}
     cpu: [loong64]
     os: [linux]
     libc: [glibc]
 
-  '@rollup/rollup-linux-ppc64-gnu@4.49.0':
-    resolution: {integrity: sha512-k9aEmOWt+mrMuD3skjVJSSxHckJp+SiFzFG+v8JLXbc/xi9hv2icSkR3U7uQzqy+/QbbYY7iNB9eDTwrELo14g==}
+  '@rollup/rollup-linux-loong64-musl@4.64.12':
+    resolution: {integrity: sha512-AjlbD0efZEhHaJ3bsNjxSFDoguNq6VZvC+FKGJGBCA+ZN7BrZq2TuuSWFa6AI8IpOeuvhp2LoYcP7jiZwmtU0Q==}
+    cpu: [loong64]
+    os: [linux]
+    libc: [musl]
+
+  '@rollup/rollup-linux-ppc64-gnu@4.64.12':
+    resolution: {integrity: sha512-sDW0CiPoUCEEUV25uBG5sJ2gKe75DJqLpj91m1eK1vKffywyY7v4i6q1450ZuR6QW4NArXg7JpbMGgKU8di3HQ==}
     cpu: [ppc64]
     os: [linux]
     libc: [glibc]
 
-  '@rollup/rollup-linux-riscv64-gnu@4.49.0':
-    resolution: {integrity: sha512-rDKRFFIWJ/zJn6uk2IdYLc09Z7zkE5IFIOWqpuU0o6ZpHcdniAyWkwSUWE/Z25N/wNDmFHHMzin84qW7Wzkjsw==}
+  '@rollup/rollup-linux-ppc64-musl@4.64.12':
+    resolution: {integrity: sha512-VTQYUhMjl8kv999VuYqScgv7P9cR9KuxI/6bkUsEa3bsswqG0+otFjuLZmJ1U+ffEP4IAz0jxOeV0DX6NRBhjg==}
+    cpu: [ppc64]
+    os: [linux]
+    libc: [musl]
+
+  '@rollup/rollup-linux-riscv64-gnu@4.64.12':
+    resolution: {integrity: sha512-ppsKwpSjNrzJ8hge3Z3uiCcoRgAAQk2tU7auy3MFF348ffWRldFPnWIT/a/enK7huijlTfnwn4DYpDoapEb45A==}
     cpu: [riscv64]
     os: [linux]
     libc: [glibc]
 
-  '@rollup/rollup-linux-riscv64-musl@4.49.0':
-    resolution: {integrity: sha512-FkkhIY/hYFVnOzz1WeV3S9Bd1h0hda/gRqvZCMpHWDHdiIHn6pqsY3b5eSbvGccWHMQ1uUzgZTKS4oGpykf8Tw==}
+  '@rollup/rollup-linux-riscv64-musl@4.64.12':
+    resolution: {integrity: sha512-Gc3cVRC1trFH+GFWWTsJz6YuD4u75fzr/q99jqQGimonN/zvN6Wecck5WGzllOHj+XYXHcq0Ibor0tanGjfI6A==}
     cpu: [riscv64]
     os: [linux]
     libc: [musl]
 
-  '@rollup/rollup-linux-s390x-gnu@4.49.0':
-    resolution: {integrity: sha512-gRf5c+A7QiOG3UwLyOOtyJMD31JJhMjBvpfhAitPAoqZFcOeK3Kc1Veg1z/trmt+2P6F/biT02fU19GGTS529A==}
+  '@rollup/rollup-linux-s390x-gnu@4.64.12':
+    resolution: {integrity: sha512-pjmDTFStvwFE3shTeUDvSDiSp8/qAf5bQXejcEUDDavWz4jEhTIpCdpS06G0PEwSCSNK0Lngjz2v9l4hk3Z74A==}
     cpu: [s390x]
     os: [linux]
     libc: [glibc]
 
-  '@rollup/rollup-linux-x64-gnu@4.49.0':
-    resolution: {integrity: sha512-BR7+blScdLW1h/2hB/2oXM+dhTmpW3rQt1DeSiCP9mc2NMMkqVgjIN3DDsNpKmezffGC9R8XKVOLmBkRUcK/sA==}
+  '@rollup/rollup-linux-x64-gnu@4.64.12':
+    resolution: {integrity: sha512-mkbjxPqpR91u1JD7xY4aLZhr/Mqka4/RqGcG4WNGgN/lC1o7TzyCyqJoSJXp9qVVxMwpJGFlEF1VlERb+Ghw1Q==}
     cpu: [x64]
     os: [linux]
     libc: [glibc]
 
-  '@rollup/rollup-linux-x64-musl@4.49.0':
-    resolution: {integrity: sha512-hDMOAe+6nX3V5ei1I7Au3wcr9h3ktKzDvF2ne5ovX8RZiAHEtX1A5SNNk4zt1Qt77CmnbqT+upb/umzoPMWiPg==}
+  '@rollup/rollup-linux-x64-musl@4.64.12':
+    resolution: {integrity: sha512-vIeut2LkuVc3gcsawLJPahNAzvzBcFRhu2O+yVb//BuQKz7PIItMF0piXRbN/lIDO3d68TSDd368Vg6YwgTybw==}
     cpu: [x64]
     os: [linux]
     libc: [musl]
 
-  '@rollup/rollup-win32-arm64-msvc@4.49.0':
-    resolution: {integrity: sha512-wkNRzfiIGaElC9kXUT+HLx17z7D0jl+9tGYRKwd8r7cUqTL7GYAvgUY++U2hK6Ar7z5Z6IRRoWC8kQxpmM7TDA==}
+  '@rollup/rollup-openbsd-x64@4.64.12':
+    resolution: {integrity: sha512-3Sx+D3r9oPkTdNUcPrIRM2Am+vzEV6VGWoImHG4ZVK2jJeOW+eDjLeTm6nvu/z/m0fiX2YmGLXIypblc336MXg==}
+    cpu: [x64]
+    os: [openbsd]
+
+  '@rollup/rollup-openharmony-arm64@4.64.12':
+    resolution: {integrity: sha512-Nn2xh0teFnl71EiiUrKvECWcdGXtWF8q0uGclYwXGVw6QClGAcME0/bJSGdK+xIvd6MLEKYmjkTUvCBV+7m5Kw==}
+    cpu: [arm64]
+    os: [openharmony]
+
+  '@rollup/rollup-win32-arm64-msvc@4.64.12':
+    resolution: {integrity: sha512-n1/0H9TS+kBa4xp6n9aV7yiynBNfmerjkj2nAMIfY0ZHv1zShWRXnsAuAPAH0sfEK4ZSMK+z24q2RjAPFLCN1w==}
     cpu: [arm64]
     os: [win32]
 
-  '@rollup/rollup-win32-ia32-msvc@4.49.0':
-    resolution: {integrity: sha512-gq5aW/SyNpjp71AAzroH37DtINDcX1Qw2iv9Chyz49ZgdOP3NV8QCyKZUrGsYX9Yyggj5soFiRCgsL3HwD8TdA==}
+  '@rollup/rollup-win32-ia32-msvc@4.64.12':
+    resolution: {integrity: sha512-AdlDbQpsLfGlsHr1NfLZFtdnvxCKNp9TwlYVYExs8JJLWjLafUQEKJk0r9zUbmU57mw9nglMEvzqPHuLWYmaKw==}
     cpu: [ia32]
     os: [win32]
 
-  '@rollup/rollup-win32-x64-msvc@4.49.0':
-    resolution: {integrity: sha512-gEtqFbzmZLFk2xKh7g0Rlo8xzho8KrEFEkzvHbfUGkrgXOpZ4XagQ6n+wIZFNh1nTb8UD16J4nFSFKXYgnbdBg==}
+  '@rollup/rollup-win32-x64-gnu@4.64.12':
+    resolution: {integrity: sha512-u5SSUJBHod51UamjkigSr+JPre6xMy5vaWTTV2K0SnFG4RuKyYpf66dTSLFKX2cwaldpwyBurXPUCxq8riQMEg==}
+    cpu: [x64]
+    os: [win32]
+
+  '@rollup/rollup-win32-x64-msvc@4.64.12':
+    resolution: {integrity: sha512-j5rXD4R/4DM5+V991AA9xOnG2Rwu2g3p5TPgu1Eu7apju0NUrLl+Bn/KpWc6wYJtlXqzwz1r+LNV1JeBU4VGvw==}
     cpu: [x64]
     os: [win32]
 
@@ -437,8 +468,8 @@
   '@types/accepts@1.3.7':
     resolution: {integrity: sha512-Pay9fq2lM2wXPWbteBsRAGiWH2hig4ZE2asK+mm7kUzlxRTfL961rj89I6zV/E3PcIkDqyuBEcMxFT7rccugeQ==}
 
-  '@types/babel__code-frame@7.0.6':
-    resolution: {integrity: sha512-Anitqkl3+KrzcW2k77lRlg/GfLZLWXBuNgbEcIOU6M92yw42vsd3xV/Z/yAHEj8m+KUjL6bWOVOFqX8PFPJ4LA==}
+  '@types/babel__code-frame@7.27.0':
+    resolution: {integrity: sha512-Dwlo+LrxDx/0SpfmJ/BKveHf7QXWvLBLc+x03l5sbzykj3oB9nHygCpSECF1a+s+QIxbghe+KHqC90vGtxLRAA==}
 
   '@types/body-parser@1.19.6':
     resolution: {integrity: sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g==}
@@ -449,8 +480,8 @@
   '@types/chai@4.3.20':
     resolution: {integrity: sha512-/pC9HAB5I/xMlc5FP77qjCnI16ChlJfW0tGa0IUcFn38VJrTV6DeZ60NU5KZBtaOZqjdpwTWohz5HU1RrhiYxQ==}
 
-  '@types/chai@5.2.2':
-    resolution: {integrity: sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==}
+  '@types/chai@5.2.3':
+    resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==}
 
   '@types/co-body@6.1.3':
     resolution: {integrity: sha512-UhuhrQ5hclX6UJctv5m4Rfp52AfG9o9+d9/HwjxhVB5NjXxr5t9oKgJxN8xRHgr35oo8meUEHUPFWiKg6y71aA==}
@@ -467,8 +498,8 @@
   '@types/convert-source-map@2.0.3':
     resolution: {integrity: sha512-ag0BfJLZf6CQz8VIuRIEYQ5Ggwk/82uvTQf27RcpyDNbY0Vw49LIPqAxk5tqYfrCs9xDaIMvl4aj7ZopnYL8bA==}
 
-  '@types/cookies@0.9.1':
-    resolution: {integrity: sha512-E/DPgzifH4sM1UMadJMWd6mO2jOd4g1Ejwzx8/uRCDpJis1IrlyQEcGAYEomtAqRYmD5ORbNXMeI9U0RiVGZbg==}
+  '@types/cookies@0.9.2':
+    resolution: {integrity: sha512-1AvkDdZM2dbyFybL4fxpuNCaWyv//0AwsuUk2DWeXyM1/5ZKm6W3z6mQi24RZ4l2ucY+bkSHzbDVpySqPGuV8A==}
 
   '@types/debounce@1.2.4':
     resolution: {integrity: sha512-jBqiORIzKDOToaF63Fm//haOCHuwQuLa2202RK4MozpA6lh93eCBc+/8+wZn5OzjJt3ySdc+74SXWXB55Ewtyw==}
@@ -476,14 +507,14 @@
   '@types/deep-eql@4.0.2':
     resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==}
 
-  '@types/estree@1.0.8':
-    resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==}
+  '@types/estree@1.0.9':
+    resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==}
 
-  '@types/express-serve-static-core@5.0.7':
-    resolution: {integrity: sha512-R+33OsgWw7rOhD1emjU7dzCDHucJrgJXMA5PYCzJxVil0dsyx5iBEPHqpPfiKNJQb7lZ1vxwoLR4Z87bBUpeGQ==}
+  '@types/express-serve-static-core@5.1.3':
+    resolution: {integrity: sha512-dPfW8NFiOF4wOHc7+N/QSxlY9cfSsenewGbAz8C8U/MULPd/YZ27LvJUIlzaXie7e6Ove9YunJGgC9tbHD2cKw==}
 
-  '@types/express@5.0.3':
-    resolution: {integrity: sha512-wGA0NX93b19/dZC1J18tKWVIYWyyF2ZjT9vin/NRu0qzzvfVzWjs04iq2rQ3H65vCTQYlRqs3YHfY7zjdV+9Kw==}
+  '@types/express@5.0.6':
+    resolution: {integrity: sha512-sKYVuV7Sv9fbPIt/442koC7+IIwK5olP1KWeD88e/idgoJqDm3JV/YUiPwkoKK92ylff2MGxSz1CSjsXelx0YA==}
 
   '@types/http-assert@1.5.6':
     resolution: {integrity: sha512-TTEwmtjgVbYAzZYWyeHPrrtWnfVkm8tQkP8P21uQifPgMRgjrow3XDEYqucuC8SKZJT7pUnhU/JymvjggxO9vw==}
@@ -503,17 +534,11 @@
   '@types/keygrip@1.0.6':
     resolution: {integrity: sha512-lZuNAY9xeJt7Bx4t4dx0rYCDqGPW8RXhQZK1td7d4H6E9zYbLoOtjBvfwdTKpsyxQI/2jv+armjX/RW+ZNpXOQ==}
 
-  '@types/koa-compose@3.2.8':
-    resolution: {integrity: sha512-4Olc63RY+MKvxMwVknCUDhRQX1pFQoBZ/lXcRLP69PQkEpze/0cr8LNqJQe5NFb/b19DWi2a5bTi2VAlQzhJuA==}
+  '@types/koa-compose@3.2.9':
+    resolution: {integrity: sha512-BroAZ9FTvPiCy0Pi8tjD1OfJ7bgU1gQf0eR6e1Vm+JJATy9eKOG3hQMFtMciMawiSOVnLMdmUOC46s7HBhSTsA==}
 
-  '@types/koa@2.15.0':
-    resolution: {integrity: sha512-7QFsywoE5URbuVnG3loe03QXuGajrnotr3gQkXcEBShORai23MePfFYdhz90FEtBBpkyIYQbVD+evKtloCgX3g==}
-
-  '@types/koa@3.0.0':
-    resolution: {integrity: sha512-MOcVYdVYmkSutVHZZPh8j3+dAjLyR5Tl59CN0eKgpkE1h/LBSmPAsQQuWs+bKu7WtGNn+hKfJH9Gzml+PulmDg==}
-
-  '@types/mime@1.3.5':
-    resolution: {integrity: sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==}
+  '@types/koa@2.15.2':
+    resolution: {integrity: sha512-CB+iyjjh1uS5N6/CKwXvw0qA7USMS2WVc4Tjf660yCjhdvqzNr8gdFcIawB41zGGptOQ+d1fnpaQWIIUXYxR3w==}
 
   '@types/mkdirp@1.0.2':
     resolution: {integrity: sha512-o0K1tSO0Dx5X6xlU5F1D6625FawhC3dU3iqr25lluNv/+/QIVH8RLNEiVokgIZo+mz+87w/3Mkg/VvQS+J51fQ==}
@@ -521,8 +546,8 @@
   '@types/mocha@10.0.10':
     resolution: {integrity: sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==}
 
-  '@types/node@24.3.0':
-    resolution: {integrity: sha512-aPTXCrfwnDLj4VvXrm+UUCQjNEvJgNA8s5F1cvwQU+3KNltTOkBm1j30uNLyqqPNe7gE3KFzImYoZEfLhp4Yow==}
+  '@types/node@26.6.5':
+    resolution: {integrity: sha512-uMzsv9stDdofIZBx4UGh4Z9ZgXnGC9seRDscilBcTHAeOFk67MZg/k9bWVfO+bk4qZmG+l52hRnLwUiH2LnJTg==}
 
   '@types/parse5@6.0.3':
     resolution: {integrity: sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==}
@@ -533,8 +558,8 @@
   '@types/pngjs@6.0.5':
     resolution: {integrity: sha512-0k5eKfrA83JOZPppLtS2C7OUtyNAl2wKNxfyYl9Q5g9lPkgBl/9hNyAu6HuEH2J4XmIv2znEpkDd0SaZVxW6iQ==}
 
-  '@types/qs@6.14.0':
-    resolution: {integrity: sha512-eOunJqu0K1923aExK6y8p6fsihYEn/BYuQ4g0CxAAgFc4b/ZLN4CrsRZ55srTdqoiLzU2B2evC+apEIxprEzkQ==}
+  '@types/qs@6.15.1':
+    resolution: {integrity: sha512-GZHUBZR9hckSUhrxmp1nG6NwdpM9fCunJwyThLW1X3AyHgd9IlHb6VANpQQqDr2o/qQp6McZ3y/IA2rVzKzSbw==}
 
   '@types/range-parser@1.2.7':
     resolution: {integrity: sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==}
@@ -542,11 +567,11 @@
   '@types/resolve@1.20.2':
     resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==}
 
-  '@types/send@0.17.5':
-    resolution: {integrity: sha512-z6F2D3cOStZvuk2SaP6YrwkNO65iTZcwA2ZkSABegdkAh/lf+Aa/YQndZVfmEXT5vgAp6zv06VQ3ejSVjAny4w==}
+  '@types/send@1.2.1':
+    resolution: {integrity: sha512-arsCikDvlU99zl1g69TcAB3mzZPpxgw0UQnaHeC1Nwb015xp8bknZv5rIfri9xTOcMuaVgvabfIRA7PSZVuZIQ==}
 
-  '@types/serve-static@1.15.8':
-    resolution: {integrity: sha512-roei0UY3LhpOJvjbIP6ZZFngyLKl5dskOtDhxY5THRSpO+ZI+nzJ+m5yUMzGrp89YRa7lvknKkMYjqQFGwA7Sg==}
+  '@types/serve-static@2.2.0':
+    resolution: {integrity: sha512-8mam4H1NHLtu7nmtalF7eyBH14QyOASmcxHhSfEoRyr0nP/YdoesEtU+uSRvMe96TW/HPTtkoKqQLl53N7UXMQ==}
 
   '@types/sinon-chai@3.2.12':
     resolution: {integrity: sha512-9y0Gflk3b0+NhQZ/oxGtaAJDvRywCa5sIyaVnounqLvmf93yBF4EgIRspePtkMs3Tr844nCclYMlcCNmLCvjuQ==}
@@ -554,8 +579,8 @@
   '@types/sinon@17.0.4':
     resolution: {integrity: sha512-RHnIrhfPO3+tJT0s7cFaXGZvsL4bbR3/k7z3P312qMS4JaS2Tk+KiwiLx1S0rQ56ERj00u1/BtdyVd0FY+Pdew==}
 
-  '@types/sinonjs__fake-timers@8.1.5':
-    resolution: {integrity: sha512-mQkU2jY8jJEF7YHjHvsQO8+3ughTL1mcnn96igfhONmR+fUPSKIkefQYpSe8bsly2Ep7oQbn/6VG5/9/0qcArQ==}
+  '@types/sinonjs__fake-timers@15.0.1':
+    resolution: {integrity: sha512-Ko2tjWJq8oozHzHV+reuvS5KYIRAokHnGbDwGh/J64LntgpbuylF74ipEL24HCyRjf9FOlBiBHWBR1RlVKsI1w==}
 
   '@types/trusted-types@2.0.7':
     resolution: {integrity: sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==}
@@ -578,8 +603,8 @@
     resolution: {integrity: sha512-Da65zsiN6iZPMRuj4Oa6YPwvsmZmo5gtPWhW2lx3GTUf5CAEapjVpZVlUXnKPL7M7zRuk72jSsIl8lo+XpTCtw==}
     engines: {node: '>=18.0.0'}
 
-  '@web/dev-server-esbuild@1.0.4':
-    resolution: {integrity: sha512-ia1LxBwwRiQBYhJ7/RtLenHyPjzle3SvTw3jOZaeGv8UGXVPOkQV8fR05caOtW/DPPZaZovNAybzRKVnNiYIZg==}
+  '@web/dev-server-esbuild@1.0.5':
+    resolution: {integrity: sha512-QkKfnBuo+ogcMXLE9kKhw8+UwfbuIgiKKATY26ssgSwtMmAhgq+/SSG+QM55VMkVVzDDLi97aMDEcdr3V2sYvQ==}
     engines: {node: '>=18.0.0'}
 
   '@web/dev-server-rollup@0.6.4':
@@ -591,8 +616,8 @@
     engines: {node: '>=18.0.0'}
     hasBin: true
 
-  '@web/parse5-utils@2.1.0':
-    resolution: {integrity: sha512-GzfK5disEJ6wEjoPwx8AVNwUe9gYIiwc+x//QYxYDAFKUp4Xb1OJAGLc2l2gVrSQmtPGLKrTRcW90Hv4pEq1qA==}
+  '@web/parse5-utils@2.1.1':
+    resolution: {integrity: sha512-7rBVZEMGfrq2iPcAEwJ0KSNSvmA2a6jT2CK8/gyIOHgn4reg7bSSRbzyWIEYWyIkeRoYEukX/aW+nAeCgSSqhQ==}
     engines: {node: '>=18.0.0'}
 
   '@web/test-runner-chrome@0.18.1':
@@ -666,14 +691,18 @@
     resolution: {integrity: sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==}
     engines: {node: '>=6'}
 
-  array-back@6.2.2:
-    resolution: {integrity: sha512-gUAZ7HPyb4SJczXAMUXMGAvI976JoK3qEx9v1FTmeYuJj0IBiaKttG1ydtGKdkfqWkIkouke7nG8ufGy77+Cvw==}
+  array-back@6.2.3:
+    resolution: {integrity: sha512-SGDvmg6QTYiTxCBkYVmThcoa67uLl35pyzRHdpCGBOcqFy6BtwnphoFPk7LhJshD+Yk1Kt35WGWeZPTgwR4Fhw==}
     engines: {node: '>=12.17'}
 
   array-union@2.1.0:
     resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==}
     engines: {node: '>=8'}
 
+  assertion-error@2.0.1:
+    resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==}
+    engines: {node: '>=12'}
+
   ast-types@0.13.4:
     resolution: {integrity: sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==}
     engines: {node: '>=4'}
@@ -685,57 +714,68 @@
   async@3.2.6:
     resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==}
 
-  axe-core@4.10.3:
-    resolution: {integrity: sha512-Xm7bpRXnDSX2YE2YFfBk2FnF0ep6tmG7xPh8iHee8MIcrgq762Nkce856dYtJYLkuIoYZvGfTs/PbZhideTcEg==}
+  axe-core@4.14.0:
+    resolution: {integrity: sha512-9WTZxEjsZ7b13TH8JPmbV2z8CHbl80/2hm3XPEG4JgNdQLK81IBRXmSxHfMAOkSqQeRxT/0dwNDz2GOm3zzpcQ==}
     engines: {node: '>=4'}
 
-  b4a@1.6.7:
-    resolution: {integrity: sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==}
+  b4a@1.9.0:
+    resolution: {integrity: sha512-dpfcF9fDNR6++cthXR67iyhgqWy9CBouAvIWhIntzBG6cvK/cnIPiZQjBwi/ZqjjBEDGfoNDtmB0kTjroOJ3pQ==}
+    peerDependencies:
+      react-native-b4a: '*'
+    peerDependenciesMeta:
+      react-native-b4a:
+        optional: true
 
   balanced-match@1.0.2:
     resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==}
 
-  bare-events@2.6.1:
-    resolution: {integrity: sha512-AuTJkq9XmE6Vk0FJVNq5QxETrSA/vKHarWVBG5l/JbdCL1prJemiyJqUS0jrlXO0MftuPq4m3YVYhoNc5+aE/g==}
+  bare-events@2.9.2:
+    resolution: {integrity: sha512-AIPKioV7/Y/8KfZ3AAhjPJxLLbY49S64Ym5DakZlUg75qQiTgUq9hEJoEwa4eUezPUlXRy/i5NpsKvo9jgKmoA==}
+    peerDependencies:
+      bare-abort-controller: '*'
+    peerDependenciesMeta:
+      bare-abort-controller:
+        optional: true
 
-  bare-fs@4.2.1:
-    resolution: {integrity: sha512-mELROzV0IhqilFgsl1gyp48pnZsaV9xhQapHLDsvn4d4ZTfbFhcghQezl7FTEDNBcGqLUnNI3lUlm6ecrLWdFA==}
-    engines: {bare: '>=1.16.0'}
+  bare-fs@4.8.4:
+    resolution: {integrity: sha512-MPC2eyrpbk3A873sK4y6rk+Iv4o2enxTjHZ8zH3HO0mjrpm5XjnguY2XmfidIsDV6vnjpbMBKUAJpV0ISD2SsQ==}
+    engines: {bare: '>=1.28.0'}
     peerDependencies:
       bare-buffer: '*'
     peerDependenciesMeta:
       bare-buffer:
         optional: true
 
-  bare-os@3.6.2:
-    resolution: {integrity: sha512-T+V1+1srU2qYNBmJCXZkUY5vQ0B4FSlL3QDROnKQYOqeiQR8UbjNHlPa+TIbM4cuidiN9GaTaOZgSEgsvPbh5A==}
-    engines: {bare: '>=1.14.0'}
+  bare-path@3.1.2:
+    resolution: {integrity: sha512-ZyKbsuuqK6Ag0K8pX6V5Txq6XeJRvY+wXucnFGRjiyVYP9YWDpIQugk/b+enRYrEYBJaqLzghRQpXPMR7341Nw==}
 
-  bare-path@3.0.0:
-    resolution: {integrity: sha512-tyfW2cQcB5NN8Saijrhqn0Zh7AnFNsnczRcuWODH0eYAXBsJ5gVxAUuNr7tsHSC6IZ77cA0SitzT+s47kot8Mw==}
-
-  bare-stream@2.7.0:
-    resolution: {integrity: sha512-oyXQNicV1y8nc2aKffH+BUHFRXmx6VrPzlnaEvMhram0nPBrKcEdcyBg5r08D0i8VxngHFAiVyn1QKXpSG0B8A==}
+  bare-stream@2.13.4:
+    resolution: {integrity: sha512-PcrQ8lVLbiJscNm1Kez+Yp4Gy4AHGcN1lzwjvf5NybWen7VvEgUfyfnXYJ2zNqWnzOfCb1Abq6lH8ti0syQszA==}
     peerDependencies:
+      bare-abort-controller: '*'
       bare-buffer: '*'
       bare-events: '*'
     peerDependenciesMeta:
+      bare-abort-controller:
+        optional: true
       bare-buffer:
         optional: true
       bare-events:
         optional: true
 
-  basic-ftp@5.0.5:
-    resolution: {integrity: sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==}
+  bare-url@2.5.5:
+    resolution: {integrity: sha512-iM9qJCruvpt2rPaLsrumVDru9pogI7PHziHIa9kTNRFt8C8HuSa+kI9kFezK+NvHEFnnz71rKGZ1EAilq/3V/Q==}
+
+  basic-ftp@5.3.1:
+    resolution: {integrity: sha512-bopVNp6ugyA150DDuZfPFdt1KZ5a94ZDiwX4hMgZDzF+GttD80lEy8kj98kbyhLXnPvhtIo93mdnLIjpCAeeOw==}
     engines: {node: '>=10.0.0'}
-    deprecated: Security vulnerability fixed in 5.2.1, please upgrade
 
   binary-extensions@2.3.0:
     resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==}
     engines: {node: '>=8'}
 
-  brace-expansion@2.0.2:
-    resolution: {integrity: sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==}
+  brace-expansion@2.1.7:
+    resolution: {integrity: sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g==}
 
   braces@3.0.3:
     resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==}
@@ -794,8 +834,8 @@
     engines: {node: '>=12.13.0'}
     hasBin: true
 
-  chromium-bidi@8.0.0:
-    resolution: {integrity: sha512-d1VmE0FD7lxZQHzcDUCKZSNRtRwISXDsdg4HjdTR5+Ll5nQ/vzU12JeNmupD6VWffrPSlrnGhEWlLESKH3VO+g==}
+  chromium-bidi@14.0.0:
+    resolution: {integrity: sha512-9gYlLtS6tStdRWzrtXaTMnqcM4dudNegMXJxkR0I/CXObHalYeYcAMPrL19eroNZHtJ8DQmu1E+ZNOYu/IXMXw==}
     peerDependencies:
       devtools-protocol: '*'
 
@@ -833,8 +873,8 @@
     resolution: {integrity: sha512-H4UfQhZyakIjC74I9d34fGYDwk3XpSr17QhEd0Q3I9Xq1CETHo4Hcuo87WyWHpAF1aSLjLRf5lD9ZGX2qStUvg==}
     engines: {node: '>=4.0.0'}
 
-  command-line-usage@7.0.3:
-    resolution: {integrity: sha512-PqMLy5+YGwhMh1wS04mVG44oqDsgyLRSKJBdOo1bnYhMKBW65gZF1dRp2OZRhiTjgUHljy99qkO7bsctLaw35Q==}
+  command-line-usage@7.0.4:
+    resolution: {integrity: sha512-85UdvzTNx/+s5CkSgBm/0hzP80RFHAa7PsfeADE5ezZF3uHz3/Tqj9gIKGT9PTtpycc3Ua64T0oVulGfKxzfqg==}
     engines: {node: '>=12.20.0'}
 
   content-disposition@0.5.4:
@@ -848,8 +888,8 @@
   convert-source-map@2.0.0:
     resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==}
 
-  cookies@0.9.1:
-    resolution: {integrity: sha512-TG2hpqe4ELx54QER/S3HQ9SRVnQnGBtKUz5bLQWtYAQ+o6GpgMs6sYUvaiJjVxb+UXwhRhAEP3m7LbsIZ77Hmw==}
+  cookies@0.9.2:
+    resolution: {integrity: sha512-8BIbcC6tPZMv2/PD4PrB3CtKks7LmAWhA7FRZK/6/b/WJ2RUz00KCga7gq50S4/RhZ22kxefRFGgsuts0v3eoA==}
     engines: {node: '>= 0.8'}
 
   cross-spawn@7.0.6:
@@ -879,8 +919,8 @@
       supports-color:
         optional: true
 
-  debug@4.4.1:
-    resolution: {integrity: sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==}
+  debug@4.4.3:
+    resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==}
     engines: {node: '>=6.0'}
     peerDependencies:
       supports-color: '*'
@@ -930,11 +970,11 @@
     resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==}
     engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16}
 
-  devtools-protocol@0.0.1475386:
-    resolution: {integrity: sha512-RQ809ykTfJ+dgj9bftdeL2vRVxASAuGU+I9LEx9Ij5TXU5HrgAQVmzi72VA+mkzscE12uzlRv5/tWWv9R9J1SA==}
+  devtools-protocol@0.0.1608973:
+    resolution: {integrity: sha512-Tpm17fxYzt+J7VrGdc1k8YdRqS3YV7se/M6KeemEqvUbq/n7At1rWVuXMxQgpWkdwSdIEKYbU//Bve+Shm4YNQ==}
 
-  diff@5.2.0:
-    resolution: {integrity: sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==}
+  diff@5.2.2:
+    resolution: {integrity: sha512-vtcDfH3TOjP8UekytvnHH1o1P4FcUdt4eQ1Y+Abap1tk/OB2MWQvcwS2ClCd1zuIhc3JKOx6p3kod8Vfys3E+A==}
     engines: {node: '>=0.3.1'}
 
   diff@7.0.0:
@@ -962,8 +1002,9 @@
   end-of-stream@1.4.5:
     resolution: {integrity: sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==}
 
-  errorstacks@2.4.1:
-    resolution: {integrity: sha512-jE4i0SMYevwu/xxAuzhly/KTwtj0xDhbzB6m1xPImxTkw8wcCbgarOQPfCVMi5JKVyW7in29pNJCCJrry3Ynnw==}
+  errorstacks@2.4.2:
+    resolution: {integrity: sha512-aQAkABfX+AsCxWtvh1KGIDkTiYyABsTtZkBb8cd9FWxNnEdrcFEsTxUfi9sc0Jc1mgHC2kW3UtJVadqSuMm/uQ==}
+    engines: {node: '>=24'}
 
   es-define-property@1.0.1:
     resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==}
@@ -976,12 +1017,12 @@
   es-module-lexer@1.7.0:
     resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==}
 
-  es-object-atoms@1.1.1:
-    resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==}
+  es-object-atoms@1.1.2:
+    resolution: {integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==}
     engines: {node: '>= 0.4'}
 
-  esbuild@0.25.9:
-    resolution: {integrity: sha512-CRbODhYyQx3qp7ZEwzxOk4JBqmD/seJrzPa/cGjY1VtIn5E09Oi9/dB4JwctnfZ8Q8iT7rioVv5k/FNT/uf54g==}
+  esbuild@0.27.7:
+    resolution: {integrity: sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==}
     engines: {node: '>=18'}
     hasBin: true
 
@@ -1021,6 +1062,9 @@
     resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==}
     engines: {node: '>= 0.6'}
 
+  events-universal@1.0.1:
+    resolution: {integrity: sha512-LUd5euvbMLpwOF8m6ivPCbhQeSiYVNb8Vs0fQ8QjXo0JTkEHpz8pxdQf0gStltaPpw0Cca8b39KxvK9cfKRiAw==}
+
   execa@5.1.1:
     resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==}
     engines: {node: '>=10'}
@@ -1037,8 +1081,8 @@
     resolution: {integrity: sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==}
     engines: {node: '>=8.6.0'}
 
-  fastq@1.19.1:
-    resolution: {integrity: sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==}
+  fastq@1.20.3:
+    resolution: {integrity: sha512-XKv5nnLs6nLF71NgiKJLIZFLkPyIEuOselLG7ujZnGrRfQK8HpvY+WqKhAJUAdLomwVHErVS4LfxFlPq0/FTAw==}
 
   fd-slicer@1.1.0:
     resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==}
@@ -1066,11 +1110,6 @@
   fs.realpath@1.0.0:
     resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==}
 
-  fsevents@2.3.2:
-    resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==}
-    engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
-    os: [darwin]
-
   fsevents@2.3.3:
     resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==}
     engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
@@ -1079,6 +1118,10 @@
   function-bind@1.1.2:
     resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==}
 
+  generator-function@2.0.1:
+    resolution: {integrity: sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==}
+    engines: {node: '>= 0.4'}
+
   get-caller-file@2.0.5:
     resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==}
     engines: {node: 6.* || 8.* || >= 10.*}
@@ -1132,8 +1175,8 @@
     resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==}
     engines: {node: '>= 0.4'}
 
-  hasown@2.0.2:
-    resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==}
+  hasown@2.0.4:
+    resolution: {integrity: sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==}
     engines: {node: '>= 0.4'}
 
   he@1.2.0:
@@ -1155,8 +1198,8 @@
     resolution: {integrity: sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==}
     engines: {node: '>= 0.6'}
 
-  http-errors@2.0.0:
-    resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==}
+  http-errors@2.0.1:
+    resolution: {integrity: sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==}
     engines: {node: '>= 0.8'}
 
   http-proxy-agent@7.0.2:
@@ -1197,8 +1240,8 @@
     resolution: {integrity: sha512-D8WGsR6yDt8uq7vDMu7mjcR+yRMm3dW8yufyChmszWRjcSHuxLBkR3GdS2HZAjodsaGuCvXeEJpueisXJULghg==}
     engines: {node: '>=10'}
 
-  ip-address@10.0.1:
-    resolution: {integrity: sha512-NWv9YLW4PoW2B7xtzaS3NCot75m6nK7Icdv0o3lfMceJVRfSoQwqD4wEH5rLwoKJwUiZ/rfpiVBhnaF0FK4HoA==}
+  ip-address@10.7.4:
+    resolution: {integrity: sha512-DWBMKyeM25D70nrIiTkgQth59/G+naKOTep6huF9j+GmeK3DMD60Zvxg5d5qQnz+38AHgou6ean2LECX+lrKDg==}
     engines: {node: '>= 12'}
 
   ip-regex@4.3.0:
@@ -1213,8 +1256,8 @@
     resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==}
     engines: {node: '>=8'}
 
-  is-core-module@2.16.1:
-    resolution: {integrity: sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==}
+  is-core-module@2.17.0:
+    resolution: {integrity: sha512-J/vG0zBCbIKOQFfufSwyXdMrsohyJIUNkrnmo6WZGzoM7tr/lsbfW5b2BvisL6zsyMzK9UxV9L6c7AoFbyXHOA==}
     engines: {node: '>= 0.4'}
 
   is-docker@2.2.1:
@@ -1230,8 +1273,8 @@
     resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==}
     engines: {node: '>=8'}
 
-  is-generator-function@1.1.0:
-    resolution: {integrity: sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==}
+  is-generator-function@1.1.2:
+    resolution: {integrity: sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==}
     engines: {node: '>= 0.4'}
 
   is-glob@4.0.3:
@@ -1269,8 +1312,8 @@
     resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==}
     engines: {node: '>=8'}
 
-  isbinaryfile@5.0.5:
-    resolution: {integrity: sha512-vh9MWXjhhblwrHlt/yutrubDuBD01kKFscyVndE2/VEeEU5aAizrzuWAsEaCjo997k+IluhN6C4jgxfS69SCIw==}
+  isbinaryfile@5.0.7:
+    resolution: {integrity: sha512-gnWD14Jh3FzS3CPhF0AxNOJ8CxqeblPTADzI38r0wt8ZyQl5edpy75myt08EG2oKvpyiqSqsx+Wkz9vtkbTqYQ==}
     engines: {node: '>= 18.0.0'}
 
   isexe@2.0.0:
@@ -1291,8 +1334,8 @@
   js-tokens@4.0.0:
     resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==}
 
-  js-yaml@4.1.0:
-    resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==}
+  js-yaml@4.3.2:
+    resolution: {integrity: sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==}
     hasBin: true
 
   keygrip@1.1.0:
@@ -1317,8 +1360,8 @@
     resolution: {integrity: sha512-UqyYyH5YEXaJrf9S8E23GoJFQZXkBVJ9zYYMPGz919MSX1KuvAcycIuS0ci150HCoPf4XQVhQ84Qf8xRPWxFaQ==}
     engines: {node: '>= 7.6.0'}
 
-  koa@2.16.2:
-    resolution: {integrity: sha512-+CCssgnrWKx9aI3OeZwroa/ckG4JICxvIFnSiOUyl2Uv+UTI+xIw0FfFrWS7cQFpoePpr9o8csss7KzsTzNL8Q==}
+  koa@2.16.4:
+    resolution: {integrity: sha512-3An0GCLDSR34tsCO4H8Tef8Pp2ngtaZDAZnsWJYelqXUK5wyiHvGItgK/xcSkmHLSTn1Jcho1mRQs2ehRzvKKw==}
     engines: {node: ^4.8.4 || ^6.10.1 || ^7.10.1 || >= 8.1.4}
 
   lighthouse-logger@1.4.2:
@@ -1394,8 +1437,8 @@
     resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==}
     engines: {node: '>=6'}
 
-  minimatch@5.1.6:
-    resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==}
+  minimatch@5.1.9:
+    resolution: {integrity: sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==}
     engines: {node: '>=10'}
 
   mitt@3.0.1:
@@ -1420,8 +1463,8 @@
   nanocolors@0.2.13:
     resolution: {integrity: sha512-0n3mSAQLPpGLV9ORXT5+C/D4mwew7Ebws69Hx4E2sgz2ZA5+32Q80B9tL8PbL7XHnRDiAxH/pnrUJ9a4fkTNTA==}
 
-  nanoid@3.3.11:
-    resolution: {integrity: sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==}
+  nanoid@3.3.20:
+    resolution: {integrity: sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==}
     engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
     hasBin: true
 
@@ -1429,8 +1472,8 @@
     resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==}
     engines: {node: '>= 0.6'}
 
-  netmask@2.0.2:
-    resolution: {integrity: sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==}
+  netmask@2.1.1:
+    resolution: {integrity: sha512-eonl3sLUha+S1GzTPxychyhnUzKyeQkZ7jLjKrBagJgPla13F+uQ71HgpFefyHgqrjEbCPkDArxYsjY8/+gLKA==}
     engines: {node: '>= 0.4.0'}
 
   normalize-path@3.0.0:
@@ -1523,12 +1566,12 @@
   picocolors@1.1.1:
     resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}
 
-  picomatch@2.3.1:
-    resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==}
+  picomatch@2.3.2:
+    resolution: {integrity: sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==}
     engines: {node: '>=8.6'}
 
-  picomatch@4.0.3:
-    resolution: {integrity: sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==}
+  picomatch@4.0.7:
+    resolution: {integrity: sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==}
     engines: {node: '>=12'}
 
   pixelmatch@5.3.0:
@@ -1539,14 +1582,14 @@
     resolution: {integrity: sha512-xhcb4yHu9sM/G7foGzoLtXYcC0zHEaOXXjRKhGup0fw78Nf2Tkiapv4EQyMzrbcmQPsllAI7DbFY2UT7PlI9Pg==}
     hasBin: true
 
-  playwright-core@1.55.0:
-    resolution: {integrity: sha512-GvZs4vU3U5ro2nZpeiwyb0zuFaqb9sUiAJuyrWpcGouD8y9/HLgGbNRjIph7zU9D3hnPaisMl9zG9CgFi/biIg==}
-    engines: {node: '>=18'}
+  playwright-core@1.64.1:
+    resolution: {integrity: sha512-BC4s8y6SEVA6Q1rSxZTto8hI1KUI3xXlHGZgvGqP4IqPdI/a6FX9H29IDNz7vKo9l21b6LfYosScPL6M3xxyDQ==}
+    engines: {node: '>=20'}
     hasBin: true
 
-  playwright@1.55.0:
-    resolution: {integrity: sha512-sdCWStblvV1YU909Xqx0DhOjPZE4/5lJsIS84IfN9dAZfcl/CIZ5O8l3o0j7hPMjDvqoTF8ZUcc+i/GL5erstA==}
-    engines: {node: '>=18'}
+  playwright@1.64.1:
+    resolution: {integrity: sha512-HCrVhHr5QQuwYoswEUGTb7gGp522yflbv/ST8nF4sFWGuLjQCt17Q/EubpGGSNKYn1tsTCPZxqHhHCfVURu7UA==}
+    engines: {node: '>=20'}
     hasBin: true
 
   pngjs@6.0.0:
@@ -1557,8 +1600,8 @@
     resolution: {integrity: sha512-LKWqWJRhstyYo9pGvgor/ivk2w94eSjE3RGVuzLGlr3NmD8bf7RcYGze1mNdEHRP6TRP6rMuDHk5t44hnTRyow==}
     engines: {node: '>=14.19.0'}
 
-  portfinder@1.0.37:
-    resolution: {integrity: sha512-yuGIEjDAYnnOex9ddMnKZEMFE0CcGo6zbfzDklkmT1m5z734ss6JMzN9rNB3+RR7iS+F10D4/BVIaXOyh8PQKw==}
+  portfinder@1.0.38:
+    resolution: {integrity: sha512-rEwq/ZHlJIKw++XtLAO8PPuOQA/zaPJOZJ37BVuN97nLpMJeuDVLVGRwbFoBgLudgdTMP2hdRJP++H+8QOA3vg==}
     engines: {node: '>= 10.12'}
 
   progress@2.0.3:
@@ -1572,19 +1615,19 @@
   proxy-from-env@1.1.0:
     resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==}
 
-  pump@3.0.3:
-    resolution: {integrity: sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==}
+  pump@3.0.4:
+    resolution: {integrity: sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==}
 
   punycode@2.3.1:
     resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==}
     engines: {node: '>=6'}
 
-  puppeteer-core@24.17.0:
-    resolution: {integrity: sha512-RYOBKFiF+3RdwIZTEacqNpD567gaFcBAOKTT7742FdB1icXudrPI7BlZbYTYWK2wgGQUXt9Zi1Yn+D5PmCs4CA==}
+  puppeteer-core@24.43.1:
+    resolution: {integrity: sha512-T5ScUMAsmhdNbgDR41AGESYeS6V9MSgetkSnVhhW+gXvzC42VesKCn5ld87gAZDJ6vLHL9GkRvY9WtQWSnwFbw==}
     engines: {node: '>=18'}
 
-  qs@6.14.0:
-    resolution: {integrity: sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==}
+  qs@6.16.1:
+    resolution: {integrity: sha512-5Px6J7rfHBAGUhNQ3es4YzcOdBBw0SDcVtThJml4RdnKw4tKs2epA0kPZ+K8X+WiHktT93RHVcQ/3ym5aTCgtg==}
     engines: {node: '>=0.6'}
 
   queue-microtask@1.2.3:
@@ -1593,8 +1636,8 @@
   randombytes@2.1.0:
     resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==}
 
-  raw-body@2.5.2:
-    resolution: {integrity: sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==}
+  raw-body@2.5.3:
+    resolution: {integrity: sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==}
     engines: {node: '>= 0.8'}
 
   readdirp@3.6.0:
@@ -1613,8 +1656,8 @@
     resolution: {integrity: sha512-i1xevIst/Qa+nA9olDxLWnLk8YZbi8R/7JPbCMcgyWaFR6bKWaexgJgEB5oc2PKMjYdrHynyz0NY+if+H98t1w==}
     engines: {node: '>= 0.8'}
 
-  resolve@1.22.10:
-    resolution: {integrity: sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==}
+  resolve@1.22.13:
+    resolution: {integrity: sha512-Dj/cW9zBV2aRj6XzCxuGIs3ESZKv02jixne3q6jFZYZ3/Tg09gHHviSMDL4kObh9pqSahdRHEnDoaP2gn8YLhA==}
     engines: {node: '>= 0.4'}
     hasBin: true
 
@@ -1626,8 +1669,8 @@
     resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==}
     engines: {iojs: '>=1.0.0', node: '>=0.10.0'}
 
-  rollup@4.49.0:
-    resolution: {integrity: sha512-3IVq0cGJ6H7fKXXEdVt+RcYvRCt8beYY9K1760wGQwSAHZcS9eot1zDG5axUbcp/kWRi5zKIIDX8MoKv/TzvZA==}
+  rollup@4.64.12:
+    resolution: {integrity: sha512-GhAu8ZglZ61VWSX/ZW3K/qkazgURBIQL0/Yy51QsS8DPyebR5Cf/Z2PANJFpTU0aVZ9byJcyqR6xvBbkXhdGYQ==}
     engines: {node: '>=18.0.0', npm: '>=8.0.0'}
     hasBin: true
 
@@ -1644,8 +1687,8 @@
   safer-buffer@2.1.2:
     resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==}
 
-  semver@7.7.2:
-    resolution: {integrity: sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==}
+  semver@7.8.5:
+    resolution: {integrity: sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==}
     engines: {node: '>=10'}
     hasBin: true
 
@@ -1666,8 +1709,8 @@
     resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==}
     engines: {node: '>=8'}
 
-  side-channel-list@1.0.0:
-    resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==}
+  side-channel-list@1.0.1:
+    resolution: {integrity: sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==}
     engines: {node: '>= 0.4'}
 
   side-channel-map@1.0.1:
@@ -1678,8 +1721,8 @@
     resolution: {integrity: sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==}
     engines: {node: '>= 0.4'}
 
-  side-channel@1.1.0:
-    resolution: {integrity: sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==}
+  side-channel@1.1.1:
+    resolution: {integrity: sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==}
     engines: {node: '>= 0.4'}
 
   signal-exit@3.0.7:
@@ -1704,8 +1747,8 @@
     resolution: {integrity: sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==}
     engines: {node: '>= 14'}
 
-  socks@2.8.7:
-    resolution: {integrity: sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A==}
+  socks@2.8.10:
+    resolution: {integrity: sha512-e0VyvkVTwVYViNovRkZ9aodhxVlyoMn7eJhVUPxZ+eK9P/7CBkxvvsBOHqFPEH416726W8tLXXXjKwqgTErrCQ==}
     engines: {node: '>= 10.0.0', npm: '>= 3.0.0'}
 
   source-map-support@0.5.21:
@@ -1723,12 +1766,12 @@
     resolution: {integrity: sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==}
     engines: {node: '>= 0.6'}
 
-  statuses@2.0.1:
-    resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==}
+  statuses@2.0.2:
+    resolution: {integrity: sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==}
     engines: {node: '>= 0.8'}
 
-  streamx@2.22.1:
-    resolution: {integrity: sha512-znKXEBxfatz2GBNK02kRnCXjV+AA4kjZIUxeWSr3UGirZMJfTE9uiwKHobnbgxWyL/JWro8tTq+vOqAK1/qbSA==}
+  streamx@2.28.1:
+    resolution: {integrity: sha512-zEzXb0s5Cds7tqMH6rhZ05lcJydCWiQPEwiNngVqzsxCc962vLY4Uw+mW7od8kDH258k2Uz/JrOkdIAAhSh9VA==}
 
   string-width@4.2.3:
     resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==}
@@ -1762,14 +1805,17 @@
     resolution: {integrity: sha512-iK5/YhZxq5GO5z8wb0bY1317uDF3Zjpha0QFFLA8/trAoiLbQD0HUbMesEaxyzUgDxi2QlcbM8IvqOlEjgoXBA==}
     engines: {node: '>=12.17'}
 
-  tar-fs@3.1.0:
-    resolution: {integrity: sha512-5Mty5y/sOF1YWj1J6GiBodjlDc05CUR8PKXrsnFAiSG0xA+GHeWLovaZPYUDXkH/1iKRf2+M5+OrRgzC7O9b7w==}
+  tar-fs@3.1.3:
+    resolution: {integrity: sha512-/hU4AXnIdZu+Gvl1pk0oI5f5HxWsCJRtY2aFaJdk9VvyL48DWU6iU5WAIPG+wIi1YvWA6eTJvIviP/tMAZZNwQ==}
 
-  tar-stream@3.1.7:
-    resolution: {integrity: sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==}
+  tar-stream@3.2.2:
+    resolution: {integrity: sha512-+8NeqHRjQWH9nYlwo2gamAMImZCVzI4UoEgDpWorBt9OEfppiZn+uSkskzQKPWIZyji/C8fpWO7u69G0DX0tbg==}
 
-  text-decoder@1.2.3:
-    resolution: {integrity: sha512-3/o9z3X0X0fTupwsYvR03pJ/DjWuqqrfwBgTQzdWDiQSm9KitAyz/9WqsT2JQW7KV2m+bC2ol/zqpW37NHxLaA==}
+  teex@1.0.1:
+    resolution: {integrity: sha512-eYE6iEI62Ni1H8oIa7KlDU6uQBtqr4Eajni3wX7rpfXD8ysFx8z0+dri+KWEPWpBsxXfxu58x/0jvTVT1ekOSg==}
+
+  text-decoder@1.2.7:
+    resolution: {integrity: sha512-vlLytXkeP4xvEq2otHeJfSQIRyWxo/oZGEbXrtEEF9Hnmrdly59sUbzZ/QgyWuLYHctCHxFF4tRQZNQ9k60ExQ==}
 
   to-regex-range@5.0.1:
     resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==}
@@ -1806,8 +1852,8 @@
     resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==}
     engines: {node: '>= 0.6'}
 
-  typed-query-selector@2.12.0:
-    resolution: {integrity: sha512-SbklCd1F0EiZOyPiW192rrHZzZ5sBijB6xM+cpmrwDqObvdtunOHHIk9fCGsoK5JVIYXoyEp4iEdE3upFH3PAg==}
+  typed-query-selector@2.12.3:
+    resolution: {integrity: sha512-/dtuMZyutHLlrxWhhC1uib00ELUr2dZ8C9B8YzZYsJmeE3V56OxRblrSM2UaF142pcMtak7ehZ6+poWGeehNIg==}
 
   typical@4.0.0:
     resolution: {integrity: sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==}
@@ -1821,8 +1867,8 @@
     resolution: {integrity: sha512-LbBDqdIC5s8iROCUjMbW1f5dJQTEFB1+KO9ogbvlb3nm9n4YHa5p4KTvFPWvh2Hs8gZMBuiB1/8+pdfe/tDPug==}
     hasBin: true
 
-  undici-types@7.10.0:
-    resolution: {integrity: sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==}
+  undici-types@8.9.0:
+    resolution: {integrity: sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==}
 
   unpipe@1.0.0:
     resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==}
@@ -1836,6 +1882,9 @@
     resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==}
     engines: {node: '>= 0.8'}
 
+  webdriver-bidi-protocol@0.4.1:
+    resolution: {integrity: sha512-ARrjNjtWRRs2w4Tk7nqrf2gBI0QXWuOmMCx2hU+1jUt6d00MjMxURrhxhGbrsoiZKJrhTSTzbIrc554iKI10qw==}
+
   webidl-conversions@7.0.0:
     resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==}
     engines: {node: '>=12'}
@@ -1849,8 +1898,8 @@
     engines: {node: '>= 8'}
     hasBin: true
 
-  wordwrapjs@5.1.0:
-    resolution: {integrity: sha512-JNjcULU2e4KJwUNv6CHgI46UvDGitb6dGryHajXTDiLgg1/RiGoPSDw4kZfYnwGtEXf2ZMeIewDQgFGzkCB2Sg==}
+  wordwrapjs@5.1.1:
+    resolution: {integrity: sha512-0yweIbkINJodk27gX9LBGMzyQdBDan3s/dEAiwBOj+Mf0PPyWL6/rikalkv8EeD0E8jm4o5RXEOrFTP3NXbhJg==}
     engines: {node: '>=12.17'}
 
   workerpool@6.5.1:
@@ -1867,8 +1916,8 @@
   wrappy@1.0.2:
     resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==}
 
-  ws@7.5.10:
-    resolution: {integrity: sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==}
+  ws@7.5.13:
+    resolution: {integrity: sha512-rsKI6xDBFVf4r/x8XyChGK04QR/XHroxs/jUcoWvtEZM8TPU/X/uIY9B1CsSzYws9ZJb/6bbBu7dPhFW00CAoA==}
     engines: {node: '>=8.3.0'}
     peerDependencies:
       bufferutil: ^4.0.1
@@ -1879,8 +1928,8 @@
       utf-8-validate:
         optional: true
 
-  ws@8.18.3:
-    resolution: {integrity: sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==}
+  ws@8.22.0:
+    resolution: {integrity: sha512-Ydggc987+RO0AnWtZ/7Wq9FtNvcrL1b/RO0ud9mWjUPgDrsAAwQSF51sm2hm1XofbU/4jkpGEsLFsZZxU+1DOg==}
     engines: {node: '>=10.0.0'}
     peerDependencies:
       bufferutil: ^4.0.1
@@ -1907,12 +1956,12 @@
     resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==}
     engines: {node: '>=10'}
 
-  yargs@16.2.0:
-    resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==}
+  yargs@16.2.2:
+    resolution: {integrity: sha512-Nt9ZJjXTv5R8MHbqby/wXQ6Gi0Bb3TcYZkR1bzuL4yB2OxWPkXknz513gEF0GoA6tn00UpbPvERW8rzCuWCA6w==}
     engines: {node: '>=10'}
 
-  yargs@17.7.2:
-    resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==}
+  yargs@17.7.3:
+    resolution: {integrity: sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==}
     engines: {node: '>=12'}
 
   yauzl@2.10.0:
@@ -1931,90 +1980,90 @@
 
 snapshots:
 
-  '@babel/code-frame@7.27.1':
+  '@babel/code-frame@7.29.7':
     dependencies:
-      '@babel/helper-validator-identifier': 7.27.1
+      '@babel/helper-validator-identifier': 7.29.7
       js-tokens: 4.0.0
       picocolors: 1.1.1
 
-  '@babel/helper-validator-identifier@7.27.1': {}
+  '@babel/helper-validator-identifier@7.29.7': {}
 
-  '@esbuild/aix-ppc64@0.25.9':
+  '@esbuild/aix-ppc64@0.27.7':
     optional: true
 
-  '@esbuild/android-arm64@0.25.9':
+  '@esbuild/android-arm64@0.27.7':
     optional: true
 
-  '@esbuild/android-arm@0.25.9':
+  '@esbuild/android-arm@0.27.7':
     optional: true
 
-  '@esbuild/android-x64@0.25.9':
+  '@esbuild/android-x64@0.27.7':
     optional: true
 
-  '@esbuild/darwin-arm64@0.25.9':
+  '@esbuild/darwin-arm64@0.27.7':
     optional: true
 
-  '@esbuild/darwin-x64@0.25.9':
+  '@esbuild/darwin-x64@0.27.7':
     optional: true
 
-  '@esbuild/freebsd-arm64@0.25.9':
+  '@esbuild/freebsd-arm64@0.27.7':
     optional: true
 
-  '@esbuild/freebsd-x64@0.25.9':
+  '@esbuild/freebsd-x64@0.27.7':
     optional: true
 
-  '@esbuild/linux-arm64@0.25.9':
+  '@esbuild/linux-arm64@0.27.7':
     optional: true
 
-  '@esbuild/linux-arm@0.25.9':
+  '@esbuild/linux-arm@0.27.7':
     optional: true
 
-  '@esbuild/linux-ia32@0.25.9':
+  '@esbuild/linux-ia32@0.27.7':
     optional: true
 
-  '@esbuild/linux-loong64@0.25.9':
+  '@esbuild/linux-loong64@0.27.7':
     optional: true
 
-  '@esbuild/linux-mips64el@0.25.9':
+  '@esbuild/linux-mips64el@0.27.7':
     optional: true
 
-  '@esbuild/linux-ppc64@0.25.9':
+  '@esbuild/linux-ppc64@0.27.7':
     optional: true
 
-  '@esbuild/linux-riscv64@0.25.9':
+  '@esbuild/linux-riscv64@0.27.7':
     optional: true
 
-  '@esbuild/linux-s390x@0.25.9':
+  '@esbuild/linux-s390x@0.27.7':
     optional: true
 
-  '@esbuild/linux-x64@0.25.9':
+  '@esbuild/linux-x64@0.27.7':
     optional: true
 
-  '@esbuild/netbsd-arm64@0.25.9':
+  '@esbuild/netbsd-arm64@0.27.7':
     optional: true
 
-  '@esbuild/netbsd-x64@0.25.9':
+  '@esbuild/netbsd-x64@0.27.7':
     optional: true
 
-  '@esbuild/openbsd-arm64@0.25.9':
+  '@esbuild/openbsd-arm64@0.27.7':
     optional: true
 
-  '@esbuild/openbsd-x64@0.25.9':
+  '@esbuild/openbsd-x64@0.27.7':
     optional: true
 
-  '@esbuild/openharmony-arm64@0.25.9':
+  '@esbuild/openharmony-arm64@0.27.7':
     optional: true
 
-  '@esbuild/sunos-x64@0.25.9':
+  '@esbuild/sunos-x64@0.27.7':
     optional: true
 
-  '@esbuild/win32-arm64@0.25.9':
+  '@esbuild/win32-arm64@0.27.7':
     optional: true
 
-  '@esbuild/win32-ia32@0.25.9':
+  '@esbuild/win32-ia32@0.27.7':
     optional: true
 
-  '@esbuild/win32-x64@0.25.9':
+  '@esbuild/win32-x64@0.27.7':
     optional: true
 
   '@esm-bundle/chai@4.3.4-fix.0':
@@ -2025,23 +2074,24 @@
 
   '@jridgewell/resolve-uri@3.1.2': {}
 
-  '@jridgewell/sourcemap-codec@1.5.5': {}
+  '@jridgewell/sourcemap-codec@1.6.0': {}
 
-  '@jridgewell/trace-mapping@0.3.30':
+  '@jridgewell/trace-mapping@0.3.31':
     dependencies:
       '@jridgewell/resolve-uri': 3.1.2
-      '@jridgewell/sourcemap-codec': 1.5.5
-
-  '@lit-labs/ssr-dom-shim@1.4.0': {}
+      '@jridgewell/sourcemap-codec': 1.6.0
 
   '@lit-labs/ssr-dom-shim@1.6.0': {}
 
-  '@lit/reactive-element@2.1.1':
+  '@lit/reactive-element@2.1.2':
     dependencies:
-      '@lit-labs/ssr-dom-shim': 1.4.0
+      '@lit-labs/ssr-dom-shim': 1.6.0
 
   '@mdn/browser-compat-data@4.2.1': {}
 
+  '@napi-rs/lzma-linux-x64-gnu@1.5.1':
+    optional: true
+
   '@nodelib/fs.scandir@2.1.5':
     dependencies:
       '@nodelib/fs.stat': 2.0.5
@@ -2052,19 +2102,19 @@
   '@nodelib/fs.walk@1.2.8':
     dependencies:
       '@nodelib/fs.scandir': 2.1.5
-      fastq: 1.19.1
+      fastq: 1.20.3
 
   '@open-wc/dedupe-mixin@2.0.1': {}
 
-  '@open-wc/scoped-elements@3.0.6':
+  '@open-wc/scoped-elements@3.0.10':
     dependencies:
       '@open-wc/dedupe-mixin': 2.0.1
       lit: 3.3.2
 
-  '@open-wc/semantic-dom-diff@0.20.1':
+  '@open-wc/semantic-dom-diff@0.20.1(supports-color@8.1.1)':
     dependencies:
       '@types/chai': 4.3.20
-      '@web/test-runner-commands': 0.9.0
+      '@web/test-runner-commands': 0.9.0(supports-color@8.1.1)
     transitivePeerDependencies:
       - bufferutil
       - supports-color
@@ -2072,14 +2122,14 @@
 
   '@open-wc/testing-helpers@3.0.1':
     dependencies:
-      '@open-wc/scoped-elements': 3.0.6
+      '@open-wc/scoped-elements': 3.0.10
       lit: 3.3.2
       lit-html: 3.3.2
 
-  '@open-wc/testing@4.0.0':
+  '@open-wc/testing@4.0.0(supports-color@8.1.1)':
     dependencies:
       '@esm-bundle/chai': 4.3.4-fix.0
-      '@open-wc/semantic-dom-diff': 0.20.1
+      '@open-wc/semantic-dom-diff': 0.20.1(supports-color@8.1.1)
       '@open-wc/testing-helpers': 3.0.1
       '@types/chai-dom': 1.11.3
       '@types/sinon-chai': 3.2.12
@@ -2089,95 +2139,112 @@
       - supports-color
       - utf-8-validate
 
-  '@puppeteer/browsers@2.10.7':
+  '@puppeteer/browsers@2.13.2(supports-color@8.1.1)':
     dependencies:
-      debug: 4.4.1(supports-color@8.1.1)
-      extract-zip: 2.0.1
+      debug: 4.4.3(supports-color@8.1.1)
+      extract-zip: 2.0.1(supports-color@8.1.1)
       progress: 2.0.3
-      proxy-agent: 6.5.0
-      semver: 7.7.2
-      tar-fs: 3.1.0
-      yargs: 17.7.2
+      proxy-agent: 6.5.0(supports-color@8.1.1)
+      semver: 7.8.5
+      tar-fs: 3.1.3
+      yargs: 17.7.3
     transitivePeerDependencies:
+      - bare-abort-controller
       - bare-buffer
+      - react-native-b4a
       - supports-color
 
-  '@rollup/plugin-node-resolve@15.3.1(rollup@4.49.0)':
+  '@rollup/plugin-node-resolve@15.3.1(rollup@4.64.12)':
     dependencies:
-      '@rollup/pluginutils': 5.2.0(rollup@4.49.0)
+      '@rollup/pluginutils': 5.5.1(rollup@4.64.12)
       '@types/resolve': 1.20.2
       deepmerge: 4.3.1
       is-module: 1.0.0
-      resolve: 1.22.10
+      resolve: 1.22.13
     optionalDependencies:
-      rollup: 4.49.0
+      rollup: 4.64.12
 
-  '@rollup/pluginutils@5.2.0(rollup@4.49.0)':
+  '@rollup/pluginutils@5.5.1(rollup@4.64.12)':
     dependencies:
-      '@types/estree': 1.0.8
+      '@types/estree': 1.0.9
       estree-walker: 2.0.2
-      picomatch: 4.0.3
+      picomatch: 4.0.7
     optionalDependencies:
-      rollup: 4.49.0
+      rollup: 4.64.12
 
-  '@rollup/rollup-android-arm-eabi@4.49.0':
+  '@rollup/rollup-android-arm-eabi@4.64.12':
     optional: true
 
-  '@rollup/rollup-android-arm64@4.49.0':
+  '@rollup/rollup-android-arm64@4.64.12':
     optional: true
 
-  '@rollup/rollup-darwin-arm64@4.49.0':
+  '@rollup/rollup-darwin-arm64@4.64.12':
     optional: true
 
-  '@rollup/rollup-darwin-x64@4.49.0':
+  '@rollup/rollup-darwin-x64@4.64.12':
     optional: true
 
-  '@rollup/rollup-freebsd-arm64@4.49.0':
+  '@rollup/rollup-freebsd-arm64@4.64.12':
     optional: true
 
-  '@rollup/rollup-freebsd-x64@4.49.0':
+  '@rollup/rollup-freebsd-x64@4.64.12':
     optional: true
 
-  '@rollup/rollup-linux-arm-gnueabihf@4.49.0':
+  '@rollup/rollup-linux-arm-gnueabihf@4.64.12':
     optional: true
 
-  '@rollup/rollup-linux-arm-musleabihf@4.49.0':
+  '@rollup/rollup-linux-arm-musleabihf@4.64.12':
     optional: true
 
-  '@rollup/rollup-linux-arm64-gnu@4.49.0':
+  '@rollup/rollup-linux-arm64-gnu@4.64.12':
     optional: true
 
-  '@rollup/rollup-linux-arm64-musl@4.49.0':
+  '@rollup/rollup-linux-arm64-musl@4.64.12':
     optional: true
 
-  '@rollup/rollup-linux-loongarch64-gnu@4.49.0':
+  '@rollup/rollup-linux-loong64-gnu@4.64.12':
     optional: true
 
-  '@rollup/rollup-linux-ppc64-gnu@4.49.0':
+  '@rollup/rollup-linux-loong64-musl@4.64.12':
     optional: true
 
-  '@rollup/rollup-linux-riscv64-gnu@4.49.0':
+  '@rollup/rollup-linux-ppc64-gnu@4.64.12':
     optional: true
 
-  '@rollup/rollup-linux-riscv64-musl@4.49.0':
+  '@rollup/rollup-linux-ppc64-musl@4.64.12':
     optional: true
 
-  '@rollup/rollup-linux-s390x-gnu@4.49.0':
+  '@rollup/rollup-linux-riscv64-gnu@4.64.12':
     optional: true
 
-  '@rollup/rollup-linux-x64-gnu@4.49.0':
+  '@rollup/rollup-linux-riscv64-musl@4.64.12':
     optional: true
 
-  '@rollup/rollup-linux-x64-musl@4.49.0':
+  '@rollup/rollup-linux-s390x-gnu@4.64.12':
     optional: true
 
-  '@rollup/rollup-win32-arm64-msvc@4.49.0':
+  '@rollup/rollup-linux-x64-gnu@4.64.12':
     optional: true
 
-  '@rollup/rollup-win32-ia32-msvc@4.49.0':
+  '@rollup/rollup-linux-x64-musl@4.64.12':
     optional: true
 
-  '@rollup/rollup-win32-x64-msvc@4.49.0':
+  '@rollup/rollup-openbsd-x64@4.64.12':
+    optional: true
+
+  '@rollup/rollup-openharmony-arm64@4.64.12':
+    optional: true
+
+  '@rollup/rollup-win32-arm64-msvc@4.64.12':
+    optional: true
+
+  '@rollup/rollup-win32-ia32-msvc@4.64.12':
+    optional: true
+
+  '@rollup/rollup-win32-x64-gnu@4.64.12':
+    optional: true
+
+  '@rollup/rollup-win32-x64-msvc@4.64.12':
     optional: true
 
   '@sinonjs/commons@3.0.1':
@@ -2197,65 +2264,66 @@
 
   '@types/accepts@1.3.7':
     dependencies:
-      '@types/node': 24.3.0
+      '@types/node': 26.6.5
 
-  '@types/babel__code-frame@7.0.6': {}
+  '@types/babel__code-frame@7.27.0': {}
 
   '@types/body-parser@1.19.6':
     dependencies:
       '@types/connect': 3.4.38
-      '@types/node': 24.3.0
+      '@types/node': 26.6.5
 
   '@types/chai-dom@1.11.3':
     dependencies:
-      '@types/chai': 5.2.2
+      '@types/chai': 5.2.3
 
   '@types/chai@4.3.20': {}
 
-  '@types/chai@5.2.2':
+  '@types/chai@5.2.3':
     dependencies:
       '@types/deep-eql': 4.0.2
+      assertion-error: 2.0.1
 
   '@types/co-body@6.1.3':
     dependencies:
-      '@types/node': 24.3.0
-      '@types/qs': 6.14.0
+      '@types/node': 26.6.5
+      '@types/qs': 6.15.1
 
   '@types/command-line-args@5.2.3': {}
 
   '@types/connect@3.4.38':
     dependencies:
-      '@types/node': 24.3.0
+      '@types/node': 26.6.5
 
   '@types/content-disposition@0.5.9': {}
 
   '@types/convert-source-map@2.0.3': {}
 
-  '@types/cookies@0.9.1':
+  '@types/cookies@0.9.2':
     dependencies:
       '@types/connect': 3.4.38
-      '@types/express': 5.0.3
+      '@types/express': 5.0.6
       '@types/keygrip': 1.0.6
-      '@types/node': 24.3.0
+      '@types/node': 26.6.5
 
   '@types/debounce@1.2.4': {}
 
   '@types/deep-eql@4.0.2': {}
 
-  '@types/estree@1.0.8': {}
+  '@types/estree@1.0.9': {}
 
-  '@types/express-serve-static-core@5.0.7':
+  '@types/express-serve-static-core@5.1.3':
     dependencies:
-      '@types/node': 24.3.0
-      '@types/qs': 6.14.0
+      '@types/node': 26.6.5
+      '@types/qs': 6.15.1
       '@types/range-parser': 1.2.7
-      '@types/send': 0.17.5
+      '@types/send': 1.2.1
 
-  '@types/express@5.0.3':
+  '@types/express@5.0.6':
     dependencies:
       '@types/body-parser': 1.19.6
-      '@types/express-serve-static-core': 5.0.7
-      '@types/serve-static': 1.15.8
+      '@types/express-serve-static-core': 5.1.3
+      '@types/serve-static': 2.2.0
 
   '@types/http-assert@1.5.6': {}
 
@@ -2273,129 +2341,114 @@
 
   '@types/keygrip@1.0.6': {}
 
-  '@types/koa-compose@3.2.8':
+  '@types/koa-compose@3.2.9':
     dependencies:
-      '@types/koa': 3.0.0
+      '@types/koa': 2.15.2
 
-  '@types/koa@2.15.0':
+  '@types/koa@2.15.2':
     dependencies:
       '@types/accepts': 1.3.7
       '@types/content-disposition': 0.5.9
-      '@types/cookies': 0.9.1
+      '@types/cookies': 0.9.2
       '@types/http-assert': 1.5.6
       '@types/http-errors': 2.0.5
       '@types/keygrip': 1.0.6
-      '@types/koa-compose': 3.2.8
-      '@types/node': 24.3.0
-
-  '@types/koa@3.0.0':
-    dependencies:
-      '@types/accepts': 1.3.7
-      '@types/content-disposition': 0.5.9
-      '@types/cookies': 0.9.1
-      '@types/http-assert': 1.5.6
-      '@types/http-errors': 2.0.5
-      '@types/keygrip': 1.0.6
-      '@types/koa-compose': 3.2.8
-      '@types/node': 24.3.0
-
-  '@types/mime@1.3.5': {}
+      '@types/koa-compose': 3.2.9
+      '@types/node': 26.6.5
 
   '@types/mkdirp@1.0.2':
     dependencies:
-      '@types/node': 24.3.0
+      '@types/node': 26.6.5
 
   '@types/mocha@10.0.10': {}
 
-  '@types/node@24.3.0':
+  '@types/node@26.6.5':
     dependencies:
-      undici-types: 7.10.0
+      undici-types: 8.9.0
 
   '@types/parse5@6.0.3': {}
 
   '@types/pixelmatch@5.2.6':
     dependencies:
-      '@types/node': 24.3.0
+      '@types/node': 26.6.5
 
   '@types/pngjs@6.0.5':
     dependencies:
-      '@types/node': 24.3.0
+      '@types/node': 26.6.5
 
-  '@types/qs@6.14.0': {}
+  '@types/qs@6.15.1': {}
 
   '@types/range-parser@1.2.7': {}
 
   '@types/resolve@1.20.2': {}
 
-  '@types/send@0.17.5':
+  '@types/send@1.2.1':
     dependencies:
-      '@types/mime': 1.3.5
-      '@types/node': 24.3.0
+      '@types/node': 26.6.5
 
-  '@types/serve-static@1.15.8':
+  '@types/serve-static@2.2.0':
     dependencies:
       '@types/http-errors': 2.0.5
-      '@types/node': 24.3.0
-      '@types/send': 0.17.5
+      '@types/node': 26.6.5
 
   '@types/sinon-chai@3.2.12':
     dependencies:
-      '@types/chai': 5.2.2
+      '@types/chai': 5.2.3
       '@types/sinon': 17.0.4
 
   '@types/sinon@17.0.4':
     dependencies:
-      '@types/sinonjs__fake-timers': 8.1.5
+      '@types/sinonjs__fake-timers': 15.0.1
 
-  '@types/sinonjs__fake-timers@8.1.5': {}
+  '@types/sinonjs__fake-timers@15.0.1': {}
 
   '@types/trusted-types@2.0.7': {}
 
   '@types/ws@7.4.7':
     dependencies:
-      '@types/node': 24.3.0
+      '@types/node': 26.6.5
 
   '@types/yauzl@2.10.3':
     dependencies:
-      '@types/node': 24.3.0
+      '@types/node': 26.6.5
     optional: true
 
   '@web/browser-logs@0.4.1':
     dependencies:
-      errorstacks: 2.4.1
+      errorstacks: 2.4.2
 
   '@web/config-loader@0.3.3': {}
 
-  '@web/dev-server-core@0.7.5':
+  '@web/dev-server-core@0.7.5(supports-color@8.1.1)':
     dependencies:
-      '@types/koa': 2.15.0
+      '@types/koa': 2.15.2
       '@types/ws': 7.4.7
-      '@web/parse5-utils': 2.1.0
+      '@web/parse5-utils': 2.1.1
       chokidar: 4.0.3
       clone: 2.1.2
       es-module-lexer: 1.7.0
       get-stream: 6.0.1
       is-stream: 2.0.1
-      isbinaryfile: 5.0.5
-      koa: 2.16.2
+      isbinaryfile: 5.0.7
+      koa: 2.16.4(supports-color@8.1.1)
       koa-etag: 4.0.0
-      koa-send: 5.0.1
-      koa-static: 5.0.0
+      koa-send: 5.0.1(supports-color@8.1.1)
+      koa-static: 5.0.0(supports-color@8.1.1)
       lru-cache: 8.0.5
       mime-types: 2.1.35
       parse5: 6.0.1
-      picomatch: 2.3.1
-      ws: 7.5.10
+      picomatch: 2.3.2
+      ws: 7.5.13
     transitivePeerDependencies:
       - bufferutil
       - supports-color
       - utf-8-validate
 
-  '@web/dev-server-esbuild@1.0.4':
+  '@web/dev-server-esbuild@1.0.5(supports-color@8.1.1)':
     dependencies:
       '@mdn/browser-compat-data': 4.2.1
-      '@web/dev-server-core': 0.7.5
-      esbuild: 0.25.9
+      '@web/dev-server-core': 0.7.5(supports-color@8.1.1)
+      esbuild: 0.27.7
       parse5: 6.0.1
       ua-parser-js: 1.0.41
     transitivePeerDependencies:
@@ -2403,77 +2456,79 @@
       - supports-color
       - utf-8-validate
 
-  '@web/dev-server-rollup@0.6.4':
+  '@web/dev-server-rollup@0.6.4(supports-color@8.1.1)':
     dependencies:
-      '@rollup/plugin-node-resolve': 15.3.1(rollup@4.49.0)
-      '@web/dev-server-core': 0.7.5
+      '@rollup/plugin-node-resolve': 15.3.1(rollup@4.64.12)
+      '@web/dev-server-core': 0.7.5(supports-color@8.1.1)
       nanocolors: 0.2.13
       parse5: 6.0.1
-      rollup: 4.49.0
+      rollup: 4.64.12
       whatwg-url: 14.2.0
     transitivePeerDependencies:
       - bufferutil
       - supports-color
       - utf-8-validate
 
-  '@web/dev-server@0.4.6':
+  '@web/dev-server@0.4.6(supports-color@8.1.1)':
     dependencies:
-      '@babel/code-frame': 7.27.1
+      '@babel/code-frame': 7.29.7
       '@types/command-line-args': 5.2.3
       '@web/config-loader': 0.3.3
-      '@web/dev-server-core': 0.7.5
-      '@web/dev-server-rollup': 0.6.4
+      '@web/dev-server-core': 0.7.5(supports-color@8.1.1)
+      '@web/dev-server-rollup': 0.6.4(supports-color@8.1.1)
       camelcase: 6.3.0
       command-line-args: 5.2.1
-      command-line-usage: 7.0.3
+      command-line-usage: 7.0.4
       debounce: 1.2.1
       deepmerge: 4.3.1
       internal-ip: 6.2.0
       nanocolors: 0.2.13
       open: 8.4.2
-      portfinder: 1.0.37
+      portfinder: 1.0.38(supports-color@8.1.1)
     transitivePeerDependencies:
       - bufferutil
       - supports-color
       - utf-8-validate
 
-  '@web/parse5-utils@2.1.0':
+  '@web/parse5-utils@2.1.1':
     dependencies:
       '@types/parse5': 6.0.3
       parse5: 6.0.1
 
-  '@web/test-runner-chrome@0.18.1':
+  '@web/test-runner-chrome@0.18.1(supports-color@8.1.1)':
     dependencies:
-      '@web/test-runner-core': 0.13.4
-      '@web/test-runner-coverage-v8': 0.8.0
-      chrome-launcher: 0.15.2
-      puppeteer-core: 24.17.0
+      '@web/test-runner-core': 0.13.4(supports-color@8.1.1)
+      '@web/test-runner-coverage-v8': 0.8.0(supports-color@8.1.1)
+      chrome-launcher: 0.15.2(supports-color@8.1.1)
+      puppeteer-core: 24.43.1(supports-color@8.1.1)
     transitivePeerDependencies:
+      - bare-abort-controller
       - bare-buffer
       - bufferutil
+      - react-native-b4a
       - supports-color
       - utf-8-validate
 
-  '@web/test-runner-commands@0.9.0':
+  '@web/test-runner-commands@0.9.0(supports-color@8.1.1)':
     dependencies:
-      '@web/test-runner-core': 0.13.4
+      '@web/test-runner-core': 0.13.4(supports-color@8.1.1)
       mkdirp: 1.0.4
     transitivePeerDependencies:
       - bufferutil
       - supports-color
       - utf-8-validate
 
-  '@web/test-runner-core@0.13.4':
+  '@web/test-runner-core@0.13.4(supports-color@8.1.1)':
     dependencies:
-      '@babel/code-frame': 7.27.1
-      '@types/babel__code-frame': 7.0.6
+      '@babel/code-frame': 7.29.7
+      '@types/babel__code-frame': 7.27.0
       '@types/co-body': 6.1.3
       '@types/convert-source-map': 2.0.3
       '@types/debounce': 1.2.4
       '@types/istanbul-lib-coverage': 2.0.6
       '@types/istanbul-reports': 3.0.4
       '@web/browser-logs': 0.4.1
-      '@web/dev-server-core': 0.7.5
+      '@web/dev-server-core': 0.7.5(supports-color@8.1.1)
       chokidar: 4.0.3
       cli-cursor: 3.1.0
       co-body: 6.2.0
@@ -2487,52 +2542,52 @@
       istanbul-reports: 3.2.0
       log-update: 4.0.0
       nanocolors: 0.2.13
-      nanoid: 3.3.11
+      nanoid: 3.3.20
       open: 8.4.2
-      picomatch: 2.3.1
+      picomatch: 2.3.2
       source-map: 0.7.6
     transitivePeerDependencies:
       - bufferutil
       - supports-color
       - utf-8-validate
 
-  '@web/test-runner-coverage-v8@0.8.0':
+  '@web/test-runner-coverage-v8@0.8.0(supports-color@8.1.1)':
     dependencies:
-      '@web/test-runner-core': 0.13.4
+      '@web/test-runner-core': 0.13.4(supports-color@8.1.1)
       istanbul-lib-coverage: 3.2.2
       lru-cache: 8.0.5
-      picomatch: 2.3.1
+      picomatch: 2.3.2
       v8-to-istanbul: 9.3.0
     transitivePeerDependencies:
       - bufferutil
       - supports-color
       - utf-8-validate
 
-  '@web/test-runner-mocha@0.9.0':
+  '@web/test-runner-mocha@0.9.0(supports-color@8.1.1)':
     dependencies:
-      '@web/test-runner-core': 0.13.4
+      '@web/test-runner-core': 0.13.4(supports-color@8.1.1)
     transitivePeerDependencies:
       - bufferutil
       - supports-color
       - utf-8-validate
 
-  '@web/test-runner-playwright@0.11.1':
+  '@web/test-runner-playwright@0.11.1(supports-color@8.1.1)':
     dependencies:
-      '@web/test-runner-core': 0.13.4
-      '@web/test-runner-coverage-v8': 0.8.0
-      playwright: 1.55.0
+      '@web/test-runner-core': 0.13.4(supports-color@8.1.1)
+      '@web/test-runner-coverage-v8': 0.8.0(supports-color@8.1.1)
+      playwright: 1.64.1
     transitivePeerDependencies:
       - bufferutil
       - supports-color
       - utf-8-validate
 
-  '@web/test-runner-visual-regression@0.10.0':
+  '@web/test-runner-visual-regression@0.10.0(supports-color@8.1.1)':
     dependencies:
       '@types/mkdirp': 1.0.2
       '@types/pixelmatch': 5.2.6
       '@types/pngjs': 6.0.5
-      '@web/test-runner-commands': 0.9.0
-      '@web/test-runner-core': 0.13.4
+      '@web/test-runner-commands': 0.9.0(supports-color@8.1.1)
+      '@web/test-runner-core': 0.13.4(supports-color@8.1.1)
       mkdirp: 1.0.4
       pixelmatch: 5.3.0
       pngjs: 7.0.0
@@ -2541,27 +2596,29 @@
       - supports-color
       - utf-8-validate
 
-  '@web/test-runner@0.20.2':
+  '@web/test-runner@0.20.2(supports-color@8.1.1)':
     dependencies:
       '@web/browser-logs': 0.4.1
       '@web/config-loader': 0.3.3
-      '@web/dev-server': 0.4.6
-      '@web/test-runner-chrome': 0.18.1
-      '@web/test-runner-commands': 0.9.0
-      '@web/test-runner-core': 0.13.4
-      '@web/test-runner-mocha': 0.9.0
+      '@web/dev-server': 0.4.6(supports-color@8.1.1)
+      '@web/test-runner-chrome': 0.18.1(supports-color@8.1.1)
+      '@web/test-runner-commands': 0.9.0(supports-color@8.1.1)
+      '@web/test-runner-core': 0.13.4(supports-color@8.1.1)
+      '@web/test-runner-mocha': 0.9.0(supports-color@8.1.1)
       camelcase: 6.3.0
       command-line-args: 5.2.1
-      command-line-usage: 7.0.3
+      command-line-usage: 7.0.4
       convert-source-map: 2.0.0
-      diff: 5.2.0
+      diff: 5.2.2
       globby: 11.1.0
       nanocolors: 0.2.13
-      portfinder: 1.0.37
+      portfinder: 1.0.38(supports-color@8.1.1)
       source-map: 0.7.6
     transitivePeerDependencies:
+      - bare-abort-controller
       - bare-buffer
       - bufferutil
+      - react-native-b4a
       - supports-color
       - utf-8-validate
 
@@ -2589,16 +2646,18 @@
   anymatch@3.1.3:
     dependencies:
       normalize-path: 3.0.0
-      picomatch: 2.3.1
+      picomatch: 2.3.2
 
   argparse@2.0.1: {}
 
   array-back@3.1.0: {}
 
-  array-back@6.2.2: {}
+  array-back@6.2.3: {}
 
   array-union@2.1.0: {}
 
+  assertion-error@2.0.1: {}
+
   ast-types@0.13.4:
     dependencies:
       tslib: 2.8.1
@@ -2607,42 +2666,46 @@
 
   async@3.2.6: {}
 
-  axe-core@4.10.3: {}
+  axe-core@4.14.0: {}
 
-  b4a@1.6.7: {}
+  b4a@1.9.0: {}
 
   balanced-match@1.0.2: {}
 
-  bare-events@2.6.1:
-    optional: true
+  bare-events@2.9.2: {}
 
-  bare-fs@4.2.1:
+  bare-fs@4.8.4:
     dependencies:
-      bare-events: 2.6.1
-      bare-path: 3.0.0
-      bare-stream: 2.7.0(bare-events@2.6.1)
-    optional: true
+      bare-events: 2.9.2
+      bare-path: 3.1.2
+      bare-stream: 2.13.4(bare-events@2.9.2)
+      bare-url: 2.5.5
+      fast-fifo: 1.3.2
+    transitivePeerDependencies:
+      - bare-abort-controller
+      - react-native-b4a
 
-  bare-os@3.6.2:
-    optional: true
+  bare-path@3.1.2: {}
 
-  bare-path@3.0.0:
+  bare-stream@2.13.4(bare-events@2.9.2):
     dependencies:
-      bare-os: 3.6.2
-    optional: true
-
-  bare-stream@2.7.0(bare-events@2.6.1):
-    dependencies:
-      streamx: 2.22.1
+      b4a: 1.9.0
+      streamx: 2.28.1
+      teex: 1.0.1
     optionalDependencies:
-      bare-events: 2.6.1
-    optional: true
+      bare-events: 2.9.2
+    transitivePeerDependencies:
+      - react-native-b4a
 
-  basic-ftp@5.0.5: {}
+  bare-url@2.5.5:
+    dependencies:
+      bare-path: 3.1.2
+
+  basic-ftp@5.3.1: {}
 
   binary-extensions@2.3.0: {}
 
-  brace-expansion@2.0.2:
+  brace-expansion@2.1.7:
     dependencies:
       balanced-match: 1.0.2
 
@@ -2677,7 +2740,7 @@
 
   chai-a11y-axe@1.5.0:
     dependencies:
-      axe-core: 4.10.3
+      axe-core: 4.14.0
 
   chalk-template@0.4.0:
     dependencies:
@@ -2704,18 +2767,18 @@
     dependencies:
       readdirp: 4.1.2
 
-  chrome-launcher@0.15.2:
+  chrome-launcher@0.15.2(supports-color@8.1.1):
     dependencies:
-      '@types/node': 24.3.0
+      '@types/node': 26.6.5
       escape-string-regexp: 4.0.0
       is-wsl: 2.2.0
-      lighthouse-logger: 1.4.2
+      lighthouse-logger: 1.4.2(supports-color@8.1.1)
     transitivePeerDependencies:
       - supports-color
 
-  chromium-bidi@8.0.0(devtools-protocol@0.0.1475386):
+  chromium-bidi@14.0.0(devtools-protocol@0.0.1608973):
     dependencies:
-      devtools-protocol: 0.0.1475386
+      devtools-protocol: 0.0.1608973
       mitt: 3.0.1
       zod: 3.25.76
 
@@ -2741,8 +2804,8 @@
     dependencies:
       '@hapi/bourne': 3.0.0
       inflation: 2.1.0
-      qs: 6.14.0
-      raw-body: 2.5.2
+      qs: 6.16.1
+      raw-body: 2.5.3
       type-is: 1.6.18
 
   co@4.6.0: {}
@@ -2760,9 +2823,9 @@
       lodash.camelcase: 4.3.0
       typical: 4.0.0
 
-  command-line-usage@7.0.3:
+  command-line-usage@7.0.4:
     dependencies:
-      array-back: 6.2.2
+      array-back: 6.2.3
       chalk-template: 0.4.0
       table-layout: 4.1.1
       typical: 7.3.0
@@ -2775,7 +2838,7 @@
 
   convert-source-map@2.0.0: {}
 
-  cookies@0.9.1:
+  cookies@0.9.2:
     dependencies:
       depd: 2.0.0
       keygrip: 1.1.0
@@ -2790,15 +2853,19 @@
 
   debounce@1.2.1: {}
 
-  debug@2.6.9:
+  debug@2.6.9(supports-color@8.1.1):
     dependencies:
       ms: 2.0.0
+    optionalDependencies:
+      supports-color: 8.1.1
 
-  debug@3.2.7:
+  debug@3.2.7(supports-color@8.1.1):
     dependencies:
       ms: 2.1.3
+    optionalDependencies:
+      supports-color: 8.1.1
 
-  debug@4.4.1(supports-color@8.1.1):
+  debug@4.4.3(supports-color@8.1.1):
     dependencies:
       ms: 2.1.3
     optionalDependencies:
@@ -2832,9 +2899,9 @@
 
   destroy@1.2.0: {}
 
-  devtools-protocol@0.0.1475386: {}
+  devtools-protocol@0.0.1608973: {}
 
-  diff@5.2.0: {}
+  diff@5.2.2: {}
 
   diff@7.0.0: {}
 
@@ -2858,7 +2925,7 @@
     dependencies:
       once: 1.4.0
 
-  errorstacks@2.4.1: {}
+  errorstacks@2.4.2: {}
 
   es-define-property@1.0.1: {}
 
@@ -2866,38 +2933,38 @@
 
   es-module-lexer@1.7.0: {}
 
-  es-object-atoms@1.1.1:
+  es-object-atoms@1.1.2:
     dependencies:
       es-errors: 1.3.0
 
-  esbuild@0.25.9:
+  esbuild@0.27.7:
     optionalDependencies:
-      '@esbuild/aix-ppc64': 0.25.9
-      '@esbuild/android-arm': 0.25.9
-      '@esbuild/android-arm64': 0.25.9
-      '@esbuild/android-x64': 0.25.9
-      '@esbuild/darwin-arm64': 0.25.9
-      '@esbuild/darwin-x64': 0.25.9
-      '@esbuild/freebsd-arm64': 0.25.9
-      '@esbuild/freebsd-x64': 0.25.9
-      '@esbuild/linux-arm': 0.25.9
-      '@esbuild/linux-arm64': 0.25.9
-      '@esbuild/linux-ia32': 0.25.9
-      '@esbuild/linux-loong64': 0.25.9
-      '@esbuild/linux-mips64el': 0.25.9
-      '@esbuild/linux-ppc64': 0.25.9
-      '@esbuild/linux-riscv64': 0.25.9
-      '@esbuild/linux-s390x': 0.25.9
-      '@esbuild/linux-x64': 0.25.9
-      '@esbuild/netbsd-arm64': 0.25.9
-      '@esbuild/netbsd-x64': 0.25.9
-      '@esbuild/openbsd-arm64': 0.25.9
-      '@esbuild/openbsd-x64': 0.25.9
-      '@esbuild/openharmony-arm64': 0.25.9
-      '@esbuild/sunos-x64': 0.25.9
-      '@esbuild/win32-arm64': 0.25.9
-      '@esbuild/win32-ia32': 0.25.9
-      '@esbuild/win32-x64': 0.25.9
+      '@esbuild/aix-ppc64': 0.27.7
+      '@esbuild/android-arm': 0.27.7
+      '@esbuild/android-arm64': 0.27.7
+      '@esbuild/android-x64': 0.27.7
+      '@esbuild/darwin-arm64': 0.27.7
+      '@esbuild/darwin-x64': 0.27.7
+      '@esbuild/freebsd-arm64': 0.27.7
+      '@esbuild/freebsd-x64': 0.27.7
+      '@esbuild/linux-arm': 0.27.7
+      '@esbuild/linux-arm64': 0.27.7
+      '@esbuild/linux-ia32': 0.27.7
+      '@esbuild/linux-loong64': 0.27.7
+      '@esbuild/linux-mips64el': 0.27.7
+      '@esbuild/linux-ppc64': 0.27.7
+      '@esbuild/linux-riscv64': 0.27.7
+      '@esbuild/linux-s390x': 0.27.7
+      '@esbuild/linux-x64': 0.27.7
+      '@esbuild/netbsd-arm64': 0.27.7
+      '@esbuild/netbsd-x64': 0.27.7
+      '@esbuild/openbsd-arm64': 0.27.7
+      '@esbuild/openbsd-x64': 0.27.7
+      '@esbuild/openharmony-arm64': 0.27.7
+      '@esbuild/sunos-x64': 0.27.7
+      '@esbuild/win32-arm64': 0.27.7
+      '@esbuild/win32-ia32': 0.27.7
+      '@esbuild/win32-x64': 0.27.7
 
   escalade@3.2.0: {}
 
@@ -2923,6 +2990,12 @@
 
   etag@1.8.1: {}
 
+  events-universal@1.0.1:
+    dependencies:
+      bare-events: 2.9.2
+    transitivePeerDependencies:
+      - bare-abort-controller
+
   execa@5.1.1:
     dependencies:
       cross-spawn: 7.0.6
@@ -2935,9 +3008,9 @@
       signal-exit: 3.0.7
       strip-final-newline: 2.0.0
 
-  extract-zip@2.0.1:
+  extract-zip@2.0.1(supports-color@8.1.1):
     dependencies:
-      debug: 4.4.1(supports-color@8.1.1)
+      debug: 4.4.3(supports-color@8.1.1)
       get-stream: 5.2.0
       yauzl: 2.10.0
     optionalDependencies:
@@ -2955,7 +3028,7 @@
       merge2: 1.4.1
       micromatch: 4.0.8
 
-  fastq@1.19.1:
+  fastq@1.20.3:
     dependencies:
       reusify: 1.1.0
 
@@ -2982,14 +3055,13 @@
 
   fs.realpath@1.0.0: {}
 
-  fsevents@2.3.2:
-    optional: true
-
   fsevents@2.3.3:
     optional: true
 
   function-bind@1.1.2: {}
 
+  generator-function@2.0.1: {}
+
   get-caller-file@2.0.5: {}
 
   get-intrinsic@1.3.0:
@@ -2997,30 +3069,30 @@
       call-bind-apply-helpers: 1.0.2
       es-define-property: 1.0.1
       es-errors: 1.3.0
-      es-object-atoms: 1.1.1
+      es-object-atoms: 1.1.2
       function-bind: 1.1.2
       get-proto: 1.0.1
       gopd: 1.2.0
       has-symbols: 1.1.0
-      hasown: 2.0.2
+      hasown: 2.0.4
       math-intrinsics: 1.1.0
 
   get-proto@1.0.1:
     dependencies:
       dunder-proto: 1.0.1
-      es-object-atoms: 1.1.1
+      es-object-atoms: 1.1.2
 
   get-stream@5.2.0:
     dependencies:
-      pump: 3.0.3
+      pump: 3.0.4
 
   get-stream@6.0.1: {}
 
-  get-uri@6.0.5:
+  get-uri@6.0.5(supports-color@8.1.1):
     dependencies:
-      basic-ftp: 5.0.5
+      basic-ftp: 5.3.1
       data-uri-to-buffer: 6.0.2
-      debug: 4.4.1(supports-color@8.1.1)
+      debug: 4.4.3(supports-color@8.1.1)
     transitivePeerDependencies:
       - supports-color
 
@@ -3033,7 +3105,7 @@
       fs.realpath: 1.0.0
       inflight: 1.0.6
       inherits: 2.0.4
-      minimatch: 5.1.6
+      minimatch: 5.1.9
       once: 1.4.0
 
   globby@11.1.0:
@@ -3055,7 +3127,7 @@
     dependencies:
       has-symbols: 1.1.0
 
-  hasown@2.0.2:
+  hasown@2.0.4:
     dependencies:
       function-bind: 1.1.2
 
@@ -3083,25 +3155,25 @@
       statuses: 1.5.0
       toidentifier: 1.0.1
 
-  http-errors@2.0.0:
+  http-errors@2.0.1:
     dependencies:
       depd: 2.0.0
       inherits: 2.0.4
       setprototypeof: 1.2.0
-      statuses: 2.0.1
+      statuses: 2.0.2
       toidentifier: 1.0.1
 
-  http-proxy-agent@7.0.2:
+  http-proxy-agent@7.0.2(supports-color@8.1.1):
     dependencies:
       agent-base: 7.1.4
-      debug: 4.4.1(supports-color@8.1.1)
+      debug: 4.4.3(supports-color@8.1.1)
     transitivePeerDependencies:
       - supports-color
 
-  https-proxy-agent@7.0.6:
+  https-proxy-agent@7.0.6(supports-color@8.1.1):
     dependencies:
       agent-base: 7.1.4
-      debug: 4.4.1(supports-color@8.1.1)
+      debug: 4.4.3(supports-color@8.1.1)
     transitivePeerDependencies:
       - supports-color
 
@@ -3131,7 +3203,7 @@
       is-ip: 3.1.0
       p-event: 4.2.0
 
-  ip-address@10.0.1: {}
+  ip-address@10.7.4: {}
 
   ip-regex@4.3.0: {}
 
@@ -3141,9 +3213,9 @@
     dependencies:
       binary-extensions: 2.3.0
 
-  is-core-module@2.16.1:
+  is-core-module@2.17.0:
     dependencies:
-      hasown: 2.0.2
+      hasown: 2.0.4
 
   is-docker@2.2.1: {}
 
@@ -3151,9 +3223,10 @@
 
   is-fullwidth-code-point@3.0.0: {}
 
-  is-generator-function@1.1.0:
+  is-generator-function@1.1.2:
     dependencies:
       call-bound: 1.0.4
+      generator-function: 2.0.1
       get-proto: 1.0.1
       has-tostringtag: 1.0.2
       safe-regex-test: 1.1.0
@@ -3177,7 +3250,7 @@
       call-bound: 1.0.4
       gopd: 1.2.0
       has-tostringtag: 1.0.2
-      hasown: 2.0.2
+      hasown: 2.0.4
 
   is-stream@2.0.1: {}
 
@@ -3187,7 +3260,7 @@
     dependencies:
       is-docker: 2.2.1
 
-  isbinaryfile@5.0.5: {}
+  isbinaryfile@5.0.7: {}
 
   isexe@2.0.0: {}
 
@@ -3206,7 +3279,7 @@
 
   js-tokens@4.0.0: {}
 
-  js-yaml@4.1.0:
+  js-yaml@4.3.2:
     dependencies:
       argparse: 2.0.1
 
@@ -3225,29 +3298,29 @@
     dependencies:
       etag: 1.8.1
 
-  koa-send@5.0.1:
+  koa-send@5.0.1(supports-color@8.1.1):
     dependencies:
-      debug: 4.4.1(supports-color@8.1.1)
+      debug: 4.4.3(supports-color@8.1.1)
       http-errors: 1.8.1
       resolve-path: 1.4.0
     transitivePeerDependencies:
       - supports-color
 
-  koa-static@5.0.0:
+  koa-static@5.0.0(supports-color@8.1.1):
     dependencies:
-      debug: 3.2.7
-      koa-send: 5.0.1
+      debug: 3.2.7(supports-color@8.1.1)
+      koa-send: 5.0.1(supports-color@8.1.1)
     transitivePeerDependencies:
       - supports-color
 
-  koa@2.16.2:
+  koa@2.16.4(supports-color@8.1.1):
     dependencies:
       accepts: 1.3.8
       cache-content-type: 1.0.1
       content-disposition: 0.5.4
       content-type: 1.0.5
-      cookies: 0.9.1
-      debug: 4.4.1(supports-color@8.1.1)
+      cookies: 0.9.2
+      debug: 4.4.3(supports-color@8.1.1)
       delegates: 1.0.0
       depd: 2.0.0
       destroy: 1.2.0
@@ -3256,7 +3329,7 @@
       fresh: 0.5.2
       http-assert: 1.5.0
       http-errors: 1.8.1
-      is-generator-function: 1.1.0
+      is-generator-function: 1.1.2
       koa-compose: 4.1.0
       koa-convert: 2.0.0
       on-finished: 2.4.1
@@ -3268,9 +3341,9 @@
     transitivePeerDependencies:
       - supports-color
 
-  lighthouse-logger@1.4.2:
+  lighthouse-logger@1.4.2(supports-color@8.1.1):
     dependencies:
-      debug: 2.6.9
+      debug: 2.6.9(supports-color@8.1.1)
       marky: 1.3.0
     transitivePeerDependencies:
       - supports-color
@@ -3278,7 +3351,7 @@
   lit-element@4.2.2:
     dependencies:
       '@lit-labs/ssr-dom-shim': 1.6.0
-      '@lit/reactive-element': 2.1.1
+      '@lit/reactive-element': 2.1.2
       lit-html: 3.3.2
 
   lit-html@3.3.2:
@@ -3287,7 +3360,7 @@
 
   lit@3.3.2:
     dependencies:
-      '@lit/reactive-element': 2.1.1
+      '@lit/reactive-element': 2.1.2
       lit-element: 4.2.2
       lit-html: 3.3.2
 
@@ -3315,7 +3388,7 @@
 
   make-dir@4.0.0:
     dependencies:
-      semver: 7.7.2
+      semver: 7.8.5
 
   marky@1.3.0: {}
 
@@ -3330,7 +3403,7 @@
   micromatch@4.0.8:
     dependencies:
       braces: 3.0.3
-      picomatch: 2.3.1
+      picomatch: 2.3.2
 
   mime-db@1.52.0: {}
 
@@ -3340,9 +3413,9 @@
 
   mimic-fn@2.1.0: {}
 
-  minimatch@5.1.6:
+  minimatch@5.1.9:
     dependencies:
-      brace-expansion: 2.0.2
+      brace-expansion: 2.1.7
 
   mitt@3.0.1: {}
 
@@ -3353,21 +3426,21 @@
       ansi-colors: 4.1.3
       browser-stdout: 1.3.1
       chokidar: 3.6.0
-      debug: 4.4.1(supports-color@8.1.1)
-      diff: 5.2.0
+      debug: 4.4.3(supports-color@8.1.1)
+      diff: 5.2.2
       escape-string-regexp: 4.0.0
       find-up: 5.0.0
       glob: 8.1.0
       he: 1.2.0
-      js-yaml: 4.1.0
+      js-yaml: 4.3.2
       log-symbols: 4.1.0
-      minimatch: 5.1.6
+      minimatch: 5.1.9
       ms: 2.1.3
       serialize-javascript: 6.0.2
       strip-json-comments: 3.1.1
       supports-color: 8.1.1
       workerpool: 6.5.1
-      yargs: 16.2.0
+      yargs: 16.2.2
       yargs-parser: 20.2.9
       yargs-unparser: 2.0.0
 
@@ -3377,11 +3450,11 @@
 
   nanocolors@0.2.13: {}
 
-  nanoid@3.3.11: {}
+  nanoid@3.3.20: {}
 
   negotiator@0.6.3: {}
 
-  netmask@2.0.2: {}
+  netmask@2.1.1: {}
 
   normalize-path@3.0.0: {}
 
@@ -3429,23 +3502,23 @@
     dependencies:
       p-finally: 1.0.0
 
-  pac-proxy-agent@7.2.0:
+  pac-proxy-agent@7.2.0(supports-color@8.1.1):
     dependencies:
       '@tootallnate/quickjs-emscripten': 0.23.0
       agent-base: 7.1.4
-      debug: 4.4.1(supports-color@8.1.1)
-      get-uri: 6.0.5
-      http-proxy-agent: 7.0.2
-      https-proxy-agent: 7.0.6
+      debug: 4.4.3(supports-color@8.1.1)
+      get-uri: 6.0.5(supports-color@8.1.1)
+      http-proxy-agent: 7.0.2(supports-color@8.1.1)
+      https-proxy-agent: 7.0.6(supports-color@8.1.1)
       pac-resolver: 7.0.1
-      socks-proxy-agent: 8.0.5
+      socks-proxy-agent: 8.0.5(supports-color@8.1.1)
     transitivePeerDependencies:
       - supports-color
 
   pac-resolver@7.0.1:
     dependencies:
       degenerator: 5.0.1
-      netmask: 2.0.2
+      netmask: 2.1.1
 
   parse5@6.0.1: {}
 
@@ -3465,9 +3538,9 @@
 
   picocolors@1.1.1: {}
 
-  picomatch@2.3.1: {}
+  picomatch@2.3.2: {}
 
-  picomatch@4.0.3: {}
+  picomatch@4.0.7: {}
 
   pixelmatch@5.3.0:
     dependencies:
@@ -3477,66 +3550,68 @@
     dependencies:
       pngjs: 7.0.0
 
-  playwright-core@1.55.0: {}
+  playwright-core@1.64.1: {}
 
-  playwright@1.55.0:
+  playwright@1.64.1:
     dependencies:
-      playwright-core: 1.55.0
-    optionalDependencies:
-      fsevents: 2.3.2
+      playwright-core: 1.64.1
 
   pngjs@6.0.0: {}
 
   pngjs@7.0.0: {}
 
-  portfinder@1.0.37:
+  portfinder@1.0.38(supports-color@8.1.1):
     dependencies:
       async: 3.2.6
-      debug: 4.4.1(supports-color@8.1.1)
+      debug: 4.4.3(supports-color@8.1.1)
     transitivePeerDependencies:
       - supports-color
 
   progress@2.0.3: {}
 
-  proxy-agent@6.5.0:
+  proxy-agent@6.5.0(supports-color@8.1.1):
     dependencies:
       agent-base: 7.1.4
-      debug: 4.4.1(supports-color@8.1.1)
-      http-proxy-agent: 7.0.2
-      https-proxy-agent: 7.0.6
+      debug: 4.4.3(supports-color@8.1.1)
+      http-proxy-agent: 7.0.2(supports-color@8.1.1)
+      https-proxy-agent: 7.0.6(supports-color@8.1.1)
       lru-cache: 7.18.3
-      pac-proxy-agent: 7.2.0
+      pac-proxy-agent: 7.2.0(supports-color@8.1.1)
       proxy-from-env: 1.1.0
-      socks-proxy-agent: 8.0.5
+      socks-proxy-agent: 8.0.5(supports-color@8.1.1)
     transitivePeerDependencies:
       - supports-color
 
   proxy-from-env@1.1.0: {}
 
-  pump@3.0.3:
+  pump@3.0.4:
     dependencies:
       end-of-stream: 1.4.5
       once: 1.4.0
 
   punycode@2.3.1: {}
 
-  puppeteer-core@24.17.0:
+  puppeteer-core@24.43.1(supports-color@8.1.1):
     dependencies:
-      '@puppeteer/browsers': 2.10.7
-      chromium-bidi: 8.0.0(devtools-protocol@0.0.1475386)
-      debug: 4.4.1(supports-color@8.1.1)
-      devtools-protocol: 0.0.1475386
-      typed-query-selector: 2.12.0
-      ws: 8.18.3
+      '@puppeteer/browsers': 2.13.2(supports-color@8.1.1)
+      chromium-bidi: 14.0.0(devtools-protocol@0.0.1608973)
+      debug: 4.4.3(supports-color@8.1.1)
+      devtools-protocol: 0.0.1608973
+      typed-query-selector: 2.12.3
+      webdriver-bidi-protocol: 0.4.1
+      ws: 8.22.0
     transitivePeerDependencies:
+      - bare-abort-controller
       - bare-buffer
       - bufferutil
+      - react-native-b4a
       - supports-color
       - utf-8-validate
 
-  qs@6.14.0:
+  qs@6.16.1:
     dependencies:
-      side-channel: 1.1.0
+      es-define-property: 1.0.1
+      side-channel: 1.1.1
 
   queue-microtask@1.2.3: {}
 
@@ -3544,16 +3619,16 @@
     dependencies:
       safe-buffer: 5.2.1
 
-  raw-body@2.5.2:
+  raw-body@2.5.3:
     dependencies:
       bytes: 3.1.2
-      http-errors: 2.0.0
+      http-errors: 2.0.1
       iconv-lite: 0.4.24
       unpipe: 1.0.0
 
   readdirp@3.6.0:
     dependencies:
-      picomatch: 2.3.1
+      picomatch: 2.3.2
 
   readdirp@4.1.2: {}
 
@@ -3564,9 +3639,10 @@
       http-errors: 1.6.3
       path-is-absolute: 1.0.1
 
-  resolve@1.22.10:
+  resolve@1.22.13:
     dependencies:
-      is-core-module: 2.16.1
+      es-errors: 1.3.0
+      is-core-module: 2.17.0
       path-parse: 1.0.7
       supports-preserve-symlinks-flag: 1.0.0
 
@@ -3577,30 +3653,36 @@
 
   reusify@1.1.0: {}
 
-  rollup@4.49.0:
+  rollup@4.64.12:
     dependencies:
-      '@types/estree': 1.0.8
+      '@types/estree': 1.0.9
     optionalDependencies:
-      '@rollup/rollup-android-arm-eabi': 4.49.0
-      '@rollup/rollup-android-arm64': 4.49.0
-      '@rollup/rollup-darwin-arm64': 4.49.0
-      '@rollup/rollup-darwin-x64': 4.49.0
-      '@rollup/rollup-freebsd-arm64': 4.49.0
-      '@rollup/rollup-freebsd-x64': 4.49.0
-      '@rollup/rollup-linux-arm-gnueabihf': 4.49.0
-      '@rollup/rollup-linux-arm-musleabihf': 4.49.0
-      '@rollup/rollup-linux-arm64-gnu': 4.49.0
-      '@rollup/rollup-linux-arm64-musl': 4.49.0
-      '@rollup/rollup-linux-loongarch64-gnu': 4.49.0
-      '@rollup/rollup-linux-ppc64-gnu': 4.49.0
-      '@rollup/rollup-linux-riscv64-gnu': 4.49.0
-      '@rollup/rollup-linux-riscv64-musl': 4.49.0
-      '@rollup/rollup-linux-s390x-gnu': 4.49.0
-      '@rollup/rollup-linux-x64-gnu': 4.49.0
-      '@rollup/rollup-linux-x64-musl': 4.49.0
-      '@rollup/rollup-win32-arm64-msvc': 4.49.0
-      '@rollup/rollup-win32-ia32-msvc': 4.49.0
-      '@rollup/rollup-win32-x64-msvc': 4.49.0
+      '@napi-rs/lzma-linux-x64-gnu': 1.5.1
+      '@rollup/rollup-android-arm-eabi': 4.64.12
+      '@rollup/rollup-android-arm64': 4.64.12
+      '@rollup/rollup-darwin-arm64': 4.64.12
+      '@rollup/rollup-darwin-x64': 4.64.12
+      '@rollup/rollup-freebsd-arm64': 4.64.12
+      '@rollup/rollup-freebsd-x64': 4.64.12
+      '@rollup/rollup-linux-arm-gnueabihf': 4.64.12
+      '@rollup/rollup-linux-arm-musleabihf': 4.64.12
+      '@rollup/rollup-linux-arm64-gnu': 4.64.12
+      '@rollup/rollup-linux-arm64-musl': 4.64.12
+      '@rollup/rollup-linux-loong64-gnu': 4.64.12
+      '@rollup/rollup-linux-loong64-musl': 4.64.12
+      '@rollup/rollup-linux-ppc64-gnu': 4.64.12
+      '@rollup/rollup-linux-ppc64-musl': 4.64.12
+      '@rollup/rollup-linux-riscv64-gnu': 4.64.12
+      '@rollup/rollup-linux-riscv64-musl': 4.64.12
+      '@rollup/rollup-linux-s390x-gnu': 4.64.12
+      '@rollup/rollup-linux-x64-gnu': 4.64.12
+      '@rollup/rollup-linux-x64-musl': 4.64.12
+      '@rollup/rollup-openbsd-x64': 4.64.12
+      '@rollup/rollup-openharmony-arm64': 4.64.12
+      '@rollup/rollup-win32-arm64-msvc': 4.64.12
+      '@rollup/rollup-win32-ia32-msvc': 4.64.12
+      '@rollup/rollup-win32-x64-gnu': 4.64.12
+      '@rollup/rollup-win32-x64-msvc': 4.64.12
       fsevents: 2.3.3
 
   run-parallel@1.2.0:
@@ -3617,7 +3699,7 @@
 
   safer-buffer@2.1.2: {}
 
-  semver@7.7.2: {}
+  semver@7.8.5: {}
 
   serialize-javascript@6.0.2:
     dependencies:
@@ -3633,7 +3715,7 @@
 
   shebang-regex@3.0.0: {}
 
-  side-channel-list@1.0.0:
+  side-channel-list@1.0.1:
     dependencies:
       es-errors: 1.3.0
       object-inspect: 1.13.4
@@ -3653,11 +3735,11 @@
       object-inspect: 1.13.4
       side-channel-map: 1.0.1
 
-  side-channel@1.1.0:
+  side-channel@1.1.1:
     dependencies:
       es-errors: 1.3.0
       object-inspect: 1.13.4
-      side-channel-list: 1.0.0
+      side-channel-list: 1.0.1
       side-channel-map: 1.0.1
       side-channel-weakmap: 1.0.2
 
@@ -3681,17 +3763,17 @@
 
   smart-buffer@4.2.0: {}
 
-  socks-proxy-agent@8.0.5:
+  socks-proxy-agent@8.0.5(supports-color@8.1.1):
     dependencies:
       agent-base: 7.1.4
-      debug: 4.4.1(supports-color@8.1.1)
-      socks: 2.8.7
+      debug: 4.4.3(supports-color@8.1.1)
+      socks: 2.8.10
     transitivePeerDependencies:
       - supports-color
 
-  socks@2.8.7:
+  socks@2.8.10:
     dependencies:
-      ip-address: 10.0.1
+      ip-address: 10.7.4
       smart-buffer: 4.2.0
 
   source-map-support@0.5.21:
@@ -3705,14 +3787,16 @@
 
   statuses@1.5.0: {}
 
-  statuses@2.0.1: {}
+  statuses@2.0.2: {}
 
-  streamx@2.22.1:
+  streamx@2.28.1:
     dependencies:
+      events-universal: 1.0.1
       fast-fifo: 1.3.2
-      text-decoder: 1.2.3
-    optionalDependencies:
-      bare-events: 2.6.1
+      text-decoder: 1.2.7
+    transitivePeerDependencies:
+      - bare-abort-controller
+      - react-native-b4a
 
   string-width@4.2.3:
     dependencies:
@@ -3740,28 +3824,44 @@
 
   table-layout@4.1.1:
     dependencies:
-      array-back: 6.2.2
-      wordwrapjs: 5.1.0
+      array-back: 6.2.3
+      wordwrapjs: 5.1.1
 
-  tar-fs@3.1.0:
+  tar-fs@3.1.3:
     dependencies:
-      pump: 3.0.3
-      tar-stream: 3.1.7
+      pump: 3.0.4
+      tar-stream: 3.2.2
     optionalDependencies:
-      bare-fs: 4.2.1
-      bare-path: 3.0.0
+      bare-fs: 4.8.4
+      bare-path: 3.1.2
     transitivePeerDependencies:
+      - bare-abort-controller
       - bare-buffer
+      - react-native-b4a
 
-  tar-stream@3.1.7:
+  tar-stream@3.2.2:
     dependencies:
-      b4a: 1.6.7
+      b4a: 1.9.0
+      bare-fs: 4.8.4
       fast-fifo: 1.3.2
-      streamx: 2.22.1
+      streamx: 2.28.1
+    transitivePeerDependencies:
+      - bare-abort-controller
+      - bare-buffer
+      - react-native-b4a
 
-  text-decoder@1.2.3:
+  teex@1.0.1:
     dependencies:
-      b4a: 1.6.7
+      streamx: 2.28.1
+    transitivePeerDependencies:
+      - bare-abort-controller
+      - react-native-b4a
+
+  text-decoder@1.2.7:
+    dependencies:
+      b4a: 1.9.0
+    transitivePeerDependencies:
+      - react-native-b4a
 
   to-regex-range@5.0.1:
     dependencies:
@@ -3788,7 +3888,7 @@
       media-typer: 0.3.0
       mime-types: 2.1.35
 
-  typed-query-selector@2.12.0: {}
+  typed-query-selector@2.12.3: {}
 
   typical@4.0.0: {}
 
@@ -3796,18 +3896,20 @@
 
   ua-parser-js@1.0.41: {}
 
-  undici-types@7.10.0: {}
+  undici-types@8.9.0: {}
 
   unpipe@1.0.0: {}
 
   v8-to-istanbul@9.3.0:
     dependencies:
-      '@jridgewell/trace-mapping': 0.3.30
+      '@jridgewell/trace-mapping': 0.3.31
       '@types/istanbul-lib-coverage': 2.0.6
       convert-source-map: 2.0.0
 
   vary@1.1.2: {}
 
+  webdriver-bidi-protocol@0.4.1: {}
+
   webidl-conversions@7.0.0: {}
 
   whatwg-url@14.2.0:
@@ -3819,7 +3921,7 @@
     dependencies:
       isexe: 2.0.0
 
-  wordwrapjs@5.1.0: {}
+  wordwrapjs@5.1.1: {}
 
   workerpool@6.5.1: {}
 
@@ -3837,9 +3939,9 @@
 
   wrappy@1.0.2: {}
 
-  ws@7.5.10: {}
+  ws@7.5.13: {}
 
-  ws@8.18.3: {}
+  ws@8.22.0: {}
 
   y18n@5.0.8: {}
 
@@ -3854,7 +3956,7 @@
       flat: 5.0.2
       is-plain-obj: 2.1.0
 
-  yargs@16.2.0:
+  yargs@16.2.2:
     dependencies:
       cliui: 7.0.4
       escalade: 3.2.0
@@ -3864,7 +3966,7 @@
       y18n: 5.0.8
       yargs-parser: 20.2.9
 
-  yargs@17.7.2:
+  yargs@17.7.3:
     dependencies:
       cliui: 8.0.1
       escalade: 3.2.0
diff --git a/polygerrit-ui/polygerrit.MODULE.bazel b/polygerrit-ui/polygerrit.MODULE.bazel
index 2e4fe00..e04ce53 100644
--- a/polygerrit-ui/polygerrit.MODULE.bazel
+++ b/polygerrit-ui/polygerrit.MODULE.bazel
@@ -23,7 +23,7 @@
 
 rules_ts_ext = use_extension("@aspect_rules_ts//ts:extensions.bzl", "typescript", dev_dependency = True)
 rules_ts_ext.deps(
-    version_from = "//:package.json",
+    version_from = "@npm//:typescript/resolved.json",
 )
 use_repo(rules_ts_ext, "npm_typescript")
 
@@ -34,6 +34,14 @@
 node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
 node.toolchain(node_version_from_nvmrc = "//:.nvmrc")
 
+pnpm = use_extension(
+    "@aspect_rules_js//npm:extensions.bzl",
+    "pnpm",
+    dev_dependency = True,
+)
+pnpm.pnpm(pnpm_version = "12.13.0")
+use_repo(pnpm, "pnpm")
+
 npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm")
 npm.npm_translate_lock(
     name = "npm",
@@ -68,9 +76,13 @@
     yarn_lock = "//polygerrit-ui/app:yarn.lock",
 )
 use_repo(npm, "ui_npm")
-
 npm.npm_translate_lock(
     name = "ui_dev_npm",
+    # TODO(davido): Remove after upgrading to a pngjs release with correct
+    # archive permissions. See https://github.com/pngjs/pngjs/issues/381.
+    custom_postinstalls = {
+        "pngjs": "chmod -R a+X *",
+    },
     data = [
         "//polygerrit-ui:package.json",
         "//polygerrit-ui:pnpm-workspace.yaml",
@@ -80,7 +92,6 @@
     yarn_lock = "//polygerrit-ui:yarn.lock",
 )
 use_repo(npm, "ui_dev_npm")
-
 npm.npm_translate_lock(
     name = "tools_npm",
     data = [
@@ -92,7 +103,6 @@
     yarn_lock = "//tools/node_tools:yarn.lock",
 )
 use_repo(npm, "tools_npm")
-
 npm.npm_translate_lock(
     name = "plugins_npm",
     data = [
@@ -104,3 +114,13 @@
     yarn_lock = "//plugins:yarn.lock",
 )
 use_repo(npm, "plugins_npm")
+
+# Build in-tree plugins against the plugin TypeScript API of this branch
+# (polygerrit-ui/app/api) instead of the npm release pinned in
+# plugins/package.json, which lacks the APIs this branch adds. The bare package
+# name matches whatever version the lock resolves, so bumping the pin in
+# plugins/package.json does not silently disable the replacement.
+npm.npm_replace_package(
+    package = "@gerritcodereview/typescript-api",
+    replacement = "//polygerrit-ui/app:plugin_api_npm_package",
+)
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-1000px-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-1000px-dark.png
index 54e0f91..77f18e8 100644
--- a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-1000px-dark.png
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-1000px-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-1000px.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-1000px.png
index 4b52372..2a6fe31 100644
--- a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-1000px.png
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-1000px.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-30-labels-1000px-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-30-labels-1000px-dark.png
index 38cfd6c..c4bf82b 100644
--- a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-30-labels-1000px-dark.png
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-30-labels-1000px-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-30-labels-1000px.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-30-labels-1000px.png
index b0ca78d..654077e 100644
--- a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-30-labels-1000px.png
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-30-labels-1000px.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-30-labels-390px-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-30-labels-390px-dark.png
index 282da4d..83a6b0e 100644
--- a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-30-labels-390px-dark.png
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-30-labels-390px-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-30-labels-390px.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-30-labels-390px.png
index d1dac17..1cd7c89a 100644
--- a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-30-labels-390px.png
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-30-labels-390px.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-30-labels-700px-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-30-labels-700px-dark.png
index 93bcf63..c3ae9bb 100644
--- a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-30-labels-700px-dark.png
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-30-labels-700px-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-30-labels-700px.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-30-labels-700px.png
index a13c546..b19d612 100644
--- a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-30-labels-700px.png
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-30-labels-700px.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-390px-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-390px-dark.png
index ec3476b..84c8a71 100644
--- a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-390px-dark.png
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-390px-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-390px.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-390px.png
index ac6fa90..cadf1f0 100644
--- a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-390px.png
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-390px.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-700px-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-700px-dark.png
index f0669d3..0e2201f 100644
--- a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-700px-dark.png
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-700px-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-700px.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-700px.png
index 599b351..069cdb6 100644
--- a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-700px.png
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-700px.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-801px-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-801px-dark.png
index f6d28f9..c4de6e7 100644
--- a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-801px-dark.png
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-801px-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-801px.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-801px.png
index b9f122a..a6193c3 100644
--- a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-801px.png
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-801px.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-mobile-vote-badges-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-mobile-vote-badges-dark.png
index b91f74c..2d0d747 100644
--- a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-mobile-vote-badges-dark.png
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-mobile-vote-badges-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-mobile-vote-badges.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-mobile-vote-badges.png
index df5959f..9329f52 100644
--- a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-mobile-vote-badges.png
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-list-mobile-vote-badges.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-view-1280px-chat-open-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-view-1280px-chat-open-dark.png
index ac50c8e..43a663d 100644
--- a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-view-1280px-chat-open-dark.png
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-view-1280px-chat-open-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-view-1280px-chat-open.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-view-1280px-chat-open.png
index dd975a0..0faafba 100644
--- a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-view-1280px-chat-open.png
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-view-1280px-chat-open.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-view-801px-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-view-801px-dark.png
index 5bf9965..e509546 100644
--- a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-view-801px-dark.png
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-view-801px-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-view-801px.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-view-801px.png
index b7b7977..a3a06eb 100644
--- a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-view-801px.png
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-view-801px.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-view-commit-markdown-801px-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-view-commit-markdown-801px-dark.png
new file mode 100644
index 0000000..aacf454
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-view-commit-markdown-801px-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-view-commit-markdown-801px.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-view-commit-markdown-801px.png
new file mode 100644
index 0000000..8b9304b
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-view-commit-markdown-801px.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-view-wrapped-statuses-801px-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-view-wrapped-statuses-801px-dark.png
index bc9fb48..e0a04a5 100644
--- a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-view-wrapped-statuses-801px-dark.png
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-view-wrapped-statuses-801px-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-view-wrapped-statuses-801px.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-view-wrapped-statuses-801px.png
index d5b01a9..301ef63 100644
--- a/polygerrit-ui/screenshots/Chromium/baseline/gr-change-view-wrapped-statuses-801px.png
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-change-view-wrapped-statuses-801px.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-confirm-submit-dialog-no-topic-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-confirm-submit-dialog-no-topic-dark.png
new file mode 100644
index 0000000..9e0d71e
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-confirm-submit-dialog-no-topic-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-confirm-submit-dialog-no-topic.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-confirm-submit-dialog-no-topic.png
new file mode 100644
index 0000000..5f42bdf
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-confirm-submit-dialog-no-topic.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-confirm-submit-dialog-topic-all-submittable-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-confirm-submit-dialog-topic-all-submittable-dark.png
new file mode 100644
index 0000000..2610f73
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-confirm-submit-dialog-topic-all-submittable-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-confirm-submit-dialog-topic-all-submittable.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-confirm-submit-dialog-topic-all-submittable.png
new file mode 100644
index 0000000..38eb583
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-confirm-submit-dialog-topic-all-submittable.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-confirm-submit-dialog-topic-enforced-all-submittable-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-confirm-submit-dialog-topic-enforced-all-submittable-dark.png
new file mode 100644
index 0000000..d30a2eb
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-confirm-submit-dialog-topic-enforced-all-submittable-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-confirm-submit-dialog-topic-enforced-all-submittable.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-confirm-submit-dialog-topic-enforced-all-submittable.png
new file mode 100644
index 0000000..8ad489c
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-confirm-submit-dialog-topic-enforced-all-submittable.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-confirm-submit-dialog-topic-enforced-unsubmittable-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-confirm-submit-dialog-topic-enforced-unsubmittable-dark.png
new file mode 100644
index 0000000..86b0e6f
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-confirm-submit-dialog-topic-enforced-unsubmittable-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-confirm-submit-dialog-topic-enforced-unsubmittable.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-confirm-submit-dialog-topic-enforced-unsubmittable.png
new file mode 100644
index 0000000..beffb74
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-confirm-submit-dialog-topic-enforced-unsubmittable.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-confirm-submit-dialog-topic-unsubmittable-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-confirm-submit-dialog-topic-unsubmittable-dark.png
new file mode 100644
index 0000000..05b0d9f
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-confirm-submit-dialog-topic-unsubmittable-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-confirm-submit-dialog-topic-unsubmittable.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-confirm-submit-dialog-topic-unsubmittable.png
new file mode 100644
index 0000000..1d1029c
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-confirm-submit-dialog-topic-unsubmittable.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-large-line-numbers-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-large-line-numbers-dark.png
new file mode 100644
index 0000000..c7f0986
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-large-line-numbers-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-large-line-numbers-unified-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-large-line-numbers-unified-dark.png
new file mode 100644
index 0000000..88d42dd
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-large-line-numbers-unified-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-large-line-numbers-unified.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-large-line-numbers-unified.png
new file mode 100644
index 0000000..c455ad5
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-large-line-numbers-unified.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-large-line-numbers.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-large-line-numbers.png
new file mode 100644
index 0000000..2b0d6c7
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-large-line-numbers.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-lean-viewer-collapsed-proofs-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-lean-viewer-collapsed-proofs-dark.png
new file mode 100644
index 0000000..36aaf5b
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-lean-viewer-collapsed-proofs-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-lean-viewer-collapsed-proofs.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-lean-viewer-collapsed-proofs.png
new file mode 100644
index 0000000..d7a0fb5
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-lean-viewer-collapsed-proofs.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-lean-viewer-lean-lang-ref-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-lean-viewer-lean-lang-ref-dark.png
new file mode 100644
index 0000000..c32db97
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-lean-viewer-lean-lang-ref-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-lean-viewer-lean-lang-ref.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-lean-viewer-lean-lang-ref.png
new file mode 100644
index 0000000..d386d90
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-lean-viewer-lean-lang-ref.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-lean-viewer-proof-diff-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-lean-viewer-proof-diff-dark.png
new file mode 100644
index 0000000..07d9b55
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-lean-viewer-proof-diff-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-lean-viewer-proof-diff.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-lean-viewer-proof-diff.png
new file mode 100644
index 0000000..ec37cee
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-lean-viewer-proof-diff.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-lean-viewer-unified-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-lean-viewer-unified-dark.png
new file mode 100644
index 0000000..e111f48
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-lean-viewer-unified-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-lean-viewer-unified.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-lean-viewer-unified.png
new file mode 100644
index 0000000..707f85a
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-lean-viewer-unified.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-markdown-viewer-delta-showcase-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-markdown-viewer-delta-showcase-dark.png
new file mode 100644
index 0000000..5460b53
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-markdown-viewer-delta-showcase-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-markdown-viewer-delta-showcase.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-markdown-viewer-delta-showcase.png
new file mode 100644
index 0000000..9586389
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-markdown-viewer-delta-showcase.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-markdown-viewer-inline-code-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-markdown-viewer-inline-code-dark.png
new file mode 100644
index 0000000..3533588
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-markdown-viewer-inline-code-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-markdown-viewer-inline-code-unified-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-markdown-viewer-inline-code-unified-dark.png
new file mode 100644
index 0000000..8ad543b
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-markdown-viewer-inline-code-unified-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-markdown-viewer-inline-code-unified.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-markdown-viewer-inline-code-unified.png
new file mode 100644
index 0000000..a7338df
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-markdown-viewer-inline-code-unified.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-markdown-viewer-inline-code.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-markdown-viewer-inline-code.png
new file mode 100644
index 0000000..231a79f
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-diff-markdown-viewer-inline-code.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-custom-icon-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-custom-icon-dark.png
new file mode 100644
index 0000000..a5acec9
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-custom-icon-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-custom-icon.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-custom-icon.png
new file mode 100644
index 0000000..d3755e4
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-custom-icon.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-custom-title-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-custom-title-dark.png
new file mode 100644
index 0000000..2a4d48f
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-custom-title-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-custom-title.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-custom-title.png
new file mode 100644
index 0000000..0d58655
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-custom-title.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-dark.png
new file mode 100644
index 0000000..2828a21
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-long-custom-title-elipsis-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-long-custom-title-elipsis-dark.png
new file mode 100644
index 0000000..96968aa
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-long-custom-title-elipsis-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-long-custom-title-elipsis.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-long-custom-title-elipsis.png
new file mode 100644
index 0000000..cbcdb82
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-long-custom-title-elipsis.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-mobile-custom-title-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-mobile-custom-title-dark.png
new file mode 100644
index 0000000..4872f8e
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-mobile-custom-title-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-mobile-custom-title.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-mobile-custom-title.png
new file mode 100644
index 0000000..86f5434
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-mobile-custom-title.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-mobile-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-mobile-dark.png
new file mode 100644
index 0000000..6e15615
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-mobile-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-mobile-long-custom-title-elipsis-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-mobile-long-custom-title-elipsis-dark.png
new file mode 100644
index 0000000..e66ae19
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-mobile-long-custom-title-elipsis-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-mobile-long-custom-title-elipsis.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-mobile-long-custom-title-elipsis.png
new file mode 100644
index 0000000..9e83e4a
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-mobile-long-custom-title-elipsis.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-mobile.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-mobile.png
new file mode 100644
index 0000000..1aff9fc
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header-mobile.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header.png
new file mode 100644
index 0000000..a613619
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-main-header.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-vote-chip-ai-circle-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-vote-chip-ai-circle-dark.png
new file mode 100644
index 0000000..7417d32
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-vote-chip-ai-circle-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-vote-chip-ai-circle.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-vote-chip-ai-circle.png
new file mode 100644
index 0000000..4a55c57
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-vote-chip-ai-circle.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-vote-chip-ai-single-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-vote-chip-ai-single-dark.png
new file mode 100644
index 0000000..6d54304
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-vote-chip-ai-single-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-vote-chip-ai-single.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-vote-chip-ai-single.png
new file mode 100644
index 0000000..3f0eb34
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-vote-chip-ai-single.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-vote-chip-ai-stacked-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-vote-chip-ai-stacked-dark.png
new file mode 100644
index 0000000..6ee8dae
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-vote-chip-ai-stacked-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/gr-vote-chip-ai-stacked.png b/polygerrit-ui/screenshots/Chromium/baseline/gr-vote-chip-ai-stacked.png
new file mode 100644
index 0000000..b84967b
--- /dev/null
+++ b/polygerrit-ui/screenshots/Chromium/baseline/gr-vote-chip-ai-stacked.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/splash-page-action-card-dark.png b/polygerrit-ui/screenshots/Chromium/baseline/splash-page-action-card-dark.png
index 45aff22..c859b8a 100644
--- a/polygerrit-ui/screenshots/Chromium/baseline/splash-page-action-card-dark.png
+++ b/polygerrit-ui/screenshots/Chromium/baseline/splash-page-action-card-dark.png
Binary files differ
diff --git a/polygerrit-ui/screenshots/Chromium/baseline/splash-page-action-card.png b/polygerrit-ui/screenshots/Chromium/baseline/splash-page-action-card.png
index 4a9a251..4d1335b 100644
--- a/polygerrit-ui/screenshots/Chromium/baseline/splash-page-action-card.png
+++ b/polygerrit-ui/screenshots/Chromium/baseline/splash-page-action-card.png
Binary files differ
diff --git a/polygerrit-ui/web-test-runner.config.mjs b/polygerrit-ui/web-test-runner.config.mjs
index f759108..a8c2b45 100644
--- a/polygerrit-ui/web-test-runner.config.mjs
+++ b/polygerrit-ui/web-test-runner.config.mjs
@@ -262,6 +262,10 @@
     async (context, next) => {
       if (context.url.startsWith('/polygerrit-ui/app/fonts/')) {
         context.url = context.url.replace('/polygerrit-ui/app/', '/lib/');
+      } else if (context.url.endsWith('/diffy.png')) {
+        context.url = '/webapp/diffy.png';
+      } else if (context.url.endsWith('/gerrit_icon.png')) {
+        context.url = '/webapp/gerrit_icon.png';
       }
       await next();
     },
diff --git a/polygerrit-ui/yarn.lock b/polygerrit-ui/yarn.lock
index 540168f..4ed4052 100644
--- a/polygerrit-ui/yarn.lock
+++ b/polygerrit-ui/yarn.lock
@@ -3,148 +3,148 @@
 
 
 "@babel/code-frame@^7.12.11":
-  version "7.27.1"
-  resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.27.1.tgz#200f715e66d52a23b221a9435534a91cc13ad5be"
-  integrity sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==
+  version "7.29.7"
+  resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.29.7.tgz#f2fbbfea87c44a21590ec515b778b2c26d8866e7"
+  integrity sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==
   dependencies:
-    "@babel/helper-validator-identifier" "^7.27.1"
+    "@babel/helper-validator-identifier" "^7.29.7"
     js-tokens "^4.0.0"
     picocolors "^1.1.1"
 
-"@babel/helper-validator-identifier@^7.27.1":
-  version "7.27.1"
-  resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz#a7054dcc145a967dd4dc8fee845a57c1316c9df8"
-  integrity sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==
+"@babel/helper-validator-identifier@^7.29.7":
+  version "7.29.7"
+  resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz#bd87084ced0c796ec46bda492de6e83d29e89fc2"
+  integrity sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==
 
-"@esbuild/aix-ppc64@0.25.9":
-  version "0.25.9"
-  resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.25.9.tgz#bef96351f16520055c947aba28802eede3c9e9a9"
-  integrity sha512-OaGtL73Jck6pBKjNIe24BnFE6agGl+6KxDtTfHhy1HmhthfKouEcOhqpSL64K4/0WCtbKFLOdzD/44cJ4k9opA==
+"@esbuild/aix-ppc64@0.27.7":
+  version "0.27.7"
+  resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.27.7.tgz#82b74f92aa78d720b714162939fb248c90addf53"
+  integrity sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg==
 
-"@esbuild/android-arm64@0.25.9":
-  version "0.25.9"
-  resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.25.9.tgz#d2e70be7d51a529425422091e0dcb90374c1546c"
-  integrity sha512-IDrddSmpSv51ftWslJMvl3Q2ZT98fUSL2/rlUXuVqRXHCs5EUF1/f+jbjF5+NG9UffUDMCiTyh8iec7u8RlTLg==
+"@esbuild/android-arm64@0.27.7":
+  version "0.27.7"
+  resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.27.7.tgz#f78cb8a3121fc205a53285adb24972db385d185d"
+  integrity sha512-62dPZHpIXzvChfvfLJow3q5dDtiNMkwiRzPylSCfriLvZeq0a1bWChrGx/BbUbPwOrsWKMn8idSllklzBy+dgQ==
 
-"@esbuild/android-arm@0.25.9":
-  version "0.25.9"
-  resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.25.9.tgz#d2a753fe2a4c73b79437d0ba1480e2d760097419"
-  integrity sha512-5WNI1DaMtxQ7t7B6xa572XMXpHAaI/9Hnhk8lcxF4zVN4xstUgTlvuGDorBguKEnZO70qwEcLpfifMLoxiPqHQ==
+"@esbuild/android-arm@0.27.7":
+  version "0.27.7"
+  resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.27.7.tgz#593e10a1450bbfcac6cb321f61f468453bac209d"
+  integrity sha512-jbPXvB4Yj2yBV7HUfE2KHe4GJX51QplCN1pGbYjvsyCZbQmies29EoJbkEc+vYuU5o45AfQn37vZlyXy4YJ8RQ==
 
-"@esbuild/android-x64@0.25.9":
-  version "0.25.9"
-  resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.25.9.tgz#5278836e3c7ae75761626962f902a0d55352e683"
-  integrity sha512-I853iMZ1hWZdNllhVZKm34f4wErd4lMyeV7BLzEExGEIZYsOzqDWDf+y082izYUE8gtJnYHdeDpN/6tUdwvfiw==
+"@esbuild/android-x64@0.27.7":
+  version "0.27.7"
+  resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.27.7.tgz#453143d073326033d2d22caf9e48de4bae274b07"
+  integrity sha512-x5VpMODneVDb70PYV2VQOmIUUiBtY3D3mPBG8NxVk5CogneYhkR7MmM3yR/uMdITLrC1ml/NV1rj4bMJuy9MCg==
 
-"@esbuild/darwin-arm64@0.25.9":
-  version "0.25.9"
-  resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.25.9.tgz#f1513eaf9ec8fa15dcaf4c341b0f005d3e8b47ae"
-  integrity sha512-XIpIDMAjOELi/9PB30vEbVMs3GV1v2zkkPnuyRRURbhqjyzIINwj+nbQATh4H9GxUgH1kFsEyQMxwiLFKUS6Rg==
+"@esbuild/darwin-arm64@0.27.7":
+  version "0.27.7"
+  resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.27.7.tgz#6f23000fb9b40b7e04b7d0606c0693bd0632f322"
+  integrity sha512-5lckdqeuBPlKUwvoCXIgI2D9/ABmPq3Rdp7IfL70393YgaASt7tbju3Ac+ePVi3KDH6N2RqePfHnXkaDtY9fkw==
 
-"@esbuild/darwin-x64@0.25.9":
-  version "0.25.9"
-  resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.25.9.tgz#e27dbc3b507b3a1cea3b9280a04b8b6b725f82be"
-  integrity sha512-jhHfBzjYTA1IQu8VyrjCX4ApJDnH+ez+IYVEoJHeqJm9VhG9Dh2BYaJritkYK3vMaXrf7Ogr/0MQ8/MeIefsPQ==
+"@esbuild/darwin-x64@0.27.7":
+  version "0.27.7"
+  resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.27.7.tgz#27393dd18bb1263c663979c5f1576e00c2d024be"
+  integrity sha512-rYnXrKcXuT7Z+WL5K980jVFdvVKhCHhUwid+dDYQpH+qu+TefcomiMAJpIiC2EM3Rjtq0sO3StMV/+3w3MyyqQ==
 
-"@esbuild/freebsd-arm64@0.25.9":
-  version "0.25.9"
-  resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.9.tgz#364e3e5b7a1fd45d92be08c6cc5d890ca75908ca"
-  integrity sha512-z93DmbnY6fX9+KdD4Ue/H6sYs+bhFQJNCPZsi4XWJoYblUqT06MQUdBCpcSfuiN72AbqeBFu5LVQTjfXDE2A6Q==
+"@esbuild/freebsd-arm64@0.27.7":
+  version "0.27.7"
+  resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.7.tgz#22e4638fa502d1c0027077324c97640e3adf3a62"
+  integrity sha512-B48PqeCsEgOtzME2GbNM2roU29AMTuOIN91dsMO30t+Ydis3z/3Ngoj5hhnsOSSwNzS+6JppqWsuhTp6E82l2w==
 
-"@esbuild/freebsd-x64@0.25.9":
-  version "0.25.9"
-  resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.25.9.tgz#7c869b45faeb3df668e19ace07335a0711ec56ab"
-  integrity sha512-mrKX6H/vOyo5v71YfXWJxLVxgy1kyt1MQaD8wZJgJfG4gq4DpQGpgTB74e5yBeQdyMTbgxp0YtNj7NuHN0PoZg==
+"@esbuild/freebsd-x64@0.27.7":
+  version "0.27.7"
+  resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.27.7.tgz#9224b8e4fea924ce2194e3efc3e9aebf822192d6"
+  integrity sha512-jOBDK5XEjA4m5IJK3bpAQF9/Lelu/Z9ZcdhTRLf4cajlB+8VEhFFRjWgfy3M1O4rO2GQ/b2dLwCUGpiF/eATNQ==
 
-"@esbuild/linux-arm64@0.25.9":
-  version "0.25.9"
-  resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.25.9.tgz#48d42861758c940b61abea43ba9a29b186d6cb8b"
-  integrity sha512-BlB7bIcLT3G26urh5Dmse7fiLmLXnRlopw4s8DalgZ8ef79Jj4aUcYbk90g8iCa2467HX8SAIidbL7gsqXHdRw==
+"@esbuild/linux-arm64@0.27.7":
+  version "0.27.7"
+  resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.27.7.tgz#4f5d1c27527d817b35684ae21419e57c2bda0966"
+  integrity sha512-RZPHBoxXuNnPQO9rvjh5jdkRmVizktkT7TCDkDmQ0W2SwHInKCAV95GRuvdSvA7w4VMwfCjUiPwDi0ZO6Nfe9A==
 
-"@esbuild/linux-arm@0.25.9":
-  version "0.25.9"
-  resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.25.9.tgz#6ce4b9cabf148274101701d112b89dc67cc52f37"
-  integrity sha512-HBU2Xv78SMgaydBmdor38lg8YDnFKSARg1Q6AT0/y2ezUAKiZvc211RDFHlEZRFNRVhcMamiToo7bDx3VEOYQw==
+"@esbuild/linux-arm@0.27.7":
+  version "0.27.7"
+  resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.27.7.tgz#b9e9d070c8c1c0449cf12b20eac37d70a4595921"
+  integrity sha512-RkT/YXYBTSULo3+af8Ib0ykH8u2MBh57o7q/DAs3lTJlyVQkgQvlrPTnjIzzRPQyavxtPtfg0EopvDyIt0j1rA==
 
-"@esbuild/linux-ia32@0.25.9":
-  version "0.25.9"
-  resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.25.9.tgz#207e54899b79cac9c26c323fc1caa32e3143f1c4"
-  integrity sha512-e7S3MOJPZGp2QW6AK6+Ly81rC7oOSerQ+P8L0ta4FhVi+/j/v2yZzx5CqqDaWjtPFfYz21Vi1S0auHrap3Ma3A==
+"@esbuild/linux-ia32@0.27.7":
+  version "0.27.7"
+  resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.27.7.tgz#3f80fb696aa96051a94047f35c85b08b21c36f9e"
+  integrity sha512-GA48aKNkyQDbd3KtkplYWT102C5sn/EZTY4XROkxONgruHPU72l+gW+FfF8tf2cFjeHaRbWpOYa/uRBz/Xq1Pg==
 
-"@esbuild/linux-loong64@0.25.9":
-  version "0.25.9"
-  resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.25.9.tgz#0ba48a127159a8f6abb5827f21198b999ffd1fc0"
-  integrity sha512-Sbe10Bnn0oUAB2AalYztvGcK+o6YFFA/9829PhOCUS9vkJElXGdphz0A3DbMdP8gmKkqPmPcMJmJOrI3VYB1JQ==
+"@esbuild/linux-loong64@0.27.7":
+  version "0.27.7"
+  resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.27.7.tgz#9be1f2c28210b13ebb4156221bba356fe1675205"
+  integrity sha512-a4POruNM2oWsD4WKvBSEKGIiWQF8fZOAsycHOt6JBpZ+JN2n2JH9WAv56SOyu9X5IqAjqSIPTaJkqN8F7XOQ5Q==
 
-"@esbuild/linux-mips64el@0.25.9":
-  version "0.25.9"
-  resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.25.9.tgz#a4d4cc693d185f66a6afde94f772b38ce5d64eb5"
-  integrity sha512-YcM5br0mVyZw2jcQeLIkhWtKPeVfAerES5PvOzaDxVtIyZ2NUBZKNLjC5z3/fUlDgT6w89VsxP2qzNipOaaDyA==
+"@esbuild/linux-mips64el@0.27.7":
+  version "0.27.7"
+  resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.27.7.tgz#4ab5ee67a3dfcbcb5e8fd7883dae6e735b1163b8"
+  integrity sha512-KabT5I6StirGfIz0FMgl1I+R1H73Gp0ofL9A3nG3i/cYFJzKHhouBV5VWK1CSgKvVaG4q1RNpCTR2LuTVB3fIw==
 
-"@esbuild/linux-ppc64@0.25.9":
-  version "0.25.9"
-  resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.25.9.tgz#0f5805c1c6d6435a1dafdc043cb07a19050357db"
-  integrity sha512-++0HQvasdo20JytyDpFvQtNrEsAgNG2CY1CLMwGXfFTKGBGQT3bOeLSYE2l1fYdvML5KUuwn9Z8L1EWe2tzs1w==
+"@esbuild/linux-ppc64@0.27.7":
+  version "0.27.7"
+  resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.27.7.tgz#dac78c689f6499459c4321e5c15032c12307e7ea"
+  integrity sha512-gRsL4x6wsGHGRqhtI+ifpN/vpOFTQtnbsupUF5R5YTAg+y/lKelYR1hXbnBdzDjGbMYjVJLJTd2OFmMewAgwlQ==
 
-"@esbuild/linux-riscv64@0.25.9":
-  version "0.25.9"
-  resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.25.9.tgz#6776edece0f8fca79f3386398b5183ff2a827547"
-  integrity sha512-uNIBa279Y3fkjV+2cUjx36xkx7eSjb8IvnL01eXUKXez/CBHNRw5ekCGMPM0BcmqBxBcdgUWuUXmVWwm4CH9kg==
+"@esbuild/linux-riscv64@0.27.7":
+  version "0.27.7"
+  resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.27.7.tgz#050f7d3b355c3a98308e935bc4d6325da91b0027"
+  integrity sha512-hL25LbxO1QOngGzu2U5xeXtxXcW+/GvMN3ejANqXkxZ/opySAZMrc+9LY/WyjAan41unrR3YrmtTsUpwT66InQ==
 
-"@esbuild/linux-s390x@0.25.9":
-  version "0.25.9"
-  resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.25.9.tgz#3f6f29ef036938447c2218d309dc875225861830"
-  integrity sha512-Mfiphvp3MjC/lctb+7D287Xw1DGzqJPb/J2aHHcHxflUo+8tmN/6d4k6I2yFR7BVo5/g7x2Monq4+Yew0EHRIA==
+"@esbuild/linux-s390x@0.27.7":
+  version "0.27.7"
+  resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.27.7.tgz#d61f715ce61d43fe5844ad0d8f463f88cbe4fef6"
+  integrity sha512-2k8go8Ycu1Kb46vEelhu1vqEP+UeRVj2zY1pSuPdgvbd5ykAw82Lrro28vXUrRmzEsUV0NzCf54yARIK8r0fdw==
 
-"@esbuild/linux-x64@0.25.9":
-  version "0.25.9"
-  resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.25.9.tgz#831fe0b0e1a80a8b8391224ea2377d5520e1527f"
-  integrity sha512-iSwByxzRe48YVkmpbgoxVzn76BXjlYFXC7NvLYq+b+kDjyyk30J0JY47DIn8z1MO3K0oSl9fZoRmZPQI4Hklzg==
+"@esbuild/linux-x64@0.27.7":
+  version "0.27.7"
+  resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.27.7.tgz#ca8e1aa478fc8209257bf3ac8f79c4dc2982f32a"
+  integrity sha512-hzznmADPt+OmsYzw1EE33ccA+HPdIqiCRq7cQeL1Jlq2gb1+OyWBkMCrYGBJ+sxVzve2ZJEVeePbLM2iEIZSxA==
 
-"@esbuild/netbsd-arm64@0.25.9":
-  version "0.25.9"
-  resolved "https://registry.yarnpkg.com/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.9.tgz#06f99d7eebe035fbbe43de01c9d7e98d2a0aa548"
-  integrity sha512-9jNJl6FqaUG+COdQMjSCGW4QiMHH88xWbvZ+kRVblZsWrkXlABuGdFJ1E9L7HK+T0Yqd4akKNa/lO0+jDxQD4Q==
+"@esbuild/netbsd-arm64@0.27.7":
+  version "0.27.7"
+  resolved "https://registry.yarnpkg.com/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.7.tgz#1650f2c1b948deeb3ef948f2fc30614723c09690"
+  integrity sha512-b6pqtrQdigZBwZxAn1UpazEisvwaIDvdbMbmrly7cDTMFnw/+3lVxxCTGOrkPVnsYIosJJXAsILG9XcQS+Yu6w==
 
-"@esbuild/netbsd-x64@0.25.9":
-  version "0.25.9"
-  resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.25.9.tgz#db99858e6bed6e73911f92a88e4edd3a8c429a52"
-  integrity sha512-RLLdkflmqRG8KanPGOU7Rpg829ZHu8nFy5Pqdi9U01VYtG9Y0zOG6Vr2z4/S+/3zIyOxiK6cCeYNWOFR9QP87g==
+"@esbuild/netbsd-x64@0.27.7":
+  version "0.27.7"
+  resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.27.7.tgz#65772ab342c4b3319bf0705a211050aac1b6e320"
+  integrity sha512-OfatkLojr6U+WN5EDYuoQhtM+1xco+/6FSzJJnuWiUw5eVcicbyK3dq5EeV/QHT1uy6GoDhGbFpprUiHUYggrw==
 
-"@esbuild/openbsd-arm64@0.25.9":
-  version "0.25.9"
-  resolved "https://registry.yarnpkg.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.9.tgz#afb886c867e36f9d86bb21e878e1185f5d5a0935"
-  integrity sha512-YaFBlPGeDasft5IIM+CQAhJAqS3St3nJzDEgsgFixcfZeyGPCd6eJBWzke5piZuZ7CtL656eOSYKk4Ls2C0FRQ==
+"@esbuild/openbsd-arm64@0.27.7":
+  version "0.27.7"
+  resolved "https://registry.yarnpkg.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.7.tgz#37ed7cfa66549d7955852fce37d0c3de4e715ea1"
+  integrity sha512-AFuojMQTxAz75Fo8idVcqoQWEHIXFRbOc1TrVcFSgCZtQfSdc1RXgB3tjOn/krRHENUB4j00bfGjyl2mJrU37A==
 
-"@esbuild/openbsd-x64@0.25.9":
-  version "0.25.9"
-  resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.25.9.tgz#30855c9f8381fac6a0ef5b5f31ac6e7108a66ecf"
-  integrity sha512-1MkgTCuvMGWuqVtAvkpkXFmtL8XhWy+j4jaSO2wxfJtilVCi0ZE37b8uOdMItIHz4I6z1bWWtEX4CJwcKYLcuA==
+"@esbuild/openbsd-x64@0.27.7":
+  version "0.27.7"
+  resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.27.7.tgz#01bf3d385855ef50cb33db7c4b52f957c34cd179"
+  integrity sha512-+A1NJmfM8WNDv5CLVQYJ5PshuRm/4cI6WMZRg1by1GwPIQPCTs1GLEUHwiiQGT5zDdyLiRM/l1G0Pv54gvtKIg==
 
-"@esbuild/openharmony-arm64@0.25.9":
-  version "0.25.9"
-  resolved "https://registry.yarnpkg.com/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.9.tgz#2f2144af31e67adc2a8e3705c20c2bd97bd88314"
-  integrity sha512-4Xd0xNiMVXKh6Fa7HEJQbrpP3m3DDn43jKxMjxLLRjWnRsfxjORYJlXPO4JNcXtOyfajXorRKY9NkOpTHptErg==
+"@esbuild/openharmony-arm64@0.27.7":
+  version "0.27.7"
+  resolved "https://registry.yarnpkg.com/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.7.tgz#6c1f94b34086599aabda4eac8f638294b9877410"
+  integrity sha512-+KrvYb/C8zA9CU/g0sR6w2RBw7IGc5J2BPnc3dYc5VJxHCSF1yNMxTV5LQ7GuKteQXZtspjFbiuW5/dOj7H4Yw==
 
-"@esbuild/sunos-x64@0.25.9":
-  version "0.25.9"
-  resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.25.9.tgz#69b99a9b5bd226c9eb9c6a73f990fddd497d732e"
-  integrity sha512-WjH4s6hzo00nNezhp3wFIAfmGZ8U7KtrJNlFMRKxiI9mxEK1scOMAaa9i4crUtu+tBr+0IN6JCuAcSBJZfnphw==
+"@esbuild/sunos-x64@0.27.7":
+  version "0.27.7"
+  resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.27.7.tgz#4b0dd17ae0a6941d2d0fd35a906392517071a90d"
+  integrity sha512-ikktIhFBzQNt/QDyOL580ti9+5mL/YZeUPKU2ivGtGjdTYoqz6jObj6nOMfhASpS4GU4Q/Clh1QtxWAvcYKamA==
 
-"@esbuild/win32-arm64@0.25.9":
-  version "0.25.9"
-  resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.25.9.tgz#d789330a712af916c88325f4ffe465f885719c6b"
-  integrity sha512-mGFrVJHmZiRqmP8xFOc6b84/7xa5y5YvR1x8djzXpJBSv/UsNK6aqec+6JDjConTgvvQefdGhFDAs2DLAds6gQ==
+"@esbuild/win32-arm64@0.27.7":
+  version "0.27.7"
+  resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.27.7.tgz#34193ab5565d6ff68ca928ac04be75102ccb2e77"
+  integrity sha512-7yRhbHvPqSpRUV7Q20VuDwbjW5kIMwTHpptuUzV+AA46kiPze5Z7qgt6CLCK3pWFrHeNfDd1VKgyP4O+ng17CA==
 
-"@esbuild/win32-ia32@0.25.9":
-  version "0.25.9"
-  resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.25.9.tgz#52fc735406bd49688253e74e4e837ac2ba0789e3"
-  integrity sha512-b33gLVU2k11nVx1OhX3C8QQP6UHQK4ZtN56oFWvVXvz2VkDoe6fbG8TOgHFxEvqeqohmRnIHe5A1+HADk4OQww==
+"@esbuild/win32-ia32@0.27.7":
+  version "0.27.7"
+  resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.27.7.tgz#eb67f0e4482515d8c1894ede631c327a4da9fc4d"
+  integrity sha512-SmwKXe6VHIyZYbBLJrhOoCJRB/Z1tckzmgTLfFYOfpMAx63BJEaL9ExI8x7v0oAO3Zh6D/Oi1gVxEYr5oUCFhw==
 
-"@esbuild/win32-x64@0.25.9":
-  version "0.25.9"
-  resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.25.9.tgz#585624dc829cfb6e7c0aa6c3ca7d7e6daa87e34f"
-  integrity sha512-PPOl1mi6lpLNQxnGoyAfschAodRFYXJ+9fs6WHXz7CSWKbOqiMZsubC+BQsVKuul+3vKLuwTHsS2c2y9EoKwxQ==
+"@esbuild/win32-x64@0.27.7":
+  version "0.27.7"
+  resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.27.7.tgz#8fe30b3088b89b4873c3a6cc87597ae3920c0a8b"
+  integrity sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg==
 
 "@esm-bundle/chai@^4.3.4-fix.0":
   version "4.3.4-fix.0"
@@ -164,35 +164,40 @@
   integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==
 
 "@jridgewell/sourcemap-codec@^1.4.14":
-  version "1.5.5"
-  resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz#6912b00d2c631c0d15ce1a7ab57cd657f2a8f8ba"
-  integrity sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==
+  version "1.6.0"
+  resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz#f4c663e862f06dc98ca4d453862c46902789a18d"
+  integrity sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==
 
 "@jridgewell/trace-mapping@^0.3.12":
-  version "0.3.30"
-  resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.30.tgz#4a76c4daeee5df09f5d3940e087442fb36ce2b99"
-  integrity sha512-GQ7Nw5G2lTu/BtHTKfXhKHok2WGetd4XYcVKGx00SjAk8GMwgJM3zr6zORiPGuOE+/vkc90KtTosSSvaCjKb2Q==
+  version "0.3.31"
+  resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz#db15d6781c931f3a251a3dac39501c98a6082fd0"
+  integrity sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==
   dependencies:
     "@jridgewell/resolve-uri" "^3.1.0"
     "@jridgewell/sourcemap-codec" "^1.4.14"
 
-"@lit-labs/ssr-dom-shim@^1.4.0":
-  version "1.4.0"
-  resolved "https://registry.yarnpkg.com/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.4.0.tgz#55eb80ab5ef6e188f7e541c1e2bea1ef582413b8"
-  integrity sha512-ficsEARKnmmW5njugNYKipTm4SFnbik7CXtoencDZzmzo/dQ+2Q0bgkzJuoJP20Aj0F+izzJjOqsnkd6F/o1bw==
+"@lit-labs/ssr-dom-shim@^1.5.0":
+  version "1.6.0"
+  resolved "https://registry.yarnpkg.com/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.6.0.tgz#693e129b809741fd23e98fcb57e41fd3d082db1a"
+  integrity sha512-VHb0ALPMTlgKjM6yIxxoQNnpKyUKLD04VzeQdsiXkMqkvYlAHxq9glGLmgbb889/1GsohSOAjvQYoiBppXFqrQ==
 
 "@lit/reactive-element@^2.1.0":
-  version "2.1.1"
-  resolved "https://registry.yarnpkg.com/@lit/reactive-element/-/reactive-element-2.1.1.tgz#0662ac4a43d4898974aef9a6c5cd47b9e331919a"
-  integrity sha512-N+dm5PAYdQ8e6UlywyyrgI2t++wFGXfHx+dSJ1oBrg6FAxUj40jId++EaRm80MKX5JnlH1sBsyZ5h0bcZKemCg==
+  version "2.1.2"
+  resolved "https://registry.yarnpkg.com/@lit/reactive-element/-/reactive-element-2.1.2.tgz#4c6af9042603c98e61ba90b294607904d51b61cb"
+  integrity sha512-pbCDiVMnne1lYUIaYNN5wrwQXDtHaYtg7YEFPeW+hws6U47WeFvISGUWekPGKWOP1ygrs0ef0o1VJMk1exos5A==
   dependencies:
-    "@lit-labs/ssr-dom-shim" "^1.4.0"
+    "@lit-labs/ssr-dom-shim" "^1.5.0"
 
 "@mdn/browser-compat-data@^4.0.0":
   version "4.2.1"
   resolved "https://registry.yarnpkg.com/@mdn/browser-compat-data/-/browser-compat-data-4.2.1.tgz#1fead437f3957ceebe2e8c3f46beccdb9bc575b8"
   integrity sha512-EWUguj2kd7ldmrF9F+vI5hUOralPd+sdsUnYbRy33vZTuZkduC1shE9TtEMEjAQwyfyMb4ole5KtjF8MsnQOlA==
 
+"@napi-rs/lzma-linux-x64-gnu@1.5.1":
+  version "1.5.1"
+  resolved "https://registry.yarnpkg.com/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz#e57d4306966078662038094fb38eb9146dc3aea9"
+  integrity sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==
+
 "@nodelib/fs.scandir@2.1.5":
   version "2.1.5"
   resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
@@ -220,9 +225,9 @@
   integrity sha512-+R4VxvceUxHAUJXJQipkkoV9fy10vNo+OnUnGKZnVmcwxMl460KLzytnUM4S35SI073R0yZQp9ra0MbPUwVcEA==
 
 "@open-wc/scoped-elements@^3.0.2":
-  version "3.0.6"
-  resolved "https://registry.yarnpkg.com/@open-wc/scoped-elements/-/scoped-elements-3.0.6.tgz#9ba4a316d39f2b29dc188f34a7f5e4e1fc9dded1"
-  integrity sha512-w1ayJaUUmBw8tALtqQ6cBueld+op+bufujzbrOdH0uCTXnSQkONYZzOH+9jyQ8auVgKLqcxZ8oU6SzfqQhQkPg==
+  version "3.0.10"
+  resolved "https://registry.yarnpkg.com/@open-wc/scoped-elements/-/scoped-elements-3.0.10.tgz#f687f3fe9692f72a15efb945e652d9b74922dd77"
+  integrity sha512-esE95vxq6Y7w9/8H/oPvqN9QVR+ys3F9J2/ITyuTWnlSYaJueQmcS5CR5OybJMjjm9R5pmSoOe6Vau/O7J6d2g==
   dependencies:
     "@open-wc/dedupe-mixin" "^2.0.0"
     lit "^3.0.0"
@@ -235,7 +240,7 @@
     "@types/chai" "^4.3.1"
     "@web/test-runner-commands" "^0.9.0"
 
-"@open-wc/testing-helpers@^3.0.0":
+"@open-wc/testing-helpers@3.0.1", "@open-wc/testing-helpers@^3.0.0":
   version "3.0.1"
   resolved "https://registry.yarnpkg.com/@open-wc/testing-helpers/-/testing-helpers-3.0.1.tgz#f356690fc3495467503a30a2172288aa8baef6f8"
   integrity sha512-hyNysSatbgT2FNxHJsS3rGKcLEo6+HwDFu1UQL6jcSQUabp/tj3PyX7UnXL3H5YGv0lJArdYLSnvjLnjn3O2fw==
@@ -256,17 +261,17 @@
     "@types/sinon-chai" "^3.2.3"
     chai-a11y-axe "^1.5.0"
 
-"@puppeteer/browsers@2.10.7":
-  version "2.10.7"
-  resolved "https://registry.yarnpkg.com/@puppeteer/browsers/-/browsers-2.10.7.tgz#a28f622b2da0ee131c9a576d25d8c4e31fc24135"
-  integrity sha512-wHWLkQWBjHtajZeqCB74nsa/X70KheyOhySYBRmVQDJiNj0zjZR/naPCvdWjMhcG1LmjaMV/9WtTo5mpe8qWLw==
+"@puppeteer/browsers@2.13.2":
+  version "2.13.2"
+  resolved "https://registry.yarnpkg.com/@puppeteer/browsers/-/browsers-2.13.2.tgz#dcc8e7a4545d9680a8a72c53f132e80afc582284"
+  integrity sha512-5EUZSUIc37H6aIXyWO0Z4y8NlF8NnjgmqeQgOGiswAU7pY0HOo16ho4+alIWmSfdZnjqBRawMsP3I5YqLSn6kw==
   dependencies:
-    debug "^4.4.1"
+    debug "^4.4.3"
     extract-zip "^2.0.1"
     progress "^2.0.3"
     proxy-agent "^6.5.0"
-    semver "^7.7.2"
-    tar-fs "^3.1.0"
+    semver "^7.7.4"
+    tar-fs "^3.1.1"
     yargs "^17.7.2"
 
 "@rollup/plugin-node-resolve@^15.0.1":
@@ -281,113 +286,138 @@
     resolve "^1.22.1"
 
 "@rollup/pluginutils@^5.0.1":
-  version "5.2.0"
-  resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-5.2.0.tgz#eac25ca5b0bdda4ba735ddaca5fbf26bd435f602"
-  integrity sha512-qWJ2ZTbmumwiLFomfzTyt5Kng4hwPi9rwCYN4SHb6eaRU1KNO4ccxINHr/VhH4GgPlt1XfSTLX2LBTme8ne4Zw==
+  version "5.5.1"
+  resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-5.5.1.tgz#a6024861c0897668ef1e3911e52c2703da449237"
+  integrity sha512-P9ZvnfouRu4MSC+ilERaw6FmZs8zqKhpHxEs4aGDGWQAMzQGXnhvCSvoNwokfNvdt7t3Y5Y4p6gStQgezeIqug==
   dependencies:
     "@types/estree" "^1.0.0"
     estree-walker "^2.0.2"
     picomatch "^4.0.2"
 
-"@rollup/rollup-android-arm-eabi@4.49.0":
-  version "4.49.0"
-  resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.49.0.tgz#ba432433f5e7b419dba2be407d1d59fea6b8de48"
-  integrity sha512-rlKIeL854Ed0e09QGYFlmDNbka6I3EQFw7iZuugQjMb11KMpJCLPFL4ZPbMfaEhLADEL1yx0oujGkBQ7+qW3eA==
+"@rollup/rollup-android-arm-eabi@4.65.0":
+  version "4.65.0"
+  resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.65.0.tgz#94f89031659a9a18c2512b14c0efc89300919ac9"
+  integrity sha512-t2AnVba25baFdq7gczzS13JyVcdubLVbFX1X04mxrggDrTQPUXNv3XM0k9H1hr5tqvg7AVvtQ720QHAj0iYqhg==
 
-"@rollup/rollup-android-arm64@4.49.0":
-  version "4.49.0"
-  resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.49.0.tgz#4e05c86e0fb9af6eaf52fc298dcdec577477e35c"
-  integrity sha512-cqPpZdKUSQYRtLLr6R4X3sD4jCBO1zUmeo3qrWBCqYIeH8Q3KRL4F3V7XJ2Rm8/RJOQBZuqzQGWPjjvFUcYa/w==
+"@rollup/rollup-android-arm64@4.65.0":
+  version "4.65.0"
+  resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.65.0.tgz#d7659bcbb95e90f61d651a7742f4ddc490725fbe"
+  integrity sha512-dNONUaEwPGhl/nuO2KV8VABWlcjYyU6KtZGN8dQv5OS5JU7JSCxPijVNKXbRJd0iuTzTiJ4TjPt/4bbvDRNiMQ==
 
-"@rollup/rollup-darwin-arm64@4.49.0":
-  version "4.49.0"
-  resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.49.0.tgz#788fad425b4129875639e0c14b6441c5f3b69d46"
-  integrity sha512-99kMMSMQT7got6iYX3yyIiJfFndpojBmkHfTc1rIje8VbjhmqBXE+nb7ZZP3A5skLyujvT0eIUCUsxAe6NjWbw==
+"@rollup/rollup-darwin-arm64@4.65.0":
+  version "4.65.0"
+  resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.65.0.tgz#3766c3e28836469143a2bc3d4eaa9e6d01fcb07e"
+  integrity sha512-zWQqUH+9zavr2Bxuzfpuv2SIF3X31cr58TvSQC9o1GhpOvkqRwr60GkZdQcudyT/BEgdpdSafjgd2I13MbTL7g==
 
-"@rollup/rollup-darwin-x64@4.49.0":
-  version "4.49.0"
-  resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.49.0.tgz#d44e05bee55b781d7c2cf535d9f9169787c3599d"
-  integrity sha512-y8cXoD3wdWUDpjOLMKLx6l+NFz3NlkWKcBCBfttUn+VGSfgsQ5o/yDUGtzE9HvsodkP0+16N0P4Ty1VuhtRUGg==
+"@rollup/rollup-darwin-x64@4.65.0":
+  version "4.65.0"
+  resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.65.0.tgz#26576e6e333d8a9ceb801c9117171a35e171f169"
+  integrity sha512-RQYreBFWtO4//hIuOaZkYUnF/lPU4lz35dveDimDshWCJvVisVtJ/shmT9bkXK8wFJY+FJF89X6F3Cq1qI3LCw==
 
-"@rollup/rollup-freebsd-arm64@4.49.0":
-  version "4.49.0"
-  resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.49.0.tgz#107786b4d604495224c3543bfd2cae33ddf76500"
-  integrity sha512-3mY5Pr7qv4GS4ZvWoSP8zha8YoiqrU+e0ViPvB549jvliBbdNLrg2ywPGkgLC3cmvN8ya3za+Q2xVyT6z+vZqA==
+"@rollup/rollup-freebsd-arm64@4.65.0":
+  version "4.65.0"
+  resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.65.0.tgz#551dd14380df952fdf0ae7b5ac6f2ef199ce4dcf"
+  integrity sha512-A0NfMj6Cuh/9BE5k3awJKv6HoxFVXIcLAb6SZqAMoxUHPA1ZNNK4RsGuUPD/vL7nEAm9LG+ZzXWWTrnC0XtkpA==
 
-"@rollup/rollup-freebsd-x64@4.49.0":
-  version "4.49.0"
-  resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.49.0.tgz#54e105c3da27f31084ca6913fed603627755abde"
-  integrity sha512-C9KzzOAQU5gU4kG8DTk+tjdKjpWhVWd5uVkinCwwFub2m7cDYLOdtXoMrExfeBmeRy9kBQMkiyJ+HULyF1yj9w==
+"@rollup/rollup-freebsd-x64@4.65.0":
+  version "4.65.0"
+  resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.65.0.tgz#887b54875348e08e088c37996a9d6902cdaac0f5"
+  integrity sha512-BI6/H7q3aP0I7S7GOrjyxTjgEJlSnovXE38+bdxBpuKN6z+d//uF+T+VQ3Q7ltJL/71p17ufartARX9Ja5gOGQ==
 
-"@rollup/rollup-linux-arm-gnueabihf@4.49.0":
-  version "4.49.0"
-  resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.49.0.tgz#725c23e0766b5d9368180bc2c427a51e31d0e147"
-  integrity sha512-OVSQgEZDVLnTbMq5NBs6xkmz3AADByCWI4RdKSFNlDsYXdFtlxS59J+w+LippJe8KcmeSSM3ba+GlsM9+WwC1w==
+"@rollup/rollup-linux-arm-gnueabihf@4.65.0":
+  version "4.65.0"
+  resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.65.0.tgz#da908ad52520486ab2bc29b73d4ac7539ce929cb"
+  integrity sha512-W1vUprf09RWaVWnsFP1vlUkEWJzTZlpObOEAYZXt9Fq0UVAOYEkeGr7wBX7McKqqIQskXdBnpiOMgwPujordgA==
 
-"@rollup/rollup-linux-arm-musleabihf@4.49.0":
-  version "4.49.0"
-  resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.49.0.tgz#6946b0d2f132f2baf5657945b81565d8abd51cc0"
-  integrity sha512-ZnfSFA7fDUHNa4P3VwAcfaBLakCbYaxCk0jUnS3dTou9P95kwoOLAMlT3WmEJDBCSrOEFFV0Y1HXiwfLYJuLlA==
+"@rollup/rollup-linux-arm-musleabihf@4.65.0":
+  version "4.65.0"
+  resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.65.0.tgz#fc24203b8b9483ead2b279b477121cddd7a11b75"
+  integrity sha512-s8QTcZWgrl9haFzEGIqyE5BWyo89pFDGLMBFZ752WYxk8DJwNU/O1X6pZgPw829d9/sm6CCHyrMP3aurt76p1Q==
 
-"@rollup/rollup-linux-arm64-gnu@4.49.0":
-  version "4.49.0"
-  resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.49.0.tgz#83510a6d03e748619241a17f5a879418a963c5ed"
-  integrity sha512-Z81u+gfrobVK2iV7GqZCBfEB1y6+I61AH466lNK+xy1jfqFLiQ9Qv716WUM5fxFrYxwC7ziVdZRU9qvGHkYIJg==
+"@rollup/rollup-linux-arm64-gnu@4.65.0":
+  version "4.65.0"
+  resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.65.0.tgz#1e6bd7d297802156364b032e6f82fe83bb90e210"
+  integrity sha512-ke1f6dLRzkqveyjjF2fkEwQYZvxHtNNwjegY8nJrwcO0Bdqr8CzFO/pKE0Bns13cx0qz2Ba2Y0Hs3dSwMdnHxA==
 
-"@rollup/rollup-linux-arm64-musl@4.49.0":
-  version "4.49.0"
-  resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.49.0.tgz#085b98d44c10908626dd40f26bf924433bbd8471"
-  integrity sha512-zoAwS0KCXSnTp9NH/h9aamBAIve0DXeYpll85shf9NJ0URjSTzzS+Z9evmolN+ICfD3v8skKUPyk2PO0uGdFqg==
+"@rollup/rollup-linux-arm64-musl@4.65.0":
+  version "4.65.0"
+  resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.65.0.tgz#dd5073b19bcac627e9f184dd07878510080ab131"
+  integrity sha512-926SMeUcy4y18Rz/w2aJiUKOnyAnm6czg72bXkQEaeemsll+Wr0hnsjb2BGRpHvWgwAMYy5ACJCotbvfLCfj0A==
 
-"@rollup/rollup-linux-loongarch64-gnu@4.49.0":
-  version "4.49.0"
-  resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.49.0.tgz#13e0a4808e9f7924f2cc8c133603f627c7a00543"
-  integrity sha512-2QyUyQQ1ZtwZGiq0nvODL+vLJBtciItC3/5cYN8ncDQcv5avrt2MbKt1XU/vFAJlLta5KujqyHdYtdag4YEjYQ==
+"@rollup/rollup-linux-loong64-gnu@4.65.0":
+  version "4.65.0"
+  resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.65.0.tgz#ca83e305cf2ac438a79c9cb61fdfbae256729e37"
+  integrity sha512-6T7JNRP1hc4hqF2dUsEoVLOt9K8tmODoCLldtQRYnrddGGQY8Gqe2pM/qMMUo7EMowpP7oa2N95k0/8sYK/ipw==
 
-"@rollup/rollup-linux-ppc64-gnu@4.49.0":
-  version "4.49.0"
-  resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.49.0.tgz#aeee4e47fc9ca5d6687e686fea4696202af6b2f4"
-  integrity sha512-k9aEmOWt+mrMuD3skjVJSSxHckJp+SiFzFG+v8JLXbc/xi9hv2icSkR3U7uQzqy+/QbbYY7iNB9eDTwrELo14g==
+"@rollup/rollup-linux-loong64-musl@4.65.0":
+  version "4.65.0"
+  resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.65.0.tgz#030b2d02f318cecfc8965a68fc5ce7f393fed21d"
+  integrity sha512-SImGFl1Je5kpyAgOCPONVT7h6ASV8mAUwGRjY7eZvVjPg//PfHOXgI+P241RF/+HqsA4PP3qD527ysWFKNQyhQ==
 
-"@rollup/rollup-linux-riscv64-gnu@4.49.0":
-  version "4.49.0"
-  resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.49.0.tgz#603e4591643f1d7851a96d096cf7fcd273f7b0e1"
-  integrity sha512-rDKRFFIWJ/zJn6uk2IdYLc09Z7zkE5IFIOWqpuU0o6ZpHcdniAyWkwSUWE/Z25N/wNDmFHHMzin84qW7Wzkjsw==
+"@rollup/rollup-linux-ppc64-gnu@4.65.0":
+  version "4.65.0"
+  resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.65.0.tgz#88a2e59fd2b47d55841c67e2717999ecbf52d31d"
+  integrity sha512-XeDTbmPF1Yu5asfXGPrMkWoxTDhgryQbmw5Q1+R582O51VNCk23J6f2pDrsAp5YkneBVBwtExx6ZGOb9D2aQ6A==
 
-"@rollup/rollup-linux-riscv64-musl@4.49.0":
-  version "4.49.0"
-  resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.49.0.tgz#f8fd9b01f1888e1816d5a398789d430511286c00"
-  integrity sha512-FkkhIY/hYFVnOzz1WeV3S9Bd1h0hda/gRqvZCMpHWDHdiIHn6pqsY3b5eSbvGccWHMQ1uUzgZTKS4oGpykf8Tw==
+"@rollup/rollup-linux-ppc64-musl@4.65.0":
+  version "4.65.0"
+  resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.65.0.tgz#7cbf8e4443e8e33f26cebc3d129074773b0828dc"
+  integrity sha512-VS55JUI/1nsljmV/jfqNkLZXFw8uMO8nNlfoHmSevNf6fO3neuhyDvx9dv3c/Ytt8r/431SL8Qax1dpYvOMZTg==
 
-"@rollup/rollup-linux-s390x-gnu@4.49.0":
-  version "4.49.0"
-  resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.49.0.tgz#37a1fd372d9b93d2b75b2f37c482ecf52f52849b"
-  integrity sha512-gRf5c+A7QiOG3UwLyOOtyJMD31JJhMjBvpfhAitPAoqZFcOeK3Kc1Veg1z/trmt+2P6F/biT02fU19GGTS529A==
+"@rollup/rollup-linux-riscv64-gnu@4.65.0":
+  version "4.65.0"
+  resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.65.0.tgz#cff5057f2e6525fd70dc6a504a261ce949f85818"
+  integrity sha512-Vblw84TbX7RS4la1Y4+yQ7aore/oSyaNtFbppuBr5Vs/4LfBeXKq9dIfoExw6zOvRERqd2rRAjnZRaMhH/0x5w==
 
-"@rollup/rollup-linux-x64-gnu@4.49.0":
-  version "4.49.0"
-  resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.49.0.tgz#131e66dbf7e71cb2a389acc45319bd4c990e093a"
-  integrity sha512-BR7+blScdLW1h/2hB/2oXM+dhTmpW3rQt1DeSiCP9mc2NMMkqVgjIN3DDsNpKmezffGC9R8XKVOLmBkRUcK/sA==
+"@rollup/rollup-linux-riscv64-musl@4.65.0":
+  version "4.65.0"
+  resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.65.0.tgz#ce0325d5b9c06db1d888a773dfe03858e3071d6c"
+  integrity sha512-7+gHjtONvKgwR9InTKFaLq53f6YzBJkgeMRBENdWTsQr+spahGqQm8HF5aXpq8i4JaRrOqYyv6Zn1WltDTxaZQ==
 
-"@rollup/rollup-linux-x64-musl@4.49.0":
-  version "4.49.0"
-  resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.49.0.tgz#b7245a5ea57db9679e8bf3032c25a5d2c5f54056"
-  integrity sha512-hDMOAe+6nX3V5ei1I7Au3wcr9h3ktKzDvF2ne5ovX8RZiAHEtX1A5SNNk4zt1Qt77CmnbqT+upb/umzoPMWiPg==
+"@rollup/rollup-linux-s390x-gnu@4.65.0":
+  version "4.65.0"
+  resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.65.0.tgz#b257d6032e26da889b30d87e2e3b3853941c822e"
+  integrity sha512-KvNDC0J6s4vVHhtJ6KrDXU0Er0au/hmRIBq/+1maCV8TseGupeKizq0bWcrbp2HE1T8xoknvN0Q/KZ/YF0qX3w==
 
-"@rollup/rollup-win32-arm64-msvc@4.49.0":
-  version "4.49.0"
-  resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.49.0.tgz#768a128bb5da3c5472c3c56aec77507d28bc7209"
-  integrity sha512-wkNRzfiIGaElC9kXUT+HLx17z7D0jl+9tGYRKwd8r7cUqTL7GYAvgUY++U2hK6Ar7z5Z6IRRoWC8kQxpmM7TDA==
+"@rollup/rollup-linux-x64-gnu@4.65.0":
+  version "4.65.0"
+  resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.65.0.tgz#85e4962a06c5da119a5bf7059084a3933d2351b1"
+  integrity sha512-GExdD15WPvu/x/drELjVam7vX8EsPgvTMOa/iJL/p/4m/oOqzbb7JXZg8fXR4hlXtg/sF2zyTZ3bR0AEtEMlhQ==
 
-"@rollup/rollup-win32-ia32-msvc@4.49.0":
-  version "4.49.0"
-  resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.49.0.tgz#ce3f3b2eebe585340631498666718f00983a6a62"
-  integrity sha512-gq5aW/SyNpjp71AAzroH37DtINDcX1Qw2iv9Chyz49ZgdOP3NV8QCyKZUrGsYX9Yyggj5soFiRCgsL3HwD8TdA==
+"@rollup/rollup-linux-x64-musl@4.65.0":
+  version "4.65.0"
+  resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.65.0.tgz#05b714a3f1a3ca241e6122a471e5bf1821b79770"
+  integrity sha512-8sT9PemIZfIMED4Vd4KGoOXVDj5CMSWNcGdbheRUx9TYS03yOWdT2Q0lXPyEyNBB9YTilwewIQKNIBk6Nxi0Kg==
 
-"@rollup/rollup-win32-x64-msvc@4.49.0":
-  version "4.49.0"
-  resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.49.0.tgz#c2a0e3b81262a7e9dd12ce18b350a97558dd50bc"
-  integrity sha512-gEtqFbzmZLFk2xKh7g0Rlo8xzho8KrEFEkzvHbfUGkrgXOpZ4XagQ6n+wIZFNh1nTb8UD16J4nFSFKXYgnbdBg==
+"@rollup/rollup-openbsd-x64@4.65.0":
+  version "4.65.0"
+  resolved "https://registry.yarnpkg.com/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.65.0.tgz#775de51a8220c152cd046316c4c3e0da3a4c4c52"
+  integrity sha512-pO6Ehi0jo5yE0R6PltKhJhv9mlIiyzBJk5N5NUF2OF6xtVKI+1bdXxj/rb0jGXy3hck1ELVT0QPY3tzkAm360w==
+
+"@rollup/rollup-openharmony-arm64@4.65.0":
+  version "4.65.0"
+  resolved "https://registry.yarnpkg.com/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.65.0.tgz#56f8dc333da4de0379b35b2ac0645341aa421032"
+  integrity sha512-vo7N3/+cjjPDYr8vtxC+qSNgWa9sDvJ7g8N8R5SWqFY4WiNH1ULcAU70SKVyHeiIZOYYwNP9pTipmhN5sl1NPw==
+
+"@rollup/rollup-win32-arm64-msvc@4.65.0":
+  version "4.65.0"
+  resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.65.0.tgz#456e74e777f8281436310ecfdb6812bfddf86849"
+  integrity sha512-ArwvgFAbjKcDM7qqotZ4OVYf+UMT9xH2YzkCzK4+AuZSDihMlz1Ekoe4INwBVXzn2mnJzuIYOcSx07iTBijGRQ==
+
+"@rollup/rollup-win32-ia32-msvc@4.65.0":
+  version "4.65.0"
+  resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.65.0.tgz#c549615744d5919855391a398d0c5c222c200424"
+  integrity sha512-QGMmK4/cxKE/36FoLMSHQBCyymv/eFTnsCvvsBF0rgmOvVbvX78VWZRerL3dHa77f4pM6Xcc2iGDhJ10w/svKQ==
+
+"@rollup/rollup-win32-x64-gnu@4.65.0":
+  version "4.65.0"
+  resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.65.0.tgz#a8318f25566977d392e7d831dbf6c4229c7978af"
+  integrity sha512-XfKYFWHIPs4HPODIMsGF1IKlS3H1e3WokUZIgpmn4+uNnZBlnRDDHEylNyazbQXwhMKZre68OjtRYbKqb5+j8w==
+
+"@rollup/rollup-win32-x64-msvc@4.65.0":
+  version "4.65.0"
+  resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.65.0.tgz#4e24b35aee8d6c29f4a99fb650bed372371f8141"
+  integrity sha512-wPWi++K4Bs1VR4XihOhfGi4IGX6Cub7FlerTf8X2v+2BtDHddgSqWCXwGD+h2yAe4/niIhNDwAltioOC+wEogQ==
 
 "@sinonjs/commons@^3.0.1":
   version "3.0.1"
@@ -403,6 +433,13 @@
   dependencies:
     "@sinonjs/commons" "^3.0.1"
 
+"@sinonjs/fake-timers@^15.4.0":
+  version "15.4.0"
+  resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-15.4.0.tgz#5d40c151a9e66075fe4520bec40bccfe54931962"
+  integrity sha512-DsG+8/LscQIQg68J6Ef3dv10u6nVyetYn923s3/sus5eaGfTo1of5WMZSLf0UJc9KDuKPilPH0UDJCjvNbDNCA==
+  dependencies:
+    "@sinonjs/commons" "^3.0.1"
+
 "@sinonjs/samsam@^8.0.1":
   version "8.0.3"
   resolved "https://registry.yarnpkg.com/@sinonjs/samsam/-/samsam-8.0.3.tgz#eb6ffaef421e1e27783cc9b52567de20cb28072d"
@@ -424,9 +461,9 @@
     "@types/node" "*"
 
 "@types/babel__code-frame@^7.0.2":
-  version "7.0.6"
-  resolved "https://registry.yarnpkg.com/@types/babel__code-frame/-/babel__code-frame-7.0.6.tgz#20a899c0d29fba1ddf5c2156a10a2bda75ee6f29"
-  integrity sha512-Anitqkl3+KrzcW2k77lRlg/GfLZLWXBuNgbEcIOU6M92yw42vsd3xV/Z/yAHEj8m+KUjL6bWOVOFqX8PFPJ4LA==
+  version "7.27.0"
+  resolved "https://registry.yarnpkg.com/@types/babel__code-frame/-/babel__code-frame-7.27.0.tgz#4799f597ec9e7bbdd39e1374f43423742dcffa99"
+  integrity sha512-Dwlo+LrxDx/0SpfmJ/BKveHf7QXWvLBLc+x03l5sbzykj3oB9nHygCpSECF1a+s+QIxbghe+KHqC90vGtxLRAA==
 
 "@types/body-parser@*":
   version "1.19.6"
@@ -444,11 +481,12 @@
     "@types/chai" "*"
 
 "@types/chai@*":
-  version "5.2.2"
-  resolved "https://registry.yarnpkg.com/@types/chai/-/chai-5.2.2.tgz#6f14cea18180ffc4416bc0fd12be05fdd73bdd6b"
-  integrity sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==
+  version "5.2.3"
+  resolved "https://registry.yarnpkg.com/@types/chai/-/chai-5.2.3.tgz#8e9cd9e1c3581fa6b341a5aed5588eb285be0b4a"
+  integrity sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==
   dependencies:
     "@types/deep-eql" "*"
+    assertion-error "^2.0.1"
 
 "@types/chai@^4.2.12", "@types/chai@^4.3.1":
   version "4.3.20"
@@ -486,9 +524,9 @@
   integrity sha512-ag0BfJLZf6CQz8VIuRIEYQ5Ggwk/82uvTQf27RcpyDNbY0Vw49LIPqAxk5tqYfrCs9xDaIMvl4aj7ZopnYL8bA==
 
 "@types/cookies@*":
-  version "0.9.1"
-  resolved "https://registry.yarnpkg.com/@types/cookies/-/cookies-0.9.1.tgz#083924ca1266e34ff240ca4d4fd6732ee5b81886"
-  integrity sha512-E/DPgzifH4sM1UMadJMWd6mO2jOd4g1Ejwzx8/uRCDpJis1IrlyQEcGAYEomtAqRYmD5ORbNXMeI9U0RiVGZbg==
+  version "0.9.2"
+  resolved "https://registry.yarnpkg.com/@types/cookies/-/cookies-0.9.2.tgz#ccdf86d782f2dea34531dd32733a25be48177cd4"
+  integrity sha512-1AvkDdZM2dbyFybL4fxpuNCaWyv//0AwsuUk2DWeXyM1/5ZKm6W3z6mQi24RZ4l2ucY+bkSHzbDVpySqPGuV8A==
   dependencies:
     "@types/connect" "*"
     "@types/express" "*"
@@ -505,15 +543,15 @@
   resolved "https://registry.yarnpkg.com/@types/deep-eql/-/deep-eql-4.0.2.tgz#334311971d3a07121e7eb91b684a605e7eea9cbd"
   integrity sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==
 
-"@types/estree@1.0.8", "@types/estree@^1.0.0":
-  version "1.0.8"
-  resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.8.tgz#958b91c991b1867ced318bedea0e215ee050726e"
-  integrity sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==
+"@types/estree@1.0.9", "@types/estree@^1.0.0":
+  version "1.0.9"
+  resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.9.tgz#cf3f0e876d7bee15a93ab925b82bf570a3904a24"
+  integrity sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==
 
 "@types/express-serve-static-core@^5.0.0":
-  version "5.0.7"
-  resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-5.0.7.tgz#2fa94879c9d46b11a5df4c74ac75befd6b283de6"
-  integrity sha512-R+33OsgWw7rOhD1emjU7dzCDHucJrgJXMA5PYCzJxVil0dsyx5iBEPHqpPfiKNJQb7lZ1vxwoLR4Z87bBUpeGQ==
+  version "5.1.3"
+  resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-5.1.3.tgz#9d34c88c0c9ee62b9a6e4d9f8ab8d7e29688e6b4"
+  integrity sha512-dPfW8NFiOF4wOHc7+N/QSxlY9cfSsenewGbAz8C8U/MULPd/YZ27LvJUIlzaXie7e6Ove9YunJGgC9tbHD2cKw==
   dependencies:
     "@types/node" "*"
     "@types/qs" "*"
@@ -521,13 +559,13 @@
     "@types/send" "*"
 
 "@types/express@*":
-  version "5.0.3"
-  resolved "https://registry.yarnpkg.com/@types/express/-/express-5.0.3.tgz#6c4bc6acddc2e2a587142e1d8be0bce20757e956"
-  integrity sha512-wGA0NX93b19/dZC1J18tKWVIYWyyF2ZjT9vin/NRu0qzzvfVzWjs04iq2rQ3H65vCTQYlRqs3YHfY7zjdV+9Kw==
+  version "5.0.6"
+  resolved "https://registry.yarnpkg.com/@types/express/-/express-5.0.6.tgz#2d724b2c990dcb8c8444063f3580a903f6d500cc"
+  integrity sha512-sKYVuV7Sv9fbPIt/442koC7+IIwK5olP1KWeD88e/idgoJqDm3JV/YUiPwkoKK92ylff2MGxSz1CSjsXelx0YA==
   dependencies:
     "@types/body-parser" "*"
     "@types/express-serve-static-core" "^5.0.0"
-    "@types/serve-static" "*"
+    "@types/serve-static" "^2"
 
 "@types/http-assert@*":
   version "1.5.6"
@@ -564,16 +602,16 @@
   integrity sha512-lZuNAY9xeJt7Bx4t4dx0rYCDqGPW8RXhQZK1td7d4H6E9zYbLoOtjBvfwdTKpsyxQI/2jv+armjX/RW+ZNpXOQ==
 
 "@types/koa-compose@*":
-  version "3.2.8"
-  resolved "https://registry.yarnpkg.com/@types/koa-compose/-/koa-compose-3.2.8.tgz#dec48de1f6b3d87f87320097686a915f1e954b57"
-  integrity sha512-4Olc63RY+MKvxMwVknCUDhRQX1pFQoBZ/lXcRLP69PQkEpze/0cr8LNqJQe5NFb/b19DWi2a5bTi2VAlQzhJuA==
+  version "3.2.9"
+  resolved "https://registry.yarnpkg.com/@types/koa-compose/-/koa-compose-3.2.9.tgz#6efb945ee5573be0f4eddb728a2f6826f7a3f395"
+  integrity sha512-BroAZ9FTvPiCy0Pi8tjD1OfJ7bgU1gQf0eR6e1Vm+JJATy9eKOG3hQMFtMciMawiSOVnLMdmUOC46s7HBhSTsA==
   dependencies:
     "@types/koa" "*"
 
 "@types/koa@*":
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/@types/koa/-/koa-3.0.0.tgz#5df2b3b30da902f01b6ec78ef56403e6eb62fa6e"
-  integrity sha512-MOcVYdVYmkSutVHZZPh8j3+dAjLyR5Tl59CN0eKgpkE1h/LBSmPAsQQuWs+bKu7WtGNn+hKfJH9Gzml+PulmDg==
+  version "3.0.3"
+  resolved "https://registry.yarnpkg.com/@types/koa/-/koa-3.0.3.tgz#aa41a80d0d9fed1e3b87d33d1a7057c8badeb668"
+  integrity sha512-TdtNEJ7sYSrFQcVuS2ySsVqnq5EyE3oJbnfFJvkC9UtGP4Kpem5KE7r+ivHIbIAQAofSqnlB5D3vkfYO69TQpg==
   dependencies:
     "@types/accepts" "*"
     "@types/content-disposition" "*"
@@ -585,9 +623,9 @@
     "@types/node" "*"
 
 "@types/koa@^2.11.6":
-  version "2.15.0"
-  resolved "https://registry.yarnpkg.com/@types/koa/-/koa-2.15.0.tgz#eca43d76f527c803b491731f95df575636e7b6f2"
-  integrity sha512-7QFsywoE5URbuVnG3loe03QXuGajrnotr3gQkXcEBShORai23MePfFYdhz90FEtBBpkyIYQbVD+evKtloCgX3g==
+  version "2.15.2"
+  resolved "https://registry.yarnpkg.com/@types/koa/-/koa-2.15.2.tgz#cc570a70170713b1ab6b93384cabf4943a25678b"
+  integrity sha512-CB+iyjjh1uS5N6/CKwXvw0qA7USMS2WVc4Tjf660yCjhdvqzNr8gdFcIawB41zGGptOQ+d1fnpaQWIIUXYxR3w==
   dependencies:
     "@types/accepts" "*"
     "@types/content-disposition" "*"
@@ -598,11 +636,6 @@
     "@types/koa-compose" "*"
     "@types/node" "*"
 
-"@types/mime@^1":
-  version "1.3.5"
-  resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.5.tgz#1ef302e01cf7d2b5a0fa526790c9123bf1d06690"
-  integrity sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==
-
 "@types/mkdirp@^1.0.1":
   version "1.0.2"
   resolved "https://registry.yarnpkg.com/@types/mkdirp/-/mkdirp-1.0.2.tgz#8d0bad7aa793abe551860be1f7ae7f3198c16666"
@@ -616,11 +649,11 @@
   integrity sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==
 
 "@types/node@*":
-  version "24.3.0"
-  resolved "https://registry.yarnpkg.com/@types/node/-/node-24.3.0.tgz#89b09f45cb9a8ee69466f18ee5864e4c3eb84dec"
-  integrity sha512-aPTXCrfwnDLj4VvXrm+UUCQjNEvJgNA8s5F1cvwQU+3KNltTOkBm1j30uNLyqqPNe7gE3KFzImYoZEfLhp4Yow==
+  version "26.6.5"
+  resolved "https://registry.yarnpkg.com/@types/node/-/node-26.6.5.tgz#cb35209e7767c503551b5fa42a48231c7441d979"
+  integrity sha512-uMzsv9stDdofIZBx4UGh4Z9ZgXnGC9seRDscilBcTHAeOFk67MZg/k9bWVfO+bk4qZmG+l52hRnLwUiH2LnJTg==
   dependencies:
-    undici-types "~7.10.0"
+    undici-types "~8.9.0"
 
 "@types/parse5@^6.0.1":
   version "6.0.3"
@@ -642,9 +675,9 @@
     "@types/node" "*"
 
 "@types/qs@*":
-  version "6.14.0"
-  resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.14.0.tgz#d8b60cecf62f2db0fb68e5e006077b9178b85de5"
-  integrity sha512-eOunJqu0K1923aExK6y8p6fsihYEn/BYuQ4g0CxAAgFc4b/ZLN4CrsRZ55srTdqoiLzU2B2evC+apEIxprEzkQ==
+  version "6.15.1"
+  resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.15.1.tgz#8606884272c63f0db96986bd3548650d8a9388bf"
+  integrity sha512-GZHUBZR9hckSUhrxmp1nG6NwdpM9fCunJwyThLW1X3AyHgd9IlHb6VANpQQqDr2o/qQp6McZ3y/IA2rVzKzSbw==
 
 "@types/range-parser@*":
   version "1.2.7"
@@ -657,21 +690,19 @@
   integrity sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==
 
 "@types/send@*":
-  version "0.17.5"
-  resolved "https://registry.yarnpkg.com/@types/send/-/send-0.17.5.tgz#d991d4f2b16f2b1ef497131f00a9114290791e74"
-  integrity sha512-z6F2D3cOStZvuk2SaP6YrwkNO65iTZcwA2ZkSABegdkAh/lf+Aa/YQndZVfmEXT5vgAp6zv06VQ3ejSVjAny4w==
+  version "1.2.1"
+  resolved "https://registry.yarnpkg.com/@types/send/-/send-1.2.1.tgz#6a784e45543c18c774c049bff6d3dbaf045c9c74"
+  integrity sha512-arsCikDvlU99zl1g69TcAB3mzZPpxgw0UQnaHeC1Nwb015xp8bknZv5rIfri9xTOcMuaVgvabfIRA7PSZVuZIQ==
   dependencies:
-    "@types/mime" "^1"
     "@types/node" "*"
 
-"@types/serve-static@*":
-  version "1.15.8"
-  resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.15.8.tgz#8180c3fbe4a70e8f00b9f70b9ba7f08f35987877"
-  integrity sha512-roei0UY3LhpOJvjbIP6ZZFngyLKl5dskOtDhxY5THRSpO+ZI+nzJ+m5yUMzGrp89YRa7lvknKkMYjqQFGwA7Sg==
+"@types/serve-static@^2":
+  version "2.2.0"
+  resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-2.2.0.tgz#d4a447503ead0d1671132d1ab6bd58b805d8de6a"
+  integrity sha512-8mam4H1NHLtu7nmtalF7eyBH14QyOASmcxHhSfEoRyr0nP/YdoesEtU+uSRvMe96TW/HPTtkoKqQLl53N7UXMQ==
   dependencies:
     "@types/http-errors" "*"
     "@types/node" "*"
-    "@types/send" "*"
 
 "@types/sinon-chai@^3.2.3":
   version "3.2.12"
@@ -681,7 +712,14 @@
     "@types/chai" "*"
     "@types/sinon" "*"
 
-"@types/sinon@*", "@types/sinon@^17.0.4":
+"@types/sinon@*":
+  version "22.0.1"
+  resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-22.0.1.tgz#576f3cac7663b6104a2a5c50f4d277f46d3e160a"
+  integrity sha512-MThluJXPmpBY+Z5S3565F2z+hjkCXnBrr36j2mitVQ7JUtxA+A+YQhs+0Q6J8jxb0SVJvydO+6NWfj9EBzpiBQ==
+  dependencies:
+    "@sinonjs/fake-timers" "^15.4.0"
+
+"@types/sinon@^17.0.4":
   version "17.0.4"
   resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-17.0.4.tgz#fd9a3e8e07eea1a3f4a6f82a972c899e5778f369"
   integrity sha512-RHnIrhfPO3+tJT0s7cFaXGZvsL4bbR3/k7z3P312qMS4JaS2Tk+KiwiLx1S0rQ56ERj00u1/BtdyVd0FY+Pdew==
@@ -689,9 +727,9 @@
     "@types/sinonjs__fake-timers" "*"
 
 "@types/sinonjs__fake-timers@*":
-  version "8.1.5"
-  resolved "https://registry.yarnpkg.com/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.5.tgz#5fd3592ff10c1e9695d377020c033116cc2889f2"
-  integrity sha512-mQkU2jY8jJEF7YHjHvsQO8+3ughTL1mcnn96igfhONmR+fUPSKIkefQYpSe8bsly2Ep7oQbn/6VG5/9/0qcArQ==
+  version "15.0.1"
+  resolved "https://registry.yarnpkg.com/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-15.0.1.tgz#49f731d9453f52d64dd79f5a5626c1cf1b81bea4"
+  integrity sha512-Ko2tjWJq8oozHzHV+reuvS5KYIRAokHnGbDwGh/J64LntgpbuylF74ipEL24HCyRjf9FOlBiBHWBR1RlVKsI1w==
 
 "@types/trusted-types@^2.0.2":
   version "2.0.7"
@@ -749,13 +787,13 @@
     ws "^7.5.10"
 
 "@web/dev-server-esbuild@^1.0.4":
-  version "1.0.4"
-  resolved "https://registry.yarnpkg.com/@web/dev-server-esbuild/-/dev-server-esbuild-1.0.4.tgz#7ac39eb4350da39fb3f7c5ce5c0fd423a8511346"
-  integrity sha512-ia1LxBwwRiQBYhJ7/RtLenHyPjzle3SvTw3jOZaeGv8UGXVPOkQV8fR05caOtW/DPPZaZovNAybzRKVnNiYIZg==
+  version "1.0.5"
+  resolved "https://registry.yarnpkg.com/@web/dev-server-esbuild/-/dev-server-esbuild-1.0.5.tgz#580da2c01bc20193391b7fa096259b101e9cb35a"
+  integrity sha512-QkKfnBuo+ogcMXLE9kKhw8+UwfbuIgiKKATY26ssgSwtMmAhgq+/SSG+QM55VMkVVzDDLi97aMDEcdr3V2sYvQ==
   dependencies:
     "@mdn/browser-compat-data" "^4.0.0"
     "@web/dev-server-core" "^0.7.4"
-    esbuild "^0.25.0"
+    esbuild "^0.27.0"
     parse5 "^6.0.1"
     ua-parser-js "^1.0.33"
 
@@ -792,9 +830,9 @@
     portfinder "^1.0.32"
 
 "@web/parse5-utils@^2.1.0":
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/@web/parse5-utils/-/parse5-utils-2.1.0.tgz#3d33aca62c66773492f2fba89d23a45f8b57ba4a"
-  integrity sha512-GzfK5disEJ6wEjoPwx8AVNwUe9gYIiwc+x//QYxYDAFKUp4Xb1OJAGLc2l2gVrSQmtPGLKrTRcW90Hv4pEq1qA==
+  version "2.1.1"
+  resolved "https://registry.yarnpkg.com/@web/parse5-utils/-/parse5-utils-2.1.1.tgz#a14114ece60f7f55772410b0813585e046478fdd"
+  integrity sha512-7rBVZEMGfrq2iPcAEwJ0KSNSvmA2a6jT2CK8/gyIOHgn4reg7bSSRbzyWIEYWyIkeRoYEukX/aW+nAeCgSSqhQ==
   dependencies:
     "@types/parse5" "^6.0.1"
     parse5 "^6.0.1"
@@ -809,7 +847,7 @@
     chrome-launcher "^0.15.0"
     puppeteer-core "^24.0.0"
 
-"@web/test-runner-commands@^0.9.0":
+"@web/test-runner-commands@0.9.0", "@web/test-runner-commands@^0.9.0":
   version "0.9.0"
   resolved "https://registry.yarnpkg.com/@web/test-runner-commands/-/test-runner-commands-0.9.0.tgz#ed15a021249948204bb27559eb437ff6ceeee067"
   integrity sha512-zeLI6QdH0jzzJMDV5O42Pd8WLJtYqovgdt0JdytgHc0d1EpzXDsc7NTCJSImboc2NcayIsWAvvGGeRF69SMMYg==
@@ -973,15 +1011,20 @@
   integrity sha512-TkuxA4UCOvxuDK6NZYXCalszEzj+TLszyASooky+i742l9TqsOdYCMJJupxRic61hwquNtppB3hgcuq9SVSH1Q==
 
 array-back@^6.2.2:
-  version "6.2.2"
-  resolved "https://registry.yarnpkg.com/array-back/-/array-back-6.2.2.tgz#f567d99e9af88a6d3d2f9dfcc21db6f9ba9fd157"
-  integrity sha512-gUAZ7HPyb4SJczXAMUXMGAvI976JoK3qEx9v1FTmeYuJj0IBiaKttG1ydtGKdkfqWkIkouke7nG8ufGy77+Cvw==
+  version "6.2.3"
+  resolved "https://registry.yarnpkg.com/array-back/-/array-back-6.2.3.tgz#d41e67598805e614f23b319b9e5960dfbcd72ae2"
+  integrity sha512-SGDvmg6QTYiTxCBkYVmThcoa67uLl35pyzRHdpCGBOcqFy6BtwnphoFPk7LhJshD+Yk1Kt35WGWeZPTgwR4Fhw==
 
 array-union@^2.1.0:
   version "2.1.0"
   resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d"
   integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==
 
+assertion-error@^2.0.1:
+  version "2.0.1"
+  resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-2.0.1.tgz#f641a196b335690b1070bf00b6e7593fec190bf7"
+  integrity sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==
+
 ast-types@^0.13.4:
   version "0.13.4"
   resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.13.4.tgz#ee0d77b343263965ecc3fb62da16e7222b2b6782"
@@ -1000,57 +1043,61 @@
   integrity sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==
 
 axe-core@^4.3.3:
-  version "4.10.3"
-  resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.10.3.tgz#04145965ac7894faddbac30861e5d8f11bfd14fc"
-  integrity sha512-Xm7bpRXnDSX2YE2YFfBk2FnF0ep6tmG7xPh8iHee8MIcrgq762Nkce856dYtJYLkuIoYZvGfTs/PbZhideTcEg==
+  version "4.14.0"
+  resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.14.0.tgz#a9819d3932a8198fbe935d8cbd8afcdfecbcf31d"
+  integrity sha512-9WTZxEjsZ7b13TH8JPmbV2z8CHbl80/2hm3XPEG4JgNdQLK81IBRXmSxHfMAOkSqQeRxT/0dwNDz2GOm3zzpcQ==
 
-b4a@^1.6.4:
-  version "1.6.7"
-  resolved "https://registry.yarnpkg.com/b4a/-/b4a-1.6.7.tgz#a99587d4ebbfbd5a6e3b21bdb5d5fa385767abe4"
-  integrity sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg==
+b4a@^1.6.4, b4a@^1.8.1, b4a@^1.9.0:
+  version "1.9.0"
+  resolved "https://registry.yarnpkg.com/b4a/-/b4a-1.9.0.tgz#6336313b6e76b299c397afa68676ec6ebc788845"
+  integrity sha512-dpfcF9fDNR6++cthXR67iyhgqWy9CBouAvIWhIntzBG6cvK/cnIPiZQjBwi/ZqjjBEDGfoNDtmB0kTjroOJ3pQ==
 
 balanced-match@^1.0.0:
   version "1.0.2"
   resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
   integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
 
-bare-events@^2.2.0, bare-events@^2.5.4:
-  version "2.6.1"
-  resolved "https://registry.yarnpkg.com/bare-events/-/bare-events-2.6.1.tgz#f793b28bdc3dcf147d7cf01f882a6f0b12ccc4a2"
-  integrity sha512-AuTJkq9XmE6Vk0FJVNq5QxETrSA/vKHarWVBG5l/JbdCL1prJemiyJqUS0jrlXO0MftuPq4m3YVYhoNc5+aE/g==
+bare-events@^2.5.4, bare-events@^2.7.0:
+  version "2.9.2"
+  resolved "https://registry.yarnpkg.com/bare-events/-/bare-events-2.9.2.tgz#01d377b64c3c7167b28b52da7add3221aecf2d7f"
+  integrity sha512-AIPKioV7/Y/8KfZ3AAhjPJxLLbY49S64Ym5DakZlUg75qQiTgUq9hEJoEwa4eUezPUlXRy/i5NpsKvo9jgKmoA==
 
-bare-fs@^4.0.1:
-  version "4.2.1"
-  resolved "https://registry.yarnpkg.com/bare-fs/-/bare-fs-4.2.1.tgz#bd9c2b02a07b9206ccba97f6ea9ce9658582f119"
-  integrity sha512-mELROzV0IhqilFgsl1gyp48pnZsaV9xhQapHLDsvn4d4ZTfbFhcghQezl7FTEDNBcGqLUnNI3lUlm6ecrLWdFA==
+bare-fs@^4.0.1, bare-fs@^4.8.2:
+  version "4.8.4"
+  resolved "https://registry.yarnpkg.com/bare-fs/-/bare-fs-4.8.4.tgz#f342288e7e5d9d8e79917078e1f45950507828c5"
+  integrity sha512-MPC2eyrpbk3A873sK4y6rk+Iv4o2enxTjHZ8zH3HO0mjrpm5XjnguY2XmfidIsDV6vnjpbMBKUAJpV0ISD2SsQ==
   dependencies:
     bare-events "^2.5.4"
     bare-path "^3.0.0"
     bare-stream "^2.6.4"
-
-bare-os@^3.0.1:
-  version "3.6.2"
-  resolved "https://registry.yarnpkg.com/bare-os/-/bare-os-3.6.2.tgz#b3c4f5ad5e322c0fd0f3c29fc97d19009e2796e5"
-  integrity sha512-T+V1+1srU2qYNBmJCXZkUY5vQ0B4FSlL3QDROnKQYOqeiQR8UbjNHlPa+TIbM4cuidiN9GaTaOZgSEgsvPbh5A==
+    bare-url "^2.2.2"
+    fast-fifo "^1.3.2"
 
 bare-path@^3.0.0:
-  version "3.0.0"
-  resolved "https://registry.yarnpkg.com/bare-path/-/bare-path-3.0.0.tgz#b59d18130ba52a6af9276db3e96a2e3d3ea52178"
-  integrity sha512-tyfW2cQcB5NN8Saijrhqn0Zh7AnFNsnczRcuWODH0eYAXBsJ5gVxAUuNr7tsHSC6IZ77cA0SitzT+s47kot8Mw==
-  dependencies:
-    bare-os "^3.0.1"
+  version "3.1.2"
+  resolved "https://registry.yarnpkg.com/bare-path/-/bare-path-3.1.2.tgz#67261bc74a9ba0105ba139b8638f218c09e8d82e"
+  integrity sha512-ZyKbsuuqK6Ag0K8pX6V5Txq6XeJRvY+wXucnFGRjiyVYP9YWDpIQugk/b+enRYrEYBJaqLzghRQpXPMR7341Nw==
 
 bare-stream@^2.6.4:
-  version "2.7.0"
-  resolved "https://registry.yarnpkg.com/bare-stream/-/bare-stream-2.7.0.tgz#5b9e7dd0a354d06e82d6460c426728536c35d789"
-  integrity sha512-oyXQNicV1y8nc2aKffH+BUHFRXmx6VrPzlnaEvMhram0nPBrKcEdcyBg5r08D0i8VxngHFAiVyn1QKXpSG0B8A==
+  version "2.13.4"
+  resolved "https://registry.yarnpkg.com/bare-stream/-/bare-stream-2.13.4.tgz#61d448a268d1efd992103aae6bd729332f278ac0"
+  integrity sha512-PcrQ8lVLbiJscNm1Kez+Yp4Gy4AHGcN1lzwjvf5NybWen7VvEgUfyfnXYJ2zNqWnzOfCb1Abq6lH8ti0syQszA==
   dependencies:
-    streamx "^2.21.0"
+    b4a "^1.8.1"
+    streamx "^2.25.0"
+    teex "^1.0.1"
+
+bare-url@^2.2.2:
+  version "2.5.5"
+  resolved "https://registry.yarnpkg.com/bare-url/-/bare-url-2.5.5.tgz#2e8c18db11393aa6cae6ff246fdcda34615aacd3"
+  integrity sha512-iM9qJCruvpt2rPaLsrumVDru9pogI7PHziHIa9kTNRFt8C8HuSa+kI9kFezK+NvHEFnnz71rKGZ1EAilq/3V/Q==
+  dependencies:
+    bare-path "^3.0.0"
 
 basic-ftp@^5.0.2:
-  version "5.0.5"
-  resolved "https://registry.yarnpkg.com/basic-ftp/-/basic-ftp-5.0.5.tgz#14a474f5fffecca1f4f406f1c26b18f800225ac0"
-  integrity sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==
+  version "5.3.1"
+  resolved "https://registry.yarnpkg.com/basic-ftp/-/basic-ftp-5.3.1.tgz#3148ee9af43c0522514a4f973fecb1d3cbb6d71e"
+  integrity sha512-bopVNp6ugyA150DDuZfPFdt1KZ5a94ZDiwX4hMgZDzF+GttD80lEy8kj98kbyhLXnPvhtIo93mdnLIjpCAeeOw==
 
 binary-extensions@^2.0.0:
   version "2.3.0"
@@ -1058,9 +1105,9 @@
   integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==
 
 brace-expansion@^2.0.1:
-  version "2.0.2"
-  resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.2.tgz#54fc53237a613d854c7bd37463aad17df87214e7"
-  integrity sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==
+  version "2.1.7"
+  resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.1.7.tgz#14ea3836731823bb24740225ea43b941b436f9d1"
+  integrity sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g==
   dependencies:
     balanced-match "^1.0.0"
 
@@ -1086,7 +1133,7 @@
   resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5"
   integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==
 
-bytes@3.1.2:
+bytes@~3.1.2:
   version "3.1.2"
   resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5"
   integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==
@@ -1107,7 +1154,7 @@
     es-errors "^1.3.0"
     function-bind "^1.1.2"
 
-call-bound@^1.0.2, call-bound@^1.0.3:
+call-bound@^1.0.2, call-bound@^1.0.4:
   version "1.0.4"
   resolved "https://registry.yarnpkg.com/call-bound/-/call-bound-1.0.4.tgz#238de935d2a2a692928c538c7ccfa91067fd062a"
   integrity sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==
@@ -1174,10 +1221,10 @@
     is-wsl "^2.2.0"
     lighthouse-logger "^1.0.0"
 
-chromium-bidi@8.0.0:
-  version "8.0.0"
-  resolved "https://registry.yarnpkg.com/chromium-bidi/-/chromium-bidi-8.0.0.tgz#d73c9beed40317adf2bcfeb9a47087003cd467ec"
-  integrity sha512-d1VmE0FD7lxZQHzcDUCKZSNRtRwISXDsdg4HjdTR5+Ll5nQ/vzU12JeNmupD6VWffrPSlrnGhEWlLESKH3VO+g==
+chromium-bidi@14.0.0:
+  version "14.0.0"
+  resolved "https://registry.yarnpkg.com/chromium-bidi/-/chromium-bidi-14.0.0.tgz#15a12ab083ae519a49a724e94994ca0a9ced9c8e"
+  integrity sha512-9gYlLtS6tStdRWzrtXaTMnqcM4dudNegMXJxkR0I/CXObHalYeYcAMPrL19eroNZHtJ8DQmu1E+ZNOYu/IXMXw==
   dependencies:
     mitt "^3.0.1"
     zod "^3.24.1"
@@ -1251,14 +1298,14 @@
     typical "^4.0.0"
 
 command-line-usage@^7.0.1:
-  version "7.0.3"
-  resolved "https://registry.yarnpkg.com/command-line-usage/-/command-line-usage-7.0.3.tgz#6bce992354f6af10ecea2b631bfdf0c8b3bfaea3"
-  integrity sha512-PqMLy5+YGwhMh1wS04mVG44oqDsgyLRSKJBdOo1bnYhMKBW65gZF1dRp2OZRhiTjgUHljy99qkO7bsctLaw35Q==
+  version "7.0.4"
+  resolved "https://registry.yarnpkg.com/command-line-usage/-/command-line-usage-7.0.4.tgz#759449bac39c5410e23513f1f78551b669df1514"
+  integrity sha512-85UdvzTNx/+s5CkSgBm/0hzP80RFHAa7PsfeADE5ezZF3uHz3/Tqj9gIKGT9PTtpycc3Ua64T0oVulGfKxzfqg==
   dependencies:
     array-back "^6.2.2"
     chalk-template "^0.4.0"
-    table-layout "^4.1.0"
-    typical "^7.1.1"
+    table-layout "^4.1.1"
+    typical "^7.3.0"
 
 content-disposition@~0.5.2:
   version "0.5.4"
@@ -1278,9 +1325,9 @@
   integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==
 
 cookies@~0.9.0:
-  version "0.9.1"
-  resolved "https://registry.yarnpkg.com/cookies/-/cookies-0.9.1.tgz#3ffed6f60bb4fb5f146feeedba50acc418af67e3"
-  integrity sha512-TG2hpqe4ELx54QER/S3HQ9SRVnQnGBtKUz5bLQWtYAQ+o6GpgMs6sYUvaiJjVxb+UXwhRhAEP3m7LbsIZ77Hmw==
+  version "0.9.2"
+  resolved "https://registry.yarnpkg.com/cookies/-/cookies-0.9.2.tgz#008155ba8914985360d42b5d5384373cf85aba79"
+  integrity sha512-8BIbcC6tPZMv2/PD4PrB3CtKks7LmAWhA7FRZK/6/b/WJ2RUz00KCga7gq50S4/RhZ22kxefRFGgsuts0v3eoA==
   dependencies:
     depd "~2.0.0"
     keygrip "~1.1.0"
@@ -1304,10 +1351,10 @@
   resolved "https://registry.yarnpkg.com/debounce/-/debounce-1.2.1.tgz#38881d8f4166a5c5848020c11827b834bcb3e0a5"
   integrity sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==
 
-debug@4, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3.5, debug@^4.3.6, debug@^4.4.1:
-  version "4.4.1"
-  resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.1.tgz#e5a8bc6cbc4c6cd3e64308b0693a3d4fa550189b"
-  integrity sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==
+debug@4, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4, debug@^4.3.5, debug@^4.3.6, debug@^4.4.3:
+  version "4.4.3"
+  resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a"
+  integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==
   dependencies:
     ms "^2.1.3"
 
@@ -1366,7 +1413,7 @@
   resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"
   integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==
 
-depd@2.0.0, depd@^2.0.0, depd@~2.0.0:
+depd@^2.0.0, depd@~2.0.0:
   version "2.0.0"
   resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df"
   integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==
@@ -1386,15 +1433,15 @@
   resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015"
   integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==
 
-devtools-protocol@0.0.1475386:
-  version "0.0.1475386"
-  resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.1475386.tgz#5378401a2c5698ab68c3482c9b7816ff62ec652b"
-  integrity sha512-RQ809ykTfJ+dgj9bftdeL2vRVxASAuGU+I9LEx9Ij5TXU5HrgAQVmzi72VA+mkzscE12uzlRv5/tWWv9R9J1SA==
+devtools-protocol@0.0.1608973:
+  version "0.0.1608973"
+  resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.1608973.tgz#56e0a2a999b06d416ee928ca06aeba95a5880515"
+  integrity sha512-Tpm17fxYzt+J7VrGdc1k8YdRqS3YV7se/M6KeemEqvUbq/n7At1rWVuXMxQgpWkdwSdIEKYbU//Bve+Shm4YNQ==
 
 diff@^5.0.0, diff@^5.2.0:
-  version "5.2.0"
-  resolved "https://registry.yarnpkg.com/diff/-/diff-5.2.0.tgz#26ded047cd1179b78b9537d5ef725503ce1ae531"
-  integrity sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==
+  version "5.2.2"
+  resolved "https://registry.yarnpkg.com/diff/-/diff-5.2.2.tgz#0a4742797281d09cfa699b79ea32d27723623bad"
+  integrity sha512-vtcDfH3TOjP8UekytvnHH1o1P4FcUdt4eQ1Y+Abap1tk/OB2MWQvcwS2ClCd1zuIhc3JKOx6p3kod8Vfys3E+A==
 
 diff@^7.0.0:
   version "7.0.0"
@@ -1440,9 +1487,9 @@
     once "^1.4.0"
 
 errorstacks@^2.4.1:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/errorstacks/-/errorstacks-2.4.1.tgz#05adf6de1f5b04a66f2c12cc0593e1be2b18cd0f"
-  integrity sha512-jE4i0SMYevwu/xxAuzhly/KTwtj0xDhbzB6m1xPImxTkw8wcCbgarOQPfCVMi5JKVyW7in29pNJCCJrry3Ynnw==
+  version "2.4.2"
+  resolved "https://registry.yarnpkg.com/errorstacks/-/errorstacks-2.4.2.tgz#19cc65d0d049abbd7fc3a5fd2a01054609ae0647"
+  integrity sha512-aQAkABfX+AsCxWtvh1KGIDkTiYyABsTtZkBb8cd9FWxNnEdrcFEsTxUfi9sc0Jc1mgHC2kW3UtJVadqSuMm/uQ==
 
 es-define-property@^1.0.1:
   version "1.0.1"
@@ -1460,43 +1507,43 @@
   integrity sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==
 
 es-object-atoms@^1.0.0, es-object-atoms@^1.1.1:
-  version "1.1.1"
-  resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz#1c4f2c4837327597ce69d2ca190a7fdd172338c1"
-  integrity sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==
+  version "1.1.2"
+  resolved "https://registry.yarnpkg.com/es-object-atoms/-/es-object-atoms-1.1.2.tgz#a2d0b373205724dfa525d23b0c3e1b1ca582c99b"
+  integrity sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==
   dependencies:
     es-errors "^1.3.0"
 
-esbuild@^0.25.0:
-  version "0.25.9"
-  resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.25.9.tgz#15ab8e39ae6cdc64c24ff8a2c0aef5b3fd9fa976"
-  integrity sha512-CRbODhYyQx3qp7ZEwzxOk4JBqmD/seJrzPa/cGjY1VtIn5E09Oi9/dB4JwctnfZ8Q8iT7rioVv5k/FNT/uf54g==
+esbuild@^0.27.0:
+  version "0.27.7"
+  resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.27.7.tgz#bcadce22b2f3fd76f257e3a64f83a64986fea11f"
+  integrity sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==
   optionalDependencies:
-    "@esbuild/aix-ppc64" "0.25.9"
-    "@esbuild/android-arm" "0.25.9"
-    "@esbuild/android-arm64" "0.25.9"
-    "@esbuild/android-x64" "0.25.9"
-    "@esbuild/darwin-arm64" "0.25.9"
-    "@esbuild/darwin-x64" "0.25.9"
-    "@esbuild/freebsd-arm64" "0.25.9"
-    "@esbuild/freebsd-x64" "0.25.9"
-    "@esbuild/linux-arm" "0.25.9"
-    "@esbuild/linux-arm64" "0.25.9"
-    "@esbuild/linux-ia32" "0.25.9"
-    "@esbuild/linux-loong64" "0.25.9"
-    "@esbuild/linux-mips64el" "0.25.9"
-    "@esbuild/linux-ppc64" "0.25.9"
-    "@esbuild/linux-riscv64" "0.25.9"
-    "@esbuild/linux-s390x" "0.25.9"
-    "@esbuild/linux-x64" "0.25.9"
-    "@esbuild/netbsd-arm64" "0.25.9"
-    "@esbuild/netbsd-x64" "0.25.9"
-    "@esbuild/openbsd-arm64" "0.25.9"
-    "@esbuild/openbsd-x64" "0.25.9"
-    "@esbuild/openharmony-arm64" "0.25.9"
-    "@esbuild/sunos-x64" "0.25.9"
-    "@esbuild/win32-arm64" "0.25.9"
-    "@esbuild/win32-ia32" "0.25.9"
-    "@esbuild/win32-x64" "0.25.9"
+    "@esbuild/aix-ppc64" "0.27.7"
+    "@esbuild/android-arm" "0.27.7"
+    "@esbuild/android-arm64" "0.27.7"
+    "@esbuild/android-x64" "0.27.7"
+    "@esbuild/darwin-arm64" "0.27.7"
+    "@esbuild/darwin-x64" "0.27.7"
+    "@esbuild/freebsd-arm64" "0.27.7"
+    "@esbuild/freebsd-x64" "0.27.7"
+    "@esbuild/linux-arm" "0.27.7"
+    "@esbuild/linux-arm64" "0.27.7"
+    "@esbuild/linux-ia32" "0.27.7"
+    "@esbuild/linux-loong64" "0.27.7"
+    "@esbuild/linux-mips64el" "0.27.7"
+    "@esbuild/linux-ppc64" "0.27.7"
+    "@esbuild/linux-riscv64" "0.27.7"
+    "@esbuild/linux-s390x" "0.27.7"
+    "@esbuild/linux-x64" "0.27.7"
+    "@esbuild/netbsd-arm64" "0.27.7"
+    "@esbuild/netbsd-x64" "0.27.7"
+    "@esbuild/openbsd-arm64" "0.27.7"
+    "@esbuild/openbsd-x64" "0.27.7"
+    "@esbuild/openharmony-arm64" "0.27.7"
+    "@esbuild/sunos-x64" "0.27.7"
+    "@esbuild/win32-arm64" "0.27.7"
+    "@esbuild/win32-ia32" "0.27.7"
+    "@esbuild/win32-x64" "0.27.7"
 
 escalade@^3.1.1:
   version "3.2.0"
@@ -1549,6 +1596,13 @@
   resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
   integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==
 
+events-universal@^1.0.0:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/events-universal/-/events-universal-1.0.1.tgz#b56a84fd611b6610e0a2d0f09f80fdf931e2dfe6"
+  integrity sha512-LUd5euvbMLpwOF8m6ivPCbhQeSiYVNb8Vs0fQ8QjXo0JTkEHpz8pxdQf0gStltaPpw0Cca8b39KxvK9cfKRiAw==
+  dependencies:
+    bare-events "^2.7.0"
+
 execa@^5.0.0:
   version "5.1.1"
   resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd"
@@ -1575,7 +1629,7 @@
   optionalDependencies:
     "@types/yauzl" "^2.9.1"
 
-fast-fifo@^1.2.0, fast-fifo@^1.3.2:
+fast-fifo@^1.3.2:
   version "1.3.2"
   resolved "https://registry.yarnpkg.com/fast-fifo/-/fast-fifo-1.3.2.tgz#286e31de96eb96d38a97899815740ba2a4f3640c"
   integrity sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==
@@ -1592,9 +1646,9 @@
     micromatch "^4.0.8"
 
 fastq@^1.6.0:
-  version "1.19.1"
-  resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.19.1.tgz#d50eaba803c8846a883c16492821ebcd2cda55f5"
-  integrity sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==
+  version "1.20.3"
+  resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.20.3.tgz#7ab8731e647b56abcfeee997dae333ca3ee1d04d"
+  integrity sha512-XKv5nnLs6nLF71NgiKJLIZFLkPyIEuOselLG7ujZnGrRfQK8HpvY+WqKhAJUAdLomwVHErVS4LfxFlPq0/FTAw==
   dependencies:
     reusify "^1.0.4"
 
@@ -1642,11 +1696,6 @@
   resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
   integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==
 
-fsevents@2.3.2:
-  version "2.3.2"
-  resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
-  integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
-
 fsevents@~2.3.2:
   version "2.3.3"
   resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6"
@@ -1657,6 +1706,11 @@
   resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c"
   integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==
 
+generator-function@^2.0.0:
+  version "2.0.1"
+  resolved "https://registry.yarnpkg.com/generator-function/-/generator-function-2.0.1.tgz#0e75dd410d1243687a0ba2e951b94eedb8f737a2"
+  integrity sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==
+
 get-caller-file@^2.0.5:
   version "2.0.5"
   resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
@@ -1678,7 +1732,7 @@
     hasown "^2.0.2"
     math-intrinsics "^1.1.0"
 
-get-proto@^1.0.0, get-proto@^1.0.1:
+get-proto@^1.0.1:
   version "1.0.1"
   resolved "https://registry.yarnpkg.com/get-proto/-/get-proto-1.0.1.tgz#150b3f2743869ef3e851ec0c49d15b1d14d00ee1"
   integrity sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==
@@ -1759,10 +1813,10 @@
   dependencies:
     has-symbols "^1.0.3"
 
-hasown@^2.0.2:
-  version "2.0.2"
-  resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003"
-  integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==
+hasown@^2.0.2, hasown@^2.0.4:
+  version "2.0.4"
+  resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.4.tgz#8c62d8cb90beb2aad5d0a5b67581ad9854c3f003"
+  integrity sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==
   dependencies:
     function-bind "^1.1.2"
 
@@ -1784,17 +1838,6 @@
     deep-equal "~1.0.1"
     http-errors "~1.8.0"
 
-http-errors@2.0.0:
-  version "2.0.0"
-  resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3"
-  integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==
-  dependencies:
-    depd "2.0.0"
-    inherits "2.0.4"
-    setprototypeof "1.2.0"
-    statuses "2.0.1"
-    toidentifier "1.0.1"
-
 http-errors@^1.6.3, http-errors@^1.7.3, http-errors@~1.8.0:
   version "1.8.1"
   resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.8.1.tgz#7c3f28577cbc8a207388455dbd62295ed07bd68c"
@@ -1816,6 +1859,17 @@
     setprototypeof "1.1.0"
     statuses ">= 1.4.0 < 2"
 
+http-errors@~2.0.1:
+  version "2.0.1"
+  resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.1.tgz#36d2f65bc909c8790018dd36fb4d93da6caae06b"
+  integrity sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==
+  dependencies:
+    depd "~2.0.0"
+    inherits "~2.0.4"
+    setprototypeof "~1.2.0"
+    statuses "~2.0.2"
+    toidentifier "~1.0.1"
+
 http-proxy-agent@^7.0.0, http-proxy-agent@^7.0.1:
   version "7.0.2"
   resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz#9a8b1f246866c028509486585f62b8f2c18c270e"
@@ -1837,7 +1891,7 @@
   resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0"
   integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==
 
-iconv-lite@0.4.24:
+iconv-lite@~0.4.24:
   version "0.4.24"
   resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
   integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
@@ -1862,7 +1916,7 @@
     once "^1.3.0"
     wrappy "1"
 
-inherits@2, inherits@2.0.4:
+inherits@2, inherits@2.0.4, inherits@~2.0.4:
   version "2.0.4"
   resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
   integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
@@ -1882,10 +1936,10 @@
     is-ip "^3.1.0"
     p-event "^4.2.0"
 
-ip-address@^10.0.1:
-  version "10.0.1"
-  resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-10.0.1.tgz#a8180b783ce7788777d796286d61bce4276818ed"
-  integrity sha512-NWv9YLW4PoW2B7xtzaS3NCot75m6nK7Icdv0o3lfMceJVRfSoQwqD4wEH5rLwoKJwUiZ/rfpiVBhnaF0FK4HoA==
+ip-address@^10.1.1:
+  version "10.7.4"
+  resolved "https://registry.yarnpkg.com/ip-address/-/ip-address-10.7.4.tgz#a5e493fabce725c5d4b8b8f4d2ebb9009fbcf2e8"
+  integrity sha512-DWBMKyeM25D70nrIiTkgQth59/G+naKOTep6huF9j+GmeK3DMD60Zvxg5d5qQnz+38AHgou6ean2LECX+lrKDg==
 
 ip-regex@^4.0.0:
   version "4.3.0"
@@ -1904,12 +1958,12 @@
   dependencies:
     binary-extensions "^2.0.0"
 
-is-core-module@^2.16.0:
-  version "2.16.1"
-  resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.16.1.tgz#2a98801a849f43e2add644fbb6bc6229b19a4ef4"
-  integrity sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==
+is-core-module@^2.17.0:
+  version "2.17.0"
+  resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.17.0.tgz#75c1c76236c9f7e38ddbfff292e127dc13b21027"
+  integrity sha512-J/vG0zBCbIKOQFfufSwyXdMrsohyJIUNkrnmo6WZGzoM7tr/lsbfW5b2BvisL6zsyMzK9UxV9L6c7AoFbyXHOA==
   dependencies:
-    hasown "^2.0.2"
+    hasown "^2.0.4"
 
 is-docker@^2.0.0, is-docker@^2.1.1:
   version "2.2.1"
@@ -1927,12 +1981,13 @@
   integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
 
 is-generator-function@^1.0.7:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.1.0.tgz#bf3eeda931201394f57b5dba2800f91a238309ca"
-  integrity sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==
+  version "1.1.2"
+  resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.1.2.tgz#ae3b61e3d5ea4e4839b90bad22b02335051a17d5"
+  integrity sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==
   dependencies:
-    call-bound "^1.0.3"
-    get-proto "^1.0.0"
+    call-bound "^1.0.4"
+    generator-function "^2.0.0"
+    get-proto "^1.0.1"
     has-tostringtag "^1.0.2"
     safe-regex-test "^1.1.0"
 
@@ -1993,9 +2048,9 @@
     is-docker "^2.0.0"
 
 isbinaryfile@^5.0.0:
-  version "5.0.5"
-  resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-5.0.5.tgz#5a29c56b97ef337394c3ec4cc304066042ae81e8"
-  integrity sha512-vh9MWXjhhblwrHlt/yutrubDuBD01kKFscyVndE2/VEeEU5aAizrzuWAsEaCjo997k+IluhN6C4jgxfS69SCIw==
+  version "5.0.7"
+  resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-5.0.7.tgz#19a73f2281b7368dca9d3b3ac8a0434074670979"
+  integrity sha512-gnWD14Jh3FzS3CPhF0AxNOJ8CxqeblPTADzI38r0wt8ZyQl5edpy75myt08EG2oKvpyiqSqsx+Wkz9vtkbTqYQ==
 
 isexe@^2.0.0:
   version "2.0.0"
@@ -2030,9 +2085,9 @@
   integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
 
 js-yaml@^4.1.0:
-  version "4.1.0"
-  resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602"
-  integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==
+  version "4.3.2"
+  resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.3.2.tgz#8e44fb14a2643c59726bb15787b5f1512cb3d3fb"
+  integrity sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==
   dependencies:
     argparse "^2.0.1"
 
@@ -2081,9 +2136,9 @@
     koa-send "^5.0.0"
 
 koa@^2.13.0:
-  version "2.16.2"
-  resolved "https://registry.yarnpkg.com/koa/-/koa-2.16.2.tgz#1292a3b415a9b9f3dd6872c1835229630a4ecae3"
-  integrity sha512-+CCssgnrWKx9aI3OeZwroa/ckG4JICxvIFnSiOUyl2Uv+UTI+xIw0FfFrWS7cQFpoePpr9o8csss7KzsTzNL8Q==
+  version "2.16.4"
+  resolved "https://registry.yarnpkg.com/koa/-/koa-2.16.4.tgz#303b996f5c3f2a3bb771c7db5e4303ee05f2265f"
+  integrity sha512-3An0GCLDSR34tsCO4H8Tef8Pp2ngtaZDAZnsWJYelqXUK5wyiHvGItgK/xcSkmHLSTn1Jcho1mRQs2ehRzvKKw==
   dependencies:
     accepts "^1.3.5"
     cache-content-type "^1.0.0"
@@ -2117,26 +2172,42 @@
     debug "^2.6.9"
     marky "^1.2.2"
 
-lit-element@^4.2.0:
-  version "4.2.1"
-  resolved "https://registry.yarnpkg.com/lit-element/-/lit-element-4.2.1.tgz#0a3782f36eaa545862fe07f84abcb14b2903a042"
-  integrity sha512-WGAWRGzirAgyphK2urmYOV72tlvnxw7YfyLDgQ+OZnM9vQQBQnumQ7jUJe6unEzwGU3ahFOjuz1iz1jjrpCPuw==
+lit-element@4.2.2, lit-element@^4.2.0:
+  version "4.2.2"
+  resolved "https://registry.yarnpkg.com/lit-element/-/lit-element-4.2.2.tgz#f74fcbfbea945eae5614ece22a674fa52ca3365b"
+  integrity sha512-aFKhNToWxoyhkNDmWZwEva2SlQia+jfG0fjIWV//YeTaWrVnOxD89dPKfigCUspXFmjzOEUQpOkejH5Ly6sG0w==
   dependencies:
-    "@lit-labs/ssr-dom-shim" "^1.4.0"
+    "@lit-labs/ssr-dom-shim" "^1.5.0"
     "@lit/reactive-element" "^2.1.0"
     lit-html "^3.3.0"
 
-"lit-html@^2.0.0 || ^3.0.0", lit-html@^3.3.0:
-  version "3.3.1"
-  resolved "https://registry.yarnpkg.com/lit-html/-/lit-html-3.3.1.tgz#f0a7e4b9ea0a1d034eb28a4bf2d1b0a0096253e3"
-  integrity sha512-S9hbyDu/vs1qNrithiNyeyv64c9yqiW9l+DBgI18fL+MTvOtWoFR0FWiyq1TxaYef5wNlpEmzlXoBlZEO+WjoA==
+lit-html@3.3.2:
+  version "3.3.2"
+  resolved "https://registry.yarnpkg.com/lit-html/-/lit-html-3.3.2.tgz#4db11fdbf98fc8a0c5eabd9b1e7d088d3bb201a2"
+  integrity sha512-Qy9hU88zcmaxBXcc10ZpdK7cOLXvXpRoBxERdtqV9QOrfpMZZ6pSYP91LhpPtap3sFMUiL7Tw2RImbe0Al2/kw==
   dependencies:
     "@types/trusted-types" "^2.0.2"
 
+"lit-html@^2.0.0 || ^3.0.0", lit-html@^3.3.0:
+  version "3.3.3"
+  resolved "https://registry.yarnpkg.com/lit-html/-/lit-html-3.3.3.tgz#a63fd02fb8c1c7b7057ee805ab6c612fdebef0b1"
+  integrity sha512-el8M6jK2o3RXBnrSHX3ZKrsN8zEV63pSExTO1wYJz7QndGYZ8353e2a5PPX+qHe2aGayfnchQmkAojaWAREOIA==
+  dependencies:
+    "@types/trusted-types" "^2.0.2"
+
+lit@3.3.2:
+  version "3.3.2"
+  resolved "https://registry.yarnpkg.com/lit/-/lit-3.3.2.tgz#d9230ebbf237bfd3d2091bc0b56c576a470ac4d7"
+  integrity sha512-NF9zbsP79l4ao2SNrH3NkfmFgN/hBYSQo90saIVI1o5GpjAdCPVstVzO1MrLOakHoEhYkrtRjPK6Ob521aoYWQ==
+  dependencies:
+    "@lit/reactive-element" "^2.1.0"
+    lit-element "^4.2.0"
+    lit-html "^3.3.0"
+
 "lit@^2.0.0 || ^3.0.0", lit@^3.0.0:
-  version "3.3.1"
-  resolved "https://registry.yarnpkg.com/lit/-/lit-3.3.1.tgz#9dc79be626bc9a3b824de98b107dd662cabdeda6"
-  integrity sha512-Ksr/8L3PTapbdXJCk+EJVB78jDodUMaP54gD24W186zGRARvwrsPfS60wae/SSCTCNZVPd1chXqio1qHQmu4NA==
+  version "3.3.3"
+  resolved "https://registry.yarnpkg.com/lit/-/lit-3.3.3.tgz#93579885e51a20a772c68482a34706fe1636e8f0"
+  integrity sha512-fycuvZg/hkpozL00lm1pEJH5nN/lr9ZXd6mJI2HSN4+Bzc+LDNdEApJ6HFbPkdFNHLvOplIIuJvxkS4XUxqirw==
   dependencies:
     "@lit/reactive-element" "^2.1.0"
     lit-element "^4.2.0"
@@ -2240,9 +2311,9 @@
   integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==
 
 minimatch@^5.0.1, minimatch@^5.1.6:
-  version "5.1.6"
-  resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96"
-  integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==
+  version "5.1.9"
+  resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.9.tgz#1293ef15db0098b394540e8f9f744f9fda8dee4b"
+  integrity sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==
   dependencies:
     brace-expansion "^2.0.1"
 
@@ -2298,9 +2369,9 @@
   integrity sha512-0n3mSAQLPpGLV9ORXT5+C/D4mwew7Ebws69Hx4E2sgz2ZA5+32Q80B9tL8PbL7XHnRDiAxH/pnrUJ9a4fkTNTA==
 
 nanoid@^3.1.25:
-  version "3.3.11"
-  resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.11.tgz#4f4f112cefbe303202f2199838128936266d185b"
-  integrity sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==
+  version "3.3.20"
+  resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.20.tgz#dfd4444d85aa10111ef66ba85ed72e08ba0855d8"
+  integrity sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==
 
 negotiator@0.6.3:
   version "0.6.3"
@@ -2308,9 +2379,9 @@
   integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==
 
 netmask@^2.0.2:
-  version "2.0.2"
-  resolved "https://registry.yarnpkg.com/netmask/-/netmask-2.0.2.tgz#8b01a07644065d536383835823bc52004ebac5e7"
-  integrity sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==
+  version "2.1.1"
+  resolved "https://registry.yarnpkg.com/netmask/-/netmask-2.1.1.tgz#80043d265b53aa521b3bd01e8fcdf353f9e1e81e"
+  integrity sha512-eonl3sLUha+S1GzTPxychyhnUzKyeQkZ7jLjKrBagJgPla13F+uQ71HgpFefyHgqrjEbCPkDArxYsjY8/+gLKA==
 
 normalize-path@^3.0.0, normalize-path@~3.0.0:
   version "3.0.0"
@@ -2324,15 +2395,15 @@
   dependencies:
     path-key "^3.0.0"
 
-object-inspect@^1.13.3:
+object-inspect@^1.13.3, object-inspect@^1.13.4:
   version "1.13.4"
   resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.4.tgz#8375265e21bc20d0fa582c22e1b13485d6e00213"
   integrity sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==
 
 on-finished@^2.3.0:
-  version "2.4.1"
-  resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f"
-  integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==
+  version "2.4.2"
+  resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.2.tgz#6932b04b95bf6a4828201db10af75fe5c9c38b73"
+  integrity sha512-ATWUv387i+nLD49EiDoOft5scf32Vsdz3ktrQJG9bi7jRFmaXTssvyvj1EmeKVVgvesbqUtvQQvaS2TpTukAZQ==
   dependencies:
     ee-first "1.1.1"
 
@@ -2465,14 +2536,14 @@
   integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==
 
 picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.3.1:
-  version "2.3.1"
-  resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
-  integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
+  version "2.3.2"
+  resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.2.tgz#5a942915e26b372dc0f0e6753149a16e6b1c5601"
+  integrity sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==
 
 picomatch@^4.0.2:
-  version "4.0.3"
-  resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.3.tgz#796c76136d1eead715db1e7bad785dedd695a042"
-  integrity sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==
+  version "4.0.7"
+  resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.7.tgz#6313360034ccb36b3dc61ecbdff78121f90fe21f"
+  integrity sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==
 
 pixelmatch@^5.2.1:
   version "5.3.0"
@@ -2481,19 +2552,24 @@
   dependencies:
     pngjs "^6.0.0"
 
-playwright-core@1.55.0:
-  version "1.55.0"
-  resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.55.0.tgz#ec8a9f8ef118afb3e86e0f46f1393e3bea32adf4"
-  integrity sha512-GvZs4vU3U5ro2nZpeiwyb0zuFaqb9sUiAJuyrWpcGouD8y9/HLgGbNRjIph7zU9D3hnPaisMl9zG9CgFi/biIg==
+pixelmatch@^7.1.0:
+  version "7.2.0"
+  resolved "https://registry.yarnpkg.com/pixelmatch/-/pixelmatch-7.2.0.tgz#59f4e6faca733f763756d175e2579ed71369fd72"
+  integrity sha512-xhcb4yHu9sM/G7foGzoLtXYcC0zHEaOXXjRKhGup0fw78Nf2Tkiapv4EQyMzrbcmQPsllAI7DbFY2UT7PlI9Pg==
+  dependencies:
+    pngjs "^7.0.0"
+
+playwright-core@1.64.1:
+  version "1.64.1"
+  resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.64.1.tgz#ca9ec82d7da6ced1b2326ec59ef097aaa9a29f94"
+  integrity sha512-BC4s8y6SEVA6Q1rSxZTto8hI1KUI3xXlHGZgvGqP4IqPdI/a6FX9H29IDNz7vKo9l21b6LfYosScPL6M3xxyDQ==
 
 playwright@^1.53.0:
-  version "1.55.0"
-  resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.55.0.tgz#7aca7ac3ffd9e083a8ad8b2514d6f9ba401cc78b"
-  integrity sha512-sdCWStblvV1YU909Xqx0DhOjPZE4/5lJsIS84IfN9dAZfcl/CIZ5O8l3o0j7hPMjDvqoTF8ZUcc+i/GL5erstA==
+  version "1.64.1"
+  resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.64.1.tgz#c174f48e17f5f3fba71726a9bcdeb8534d5c665d"
+  integrity sha512-HCrVhHr5QQuwYoswEUGTb7gGp522yflbv/ST8nF4sFWGuLjQCt17Q/EubpGGSNKYn1tsTCPZxqHhHCfVURu7UA==
   dependencies:
-    playwright-core "1.55.0"
-  optionalDependencies:
-    fsevents "2.3.2"
+    playwright-core "1.64.1"
 
 pngjs@^6.0.0:
   version "6.0.0"
@@ -2506,9 +2582,9 @@
   integrity sha512-LKWqWJRhstyYo9pGvgor/ivk2w94eSjE3RGVuzLGlr3NmD8bf7RcYGze1mNdEHRP6TRP6rMuDHk5t44hnTRyow==
 
 portfinder@^1.0.32:
-  version "1.0.37"
-  resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.37.tgz#92b754ef89a11801c8efe4b0e5cd845b0064c212"
-  integrity sha512-yuGIEjDAYnnOex9ddMnKZEMFE0CcGo6zbfzDklkmT1m5z734ss6JMzN9rNB3+RR7iS+F10D4/BVIaXOyh8PQKw==
+  version "1.0.38"
+  resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.38.tgz#e4fb3a2d888b20d2977da050e48ab5e1f57a185e"
+  integrity sha512-rEwq/ZHlJIKw++XtLAO8PPuOQA/zaPJOZJ37BVuN97nLpMJeuDVLVGRwbFoBgLudgdTMP2hdRJP++H+8QOA3vg==
   dependencies:
     async "^3.2.6"
     debug "^4.3.6"
@@ -2538,9 +2614,9 @@
   integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==
 
 pump@^3.0.0:
-  version "3.0.3"
-  resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.3.tgz#151d979f1a29668dc0025ec589a455b53282268d"
-  integrity sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==
+  version "3.0.4"
+  resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.4.tgz#1f313430527fa8b905622ebd22fe1444e757ab3c"
+  integrity sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==
   dependencies:
     end-of-stream "^1.1.0"
     once "^1.3.1"
@@ -2551,23 +2627,25 @@
   integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==
 
 puppeteer-core@^24.0.0:
-  version "24.17.0"
-  resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-24.17.0.tgz#66eaa3532d06c22fbbdc36e09f416cb69b8c8637"
-  integrity sha512-RYOBKFiF+3RdwIZTEacqNpD567gaFcBAOKTT7742FdB1icXudrPI7BlZbYTYWK2wgGQUXt9Zi1Yn+D5PmCs4CA==
+  version "24.43.1"
+  resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-24.43.1.tgz#c10a5d398b69911c324e04c85ee2b236b9ec940e"
+  integrity sha512-T5ScUMAsmhdNbgDR41AGESYeS6V9MSgetkSnVhhW+gXvzC42VesKCn5ld87gAZDJ6vLHL9GkRvY9WtQWSnwFbw==
   dependencies:
-    "@puppeteer/browsers" "2.10.7"
-    chromium-bidi "8.0.0"
-    debug "^4.4.1"
-    devtools-protocol "0.0.1475386"
-    typed-query-selector "^2.12.0"
-    ws "^8.18.3"
+    "@puppeteer/browsers" "2.13.2"
+    chromium-bidi "14.0.0"
+    debug "^4.4.3"
+    devtools-protocol "0.0.1608973"
+    typed-query-selector "^2.12.2"
+    webdriver-bidi-protocol "0.4.1"
+    ws "^8.20.0"
 
 qs@^6.5.2:
-  version "6.14.0"
-  resolved "https://registry.yarnpkg.com/qs/-/qs-6.14.0.tgz#c63fa40680d2c5c941412a0e899c89af60c0a930"
-  integrity sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==
+  version "6.16.1"
+  resolved "https://registry.yarnpkg.com/qs/-/qs-6.16.1.tgz#0643e17993e551759c85078e1f0bc4b9fe908020"
+  integrity sha512-5Px6J7rfHBAGUhNQ3es4YzcOdBBw0SDcVtThJml4RdnKw4tKs2epA0kPZ+K8X+WiHktT93RHVcQ/3ym5aTCgtg==
   dependencies:
-    side-channel "^1.1.0"
+    es-define-property "^1.0.1"
+    side-channel "^1.1.1"
 
 queue-microtask@^1.2.2:
   version "1.2.3"
@@ -2582,14 +2660,14 @@
     safe-buffer "^5.1.0"
 
 raw-body@^2.3.3:
-  version "2.5.2"
-  resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.2.tgz#99febd83b90e08975087e8f1f9419a149366b68a"
-  integrity sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==
+  version "2.5.3"
+  resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.5.3.tgz#11c6650ee770a7de1b494f197927de0c923822e2"
+  integrity sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==
   dependencies:
-    bytes "3.1.2"
-    http-errors "2.0.0"
-    iconv-lite "0.4.24"
-    unpipe "1.0.0"
+    bytes "~3.1.2"
+    http-errors "~2.0.1"
+    iconv-lite "~0.4.24"
+    unpipe "~1.0.0"
 
 readdirp@^4.0.1:
   version "4.1.2"
@@ -2617,11 +2695,12 @@
     path-is-absolute "1.0.1"
 
 resolve@^1.22.1:
-  version "1.22.10"
-  resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.10.tgz#b663e83ffb09bbf2386944736baae803029b8b39"
-  integrity sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==
+  version "1.22.13"
+  resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.13.tgz#d542f97758d768f36091251a6b07540b4343f7b5"
+  integrity sha512-Dj/cW9zBV2aRj6XzCxuGIs3ESZKv02jixne3q6jFZYZ3/Tg09gHHviSMDL4kObh9pqSahdRHEnDoaP2gn8YLhA==
   dependencies:
-    is-core-module "^2.16.0"
+    es-errors "^1.3.0"
+    is-core-module "^2.17.0"
     path-parse "^1.0.7"
     supports-preserve-symlinks-flag "^1.0.0"
 
@@ -2639,32 +2718,38 @@
   integrity sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==
 
 rollup@^4.4.0:
-  version "4.49.0"
-  resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.49.0.tgz#9751ad9d06a47a4496c3c5c238b27b1422c8b0eb"
-  integrity sha512-3IVq0cGJ6H7fKXXEdVt+RcYvRCt8beYY9K1760wGQwSAHZcS9eot1zDG5axUbcp/kWRi5zKIIDX8MoKv/TzvZA==
+  version "4.65.0"
+  resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.65.0.tgz#411a4455c4d3d4a5f394706855595533e5ae1be8"
+  integrity sha512-QVCvQUTGDN6JRwi3jVGCY3H4aTHvi9rX0LyoBMkGUvdh/Z6O51CzcLz85BWZaTCDGhl6ySGqYZs+xI1jmPqGcw==
   dependencies:
-    "@types/estree" "1.0.8"
+    "@types/estree" "1.0.9"
   optionalDependencies:
-    "@rollup/rollup-android-arm-eabi" "4.49.0"
-    "@rollup/rollup-android-arm64" "4.49.0"
-    "@rollup/rollup-darwin-arm64" "4.49.0"
-    "@rollup/rollup-darwin-x64" "4.49.0"
-    "@rollup/rollup-freebsd-arm64" "4.49.0"
-    "@rollup/rollup-freebsd-x64" "4.49.0"
-    "@rollup/rollup-linux-arm-gnueabihf" "4.49.0"
-    "@rollup/rollup-linux-arm-musleabihf" "4.49.0"
-    "@rollup/rollup-linux-arm64-gnu" "4.49.0"
-    "@rollup/rollup-linux-arm64-musl" "4.49.0"
-    "@rollup/rollup-linux-loongarch64-gnu" "4.49.0"
-    "@rollup/rollup-linux-ppc64-gnu" "4.49.0"
-    "@rollup/rollup-linux-riscv64-gnu" "4.49.0"
-    "@rollup/rollup-linux-riscv64-musl" "4.49.0"
-    "@rollup/rollup-linux-s390x-gnu" "4.49.0"
-    "@rollup/rollup-linux-x64-gnu" "4.49.0"
-    "@rollup/rollup-linux-x64-musl" "4.49.0"
-    "@rollup/rollup-win32-arm64-msvc" "4.49.0"
-    "@rollup/rollup-win32-ia32-msvc" "4.49.0"
-    "@rollup/rollup-win32-x64-msvc" "4.49.0"
+    "@napi-rs/lzma-linux-x64-gnu" "1.5.1"
+    "@rollup/rollup-android-arm-eabi" "4.65.0"
+    "@rollup/rollup-android-arm64" "4.65.0"
+    "@rollup/rollup-darwin-arm64" "4.65.0"
+    "@rollup/rollup-darwin-x64" "4.65.0"
+    "@rollup/rollup-freebsd-arm64" "4.65.0"
+    "@rollup/rollup-freebsd-x64" "4.65.0"
+    "@rollup/rollup-linux-arm-gnueabihf" "4.65.0"
+    "@rollup/rollup-linux-arm-musleabihf" "4.65.0"
+    "@rollup/rollup-linux-arm64-gnu" "4.65.0"
+    "@rollup/rollup-linux-arm64-musl" "4.65.0"
+    "@rollup/rollup-linux-loong64-gnu" "4.65.0"
+    "@rollup/rollup-linux-loong64-musl" "4.65.0"
+    "@rollup/rollup-linux-ppc64-gnu" "4.65.0"
+    "@rollup/rollup-linux-ppc64-musl" "4.65.0"
+    "@rollup/rollup-linux-riscv64-gnu" "4.65.0"
+    "@rollup/rollup-linux-riscv64-musl" "4.65.0"
+    "@rollup/rollup-linux-s390x-gnu" "4.65.0"
+    "@rollup/rollup-linux-x64-gnu" "4.65.0"
+    "@rollup/rollup-linux-x64-musl" "4.65.0"
+    "@rollup/rollup-openbsd-x64" "4.65.0"
+    "@rollup/rollup-openharmony-arm64" "4.65.0"
+    "@rollup/rollup-win32-arm64-msvc" "4.65.0"
+    "@rollup/rollup-win32-ia32-msvc" "4.65.0"
+    "@rollup/rollup-win32-x64-gnu" "4.65.0"
+    "@rollup/rollup-win32-x64-msvc" "4.65.0"
     fsevents "~2.3.2"
 
 run-parallel@^1.1.9:
@@ -2693,10 +2778,10 @@
   resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
   integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
 
-semver@^7.5.3, semver@^7.7.2:
-  version "7.7.2"
-  resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.2.tgz#67d99fdcd35cec21e6f8b87a7fd515a33f982b58"
-  integrity sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==
+semver@^7.5.3, semver@^7.7.4:
+  version "7.8.5"
+  resolved "https://registry.yarnpkg.com/semver/-/semver-7.8.5.tgz#39b646037dd50c14fb451e7e4cac58ed8b863f69"
+  integrity sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==
 
 serialize-javascript@^6.0.2:
   version "6.0.2"
@@ -2710,7 +2795,7 @@
   resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656"
   integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==
 
-setprototypeof@1.2.0:
+setprototypeof@1.2.0, setprototypeof@~1.2.0:
   version "1.2.0"
   resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424"
   integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==
@@ -2727,13 +2812,13 @@
   resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
   integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
 
-side-channel-list@^1.0.0:
-  version "1.0.0"
-  resolved "https://registry.yarnpkg.com/side-channel-list/-/side-channel-list-1.0.0.tgz#10cb5984263115d3b7a0e336591e290a830af8ad"
-  integrity sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==
+side-channel-list@^1.0.1:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/side-channel-list/-/side-channel-list-1.0.1.tgz#c2e0b5a14a540aebee3bbc6c3f8666cc9b509127"
+  integrity sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==
   dependencies:
     es-errors "^1.3.0"
-    object-inspect "^1.13.3"
+    object-inspect "^1.13.4"
 
 side-channel-map@^1.0.1:
   version "1.0.1"
@@ -2756,14 +2841,14 @@
     object-inspect "^1.13.3"
     side-channel-map "^1.0.1"
 
-side-channel@^1.1.0:
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.1.0.tgz#c3fcff9c4da932784873335ec9765fa94ff66bc9"
-  integrity sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==
+side-channel@^1.1.1:
+  version "1.1.1"
+  resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.1.1.tgz#ea02c62e05dc4bea67d4442f0fb71ee192f8e0ab"
+  integrity sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==
   dependencies:
     es-errors "^1.3.0"
-    object-inspect "^1.13.3"
-    side-channel-list "^1.0.0"
+    object-inspect "^1.13.4"
+    side-channel-list "^1.0.1"
     side-channel-map "^1.0.1"
     side-channel-weakmap "^1.0.2"
 
@@ -2812,11 +2897,11 @@
     socks "^2.8.3"
 
 socks@^2.8.3:
-  version "2.8.7"
-  resolved "https://registry.yarnpkg.com/socks/-/socks-2.8.7.tgz#e2fb1d9a603add75050a2067db8c381a0b5669ea"
-  integrity sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A==
+  version "2.8.10"
+  resolved "https://registry.yarnpkg.com/socks/-/socks-2.8.10.tgz#23aab4dccc1fdae110aaf4fa51cd190552432dc5"
+  integrity sha512-e0VyvkVTwVYViNovRkZ9aodhxVlyoMn7eJhVUPxZ+eK9P/7CBkxvvsBOHqFPEH416726W8tLXXXjKwqgTErrCQ==
   dependencies:
-    ip-address "^10.0.1"
+    ip-address "^10.1.1"
     smart-buffer "^4.2.0"
 
 source-map-support@^0.5.21:
@@ -2837,25 +2922,24 @@
   resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.6.tgz#a3658ab87e5b6429c8a1f3ba0083d4c61ca3ef02"
   integrity sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==
 
-statuses@2.0.1:
-  version "2.0.1"
-  resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63"
-  integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==
-
 "statuses@>= 1.4.0 < 2", "statuses@>= 1.5.0 < 2", statuses@^1.5.0:
   version "1.5.0"
   resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
   integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==
 
-streamx@^2.15.0, streamx@^2.21.0:
-  version "2.22.1"
-  resolved "https://registry.yarnpkg.com/streamx/-/streamx-2.22.1.tgz#c97cbb0ce18da4f4db5a971dc9ab68ff5dc7f5a5"
-  integrity sha512-znKXEBxfatz2GBNK02kRnCXjV+AA4kjZIUxeWSr3UGirZMJfTE9uiwKHobnbgxWyL/JWro8tTq+vOqAK1/qbSA==
+statuses@~2.0.2:
+  version "2.0.2"
+  resolved "https://registry.yarnpkg.com/statuses/-/statuses-2.0.2.tgz#8f75eecef765b5e1cfcdc080da59409ed424e382"
+  integrity sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==
+
+streamx@^2.12.5, streamx@^2.25.0, streamx@^2.28.1:
+  version "2.28.1"
+  resolved "https://registry.yarnpkg.com/streamx/-/streamx-2.28.1.tgz#376cd42a089505a69bec0efdb5189aa45586141f"
+  integrity sha512-zEzXb0s5Cds7tqMH6rhZ05lcJydCWiQPEwiNngVqzsxCc962vLY4Uw+mW7od8kDH258k2Uz/JrOkdIAAhSh9VA==
   dependencies:
+    events-universal "^1.0.0"
     fast-fifo "^1.3.2"
     text-decoder "^1.1.0"
-  optionalDependencies:
-    bare-events "^2.2.0"
 
 string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
   version "4.2.3"
@@ -2902,7 +2986,7 @@
   resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09"
   integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==
 
-table-layout@^4.1.0:
+table-layout@^4.1.1:
   version "4.1.1"
   resolved "https://registry.yarnpkg.com/table-layout/-/table-layout-4.1.1.tgz#0f72965de1a5c0c1419c9ba21cae4e73a2f73a42"
   integrity sha512-iK5/YhZxq5GO5z8wb0bY1317uDF3Zjpha0QFFLA8/trAoiLbQD0HUbMesEaxyzUgDxi2QlcbM8IvqOlEjgoXBA==
@@ -2910,10 +2994,10 @@
     array-back "^6.2.2"
     wordwrapjs "^5.1.0"
 
-tar-fs@^3.1.0:
-  version "3.1.0"
-  resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-3.1.0.tgz#4675e2254d81410e609d91581a762608de999d25"
-  integrity sha512-5Mty5y/sOF1YWj1J6GiBodjlDc05CUR8PKXrsnFAiSG0xA+GHeWLovaZPYUDXkH/1iKRf2+M5+OrRgzC7O9b7w==
+tar-fs@^3.1.1:
+  version "3.1.3"
+  resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-3.1.3.tgz#05668cc68a30741c3813f9c16593b8dec7dcbcd1"
+  integrity sha512-/hU4AXnIdZu+Gvl1pk0oI5f5HxWsCJRtY2aFaJdk9VvyL48DWU6iU5WAIPG+wIi1YvWA6eTJvIviP/tMAZZNwQ==
   dependencies:
     pump "^3.0.0"
     tar-stream "^3.1.5"
@@ -2922,18 +3006,26 @@
     bare-path "^3.0.0"
 
 tar-stream@^3.1.5:
-  version "3.1.7"
-  resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-3.1.7.tgz#24b3fb5eabada19fe7338ed6d26e5f7c482e792b"
-  integrity sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==
+  version "3.2.2"
+  resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-3.2.2.tgz#aec7f257e712192a177a93aa0450c2e76855c8be"
+  integrity sha512-+8NeqHRjQWH9nYlwo2gamAMImZCVzI4UoEgDpWorBt9OEfppiZn+uSkskzQKPWIZyji/C8fpWO7u69G0DX0tbg==
   dependencies:
-    b4a "^1.6.4"
-    fast-fifo "^1.2.0"
-    streamx "^2.15.0"
+    b4a "^1.9.0"
+    bare-fs "^4.8.2"
+    fast-fifo "^1.3.2"
+    streamx "^2.28.1"
+
+teex@^1.0.1:
+  version "1.0.1"
+  resolved "https://registry.yarnpkg.com/teex/-/teex-1.0.1.tgz#b8fa7245ef8e8effa8078281946c85ab780a0b12"
+  integrity sha512-eYE6iEI62Ni1H8oIa7KlDU6uQBtqr4Eajni3wX7rpfXD8ysFx8z0+dri+KWEPWpBsxXfxu58x/0jvTVT1ekOSg==
+  dependencies:
+    streamx "^2.12.5"
 
 text-decoder@^1.1.0:
-  version "1.2.3"
-  resolved "https://registry.yarnpkg.com/text-decoder/-/text-decoder-1.2.3.tgz#b19da364d981b2326d5f43099c310cc80d770c65"
-  integrity sha512-3/o9z3X0X0fTupwsYvR03pJ/DjWuqqrfwBgTQzdWDiQSm9KitAyz/9WqsT2JQW7KV2m+bC2ol/zqpW37NHxLaA==
+  version "1.2.7"
+  resolved "https://registry.yarnpkg.com/text-decoder/-/text-decoder-1.2.7.tgz#5d073a9a74b9c0a9d28dfadcab96b604af57d8ba"
+  integrity sha512-vlLytXkeP4xvEq2otHeJfSQIRyWxo/oZGEbXrtEEF9Hnmrdly59sUbzZ/QgyWuLYHctCHxFF4tRQZNQ9k60ExQ==
   dependencies:
     b4a "^1.6.4"
 
@@ -2944,7 +3036,7 @@
   dependencies:
     is-number "^7.0.0"
 
-toidentifier@1.0.1:
+toidentifier@1.0.1, toidentifier@~1.0.1:
   version "1.0.1"
   resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35"
   integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==
@@ -2989,17 +3081,17 @@
     media-typer "0.3.0"
     mime-types "~2.1.24"
 
-typed-query-selector@^2.12.0:
-  version "2.12.0"
-  resolved "https://registry.yarnpkg.com/typed-query-selector/-/typed-query-selector-2.12.0.tgz#92b65dbc0a42655fccf4aeb1a08b1dddce8af5f2"
-  integrity sha512-SbklCd1F0EiZOyPiW192rrHZzZ5sBijB6xM+cpmrwDqObvdtunOHHIk9fCGsoK5JVIYXoyEp4iEdE3upFH3PAg==
+typed-query-selector@^2.12.2:
+  version "2.12.3"
+  resolved "https://registry.yarnpkg.com/typed-query-selector/-/typed-query-selector-2.12.3.tgz#d7542a829b15bd6246a5c0c03daca41b21e40025"
+  integrity sha512-/dtuMZyutHLlrxWhhC1uib00ELUr2dZ8C9B8YzZYsJmeE3V56OxRblrSM2UaF142pcMtak7ehZ6+poWGeehNIg==
 
 typical@^4.0.0:
   version "4.0.0"
   resolved "https://registry.yarnpkg.com/typical/-/typical-4.0.0.tgz#cbeaff3b9d7ae1e2bbfaf5a4e6f11eccfde94fc4"
   integrity sha512-VAH4IvQ7BDFYglMd7BPRDfLgxZZX4O4TFcRDA6EN5X7erNJJq+McIEp8np9aVtxrCJ6qx4GTYVfOWNjcqwZgRw==
 
-typical@^7.1.1:
+typical@^7.3.0:
   version "7.3.0"
   resolved "https://registry.yarnpkg.com/typical/-/typical-7.3.0.tgz#930376be344228709f134613911fa22aa09617a4"
   integrity sha512-ya4mg/30vm+DOWfBg4YK3j2WD6TWtRkCbasOJr40CseYENzCUby/7rIvXA99JGsQHeNxLbnXdyLLxKSv3tauFw==
@@ -3009,12 +3101,12 @@
   resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-1.0.41.tgz#bd04dc9ec830fcf9e4fad35cf22dcedd2e3b4e9c"
   integrity sha512-LbBDqdIC5s8iROCUjMbW1f5dJQTEFB1+KO9ogbvlb3nm9n4YHa5p4KTvFPWvh2Hs8gZMBuiB1/8+pdfe/tDPug==
 
-undici-types@~7.10.0:
-  version "7.10.0"
-  resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-7.10.0.tgz#4ac2e058ce56b462b056e629cc6a02393d3ff350"
-  integrity sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==
+undici-types@~8.9.0:
+  version "8.9.0"
+  resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-8.9.0.tgz#e240d97c8b5d85e5347ce73d25865c7906c1ec9f"
+  integrity sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==
 
-unpipe@1.0.0:
+unpipe@~1.0.0:
   version "1.0.0"
   resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
   integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==
@@ -3033,6 +3125,11 @@
   resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
   integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==
 
+webdriver-bidi-protocol@0.4.1:
+  version "0.4.1"
+  resolved "https://registry.yarnpkg.com/webdriver-bidi-protocol/-/webdriver-bidi-protocol-0.4.1.tgz#d411e7b8e158408d83bb166b0b4f1054fa3f077e"
+  integrity sha512-ARrjNjtWRRs2w4Tk7nqrf2gBI0QXWuOmMCx2hU+1jUt6d00MjMxURrhxhGbrsoiZKJrhTSTzbIrc554iKI10qw==
+
 webidl-conversions@^7.0.0:
   version "7.0.0"
   resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz#256b4e1882be7debbf01d05f0aa2039778ea080a"
@@ -3054,9 +3151,9 @@
     isexe "^2.0.0"
 
 wordwrapjs@^5.1.0:
-  version "5.1.0"
-  resolved "https://registry.yarnpkg.com/wordwrapjs/-/wordwrapjs-5.1.0.tgz#4c4d20446dcc670b14fa115ef4f8fd9947af2b3a"
-  integrity sha512-JNjcULU2e4KJwUNv6CHgI46UvDGitb6dGryHajXTDiLgg1/RiGoPSDw4kZfYnwGtEXf2ZMeIewDQgFGzkCB2Sg==
+  version "5.1.1"
+  resolved "https://registry.yarnpkg.com/wordwrapjs/-/wordwrapjs-5.1.1.tgz#bfd1eb426f0f7eec73b7df32cf7df1f618bfb3a9"
+  integrity sha512-0yweIbkINJodk27gX9LBGMzyQdBDan3s/dEAiwBOj+Mf0PPyWL6/rikalkv8EeD0E8jm4o5RXEOrFTP3NXbhJg==
 
 workerpool@^6.5.1:
   version "6.5.1"
@@ -3087,14 +3184,14 @@
   integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==
 
 ws@^7.5.10:
-  version "7.5.10"
-  resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9"
-  integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==
+  version "7.5.13"
+  resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.13.tgz#12aa507eaca76c295c278b1aebf4698ab2c1845f"
+  integrity sha512-rsKI6xDBFVf4r/x8XyChGK04QR/XHroxs/jUcoWvtEZM8TPU/X/uIY9B1CsSzYws9ZJb/6bbBu7dPhFW00CAoA==
 
-ws@^8.18.3:
-  version "8.18.3"
-  resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.3.tgz#b56b88abffde62791c639170400c93dcb0c95472"
-  integrity sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==
+ws@^8.20.0:
+  version "8.22.0"
+  resolved "https://registry.yarnpkg.com/ws/-/ws-8.22.0.tgz#40f16e1d7588ac0575041be5c49b8eb261c28e73"
+  integrity sha512-Ydggc987+RO0AnWtZ/7Wq9FtNvcrL1b/RO0ud9mWjUPgDrsAAwQSF51sm2hm1XofbU/4jkpGEsLFsZZxU+1DOg==
 
 y18n@^5.0.5:
   version "5.0.8"
@@ -3122,9 +3219,9 @@
     is-plain-obj "^2.1.0"
 
 yargs@^16.2.0:
-  version "16.2.0"
-  resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66"
-  integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==
+  version "16.2.2"
+  resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.2.tgz#c56731dca0d2788ae0866dd3c83907d6bab85f7d"
+  integrity sha512-Nt9ZJjXTv5R8MHbqby/wXQ6Gi0Bb3TcYZkR1bzuL4yB2OxWPkXknz513gEF0GoA6tn00UpbPvERW8rzCuWCA6w==
   dependencies:
     cliui "^7.0.2"
     escalade "^3.1.1"
@@ -3135,9 +3232,9 @@
     yargs-parser "^20.2.2"
 
 yargs@^17.7.2:
-  version "17.7.2"
-  resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269"
-  integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==
+  version "17.7.3"
+  resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.3.tgz#779dffe6bcafec596a7172e983289a588647faaa"
+  integrity sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==
   dependencies:
     cliui "^8.0.1"
     escalade "^3.1.1"
diff --git a/proto/entities.proto b/proto/entities.proto
index 9790cb0..419b199 100644
--- a/proto/entities.proto
+++ b/proto/entities.proto
@@ -276,7 +276,7 @@
 }
 
 // Serialized form of com.google.gerrit.entities.PatchSetApproval.
-// Next ID: 11
+// Next ID: 12
 message PatchSetApproval {
   required PatchSetApproval_Key key = 1;
   optional int32 value = 2;
@@ -286,6 +286,7 @@
   optional bool post_submit = 8;
   optional bool copied = 9;
   optional string uuid = 10;
+  optional bool is_ai = 11;
 
   // Deleted fields, should not be reused:
   reserved 4;  // changeOpen
diff --git a/resources/com/google/gerrit/httpd/auth/ldap/LoginForm.html b/resources/com/google/gerrit/httpd/auth/ldap/LoginForm.html
index f1d392b..b9f5a6a 100644
--- a/resources/com/google/gerrit/httpd/auth/ldap/LoginForm.html
+++ b/resources/com/google/gerrit/httpd/auth/ldap/LoginForm.html
@@ -1,6 +1,6 @@
 <html>
   <head>
-    <meta name="viewport" content="width=device-width, initial-scale=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1" />
     <title>Gerrit Code Review - Sign In</title>
     <style type="text/css">
       html {
diff --git a/resources/com/google/gerrit/httpd/raw/PolyGerritIndexHtml.soy b/resources/com/google/gerrit/httpd/raw/PolyGerritIndexHtml.soy
index 06f07b5..84acd9c 100644
--- a/resources/com/google/gerrit/httpd/raw/PolyGerritIndexHtml.soy
+++ b/resources/com/google/gerrit/httpd/raw/PolyGerritIndexHtml.soy
@@ -76,6 +76,72 @@
       // '/accounts/self/detail' => { 'username' : 'gerrit-user' }
       window.INITIAL_DATA = JSON.parse({$gerritInitialData});
     {/if}
+    (function() {lb}
+      const basePath = window.CANONICAL_PATH || '';
+      const prefs =
+        window.INITIAL_DATA &&
+        (window.INITIAL_DATA[basePath + '/accounts/self/preferences'] ||
+          window.INITIAL_DATA['/accounts/self/preferences']);
+      const theme = (prefs && prefs.theme) || 'AUTO';
+      const isDark =
+        theme === 'DARK' ||
+        (theme === 'AUTO' &&
+          window.matchMedia &&
+          window.matchMedia('(prefers-color-scheme: dark)').matches);
+      const currentThemeClass = isDark ? 'darkTheme' : 'lightTheme';
+      document.documentElement.classList.add(currentThemeClass);
+      window.setTimeout(function() {lb}
+        if (document.body) document.body.removeAttribute('unresolved');
+      {rb}, 2000);
+      const info =
+        window.INITIAL_DATA &&
+        (window.INITIAL_DATA[basePath + '/config/server/info'] ||
+          window.INITIAL_DATA['/config/server/info']);
+      if (!info) return;
+      const nonce = document.currentScript && document.currentScript.nonce;
+      const assetsPath = window.ASSETS_PATH || '';
+      function toPreloadUrl(p) {lb}
+        if (/^https?:/.test(p)) {lb}
+          return assetsPath && p.indexOf(window.location.host) !== -1
+            ? p.replace(window.location.origin, assetsPath)
+            : p;
+        {rb}
+        const rel = p.startsWith('/') ? p : '/' + p;
+        return (assetsPath || basePath) + rel;
+      {rb}
+      const urls = [];
+      if (info.default_theme) {lb}
+        if (info.default_theme.endsWith('/static/gerrit-theme.js')) {lb}
+          if (assetsPath && info.gerrit && info.gerrit.instance_id) {lb}
+            urls.push(assetsPath + '/hosts/' + info.gerrit.instance_id + '/static/gerrit-theme.js');
+          {rb} else {lb}
+            urls.push(basePath + '/static/gerrit-theme.js');
+          {rb}
+        {rb} else {lb}
+          urls.push(toPreloadUrl(info.default_theme));
+        {rb}
+      {rb} else if (
+        info.plugin &&
+        Array.isArray(info.plugin.js_resource_paths) &&
+        info.plugin.js_resource_paths.length <= 10
+      ) {lb}
+        for (let i = 0; i < info.plugin.js_resource_paths.length; i++) {lb}
+          const p = info.plugin.js_resource_paths[i];
+          if (typeof p === 'string' && p.split('?')[0].endsWith('.js')) {lb}
+            urls.push(toPreloadUrl(p));
+          {rb}
+        {rb}
+      {rb}
+      for (let i = 0; i < urls.length; i++) {lb}
+        const link = document.createElement('link');
+        link.rel = 'preload';
+        link.as = 'script';
+        link.crossOrigin = 'anonymous';
+        if (nonce) link.nonce = nonce;
+        link.href = urls[i];
+        document.head.appendChild(link);
+      {rb}
+    {rb})();
     {if $enabledExperiments}
       // ENABLED_EXPERIMENTS is a list of string that contains all enabled experiments
       // for the given user.
diff --git a/tools/BUILD b/tools/BUILD
index 6683bbe..3f33740 100644
--- a/tools/BUILD
+++ b/tools/BUILD
@@ -82,7 +82,7 @@
         "-Xep:BadImport:ERROR",
         "-Xep:BadInstanceof:ERROR",
         "-Xep:BadShiftAmount:ERROR",
-        "-Xep:BanJNDI:WARN",
+        "-Xep:BanJNDI:ERROR",
         "-Xep:BanSerializableRead:ERROR",
         "-Xep:BigDecimalEquals:ERROR",
         "-Xep:BigDecimalLiteralDouble:ERROR",
diff --git a/tools/bzl/js.bzl b/tools/bzl/js.bzl
index bb5a34a..97c6d7e 100644
--- a/tools/bzl/js.bzl
+++ b/tools/bzl/js.bzl
@@ -35,8 +35,8 @@
         size = "enormous",
         srcs = srcs,
         args = [
-            "$(location //polygerrit-ui:web_test_runner_bin)",
-            "$(location //polygerrit-ui:web-test-runner.config.mjs)",
+            "$(rootpath //polygerrit-ui:web_test_runner_bin)",
+            "$(rootpath //polygerrit-ui:web-test-runner.config.mjs)",
         ] + args,
         data = data + [
             "//polygerrit-ui:resultdb-reporter.mjs",
diff --git a/tools/bzl/license.bzl b/tools/bzl/license.bzl
index c8d0130..dc268c6 100644
--- a/tools/bzl/license.bzl
+++ b/tools/bzl/license.bzl
@@ -80,6 +80,6 @@
     sh_test(
         name = name,
         srcs = ["//tools/bzl:test_license.sh"],
-        args = ["$(location :%s)" % txt],
+        args = ["$(rootpath :%s)" % txt],
         data = [txt],
     )
diff --git a/tools/bzl/war_checks.bzl b/tools/bzl/war_checks.bzl
index 59acd24..9d5e721 100644
--- a/tools/bzl/war_checks.bzl
+++ b/tools/bzl/war_checks.bzl
@@ -15,8 +15,8 @@
         name = name,
         srcs = ["//tools/bzl:diff_allowlist.sh"],
         args = [
-            "$(location %s)" % allowlist,
-            "$(location %s)" % war_jars_manifest,
+            "$(rootpath %s)" % allowlist,
+            "$(rootpath %s)" % war_jars_manifest,
         ],
         data = [
             allowlist,
diff --git a/tools/deps.toml b/tools/deps.toml
index 9ccf6da..74c15b0 100644
--- a/tools/deps.toml
+++ b/tools/deps.toml
@@ -1,16 +1,16 @@
 [versions]
 antlr = "3.5.2"
 autoValueGson = "1.3.1"
-bouncyCastle = "1.85"
-byteBuddy = "1.18.12"
+bouncyCastle = "1.86"
+byteBuddy = "1.18.14"
 caffeine = "2.9.2"
 commonmark = "0.24.0"
 greenmail = "1.5.5"
 httpcomp = "4.5.14"
-jetty = "12.1.12"
+jetty = "12.1.13"
 mail = "1.6.0"
-mime4j = "0.8.1"
-ow2 = "9.9.1"
+mime4j = "0.8.10"
+ow2 = "9.10.1"
 prolog = "1.4.4"
 roaringBitmap = "0.9.44"
 
@@ -22,8 +22,8 @@
 aopalliance = { module = "aopalliance:aopalliance", version = "1.0" }
 apache-mime4j-core = { module = "org.apache.james:apache-mime4j-core", version.ref = "mime4j" }
 apache-mime4j-dom = { module = "org.apache.james:apache-mime4j-dom", version.ref = "mime4j" }
-args4j = { module = "args4j:args4j", version = "2.33" }
-asciidoctorj = { module = "org.asciidoctor:asciidoctorj", version = "1.5.8.1" }
+args4j = { module = "args4j:args4j", version = "2.37" }
+asciidoctorj = { module = "org.asciidoctor:asciidoctorj", version = "3.0.1" }
 asm = { module = "org.ow2.asm:asm", version.ref = "ow2" }
 asm-analysis = { module = "org.ow2.asm:asm-analysis", version.ref = "ow2" }
 asm-commons = { module = "org.ow2.asm:asm-commons", version.ref = "ow2" }
@@ -37,7 +37,7 @@
 autotransient = { module = "io.sweers.autotransient:autotransient", version = "1.0.0" }
 bcpg-jdk18on = { module = "org.bouncycastle:bcpg-jdk18on", version.ref = "bouncyCastle" }
 bcpkix-jdk18on = { module = "org.bouncycastle:bcpkix-jdk18on", version.ref = "bouncyCastle" }
-bcprov-jdk18on = { module = "org.bouncycastle:bcprov-jdk18on", version = "1.85.2" }
+bcprov-jdk18on = { module = "org.bouncycastle:bcprov-jdk18on", version = "1.86" }
 bcutil-jdk18on = { module = "org.bouncycastle:bcutil-jdk18on", version.ref = "bouncyCastle" }
 byte-buddy = { module = "net.bytebuddy:byte-buddy", version.ref = "byteBuddy" }
 byte-buddy-agent = { module = "net.bytebuddy:byte-buddy-agent", version.ref = "byteBuddy" }
@@ -47,11 +47,11 @@
 commonmark-ext-gfm-strikethrough = { module = "org.commonmark:commonmark-ext-gfm-strikethrough", version.ref = "commonmark" }
 commonmark-ext-gfm-tables = { module = "org.commonmark:commonmark-ext-gfm-tables", version.ref = "commonmark" }
 commonmark-ext-yaml-front-matter = { module = "org.commonmark:commonmark-ext-yaml-front-matter", version.ref = "commonmark" }
-commons-codec = { module = "commons-codec:commons-codec", version = "1.18.0" }
+commons-codec = { module = "commons-codec:commons-codec", version = "1.20.0" }
 commons-compress = { module = "org.apache.commons:commons-compress", version = "1.28.0" }
 commons-dbcp = { module = "commons-dbcp:commons-dbcp", version = "1.4" }
 commons-lang3 = { module = "org.apache.commons:commons-lang3", version = "3.20.0" }
-commons-net = { module = "commons-net:commons-net", version = "3.6" }
+commons-net = { module = "commons-net:commons-net", version = "3.13.0" }
 commons-pool = { module = "commons-pool:commons-pool", version = "1.5.5" }
 commons-text = { module = "org.apache.commons:commons-text", version = "1.15.0" }
 commons-validator = { module = "commons-validator:commons-validator", version = "1.11.0" }
@@ -66,7 +66,7 @@
 httpcore = { module = "org.apache.httpcomponents:httpcore", version = "4.4.16" }
 icu4j = { module = "com.ibm.icu:icu4j", version = "78.2" }
 jakarta-inject-api = { module = "jakarta.inject:jakarta.inject-api", version = "2.0.1" }
-JavaEWAH = { module = "com.googlecode.javaewah:JavaEWAH", version = "1.1.12" }
+JavaEWAH = { module = "com.googlecode.javaewah:JavaEWAH", version = "1.2.3" }
 javapoet = { module = "com.squareup:javapoet", version = "1.13.0" }
 javax-inject = { module = "javax.inject:javax.inject", version = "1" }
 javax-mail = { module = "com.sun.mail:javax.mail", version.ref = "mail" }
@@ -83,11 +83,11 @@
 jetty-util = { module = "org.eclipse.jetty:jetty-util", version.ref = "jetty" }
 jetty-util-ajax = { module = "org.eclipse.jetty:jetty-util-ajax", version.ref = "jetty" }
 json-smart = { module = "net.minidev:json-smart", version = "1.1.1" }
-jsoup = { module = "org.jsoup:jsoup", version = "1.14.3" }
+jsoup = { module = "org.jsoup:jsoup", version = "1.23.2" }
 jsr305 = { module = "com.google.code.findbugs:jsr305", version = "3.0.1" }
 junit = { module = "junit:junit", version = "4.13.2" }
 mime-util = { module = "eu.medsea.mimeutil:mime-util", version = "2.1.3" }
-mockito-core = { module = "org.mockito:mockito-core", version = "5.23.0" }
+mockito-core = { module = "org.mockito:mockito-core", version = "5.24.0" }
 objenesis = { module = "org.objenesis:objenesis", version = "3.4" }
 prolog-cafeteria = { module = "com.googlecode.prolog-cafe:prolog-cafeteria", version.ref = "prolog" }
 prolog-compiler = { module = "com.googlecode.prolog-cafe:prolog-compiler", version.ref = "prolog" }
diff --git a/tools/java_deps.MODULE.bazel b/tools/java_deps.MODULE.bazel
index e75c3ec..3b12f96 100644
--- a/tools/java_deps.MODULE.bazel
+++ b/tools/java_deps.MODULE.bazel
@@ -2,7 +2,7 @@
 #
 # This file is included from the root MODULE.bazel via include().
 # It contains the rules_jvm_external configuration for Gerrit:
-#  - forced artifact versions to keep Gerrit and JGit aligned
+#  - pinned root artifact versions to keep Gerrit and JGit aligned
 #  - excluded artifacts to prevent duplicate classes and unwanted runtimes
 #  - TOML-based dependency import + lockfile enforcement
 #
@@ -84,6 +84,9 @@
     "org.apache.sshd:sshd-common",
     "org.apache.sshd:sshd-core",
 
+    # sshd-scp transitively included by sshd-contrib; not needed at runtime.
+    "org.apache.sshd:sshd-scp",
+
     # Unused Lucene modules (keep WAR footprint aligned with pre-migration).
     "org.apache.lucene:lucene-facet",
     "org.apache.lucene:lucene-queries",
@@ -103,40 +106,6 @@
     _OTHER_EXCLUDES
 )
 
-# Root-level dependency versions declared by Gerrit must take precedence over
-# versions contributed by layered modules (e.g. JGit) when resolving the shared
-# maven.install("external_deps") repository.
-#
-# rules_jvm_external currently lacks a mechanism for the root module to globally
-# enforce its declared versions across the layered Maven graph when using
-# bzlmod. In particular, version_conflict_policy = "pinned" still fails early
-# with duplicate artifacts when multiple modules contribute different versions.
-#
-# As a workaround, we explicitly force the root-selected versions here via
-# maven.amend_artifact(force_version = "true") for GA coordinates that may also
-# be introduced transitively by JGit.
-#
-# Versions themselves are sourced from deps.toml and the pinned lockfile.
-#
-# TODO(davido): Remove this workaround once global root version enforcement is
-# supported in rules_jvm_external:
-# https://github.com/bazel-contrib/rules_jvm_external/issues/1549
-_GERRIT_FORCED_ARTIFACTS = [
-    "args4j:args4j",
-    "com.googlecode.javaewah:JavaEWAH",
-    "commons-codec:commons-codec",
-    "org.apache.commons:commons-lang3",
-]
-
-[
-    maven.amend_artifact(
-        name = "external_deps",
-        coordinates = coord,
-        force_version = "true",
-    )
-    for coord in _GERRIT_FORCED_ARTIFACTS
-]
-
 # We consume Guice's unshaded artifact (published as the "classes"
 # classifier) plus an external OW2 ASM (see //lib/guice and tools/nongoogle.toml),
 # because the ASM shaded into the default guice jar cannot read Java 25 class
@@ -148,7 +117,8 @@
 # classpath. These artifacts pull it in transitively, so strip that edge from
 # each; they resolve Guice solely from the //lib/guice classes-classifier jar.
 # Keep this list in sync with everything that depends on Guice transitively --
-# a missed entry silently reintroduces the shaded ASM.
+# a missed entry silently reintroduces the shaded ASM. Soy is amended
+# separately below, with an additional javax.inject exclusion.
 #
 # TODO(davido): Drop these exclusions (and the classes classifier) once Guice
 # ships a default jar with an updated shaded ASM that reads current class
@@ -156,7 +126,6 @@
 _GUICE_FAT_JAR_CONSUMERS = [
     "com.google.inject.extensions:guice-assistedinject",
     "com.google.inject.extensions:guice-servlet",
-    "com.google.template:soy",
     "org.openid4java:openid4java",
 ]
 
@@ -169,6 +138,18 @@
     for coord in _GUICE_FAT_JAR_CONSUMERS
 ]
 
+# Soy also declares javax.inject:javax.inject transitively. Gerrit no longer
+# uses javax.inject directly; retain it only through Guice 6, which still
+# requires javax.inject-1.jar in the WAR alongside jakarta.inject.
+maven.amend_artifact(
+    name = "external_deps",
+    coordinates = "com.google.template:soy",
+    exclusions = [
+        "com.google.inject:guice",
+        "javax.inject:javax.inject",
+    ],
+)
+
 # Empty maven.install call to apply the configuration to the installation from
 # toml files.
 maven.install(
diff --git a/tools/jgit-ee8/BUILD b/tools/jgit-ee8/BUILD
index fa80f5c..a5291e5 100644
--- a/tools/jgit-ee8/BUILD
+++ b/tools/jgit-ee8/BUILD
@@ -16,6 +16,6 @@
 sh_test(
     name = "classpath_duplicates_test",
     srcs = ["classpath_duplicates_test.sh"],
-    args = ["$(location :original_jgit_servlet_path)"],
+    args = ["$(rootpath :original_jgit_servlet_path)"],
     data = [":original_jgit_servlet_path"],
 )
diff --git a/tools/maven/api.sh b/tools/maven/api.sh
index e1b6c4b..f0fdccd 100755
--- a/tools/maven/api.sh
+++ b/tools/maven/api.sh
@@ -27,7 +27,7 @@
   war_deploy
 
 and build_args is the argument passed to the Bazel build command, e.g.,
-  --config:java21
+  --config=java25
 
 Set VERBOSE in the environment to get more information.
 
diff --git a/tools/node_tools/node_modules_licenses/tsconfig.json b/tools/node_tools/node_modules_licenses/tsconfig.json
index 3301307..b5de0df 100644
--- a/tools/node_tools/node_modules_licenses/tsconfig.json
+++ b/tools/node_tools/node_modules_licenses/tsconfig.json
@@ -14,7 +14,7 @@
     "allowSyntheticDefaultImports": true,
     "esModuleInterop": true,
     "strict": true,
-    "moduleResolution": "node",
+    "moduleResolution": "bundler",
     "types": ["node"],
     "typeRoots": [
       "../node_modules/@types",
diff --git a/tools/node_tools/package.json b/tools/node_tools/package.json
index 42b4759..d703276 100644
--- a/tools/node_tools/package.json
+++ b/tools/node_tools/package.json
@@ -10,7 +10,7 @@
     "@rollup/plugin-node-resolve": "^16.0.1",
     "@rollup/plugin-terser": "^0.4.4",
     "terser": "~5.39.0",
-    "typescript": "^5.8.3"
+    "typescript": "6.0.3"
   },
   "devDependencies": {},
   "license": "Apache-2.0",
diff --git a/tools/node_tools/pnpm-lock.yaml b/tools/node_tools/pnpm-lock.yaml
index 9a5aa77..6cbea6e 100644
--- a/tools/node_tools/pnpm-lock.yaml
+++ b/tools/node_tools/pnpm-lock.yaml
@@ -30,8 +30,8 @@
         specifier: ~5.39.0
         version: 5.39.2
       typescript:
-        specifier: ^5.8.3
-        version: 5.8.3
+        specifier: 6.0.3
+        version: 6.0.3
 
 packages:
 
@@ -320,8 +320,8 @@
     engines: {node: '>=10'}
     hasBin: true
 
-  typescript@5.8.3:
-    resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==}
+  typescript@6.0.3:
+    resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==}
     engines: {node: '>=14.17'}
     hasBin: true
 
@@ -568,6 +568,6 @@
       commander: 2.20.3
       source-map-support: 0.5.21
 
-  typescript@5.8.3: {}
+  typescript@6.0.3: {}
 
   undici-types@6.21.0: {}
diff --git a/tools/node_tools/yarn.lock b/tools/node_tools/yarn.lock
index a37eac1..f868db5 100644
--- a/tools/node_tools/yarn.lock
+++ b/tools/node_tools/yarn.lock
@@ -2,39 +2,6 @@
 # yarn lockfile v1
 
 
-"@bazel/concatjs@^5.8.1":
-  version "5.8.1"
-  resolved "https://registry.yarnpkg.com/@bazel/concatjs/-/concatjs-5.8.1.tgz#dd20882429e382cae79c08cbd3238dfc680d2d67"
-  integrity sha512-TkARsNUxgi3bjFeGwIGlffmQglNhuR9qK9uE7uKhdBZvQE5caAWVCjYiMTzo3viKDhwKn5QNRcHY5huuJMVFfA==
-  dependencies:
-    protobufjs "6.8.8"
-    source-map-support "0.5.9"
-    tsutils "3.21.0"
-
-"@bazel/rollup@^5.8.1":
-  version "5.8.1"
-  resolved "https://registry.yarnpkg.com/@bazel/rollup/-/rollup-5.8.1.tgz#ee876c35595b456f700d258385412e4f0dd57c15"
-  integrity sha512-Ys+UWbRp1TY2j+z15N+SZgID/nuqAtJTgJDsz0NZVjm8F8KzmgXxLDnBb/cUKFVk83pNOAi84G/bq1tINjMSNA==
-  dependencies:
-    "@bazel/worker" "5.8.1"
-
-"@bazel/typescript@^5.8.1":
-  version "5.8.1"
-  resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-5.8.1.tgz#74a76af434fad7930893cf3e98b4cc201e52dc65"
-  integrity sha512-NAJ8WQHZL1WE1YmRoCrq/1hhG15Mvy/viWh6TkvFnBeEhNUiQUsA5GYyhU1ztnBIYW03nATO3vwhAEfO7Q0U5g==
-  dependencies:
-    "@bazel/worker" "5.8.1"
-    semver "5.6.0"
-    source-map-support "0.5.9"
-    tsutils "3.21.0"
-
-"@bazel/worker@5.8.1":
-  version "5.8.1"
-  resolved "https://registry.yarnpkg.com/@bazel/worker/-/worker-5.8.1.tgz#65af7a70dd2f1aaedd6c19330abd9a198f96e7b2"
-  integrity sha512-GMyZSNW3F34f9GjbJqvs1aHyed5BNrNeiDzNJhC1fIizo/UeBM21oBBONIYLBDoBtq936U85VyPZ76JaP/83hw==
-  dependencies:
-    google-protobuf "^3.6.1"
-
 "@jridgewell/gen-mapping@^0.3.5":
   version "0.3.8"
   resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz#4f0e06362e01362f823d348f1872b08f666d8142"
@@ -75,59 +42,6 @@
     "@jridgewell/resolve-uri" "^3.1.0"
     "@jridgewell/sourcemap-codec" "^1.4.14"
 
-"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2":
-  version "1.1.2"
-  resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf"
-  integrity sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==
-
-"@protobufjs/base64@^1.1.2":
-  version "1.1.2"
-  resolved "https://registry.yarnpkg.com/@protobufjs/base64/-/base64-1.1.2.tgz#4c85730e59b9a1f1f349047dbf24296034bb2735"
-  integrity sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==
-
-"@protobufjs/codegen@^2.0.4":
-  version "2.0.4"
-  resolved "https://registry.yarnpkg.com/@protobufjs/codegen/-/codegen-2.0.4.tgz#7ef37f0d010fb028ad1ad59722e506d9262815cb"
-  integrity sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==
-
-"@protobufjs/eventemitter@^1.1.0":
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz#355cbc98bafad5978f9ed095f397621f1d066b70"
-  integrity sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==
-
-"@protobufjs/fetch@^1.1.0":
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/@protobufjs/fetch/-/fetch-1.1.0.tgz#ba99fb598614af65700c1619ff06d454b0d84c45"
-  integrity sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==
-  dependencies:
-    "@protobufjs/aspromise" "^1.1.1"
-    "@protobufjs/inquire" "^1.1.0"
-
-"@protobufjs/float@^1.0.2":
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/@protobufjs/float/-/float-1.0.2.tgz#5e9e1abdcb73fc0a7cb8b291df78c8cbd97b87d1"
-  integrity sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==
-
-"@protobufjs/inquire@^1.1.0":
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/@protobufjs/inquire/-/inquire-1.1.0.tgz#ff200e3e7cf2429e2dcafc1140828e8cc638f089"
-  integrity sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==
-
-"@protobufjs/path@^1.1.2":
-  version "1.1.2"
-  resolved "https://registry.yarnpkg.com/@protobufjs/path/-/path-1.1.2.tgz#6cc2b20c5c9ad6ad0dccfd21ca7673d8d7fbf68d"
-  integrity sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==
-
-"@protobufjs/pool@^1.1.0":
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/@protobufjs/pool/-/pool-1.1.0.tgz#09fd15f2d6d3abfa9b65bc366506d6ad7846ff54"
-  integrity sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==
-
-"@protobufjs/utf8@^1.1.0":
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570"
-  integrity sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==
-
 "@rollup/plugin-commonjs@^28.0.3":
   version "28.0.3"
   resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-28.0.3.tgz#44c2cc7c955c6113b96696b55e6bc2446bd67913"
@@ -283,16 +197,6 @@
   resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.7.tgz#4158d3105276773d5b7695cd4834b1722e4f37a8"
   integrity sha512-w28IoSUCJpidD/TGviZwwMJckNESJZXFu7NBZ5YJ4mEUnNraUn9Pm8HSZm/jDF1pDWYKspWE7oVphigUPRakIQ==
 
-"@types/long@^4.0.0":
-  version "4.0.2"
-  resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.2.tgz#b74129719fc8d11c01868010082d483b7545591a"
-  integrity sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==
-
-"@types/node@^10.1.0":
-  version "10.17.60"
-  resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.60.tgz#35f3d6213daed95da7f0f73e75bcc6980e90597b"
-  integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==
-
 "@types/node@^22.15.2":
   version "22.15.18"
   resolved "https://registry.yarnpkg.com/@types/node/-/node-22.15.18.tgz#2f8240f7e932f571c2d45f555ba0b6c3f7a75963"
@@ -350,11 +254,6 @@
   resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c"
   integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==
 
-google-protobuf@^3.6.1:
-  version "3.21.4"
-  resolved "https://registry.yarnpkg.com/google-protobuf/-/google-protobuf-3.21.4.tgz#2f933e8b6e5e9f8edde66b7be0024b68f77da6c9"
-  integrity sha512-MnG7N936zcKTco4Jd2PX2U96Kf9PxygAPKBug+74LHzmHXmceN16MmRcdgZv+DGef/S9YvQAfRsNCn4cjf9yyQ==
-
 hasown@^2.0.2:
   version "2.0.2"
   resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003"
@@ -381,11 +280,6 @@
   dependencies:
     "@types/estree" "*"
 
-long@^4.0.0:
-  version "4.0.0"
-  resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28"
-  integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==
-
 magic-string@^0.30.3:
   version "0.30.17"
   resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.17.tgz#450a449673d2460e5bbcfba9a61916a1714c7453"
@@ -403,25 +297,6 @@
   resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.2.tgz#77c742931e8f3b8820946c76cd0c1f13730d1dab"
   integrity sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==
 
-protobufjs@6.8.8:
-  version "6.8.8"
-  resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.8.8.tgz#c8b4f1282fd7a90e6f5b109ed11c84af82908e7c"
-  integrity sha512-AAmHtD5pXgZfi7GMpllpO3q1Xw1OYldr+dMUlAnffGTAhqkg72WdmSY71uKBF/JuyiKs8psYbtKrhi0ASCD8qw==
-  dependencies:
-    "@protobufjs/aspromise" "^1.1.2"
-    "@protobufjs/base64" "^1.1.2"
-    "@protobufjs/codegen" "^2.0.4"
-    "@protobufjs/eventemitter" "^1.1.0"
-    "@protobufjs/fetch" "^1.1.0"
-    "@protobufjs/float" "^1.0.2"
-    "@protobufjs/inquire" "^1.1.0"
-    "@protobufjs/path" "^1.1.2"
-    "@protobufjs/pool" "^1.1.0"
-    "@protobufjs/utf8" "^1.1.0"
-    "@types/long" "^4.0.0"
-    "@types/node" "^10.1.0"
-    long "^4.0.0"
-
 randombytes@^2.1.0:
   version "2.1.0"
   resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a"
@@ -472,11 +347,6 @@
   resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
   integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
 
-semver@5.6.0:
-  version "5.6.0"
-  resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004"
-  integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==
-
 serialize-javascript@^6.0.1:
   version "6.0.2"
   resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.2.tgz#defa1e055c83bf6d59ea805d8da862254eb6a6c2"
@@ -489,14 +359,6 @@
   resolved "https://registry.yarnpkg.com/smob/-/smob-1.5.0.tgz#85d79a1403abf128d24d3ebc1cdc5e1a9548d3ab"
   integrity sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==
 
-source-map-support@0.5.9:
-  version "0.5.9"
-  resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.9.tgz#41bc953b2534267ea2d605bccfa7bfa3111ced5f"
-  integrity sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==
-  dependencies:
-    buffer-from "^1.0.0"
-    source-map "^0.6.0"
-
 source-map-support@~0.5.20:
   version "0.5.21"
   resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f"
@@ -525,22 +387,10 @@
     commander "^2.20.0"
     source-map-support "~0.5.20"
 
-tslib@^1.8.1:
-  version "1.14.1"
-  resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
-  integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
-
-tsutils@3.21.0:
-  version "3.21.0"
-  resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623"
-  integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==
-  dependencies:
-    tslib "^1.8.1"
-
-typescript@^5.8.3:
-  version "5.8.3"
-  resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.8.3.tgz#92f8a3e5e3cf497356f4178c34cd65a7f5e8440e"
-  integrity sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==
+typescript@6.0.3:
+  version "6.0.3"
+  resolved "https://registry.yarnpkg.com/typescript/-/typescript-6.0.3.tgz#90251dc007916e972786cb94d74d15b185577d21"
+  integrity sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==
 
 undici-types@~6.21.0:
   version "6.21.0"
diff --git a/tools/nongoogle.toml b/tools/nongoogle.toml
index ea53a0d..12a7405 100644
--- a/tools/nongoogle.toml
+++ b/tools/nongoogle.toml
@@ -8,11 +8,11 @@
 flogger = "0.8"
 # Also update the GUAVA version in java/com/google/gerrit/extensions/BUILD
 # to keep Bazel and extension dependencies in sync.
-guava = "33.5.0-jre"
+guava = "33.8.0-jre"
 guice = "6.0.0"
 lucene = "10.5.1"
-slf4j = "2.0.18"
-sshd = "2.19.0"
+slf4j = "2.0.20"
+sshd = "2.20.0"
 truth = "1.4.4"
 
 [libraries]
@@ -34,13 +34,13 @@
 guice-assistedinject = { module = "com.google.inject.extensions:guice-assistedinject", version.ref = "guice" }
 guice-library = { module = "com.google.inject:guice", version.ref = "guice", classifier = "classes" }
 guice-servlet = { module = "com.google.inject.extensions:guice-servlet", version.ref = "guice" }
-h2 = { module = "com.h2database:h2", version = "2.5.250" }
+h2 = { module = "com.h2database:h2", version = "2.5.252" }
 hamcrest = { module = "org.hamcrest:hamcrest", version = "3.0" }
 impl-log4j = { module = "org.slf4j:slf4j-reload4j", version.ref = "slf4j" }
 j2objc = { module = "com.google.j2objc:j2objc-annotations", version = "1.1" }
 jcl-over-slf4j = { module = "org.slf4j:jcl-over-slf4j", version.ref = "slf4j" }
 jimfs = { module = "com.google.jimfs:jimfs", version = "1.2" }
-jruby = { module = "org.jruby:jruby-complete", version = "9.1.17.0" }
+jruby = { module = "org.jruby:jruby", version = "10.1.2.0" }
 log-api = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" }
 log-ext = { module = "org.slf4j:slf4j-ext", version.ref = "slf4j" }
 log4j = { module = "ch.qos.reload4j:reload4j", version = "1.2.26" }
@@ -53,7 +53,8 @@
 nekohtml = { module = "net.sourceforge.nekohtml:nekohtml", version = "1.9.10" }
 openid-consumer = { module = "org.openid4java:openid4java", version = "1.0.0" }
 protobuf-java = { module = "com.google.protobuf:protobuf-java", version = "4.36.2" }
-soy = { module = "com.google.template:soy", version = "2024-01-30" }
+soy = { module = "com.google.template:soy", version = "2024-02-26" }
+sshd-contrib = { module = "org.apache.sshd:sshd-contrib", version.ref = "sshd" }
 sshd-mina = { module = "org.apache.sshd:sshd-mina", version.ref = "sshd" }
 sshd-osgi = { module = "org.apache.sshd:sshd-osgi", version.ref = "sshd" }
 sshd-sftp = { module = "org.apache.sshd:sshd-sftp", version.ref = "sshd" }
diff --git a/tools/patches/BUILD b/tools/patches/BUILD
new file mode 100644
index 0000000..ebb6cc0
--- /dev/null
+++ b/tools/patches/BUILD
@@ -0,0 +1 @@
+exports_files(["protobuf-36.2-no-rust.patch"])
diff --git a/tools/patches/protobuf-36.2-no-rust.patch b/tools/patches/protobuf-36.2-no-rust.patch
new file mode 100644
index 0000000..9860606
--- /dev/null
+++ b/tools/patches/protobuf-36.2-no-rust.patch
@@ -0,0 +1,20 @@
+--- a/MODULE.bazel
++++ b/MODULE.bazel
+@@ -40,7 +40,7 @@
+ bazel_dep(name = "rules_license", version = "1.0.0")
+ bazel_dep(name = "rules_pkg", version = "1.0.1")
+ bazel_dep(name = "rules_python", version = "1.6.0")
+-bazel_dep(name = "rules_rust", version = "0.69.0")
++bazel_dep(name = "rules_rust", version = "0.69.0", dev_dependency = True)
+ 
+ bazel_dep(name = "rules_ruby", version = "0.20.1", dev_dependency = True)
+ 
+@@ -193,7 +193,7 @@
+     versions = ["1.85.0"],
+ )
+ 
+-crate = use_extension("@rules_rust//crate_universe:extension.bzl", "crate")
++crate = use_extension("@rules_rust//crate_universe:extension.bzl", "crate", dev_dependency = True)
+ crate.spec(
+     package = "googletest",
+     version = ">0.0.0",
diff --git a/tools/remote/BUILD b/tools/remote/BUILD
index 57dd4a0..ffbb0bb 100644
--- a/tools/remote/BUILD
+++ b/tools/remote/BUILD
@@ -6,7 +6,7 @@
     ],
     exec_properties = {
         "OSFamily": "Linux",
-        "container-image": "docker://gcr.io/bazel-public/ubuntu2404@sha256:57bbaa84bec679736c53dcd1d326e8f835b3b9ce3e36c12a3c12a07eb59177d3",
+        "container-image": "docker://gcr.io/bazel-public/ubuntu2604@sha256:ead39b38a2f196ab7e972204ecc5edd5bcfef2940d41b20a56527aad2479396d",
     },
     visibility = ["//visibility:public"],
 )
diff --git a/tools/repos.MODULE.bazel b/tools/repos.MODULE.bazel
index bc38f21..5fb7b8a 100644
--- a/tools/repos.MODULE.bazel
+++ b/tools/repos.MODULE.bazel
@@ -1,21 +1,17 @@
-# Repository rules for in-tree or vendored sources.
-#
-# This module fragment is included from MODULE.bazel to keep repository
-# declarations separate from the module dependency graph.
-
-local_repository = use_repo_rule(
-    "@bazel_tools//tools/build_defs/repo:local.bzl",
-    "local_repository",
+bazel_dep(name = "jgit")
+local_path_override(
+    module_name = "jgit",
+    path = "./modules/jgit",
 )
 
-# Java-Prettify external repository consumed from git submodule.
-local_repository(
-    name = "java-prettify",
-    path = "modules/java-prettify",
+bazel_dep(name = "gitiles")
+local_path_override(
+    module_name = "gitiles",
+    path = "./modules/gitiles",
 )
 
-# Gitiles source repository consumed from git submodule.
-local_repository(
-    name = "gitiles",
-    path = "modules/gitiles",
+bazel_dep(name = "java-prettify")
+local_path_override(
+    module_name = "java-prettify",
+    path = "./modules/java-prettify",
 )
diff --git a/webapp/BUILD b/webapp/BUILD
index 8ea82d3..30a80d2 100644
--- a/webapp/BUILD
+++ b/webapp/BUILD
@@ -10,3 +10,8 @@
     cmd = "cd webapp; zip -qr $$ROOT/$@ .",
     visibility = ["//visibility:public"],
 )
+
+exports_files([
+    "diffy.png",
+    "gerrit_icon.png",
+])
diff --git a/webapp/diffy.png b/webapp/diffy.png
new file mode 100644
index 0000000..8400e95
--- /dev/null
+++ b/webapp/diffy.png
Binary files differ
diff --git a/yarn.lock b/yarn.lock
index 9981d74..f0a0c6e 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -21,44 +21,6 @@
   resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.28.3.tgz#75c5034b55ba868121668be5d5bb31cc64e6e61a"
   integrity sha512-9uIQ10o0WGdpP6GDhXcdOJPJuDgFtIDtN/9+ArJQ2NAfAmiuhTQdzkaTGR33v43GYS2UrSA0eX2pPPHoFVvpxA==
 
-"@bazel/concatjs@^5.8.1":
-  version "5.8.1"
-  resolved "https://registry.yarnpkg.com/@bazel/concatjs/-/concatjs-5.8.1.tgz#dd20882429e382cae79c08cbd3238dfc680d2d67"
-  integrity sha512-TkARsNUxgi3bjFeGwIGlffmQglNhuR9qK9uE7uKhdBZvQE5caAWVCjYiMTzo3viKDhwKn5QNRcHY5huuJMVFfA==
-  dependencies:
-    protobufjs "6.8.8"
-    source-map-support "0.5.9"
-    tsutils "3.21.0"
-
-"@bazel/rollup@^5.8.1":
-  version "5.8.1"
-  resolved "https://registry.yarnpkg.com/@bazel/rollup/-/rollup-5.8.1.tgz#ee876c35595b456f700d258385412e4f0dd57c15"
-  integrity sha512-Ys+UWbRp1TY2j+z15N+SZgID/nuqAtJTgJDsz0NZVjm8F8KzmgXxLDnBb/cUKFVk83pNOAi84G/bq1tINjMSNA==
-  dependencies:
-    "@bazel/worker" "5.8.1"
-
-"@bazel/terser@^5.8.1":
-  version "5.8.1"
-  resolved "https://registry.yarnpkg.com/@bazel/terser/-/terser-5.8.1.tgz#729a0ec6dcc83e99c4f6d3f2bebb0ff254c10c48"
-  integrity sha512-TPjSDhw1pSZt9P2hd/22IJwl8KCZiJL+u2gB5mghBTCFDVdC5Dgsx135pFtvlqc6LjjOvd3s6dzcQr0YJo2HSg==
-
-"@bazel/typescript@^5.8.1":
-  version "5.8.1"
-  resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-5.8.1.tgz#74a76af434fad7930893cf3e98b4cc201e52dc65"
-  integrity sha512-NAJ8WQHZL1WE1YmRoCrq/1hhG15Mvy/viWh6TkvFnBeEhNUiQUsA5GYyhU1ztnBIYW03nATO3vwhAEfO7Q0U5g==
-  dependencies:
-    "@bazel/worker" "5.8.1"
-    semver "5.6.0"
-    source-map-support "0.5.9"
-    tsutils "3.21.0"
-
-"@bazel/worker@5.8.1":
-  version "5.8.1"
-  resolved "https://registry.yarnpkg.com/@bazel/worker/-/worker-5.8.1.tgz#65af7a70dd2f1aaedd6c19330abd9a198f96e7b2"
-  integrity sha512-GMyZSNW3F34f9GjbJqvs1aHyed5BNrNeiDzNJhC1fIizo/UeBM21oBBONIYLBDoBtq936U85VyPZ76JaP/83hw==
-  dependencies:
-    google-protobuf "^3.6.1"
-
 "@es-joy/jsdoccomment@~0.50.2":
   version "0.50.2"
   resolved "https://registry.yarnpkg.com/@es-joy/jsdoccomment/-/jsdoccomment-0.50.2.tgz#707768f0cb62abe0703d51aa9086986d230a5d5c"
@@ -200,14 +162,21 @@
   resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.25.9.tgz#585624dc829cfb6e7c0aa6c3ca7d7e6daa87e34f"
   integrity sha512-PPOl1mi6lpLNQxnGoyAfschAodRFYXJ+9fs6WHXz7CSWKbOqiMZsubC+BQsVKuul+3vKLuwTHsS2c2y9EoKwxQ==
 
-"@eslint-community/eslint-utils@^4.1.2", "@eslint-community/eslint-utils@^4.5.0", "@eslint-community/eslint-utils@^4.7.0", "@eslint-community/eslint-utils@^4.8.0":
+"@eslint-community/eslint-utils@^4.1.2", "@eslint-community/eslint-utils@^4.5.0", "@eslint-community/eslint-utils@^4.8.0":
   version "4.9.0"
   resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz#7308df158e064f0dd8b8fdb58aa14fa2a7f913b3"
   integrity sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==
   dependencies:
     eslint-visitor-keys "^3.4.3"
 
-"@eslint-community/regexpp@^4.10.0", "@eslint-community/regexpp@^4.11.0", "@eslint-community/regexpp@^4.12.1":
+"@eslint-community/eslint-utils@^4.9.1":
+  version "4.10.1"
+  resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.10.1.tgz#8911bd72b2c3640a543609e0400b8c4d2e7e7cb6"
+  integrity sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==
+  dependencies:
+    eslint-visitor-keys "^3.4.3"
+
+"@eslint-community/regexpp@^4.11.0", "@eslint-community/regexpp@^4.12.1", "@eslint-community/regexpp@^4.12.2":
   version "4.12.2"
   resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.2.tgz#bccdf615bcf7b6e8db830ec0b8d21c9a25de597b"
   integrity sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==
@@ -255,6 +224,11 @@
   resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.39.1.tgz#0dd59c3a9f40e3f1882975c321470969243e0164"
   integrity sha512-S26Stp4zCy88tH94QbBv3XCuzRQiZ9yXofEILmglYTh/Ug/a9/umqvgFtYBAo3Lp0nsI/5/qH1CCrbdK3AP1Tw==
 
+"@eslint/js@^9.26.0":
+  version "9.39.5"
+  resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.39.5.tgz#6f2fbcff75500d229d535e0a949ae13472c84787"
+  integrity sha512-QywQuszQh77pIXCsq998c8hbhSTI/azTty1Z6N53dmAudKHhy573j3yvRLsX2BSp8YpLtoCEG8E9DJe+8zUh4A==
+
 "@eslint/object-schema@^2.1.7":
   version "2.1.7"
   resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.7.tgz#6e2126a1347e86a4dedf8706ec67ff8e107ebbad"
@@ -368,59 +342,6 @@
   resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.2.9.tgz#d229a7b7f9dac167a156992ef23c7f023653f53b"
   integrity sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==
 
-"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2":
-  version "1.1.2"
-  resolved "https://registry.yarnpkg.com/@protobufjs/aspromise/-/aspromise-1.1.2.tgz#9b8b0cc663d669a7d8f6f5d0893a14d348f30fbf"
-  integrity sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==
-
-"@protobufjs/base64@^1.1.2":
-  version "1.1.2"
-  resolved "https://registry.yarnpkg.com/@protobufjs/base64/-/base64-1.1.2.tgz#4c85730e59b9a1f1f349047dbf24296034bb2735"
-  integrity sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==
-
-"@protobufjs/codegen@^2.0.4":
-  version "2.0.4"
-  resolved "https://registry.yarnpkg.com/@protobufjs/codegen/-/codegen-2.0.4.tgz#7ef37f0d010fb028ad1ad59722e506d9262815cb"
-  integrity sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==
-
-"@protobufjs/eventemitter@^1.1.0":
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz#355cbc98bafad5978f9ed095f397621f1d066b70"
-  integrity sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==
-
-"@protobufjs/fetch@^1.1.0":
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/@protobufjs/fetch/-/fetch-1.1.0.tgz#ba99fb598614af65700c1619ff06d454b0d84c45"
-  integrity sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==
-  dependencies:
-    "@protobufjs/aspromise" "^1.1.1"
-    "@protobufjs/inquire" "^1.1.0"
-
-"@protobufjs/float@^1.0.2":
-  version "1.0.2"
-  resolved "https://registry.yarnpkg.com/@protobufjs/float/-/float-1.0.2.tgz#5e9e1abdcb73fc0a7cb8b291df78c8cbd97b87d1"
-  integrity sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==
-
-"@protobufjs/inquire@^1.1.0":
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/@protobufjs/inquire/-/inquire-1.1.0.tgz#ff200e3e7cf2429e2dcafc1140828e8cc638f089"
-  integrity sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==
-
-"@protobufjs/path@^1.1.2":
-  version "1.1.2"
-  resolved "https://registry.yarnpkg.com/@protobufjs/path/-/path-1.1.2.tgz#6cc2b20c5c9ad6ad0dccfd21ca7673d8d7fbf68d"
-  integrity sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==
-
-"@protobufjs/pool@^1.1.0":
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/@protobufjs/pool/-/pool-1.1.0.tgz#09fd15f2d6d3abfa9b65bc366506d6ad7846ff54"
-  integrity sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==
-
-"@protobufjs/utf8@^1.1.0":
-  version "1.1.0"
-  resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570"
-  integrity sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==
-
 "@rollup/plugin-node-resolve@^15.0.1":
   version "15.3.1"
   resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.3.1.tgz#66008953c2524be786aa319d49e32f2128296a78"
@@ -782,11 +703,6 @@
     "@types/koa-compose" "*"
     "@types/node" "*"
 
-"@types/long@^4.0.0":
-  version "4.0.2"
-  resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.2.tgz#b74129719fc8d11c01868010082d483b7545591a"
-  integrity sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==
-
 "@types/mime@^1":
   version "1.3.5"
   resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.5.tgz#1ef302e01cf7d2b5a0fa526790c9123bf1d06690"
@@ -804,11 +720,6 @@
   dependencies:
     undici-types "~7.10.0"
 
-"@types/node@^10.1.0":
-  version "10.17.60"
-  resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.60.tgz#35f3d6213daed95da7f0f73e75bcc6980e90597b"
-  integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==
-
 "@types/normalize-package-data@^2.4.0":
   version "2.4.4"
   resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz#56e2cc26c397c038fab0e3a917a12d5c5909e901"
@@ -863,106 +774,106 @@
   dependencies:
     "@types/node" "*"
 
-"@typescript-eslint/eslint-plugin@5.62.0", "@typescript-eslint/eslint-plugin@^8.32.0", "@typescript-eslint/eslint-plugin@^8.49.0":
-  version "8.49.0"
-  resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.49.0.tgz#8ed8736b8415a9193989220eadb6031dbcd2260a"
-  integrity sha512-JXij0vzIaTtCwu6SxTh8qBc66kmf1xs7pI4UOiMDFVct6q86G0Zs7KRcEoJgY3Cav3x5Tq0MF5jwgpgLqgKG3A==
+"@typescript-eslint/eslint-plugin@5.62.0", "@typescript-eslint/eslint-plugin@^8.69.0":
+  version "8.69.0"
+  resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.69.0.tgz#bf74cc392ebcaaf096bc8b4c4d7bbeb0677687b8"
+  integrity sha512-t5jQTKPIgVW1PE6dR6H6Qz5gm8zjMlX5/2gRaOGd9eO6V7J+tQc6iWKukEe7dY8u9HyYasQ0yfF0/FSSTEO2gA==
   dependencies:
-    "@eslint-community/regexpp" "^4.10.0"
-    "@typescript-eslint/scope-manager" "8.49.0"
-    "@typescript-eslint/type-utils" "8.49.0"
-    "@typescript-eslint/utils" "8.49.0"
-    "@typescript-eslint/visitor-keys" "8.49.0"
-    ignore "^7.0.0"
+    "@eslint-community/regexpp" "^4.12.2"
+    "@typescript-eslint/scope-manager" "8.69.0"
+    "@typescript-eslint/type-utils" "8.69.0"
+    "@typescript-eslint/utils" "8.69.0"
+    "@typescript-eslint/visitor-keys" "8.69.0"
+    ignore "^7.0.5"
     natural-compare "^1.4.0"
-    ts-api-utils "^2.1.0"
+    ts-api-utils "^2.5.0"
 
-"@typescript-eslint/parser@5.62.0", "@typescript-eslint/parser@^8.32.0", "@typescript-eslint/parser@^8.49.0":
-  version "8.49.0"
-  resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.49.0.tgz#0ede412d59e99239b770f0f08c76c42fba717fa2"
-  integrity sha512-N9lBGA9o9aqb1hVMc9hzySbhKibHmB+N3IpoShyV6HyQYRGIhlrO5rQgttypi+yEeKsKI4idxC8Jw6gXKD4THA==
+"@typescript-eslint/parser@5.62.0", "@typescript-eslint/parser@^8.69.0":
+  version "8.69.0"
+  resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-8.69.0.tgz#de3ead2b35e5c71580eda40820adb4fd14834ca1"
+  integrity sha512-l4b0DhWioGg6Gt2ebGlvfkFMOjRsauxtsnDRwUSRX1qHq3HdTfQHV8wW9zEXeciai6HfeaKOedQn2Zoofx3WBw==
   dependencies:
-    "@typescript-eslint/scope-manager" "8.49.0"
-    "@typescript-eslint/types" "8.49.0"
-    "@typescript-eslint/typescript-estree" "8.49.0"
-    "@typescript-eslint/visitor-keys" "8.49.0"
-    debug "^4.3.4"
+    "@typescript-eslint/scope-manager" "8.69.0"
+    "@typescript-eslint/types" "8.69.0"
+    "@typescript-eslint/typescript-estree" "8.69.0"
+    "@typescript-eslint/visitor-keys" "8.69.0"
+    debug "^4.4.3"
 
-"@typescript-eslint/project-service@8.49.0":
-  version "8.49.0"
-  resolved "https://registry.yarnpkg.com/@typescript-eslint/project-service/-/project-service-8.49.0.tgz#ce220525c88cb2d23792b391c07e14cb9697651a"
-  integrity sha512-/wJN0/DKkmRUMXjZUXYZpD1NEQzQAAn9QWfGwo+Ai8gnzqH7tvqS7oNVdTjKqOcPyVIdZdyCMoqN66Ia789e7g==
+"@typescript-eslint/project-service@8.69.0":
+  version "8.69.0"
+  resolved "https://registry.yarnpkg.com/@typescript-eslint/project-service/-/project-service-8.69.0.tgz#cf728554436a50e644a5214a89fe02cb1ffa9af8"
+  integrity sha512-yi4obFrHMmnsesWehHbkg9zMA7Jt8cXT+mKM08G999pH1yT6nqgsHx7MYm0uY1wAj8CqiBXYRJ7WAT0QdQHQXg==
   dependencies:
-    "@typescript-eslint/tsconfig-utils" "^8.49.0"
-    "@typescript-eslint/types" "^8.49.0"
-    debug "^4.3.4"
+    "@typescript-eslint/tsconfig-utils" "^8.69.0"
+    "@typescript-eslint/types" "^8.69.0"
+    debug "^4.4.3"
 
-"@typescript-eslint/scope-manager@8.49.0":
-  version "8.49.0"
-  resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.49.0.tgz#a3496765b57fb48035d671174552e462e5bffa63"
-  integrity sha512-npgS3zi+/30KSOkXNs0LQXtsg9ekZ8OISAOLGWA/ZOEn0ZH74Ginfl7foziV8DT+D98WfQ5Kopwqb/PZOaIJGg==
+"@typescript-eslint/scope-manager@8.69.0":
+  version "8.69.0"
+  resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.69.0.tgz#13f3d1e25108e95a9ceb5a198806d1fa558f8c7a"
+  integrity sha512-ewfspqWvSxKSOaplqAUNbaSFO0eB6w1EtQ+esfYFRm3614Ty4uNtExkcbgd6nWsXphbqKyf9ZYdbZdv2xEoWEQ==
   dependencies:
-    "@typescript-eslint/types" "8.49.0"
-    "@typescript-eslint/visitor-keys" "8.49.0"
+    "@typescript-eslint/types" "8.69.0"
+    "@typescript-eslint/visitor-keys" "8.69.0"
 
-"@typescript-eslint/tsconfig-utils@8.49.0", "@typescript-eslint/tsconfig-utils@^8.49.0":
-  version "8.49.0"
-  resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.49.0.tgz#857777c8e35dd1e564505833d8043f544442fbf4"
-  integrity sha512-8prixNi1/6nawsRYxet4YOhnbW+W9FK/bQPxsGB1D3ZrDzbJ5FXw5XmzxZv82X3B+ZccuSxo/X8q9nQ+mFecWA==
+"@typescript-eslint/tsconfig-utils@8.69.0", "@typescript-eslint/tsconfig-utils@^8.69.0":
+  version "8.69.0"
+  resolved "https://registry.yarnpkg.com/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.69.0.tgz#d3b0ccc781ab252a90a0b3989b9d1eb85ab59469"
+  integrity sha512-xNqK7YTDZsLniQMV/4rpFR8Z5JlqeRvVjuG1YgF/mdPVH84HSD19L8CczMA0qg2RfwEV231GHH3VnToJDo4MfQ==
 
-"@typescript-eslint/type-utils@8.49.0":
-  version "8.49.0"
-  resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.49.0.tgz#d8118a0c1896a78a22f01d3c176e9945409b085b"
-  integrity sha512-KTExJfQ+svY8I10P4HdxKzWsvtVnsuCifU5MvXrRwoP2KOlNZ9ADNEWWsQTJgMxLzS5VLQKDjkCT/YzgsnqmZg==
+"@typescript-eslint/type-utils@8.69.0":
+  version "8.69.0"
+  resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-8.69.0.tgz#7ce68d2ebcbedd8421806c27a7f360755017159f"
+  integrity sha512-ZfoJAVg3JZndQEpEl9petVlxau3lRuElc4HRMuAlLCf8to04/iHz692RUSNmXKDjEuJmIL+KZ2/BsOcBc16dsA==
   dependencies:
-    "@typescript-eslint/types" "8.49.0"
-    "@typescript-eslint/typescript-estree" "8.49.0"
-    "@typescript-eslint/utils" "8.49.0"
-    debug "^4.3.4"
-    ts-api-utils "^2.1.0"
+    "@typescript-eslint/types" "8.69.0"
+    "@typescript-eslint/typescript-estree" "8.69.0"
+    "@typescript-eslint/utils" "8.69.0"
+    debug "^4.4.3"
+    ts-api-utils "^2.5.0"
 
-"@typescript-eslint/types@8.49.0", "@typescript-eslint/types@^8.49.0":
-  version "8.49.0"
-  resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.49.0.tgz#c1bd3ebf956d9e5216396349ca23c58d74f06aee"
-  integrity sha512-e9k/fneezorUo6WShlQpMxXh8/8wfyc+biu6tnAqA81oWrEic0k21RHzP9uqqpyBBeBKu4T+Bsjy9/b8u7obXQ==
+"@typescript-eslint/types@8.69.0", "@typescript-eslint/types@^8.69.0":
+  version "8.69.0"
+  resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.69.0.tgz#5d9ad3f707c2e4f70a2db540031104df3e63bcf5"
+  integrity sha512-K3VrubUPhlo9VDBS6QdI8YB5j7ClpqLRdefcz6PFrhnwicehBweqQ9Evhl4l+FYz0HdDmMqIiSX0aldGRYtDCA==
 
 "@typescript-eslint/types@^8.11.0":
   version "8.41.0"
   resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.41.0.tgz#9935afeaae65e535abcbcee95383fa649c64d16d"
   integrity sha512-9EwxsWdVqh42afLbHP90n2VdHaWU/oWgbH2P0CfcNfdKL7CuKpwMQGjwev56vWu9cSKU7FWSu6r9zck6CVfnag==
 
-"@typescript-eslint/typescript-estree@8.49.0":
-  version "8.49.0"
-  resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.49.0.tgz#99c5a53275197ccb4e849786dad68344e9924135"
-  integrity sha512-jrLdRuAbPfPIdYNppHJ/D0wN+wwNfJ32YTAm10eJVsFmrVpXQnDWBn8niCSMlWjvml8jsce5E/O+86IQtTbJWA==
+"@typescript-eslint/typescript-estree@8.69.0":
+  version "8.69.0"
+  resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.69.0.tgz#efa915913ffe2049bbfd26092b95d1bc7c9c454f"
+  integrity sha512-AdFkgqck3Vudb/kWnxlyafU/4aBhHrbQ9locP2N4psXTy5mOBg0SHJumnLvx7r6g1gV4DKvUFwV2nJZBoqOD8w==
   dependencies:
-    "@typescript-eslint/project-service" "8.49.0"
-    "@typescript-eslint/tsconfig-utils" "8.49.0"
-    "@typescript-eslint/types" "8.49.0"
-    "@typescript-eslint/visitor-keys" "8.49.0"
-    debug "^4.3.4"
-    minimatch "^9.0.4"
-    semver "^7.6.0"
+    "@typescript-eslint/project-service" "8.69.0"
+    "@typescript-eslint/tsconfig-utils" "8.69.0"
+    "@typescript-eslint/types" "8.69.0"
+    "@typescript-eslint/visitor-keys" "8.69.0"
+    debug "^4.4.3"
+    minimatch "^10.2.2"
+    semver "^7.7.3"
     tinyglobby "^0.2.15"
-    ts-api-utils "^2.1.0"
+    ts-api-utils "^2.5.0"
 
-"@typescript-eslint/utils@8.49.0":
-  version "8.49.0"
-  resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.49.0.tgz#43b3b91d30afd6f6114532cf0b228f1790f43aff"
-  integrity sha512-N3W7rJw7Rw+z1tRsHZbK395TWSYvufBXumYtEGzypgMUthlg0/hmCImeA8hgO2d2G4pd7ftpxxul2J8OdtdaFA==
+"@typescript-eslint/utils@8.69.0":
+  version "8.69.0"
+  resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.69.0.tgz#67ad9c00edf12fe2fbc0bf0a71b00822a8d02e97"
+  integrity sha512-tUbx60BBqQa31kXF5MCsOOLL5E/WzUuxIn7YpAvq+eaUlqvk8/NXnXMBNAdLCr0icjkzem7iUA5QqWHe/hJ1aw==
   dependencies:
-    "@eslint-community/eslint-utils" "^4.7.0"
-    "@typescript-eslint/scope-manager" "8.49.0"
-    "@typescript-eslint/types" "8.49.0"
-    "@typescript-eslint/typescript-estree" "8.49.0"
+    "@eslint-community/eslint-utils" "^4.9.1"
+    "@typescript-eslint/scope-manager" "8.69.0"
+    "@typescript-eslint/types" "8.69.0"
+    "@typescript-eslint/typescript-estree" "8.69.0"
 
-"@typescript-eslint/visitor-keys@8.49.0":
-  version "8.49.0"
-  resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.49.0.tgz#8e450cc502c0d285cad9e84d400cf349a85ced6c"
-  integrity sha512-LlKaciDe3GmZFphXIc79THF/YYBugZ7FS1pO581E/edlVVNbZKDy93evqmrfQ9/Y4uN0vVhX4iuchq26mK/iiA==
+"@typescript-eslint/visitor-keys@8.69.0":
+  version "8.69.0"
+  resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.69.0.tgz#f659785dbb79733c40499f71a65439e2033966b5"
+  integrity sha512-+rmdgPA+EXkNgKYvHvFfhrs35utXbwaC5PGpDquSXcoXQDKUA5UjV0LmTucG/4JXkM31BTu4TilHtrN8IVBe8w==
   dependencies:
-    "@typescript-eslint/types" "8.49.0"
-    eslint-visitor-keys "^4.2.1"
+    "@typescript-eslint/types" "8.69.0"
+    eslint-visitor-keys "^5.0.0"
 
 "@vscode/l10n@^0.0.18":
   version "0.0.18"
@@ -1223,6 +1134,11 @@
   resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
   integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
 
+balanced-match@^4.0.2:
+  version "4.0.4"
+  resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-4.0.4.tgz#bfb10662feed8196a2c62e7c68e17720c274179a"
+  integrity sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==
+
 brace-expansion@^1.1.7:
   version "1.1.12"
   resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.12.tgz#ab9b454466e5a8cc3a187beaad580412a9c5b843"
@@ -1231,12 +1147,12 @@
     balanced-match "^1.0.0"
     concat-map "0.0.1"
 
-brace-expansion@^2.0.1:
-  version "2.0.2"
-  resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.2.tgz#54fc53237a613d854c7bd37463aad17df87214e7"
-  integrity sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==
+brace-expansion@^5.0.8:
+  version "5.0.9"
+  resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-5.0.9.tgz#7c72438809b5fa5babf54199a1f1c281a6984fcf"
+  integrity sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==
   dependencies:
-    balanced-match "^1.0.0"
+    balanced-match "^4.0.2"
 
 braces@^3.0.3:
   version "3.0.3"
@@ -1527,7 +1443,7 @@
   dependencies:
     ms "^2.1.3"
 
-debug@^4.3.1, debug@^4.3.2, debug@^4.3.4:
+debug@^4.3.1, debug@^4.3.2, debug@^4.4.3:
   version "4.4.3"
   resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.3.tgz#c6ae432d9bd9662582fce08709b038c58e9e3d6a"
   integrity sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==
@@ -2075,6 +1991,11 @@
   resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz#4cfea60fe7dd0ad8e816e1ed026c1d5251b512c1"
   integrity sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==
 
+eslint-visitor-keys@^5.0.0:
+  version "5.0.1"
+  resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz#9e3c9489697824d2d4ce3a8ad12628f91e9f59be"
+  integrity sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==
+
 eslint@8.57.1, eslint@^9.26.0, eslint@^9.39.1:
   version "9.39.1"
   resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.39.1.tgz#be8bf7c6de77dcc4252b5a8dcb31c2efff74a6e5"
@@ -2425,11 +2346,6 @@
   resolved "https://registry.yarnpkg.com/globrex/-/globrex-0.1.2.tgz#dd5d9ec826232730cd6793a5e33a9302985e6098"
   integrity sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==
 
-google-protobuf@^3.6.1:
-  version "3.21.4"
-  resolved "https://registry.yarnpkg.com/google-protobuf/-/google-protobuf-3.21.4.tgz#2f933e8b6e5e9f8edde66b7be0024b68f77da6c9"
-  integrity sha512-MnG7N936zcKTco4Jd2PX2U96Kf9PxygAPKBug+74LHzmHXmceN16MmRcdgZv+DGef/S9YvQAfRsNCn4cjf9yyQ==
-
 gopd@^1.0.1, gopd@^1.2.0:
   version "1.2.0"
   resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1"
@@ -2582,10 +2498,10 @@
   resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.2.tgz#3cd40e729f3643fd87cb04e50bf0eb722bc596f5"
   integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==
 
-ignore@^7.0.0:
-  version "7.0.5"
-  resolved "https://registry.yarnpkg.com/ignore/-/ignore-7.0.5.tgz#4cb5f6cd7d4c7ab0365738c7aea888baa6d7efd9"
-  integrity sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==
+ignore@^7.0.5:
+  version "7.0.8"
+  resolved "https://registry.yarnpkg.com/ignore/-/ignore-7.0.8.tgz#84d8466899958458ee30b4190c839ee1446cc88d"
+  integrity sha512-YYNsSlXBjMk92SKnkwvB5LOVSa6OznlFUGcsvrFgNJbJCd0M1XKeFVRc8ZByeCqz32FivYNHJVooLmdqrmvp/Q==
 
 import-fresh@^3.2.1:
   version "3.3.1"
@@ -3128,11 +3044,6 @@
   resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
   integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
 
-long@^4.0.0:
-  version "4.0.0"
-  resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28"
-  integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==
-
 lru-cache@^6.0.0:
   version "6.0.0"
   resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94"
@@ -3228,6 +3139,13 @@
   resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869"
   integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==
 
+minimatch@^10.2.2:
+  version "10.2.6"
+  resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-10.2.6.tgz#fd956bbe0b77241e9f15ac5dccb1c638060968ef"
+  integrity sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==
+  dependencies:
+    brace-expansion "^5.0.8"
+
 minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2:
   version "3.1.2"
   resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b"
@@ -3235,13 +3153,6 @@
   dependencies:
     brace-expansion "^1.1.7"
 
-minimatch@^9.0.4:
-  version "9.0.5"
-  resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5"
-  integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==
-  dependencies:
-    brace-expansion "^2.0.1"
-
 minimist-options@4.1.0:
   version "4.1.0"
   resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619"
@@ -3648,25 +3559,6 @@
   resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da"
   integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==
 
-protobufjs@6.8.8:
-  version "6.8.8"
-  resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.8.8.tgz#c8b4f1282fd7a90e6f5b109ed11c84af82908e7c"
-  integrity sha512-AAmHtD5pXgZfi7GMpllpO3q1Xw1OYldr+dMUlAnffGTAhqkg72WdmSY71uKBF/JuyiKs8psYbtKrhi0ASCD8qw==
-  dependencies:
-    "@protobufjs/aspromise" "^1.1.2"
-    "@protobufjs/base64" "^1.1.2"
-    "@protobufjs/codegen" "^2.0.4"
-    "@protobufjs/eventemitter" "^1.1.0"
-    "@protobufjs/fetch" "^1.1.0"
-    "@protobufjs/float" "^1.0.2"
-    "@protobufjs/inquire" "^1.1.0"
-    "@protobufjs/path" "^1.1.2"
-    "@protobufjs/pool" "^1.1.0"
-    "@protobufjs/utf8" "^1.1.0"
-    "@types/long" "^4.0.0"
-    "@types/node" "^10.1.0"
-    long "^4.0.0"
-
 punycode@^2.1.0, punycode@^2.3.1:
   version "2.3.1"
   resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5"
@@ -3933,11 +3825,6 @@
   resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8"
   integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==
 
-semver@5.6.0:
-  version "5.6.0"
-  resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004"
-  integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==
-
 semver@^6.3.1:
   version "6.3.1"
   resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4"
@@ -3948,11 +3835,16 @@
   resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.2.tgz#67d99fdcd35cec21e6f8b87a7fd515a33f982b58"
   integrity sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==
 
-semver@^7.5.4, semver@^7.6.0, semver@^7.6.3:
+semver@^7.5.4, semver@^7.6.3:
   version "7.7.3"
   resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.3.tgz#4b5f4143d007633a8dc671cd0a6ef9147b8bb946"
   integrity sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==
 
+semver@^7.7.3:
+  version "7.8.5"
+  resolved "https://registry.yarnpkg.com/semver/-/semver-7.8.5.tgz#39b646037dd50c14fb451e7e4cac58ed8b863f69"
+  integrity sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==
+
 set-function-length@^1.2.2:
   version "1.2.2"
   resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449"
@@ -4068,14 +3960,6 @@
   resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9"
   integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==
 
-source-map-support@0.5.9:
-  version "0.5.9"
-  resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.9.tgz#41bc953b2534267ea2d605bccfa7bfa3111ced5f"
-  integrity sha512-gR6Rw4MvUlYy83vP0vxoVNzM6t8MUXqNuRsuBmBHQDu1Fh6X015FrLdgoDKcNdkwGubozq0P4N0Q37UyFVr1EA==
-  dependencies:
-    buffer-from "^1.0.0"
-    source-map "^0.6.0"
-
 source-map-support@~0.5.20:
   version "0.5.21"
   resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f"
@@ -4317,10 +4201,10 @@
   resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144"
   integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==
 
-ts-api-utils@^2.1.0:
-  version "2.1.0"
-  resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-2.1.0.tgz#595f7094e46eed364c13fd23e75f9513d29baf91"
-  integrity sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==
+ts-api-utils@^2.5.0:
+  version "2.5.0"
+  resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-2.5.0.tgz#4acd4a155e22734990a5ed1fe9e97f113bcb37c1"
+  integrity sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==
 
 ts-declaration-location@^1.0.6:
   version "1.0.7"
@@ -4352,7 +4236,7 @@
     minimist "^1.2.6"
     strip-bom "^3.0.0"
 
-tslib@^1.8.1, tslib@^1.9.0:
+tslib@^1.9.0:
   version "1.14.1"
   resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
   integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
@@ -4367,13 +4251,6 @@
   resolved "https://registry.yarnpkg.com/tsscmp/-/tsscmp-1.0.6.tgz#85b99583ac3589ec4bfef825b5000aa911d605eb"
   integrity sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==
 
-tsutils@3.21.0:
-  version "3.21.0"
-  resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623"
-  integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==
-  dependencies:
-    tslib "^1.8.1"
-
 type-check@^0.4.0, type-check@~0.4.0:
   version "0.4.0"
   resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1"
@@ -4454,10 +4331,10 @@
     possible-typed-array-names "^1.0.0"
     reflect.getprototypeof "^1.0.6"
 
-typescript@5.8.2, typescript@~5.2.0:
-  version "5.8.2"
-  resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.8.2.tgz#8170b3702f74b79db2e5a96207c15e65807999e4"
-  integrity sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==
+typescript@6.0.3, typescript@~5.2.0:
+  version "6.0.3"
+  resolved "https://registry.yarnpkg.com/typescript/-/typescript-6.0.3.tgz#90251dc007916e972786cb94d74d15b185577d21"
+  integrity sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==
 
 typical@^4.0.0:
   version "4.0.0"