Repository navigation
fix(plugins): keep the plugin consent fingerprint Hermes-compatible so main's Mobile checks pass - #37370
Conversation
…hone bundle passes Hermes checks Main's Mobile verify has failed since #37316 because the plugin consent fingerprint (bundled into the phone app via src/shared) used Array.prototype.toSorted, which Hermes lacks. flatMap already returns a fresh array, so sorting it in place keeps the same result.
|
No actionable comments were generated in the recent review.
|
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Review loop status: done (light path) Problem: since #37316, main's Mobile verify has failed. The phone app bundles User-facing change: none. The list is now sorted in place; Review: one fresh adversarial reviewer confirmed each light-path criterion against the code and found nothing to fix. It ran the mobile Hermes compatibility tests (2 passed) and the consent and replacement tests (21 passed), checked seven equivalence cases between the old and new sort, and reproduced the failure on an engine without Fixed in review: no test checked why the list is sorted at all: a plugin whose commands replace two built-in actions must get the same fingerprint whatever order the commands are listed in, or reordering its manifest would ask the user to approve it again. One check added to the existing replacement-consent test (16e5a6f); it fails without the sort and passes with it, and the reviewer agreed. Verified: CI green on 16e5a6f, including Mobile verify. QA: tests (a pure function; CI's Hermes check and the consent tests are the proof, no app run needed). No native chat or agent code changed. Main sync: one merge of main (32b4a13), picking up #37345, which fixed the unrelated unit-test failures main had (plugin E2E routing and prompt-receipt timing) that had also failed this PR's first CI run. For Brennan's review:
|
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Picks up main's fix for its own Mobile verify failure (#37370).
Brings main's Hermes-compatible plugin fingerprint (#37370) so the stacked PR's mobile check can pass.
Brings main's Hermes-compatible plugin fingerprint (#37370).
Main's Mobile Checks have failed since #37316 (999160b). The phone app bundles
src/shared, and the new plugin consent fingerprint sorted its "replaces" list withArray.prototype.toSorted, which the phone's Hermes engine doesn't support. The Hermes compatibility test (mobile/src/hermes-array-sorting-compat.test.ts) catches exactly this and fails on main, which also blocks every open PR's Mobile verify job.What changes: the list is sorted in place instead.
flatMapalready returns a new array, so the fingerprint is byte-for-byte the same and nothing a user sees changes; the phone bundle no longer contains the unsupported call. A test now also checks that the order a plugin lists its replacing commands in doesn't change the fingerprint, which is what the sort is for.Light path classification:
Plan: replace
.toSorted()with.sort()on the arrayflatMapjust created; CI's Mobile verify (Hermes compatibility test) is the check.