Repository navigation
test(mobile): the web app's script fence is re-derived from a measured sweep (OTA phase C, C7.8) - #22152
Conversation
…ead (OTA phase C, C7.8) `4r + 16` was a guess at break-even, and its slack ran from 17 scripts at one route to 4 at thirteen -- loosest where nothing is and tightest where the tree actually sits. Re-measured by building every prefix of the sorted route key list: 15 routes emit 67 scripts, and the marginal cost of a route runs 1 to 9 depending on what it shares, so no line through the route count is both an upper bound and a budget. The sweep is now the fence's only input. The envelope is the measurement plus one margin at the swept tree, growing by the worst route the sweep saw for every route past it, so a new route breaches it only by costing more than any route measured. The margin is four, which is the most the count has been seen to move at a fixed route count with no route added: the head that wrote the old fence read 32, 43, 61 and 69 at 8, 10, 12 and 14 routes where this one reads 34, 44, 57 and 65. Two-sided in the test, which is what stops the next bump: a build more than the margin under the envelope fails there too, so the fence has to be re-measured rather than raised. The route count stays the only term and the mermaid control still tells one artifact from 172 chunks. The shell-fit crossing comes in from 50 routes to 31 with it, because the envelope grants the worst swept route where `4r + 16` granted four. Byte budgets re-read from this build and unchanged: 8,053,438 of 9,437,184 total, 1,612,006 before the first route of the 3 MiB allowed. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…A phase C, C7.8) #22072 deleted `native.wakelock.set` from the session route and left both prose counts behind: "Fourteen grants" for a list of thirteen, and "the four audio verbs" for the three that remain. The all-or-none reason went stale with them -- it argued from a screen free to lock, which is the verb that was removed, and the device side has owned that lock since. It now argues from the microphone a route granted two of the three cannot close. The census beside the route-declaration test is what stops the next one. It reads which number words appear before "grants", "audio verbs", "media verbs" and "or none" anywhere in the file and compares them with the list itself, so a second spelling left in place fails rather than passing on the first correct hit, and a comment rewrapped at a different column still matches. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…the tables too (round 1) #22072 removed `native.wakelock.set` from the session route and left the count standing in four more files than the route table: "fourteen grants" in the call-site census and in the hop census, "the four audio grants" in the census and its test, and "the four audio verbs" on the bridge schemas. Each is now counted off the table it describes rather than copied beside it. The six-versus-eight split in the call-site census could not be re-derived -- its own "those eight" never summed to the six rows plus the audio grants, so it was wrong before #22072 too. It is replaced by what the tables say today: six rows pin eight of the session route's thirteen grants, and the other five have censuses of their own. Both numbers come from `PAGE_GRANT_CALL_SITES` and the route list, and the existing case that names six rows covering eight grants is what holds them. The census the route table got is now `spelled-count-census.mjs`, driven from three files instead of one. A phrase restated in a file collapses to one claim, so a header and a test name may spell the same count; a phrase with no number before it reads as the empty list, which no table count matches. The bridge test is the one site with no count left to pin: it names `BRIDGE_NATIVE_VERB_NAMES` instead, and a new assertion holds its own `AUDIO_VERBS` equal to that table's audio rows, so the cases below cannot pin one set while reading as coverage of another. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (6)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review. 📝 WalkthroughWalkthroughThe bundle verifier now calculates chunk ceilings from measured route-prefix sweeps, route spreads, and a fixed margin. Bundle tests validate the sweep and updated asset and shell thresholds. A shared spelled-count utility was added. Mobile web route and call-site tests now compare documented grant counts with derived table counts. Audio coverage now compares native audio verbs with the current audio verb table. Session-route comments describe thirteen grants and three audio verbs. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The bundle guard now follows measured route and script data, while grant documentation is checked against current route and verb tables. Reported verification passes, so no actionable merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description gives detailed technical context, motivation, implementation details, and verification results. However, it omits several required template sections, including the ELI5 summary, Linked Issue with a Resolution Add all missing template sections. Include the linked issue, state
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 292c871c-293a-4933-a1f9-6d48762b380c
📒 Files selected for processing (9)
config/scripts/build-mobile-web-app-bundle.test.mjsconfig/scripts/mobile-web-app-page-grant-call-sites.mjsconfig/scripts/mobile-web-app-page-grant-call-sites.test.mjsconfig/scripts/mobile-web-page-route-hop-coverage.test.mjsconfig/scripts/mobile-web-page-routes.mjsconfig/scripts/mobile-web-page-routes.test.mjsconfig/scripts/spelled-count-census.mjsconfig/scripts/verify-mobile-web-app-bundle.mjsmobile/src/mobile-web-shell/bridge/bridge-audio-verbs.test.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review.
… (round 2) `'of the session'` was counted off every grant in `PAGE_GRANT_CALL_SITES`, which is not what the sentence it pins is about. A row pinning a grant no route declares -- the shell can serve a verb before a screen asks for it -- would have made the census demand the comment overstate what the session route has. Proved before fixing: adding `native.share.send` to the navigate row moved `pinnedHere` from eight to nine while the session intersection stayed at eight, and the census failed asking for "nine of the session route's thirteen grants" against a sentence that was right to say eight. With the intersection it passes under the same probe, and the failure moves to `'grants this file pins'`, which is about this file's rows and does correctly demand nine. The other three rows are left as they were, for the same reason read the other way: `'grants this file pins'` and `'did not'` are about the rows here, so they keep the full list, and `'have censuses of their own'` and `'are not repeated here'` already count the session grants no row pins. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
There was a problem hiding this comment.
ℹ️ No critical issues — one minor census gap inline.
Reviewed changes
- Script fence re-derived —
mobileWebAppBundleMaxChunksis now anchored on the recordedMOBILE_WEB_APP_BUNDLE_SCRIPT_SWEEP(67 scripts at 15 routes) plus a measured margin of 4, granting each route past the sweep the worst measured marginal (9), replacing the4r + 16guess. - Two-sided fence tests — the live build must land within
[top row, top row + margin], the sweep's key list is pinned to the real route tree, and the asset-ceiling crossing assertions move from 50 to 31 routes. - Spelled-count census — new
config/scripts/spelled-count-census.mjsplus three test drivers pin prose grant counts to the tables they describe; stale "fourteen grants" / "four audio verbs" comments corrected to thirteen / three. - Audio-verb table assertion —
bridge-audio-verbs.test.tsderives its set fromBRIDGE_NATIVE_VERB_NAMESrather than spelling a count.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
The census pinned the JSDoc counts and stopped there, so "names six rows covering eight grants" and "reaches every one of the eight through the session route" were free to go stale. Shown rather than argued: with a ninth grant on a row and the header corrected to nine the way the old census forced, the suite went green with both titles still saying eight. `'grants this file pins'` becomes `'grants'`, which reads the header and that title as one claim -- they are the same number, and a row per site would have let them disagree while both passed. The session title takes the intersection, for the reason round 2 gave. Every other spelled number in the file is not a count of a table: "the two tables" is how many sources the census reads, and "the one it reads", "a new one cannot be missed", "any one grant went missing" and "every one of" are quantifiers with no table behind them. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
There was a problem hiding this comment.
ℹ️ No critical issues — one minor pinning suggestion inline.
Reviewed changes
- Session counts split from file counts —
pinnedHereForSessionwas added so the.mjssentence "eight of the session route's thirteen grants" is measured against the session route's grants rather than every row, while this file's own counts keep the full row list. - File-scoped row widened —
'grants this file pins'became bare'grants', pinning the JSDoc header and thenames six rows covering eight grantstitle as one claim so they cannot disagree. - Session title pinned — a
'through the session route'row pins thereaches every one of the eight through the session routetitle, and the JSDoc now states the two-count rule and that titles are read too.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
…ver (round 4) `'through the session route'` took the intersection, but the title it pins heads an assertion that compares `grantsNeeded` with every row's grants. The title names the session route and is not a claim about it: it says the rows here are all reached through that route, so it moves when the rows move. In the divergence the JSDoc already described, the two parted. With a ninth grant on a row the assertion compares nine while the census held the title at eight and passed, leaving a title reading below the assertion under it. Exactly one row takes the intersection now, the `.mjs` sentence for how many of the session route's grants these rows cover, and the JSDoc says so rather than describing a rule with two members. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
There was a problem hiding this comment.
ℹ️ No critical issues — two wording points in the new census JSDoc.
Reviewed changes
- Session-title row re-anchored —
'through the session route'now countspinnedHere(every row's grants), matching the assertion that title heads (grantsNeededagainstPAGE_GRANT_CALL_SITES.flatMap), rather than the session intersection. - Single intersection use —
pinnedHereForSessionis now referenced only by the.mjs'of the session'row, and the JSDoc states that exactly one row takes the intersection. - JSDoc rule rewritten — the two-count paragraph now spells out which sentence takes which count and why the title moves with the rows rather than the route.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
C8.1 (#22141) gave the manifest route an `optionalGrants` lane and put `externalNavigation` on the session route. Three files conflicted, all of them prose this branch had already rewritten. Resolved by taking both intents. The route table keeps this branch's corrected three-verb dictation sentence -- main's side still carried the four-verb text #22072 made stale -- and gains C8.1's `externalNavigation` paragraph whole. The call-site census and its test keep this branch's counts and gain the new grant: `externalNavigation` has a census of its own, so the set this file does not repeat grows from five to six while the rows here still pin eight of the session route's thirteen required grants. The census follows the tables rather than the prose: `censusedElsewhere` counts the required and optional grants no row pins, which is the set that sentence is about, and the route table's census gains a row for C8.1's "the one optional grant in this list". Every spelled count is true on the merged table; the fence is untouched because C8.1 added modules and no route, so the tree still builds 15 routes into 67 scripts against the envelope's 71. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
… the merge (round 5) pullfrog on the census JSDoc, both correct. "make the census demand overstates" was a finite verb where the bare infinitive belongs. "Every other row counts the rows here" was contradicted by its own table: the rows reading the route's list and the rows counting grants no row pins take neither count, so the sentence is scoped to the rows that choose between the two and says what the rest read. The two byte readings in the fence doc are re-measured on the merged tree, since they name a head: 8,055,568 of 9,437,184 total and 1,612,253 before the first route. C8.1 added no route, so the sweep and the envelope are untouched and the tree still builds 15 routes into 67 scripts. Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Since the prior review at aff2d27dfa, this delta merges origin/main (C8.1's optional-grant lane), applies two wording fixes to the census JSDoc, and re-measures the byte readings.
- Merged
origin/main(C8.1) — the three conflicted prose files were resolved by keeping this branch's corrected three-verb dictation sentence and adding C8.1'sexternalNavigationparagraph whole; the call-site census grewcensusedElsewhereso "are not repeated here" counts the required grants no row pins plus the optional one. - Pinned the optional-grant count —
mobile-web-page-routes.test.mjsderivessessionOptionalGrantsfromEXPECTED_PAGE_ROUTESand pins "the one optional grant" in the route table. - Fixed both wording points — the census JSDoc now takes the bare infinitive, and "every other row counts the rows here" is scoped to the rows that choose between the intersection and
pinnedHere, with a closing clause for the rest. - Re-measured the byte readings — the total-bytes and entry-bytes comments in
verify-mobile-web-app-bundle.mjswere refreshed on the merged head.
Verified: the four census files named in the new prose all exist and census their grants; every mapped count hand-checks (13 required, 3 audio, 8 pinned, 5 elsewhere, 6 censused); the moved 30/31 asset-crossing assertions follow from maxChunks(30)=206/maxChunks(31)=215; the focused config suites pass (35 passed / 44 skipped).
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

C7.8: the web app's script fence is re-derived from a measured sweep, and the grant counts in comments are pinned to the tables
Why
verify-mobile-web-app-bundle.mjsbounded the generation's script count with4r + 16, a guess written at break-even (69 of 72 at 14 routes). The plan's rule for when a route breaches it was to re-derive from the measured per-route spread, never to bump. Alongside it, five comments across the route table and its censuses spelled grant counts that had drifted ("Fourteen grants" for a route that declares thirteen; "the four audio verbs" since #22072 left three; a six-versus-eight split that never summed).What
The fence. Scripts emitted at each prefix of the sorted route list, measured on this head:
The spread is 1 to 9 (
prandwebcost one script;reviewcosts nine), not the 4 to 9 the plan recorded. The fence is nowmaxChunks(r) = 67 + 4 + 9 * max(0, r - 15): the measurement at the swept tree, plus one margin, growing by the worst swept route for every route past the sweep. The margin of four is measured, not chosen: the head that wrote4r + 16read 32, 43, 61 and 69 at four prefix lengths where this head reads 34, 44, 57 and 65, so four is the most the count has moved with no route added. The sweep table is the fence's only input: a route addition stales it and the pins fail until someone re-measures, which is the rule. A second pin fails if the envelope is looser than the measurement by more than the margin, so a future bump has to re-derive.Budget reading from this build, ceilings unchanged: 8,053,438 of 9,437,184 bytes (85.3%); entry static closure 1,612,006 of 3,145,728; 15 routes, 67 chunks, 110 assets, 42 images. For the flip checklist: the crossing where the derived asset ceiling passes what the shell will load moves from about 50 routes to 31, because the envelope grants the worst swept route per route where the old fence granted four.
The comments. A spelled-count census (
config/scripts/spelled-count-census.mjs, driven from three test files) pins each counted noun in these files to the table it describes: the session route's thirteen grants and three audio verbs inmobile-web-page-routes.mjs; eight of those thirteen in six call-site rows, the other five under censuses of their own, inmobile-web-app-page-grant-call-sites.mjsand its test; thirteen in the hop-coverage superset claim; andbridge-audio-verbs.test.tsno longer spells a count, it asserts itsAUDIO_VERBSequal the verb table's audio rows.Commits
b53eea2ed8expected 76 to be 71(the4r + 16anchor);the chunk envelope is looser than this build; re-measure MOBILE_WEB_APP_BUNDLE_SCRIPT_SWEEP: expected 9 to be less than or equal to 4309cc7edc4grants: expected [ 'fourteen' ] to deeply equal [ 'thirteen' ]058e7ee055mobile-web-app-page-grant-call-sites.mjs: grants: expected [ 'fourteen' ] to deeply equal [ 'thirteen' ];grants are a strict: expected [ 'fourteen' ] to deeply equal [ 'thirteen' ]; the bridge test's new equality was green on arrival (its stale count was deleted, not corrected)Left alone
The entry-bytes doc in
verify-mobile-web-app-bundle.mjsstill says five of fourteen routes break the entry bound on their own; refreshing it needs a static-import sweep per route.build-mobile-web-app-bundle.test.mjssits at 559 of the 600-line cap.Verification
Lane on
058e7ee055: touched suites 34 (config) and 36 (mobile) passed; full mobile suite 808 files, 8,994 passed;config/scripts251 files, 2,330 passed; tsc, ratchet, lints, anti-slop, changed-code quality (0 across 9 files), React Doctor all 0. Lead gate on058e7ee055againstb9643365ba: tsc 0, ratchet 0, all lint gates 0 (9 changed files), changed-code quality passed, React Doctor 0; mobile 808 files passed;config/scripts249 files passed with two load flakes (build-native-for-platformreap timeout,ci-e2e-shard-selection) that pass alone, 22/22, and touch nothing in this PR; no machine paths.Round 2
d2dcf4ede4— CodeRabbit on058e7ee055: the'of the session'phrase was counted off every grant inPAGE_GRANT_CALL_SITES, not off the ones the session route declares. Proved before fixing by addingnative.share.sendto the navigate row: the full list moved from eight to nine while the session intersection stayed at eight, and the census failed withof the session: expected [ 'eight' ] to deeply equal [ 'nine' ]against a sentence that was right to say eight. With the intersection the same probe passes that row and failsgrants this file pinsinstead, which is about this file's rows and does correctly demand nine. The probe was reverted by its inverse edit, not by a checkout; the module is byte-identical to058e7ee055. The other three rows stay as they were:'grants this file pins'and'did not'describe the rows here and keep the full list, and the twopinnedElsewhererows already count only session grants. Verified ond2dcf4ede4: the file alone 21 passed;config/scripts251 files, 2,330 passed, 16 skipped; changed-code quality 0 across 9 files; React Doctor 0; anti-slop, oxlint and oxfmt clean.Round 3
21bc163490— pullfrog ond2dcf4ede4: the census pinned this file's JSDoc counts but not itsittitles, sonames six rows covering eight grantsandreaches every one of the eight through the session routewere free to drift. The gap was shown rather than argued: with a ninth grant on a row and the header corrected to nine the way the old census forced, the suite went green with both titles still saying eight.'grants this file pins'becomes'grants', which reads the header and the first title as one claim, so the two cannot disagree while both pass; the session title takes the intersection for round 2's reason. Reds under the two probes: a ninth non-session grant givesgrants: expected [ 'eight' ] to deeply equal [ 'nine' ]and correctly leaves the session row green, and droppingnative.media.releasefrom its row makes both new rows demand seven against titles that say eight. Both probes reverted by their inverse edits; the module is byte-identical tod2dcf4ede4. Every other spelled number in the file is not a count of a table: "the two tables" is how many sources the census reads, and "the one it reads", "a new one cannot be missed", "any one grant went missing" and "every one of" are quantifiers with nothing behind them. Verified on21bc163490: the file alone 21 passed;config/scripts251 files, 2,330 passed, 16 skipped; changed-code quality 0 across 9 files; React Doctor 0; anti-slop, oxlint and oxfmt clean.Lead gate on 21bc163 against b964336 (gate-c7-8-21bc163490.log): tsc 0, ratchet 0, changed-code quality 0, react-doctor 0, anti-slop 0, root-format 0 (8 files), max-lines 0, root-oxlint 0 (9 files), config/scripts 251 passed / 2 skipped, mobile 808 passed, machine-paths 0.
Round 4
aff2d27dfa— pullfrog on21bc163490:'through the session route'pinned its title off the intersection, but the assertion that title heads comparesgrantsNeededwithPAGE_GRANT_CALL_SITES.flatMap(row => row.grants). The title names the session route without being a claim about it: it says the rows here are all reached through that route, so it moves when the rows move. Shown under the round-2 probe, where the two part: the assertion compared nine grants while the census held the title at eight and passed, leaving the title reading below the assertion under it. The row now countspinnedHere, so exactly one row takes the intersection — the.mjssentence for how many of the session route's grants these rows cover — and the JSDoc says that rather than describing a rule with two members.pinnedHereForSessionnow has the single use the sentence claims. Probe reverted by its inverse edit; the module is byte-identical to21bc163490. Verified onaff2d27dfa: the file alone 21 passed;config/scripts251 files, 2,330 passed, 16 skipped; changed-code quality 0 across 9 files; React Doctor 0; anti-slop, oxlint and oxfmt clean.Lead gate on aff2d27 against b964336 (gate-c7-8-aff2d27dfa.log): tsc 0, ratchet 0, changed-code quality 0, react-doctor 0, anti-slop 0, root-format 0 (8 files), max-lines 0, root-oxlint 0 (9 files), config/scripts 251 passed / 2 skipped, mobile 808 passed, machine-paths 0.
Round 5
Merge
5cea10a28e. C8.1 (#22141) gave the manifest route anoptionalGrantslane and putexternalNavigationon the session route. Three files conflicted, all of them prose this branch had rewritten. Resolved by taking both intents: the route table keeps this branch's corrected three-verb dictation sentence, since main's side still carried the four-verb text #22072 made stale, and gains C8.1'sexternalNavigationparagraph whole; the call-site census and its test keep this branch's counts and gain the new grant. The set this file does not repeat grows from five to six, so the census gainedcensusedElsewhere, which counts the required and optional grants no row pins, and the route census gained a row for C8.1's "the one optional grant in this list". C8.1 added modules and no route, so the fence is untouched: the merged tree builds 15 routes into 67 scripts against the envelope's 71.Every spelled count on the merged table, all derived and all true: thirteen grants, three audio verbs, three media verbs, three or none and one optional grant in
mobile-web-page-routes.mjs; thirteen grants, three audio grants, six rows pin, eight of the session, five with censuses of their own and six not repeated here inmobile-web-app-page-grant-call-sites.mjs; eight grants, six rows covering, three audio grants, eight did not and eight through the session route in its test; thirteen in the hop-coverage superset claim.Fix
f71a7a2ad0. Two pullfrog wording items:make the census demand overstatestook a finite verb where the bare infinitive belongs, andEvery other row counts the rows herewas contradicted by its own table, so it is scoped to the rows that choose between the two counts and says what the rest read. The two byte readings in the fence doc are re-measured on the merged head, since they name one: 8,055,568 of 9,437,184 total and 1,612,253 before the first route.Render rig. The webkit Link/Image modal case CI failed on
aff2d27dfapasses three times out of three on the merged tree, both engines, plus a verbose fourth run confirming it executes rather than skipping. Recorded infollowup-rig-flakes.mdwith what the assertion counts.Verified on
f71a7a2ad0:config/scripts252 files, 2,345 passed, 16 skipped; touched suites 72 passed; changed-code quality 0 across 9 files againste47ef8cc28and 0 across 110 againstb9643365ba, which now spans main's own commits; React Doctor 0; anti-slop, oxlint and oxfmt clean.Lead gate on f71a7a2 against e47ef8c (gate-c7-8-f71a7a2ad0.log): tsc 0, ratchet 0, changed-code quality 0, react-doctor 0, anti-slop 0, root-format 0 (8 files), max-lines 0, root-oxlint 0 (9 files), config/scripts 252 passed / 2 skipped, mobile 814 passed, machine-paths 0.