Repository navigation
feat(flutter): carry the value of each fixed Flutter allowance - #11641
Merged
Merged
Conversation
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
2 tasks done
morluto
changed the base branch from
feat/deno-fixed-allowance-refusals
to
main
November 16, 2026 01:29
Contributor
[Medium impact] The PR appears safe to merge; no new actionable issue remains in the reviewed changes. SummaryFlutter refusals now carry the value and unit of the allowance that stopped the read.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[ZIP reader refuses input] --> B{Reader facts}
B -->|Named ceiling| C[Keep reader ceiling and advice]
B -->|Expansion budget| D[Flutter reports effective expansion value]
B -->|Unnamed limit| E[Flutter reports metadata read allowance]
C --> F[Structured refusal and recovery]
D --> F
E --> F
C --> G[JNI includes advice in failure message]
Reviews (4) · Last reviewed commit: "test(artifacts): compare decoder-window ..." · Reviewed by Greptile |
Each Flutter fixed allowance now passes limit and unit, so details.refusal states the ceiling. The ABI inventory refusal names the ceiling that was exceeded: the ABI count or the library path bytes.
…ace refusals A Zstandard member whose window exceeds the ZIP reader's fixed 128 MiB allowance now carries that ceiling as a typed fixed allowance (limit, unit, and the recompression narrowing). Flutter reported any ZIP reader limit as its APK metadata read allowance, and Playwright trace import as a recorder-chunk limit; both now keep the reader's ceiling.
…sion advice A ZIP reader limit with a reader-owned parameter (the size-derived expansion budget) is no longer reported as the Flutter metadata read allowance; Flutter exposes no control for it, so it is a fixed ceiling with the reader's effective value. The JNI library failure message carries the reader-named ceiling's narrowing, since that report has no refusal field.
morluto
force-pushed
the
feat/flutter-fixed-allowance-limits
branch
from
November 16, 2026 01:37
2448869 to
139ebe8
Compare
22 tasks
This was referenced Nov 16, 2026
morluto
added a commit
that referenced
this pull request
Nov 16, 2026
…main (#11666) #11518 merged its counted baseline beside #11641, which added two fixed-allowance refusals to FlutterBuildProvider, and #11659, which removed one from AdbCommand; AppleAssetCatalogAnalysis no longer builds one. The architecture guards fail on main until the baseline records those counts.
1 of 12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refs #10508 (item 4, Flutter slice). The ten Flutter fixed-allowance calls named no value, so
details.refusalhad nolimitorunit. Each now carries the constant that refused the input. Tracing the APK metadata read call to its source found a misattribution: any ZIP readerlimitfailure, including a Zstandard member whose decoder window exceeds the ZIP reader's fixed 128 MiB allowance, was reported as the Flutter APK metadata read allowance. With a value attached, that would state the wrong ceiling (8 MiB). The ZIP reader now names its own decoder-window ceiling, and Flutter and Playwright trace import keep it.Builds on
ArtifactReaderFailure.fixedAllowancefrom #11634 (merged).Problem and expected behavior
Before:
identify_flutter_buildon an APK with 33 ABIs returnedresource_constraintwithoutdetails.refusal.limit. An APK whoselib/arm64-v8a/libapp.sois a Zstandard member with a 256 MiB window was refused as "The Flutter APK metadata read allowance". A Playwright trace with such a member told the caller to "Select a smaller complete recorder chunk".After:
details.refusal = { kind: "fixed_ceiling", allowance: "The Flutter ABI inventory allowance", allowance_kind: "parser", limit: 32, unit: "ABIs" }. A library path above 1024 bytes names "The Flutter library path allowance" (limit: 1024, unit: "bytes") instead of the ABI allowance.candidates) carry their values.details.refusal = { allowance: "The ZIP Zstandard decoder window allowance", allowance_kind: "parser", limit: 134217728, unit: "bytes", narrowing: "Recompress the member with a window of at most 128 MiB, or decompress it with a tool that admits larger windows, then retry." }. The message keeps the outcome ("…above REA's fixed 128 MiB allowance; the archive is not necessarily corrupt."); the recovery now comes from the refusal.Change and scope
src/flutter/FlutterBuildProvider.ts: oneFLUTTER_ALLOWANCEStable owns each ceiling with its constant; the ten call sites use it. The ABI inventory refusal selects the ceiling that was exceeded. A readerlimitfailure that names its own ceiling keeps it; only the unnamed ZIP metadata read refusal is attributed to Flutter's budget.src/resources/ZipArtifactReader.ts: the decoder-window failure carries itsFixedAllowance; the recovery sentence moved from the message intonarrowing.src/browser/history/playwrightTrace/TraceFailure.ts: a reader limit with a named ceiling keeps it instead of the recorder-chunk remediation.readerLimitFailure): a reader-named ceiling is kept; areaderLimit(the size-derivedartifact_limits.expanded_bytesbudget, which Flutter does not expose) becomes "The Flutter APK expansion allowance (derived from the APK size)" with the reader's effective value; only the remaining unnamed ZIP limit is the 8 MiB metadata read allowance.src/android/AndroidJniLibraries.ts: the JNI library failure message carries a reader-named ceiling'snarrowing, because that report has no refusal field.tests/fixtures/zipZstandard.ts: optional member name.Not included: SAZ import (
SazCapture.ts) also reports any ZIP reader limit as its expanded-input budget; fixing it needs a new capture limit name, so it is tracked separately. The other families of #10508 item 4 (pcap/tshark, native structural decoding, Go, Rust, IL2CPP, sigrok, Electron fuse, CDP, web network projection, assetutil) are later slices; the three W4 sites (src/adb×2,src/process/ArtifactAnalysisResources.ts) belong to another workstream.Contribution scope: within existing boundaries.
Contract and boundary impact
details.refusal.limit/unit(andnarrowingfor the decoder window). The decoder-windowremediation.actionwording changes;code,retryableandreported_limitsare unchanged except that a Flutter decoder-window refusal no longer reportsmax_metadata_read_bytes, which did not apply to it.docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs andskills/; edit authored instructions in.agents/skills/reverse-engineer-anything/and never commit build outputs): none.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
tests/boundary/filesystem/flutterBuildProvider.test.ts: the oversized-APK, ZIP metadata budget, ABI expansion (now also a long library path case) and hash-candidate tests assertdetails.refusal. A new case builds a real APK whoselibapp.sois a large-window Zstandard member and asserts the decoder-window ceiling for both operations. With the Flutter provider at main, the 8 refusal assertions fail; with only the Flutter table applied, the 2 decoder-window cases fail withallowance: "The Flutter APK metadata read allowance", limit: 8388608.src/browser/history/playwrightTrace/PlaywrightTraceDecoder.test.ts: a new large-windowtrace.tracecase fails with main'sTraceFailure.tsand passes with the change.tests/boundary/cli/artifactZstandardWindow.test.ts: CLI and stdio MCP assert the decoder-window refusal facts instead of the old remediation sentence.reported_limits.For evidence-bearing changes:
Validation performed
npm run test:focused --Flutter provider,ZipArtifactReader.test.ts, CLI decoder window, ZIP integrity, Playwright trace decoder and lifecycle: 228 passed.TraceFailure.ts: 1 failed.npm run check:fast(typecheck, lint, architecture guards): passed.npx oxfmt --checkon the changed files: passed.androidJniLibraries.test.ts145 passed; the 3 new cases fail with the previous head's sources;npm run check:fastpassed.analysisRefusalRemediationover the exportedZIP_ZSTANDARD_WINDOW_CEILINGin the Flutter, Playwright, CLI/MCP and JNI tests; those 4 files 167 passed;npm run check:fastpassed.Compatibility, safety, and release
Author readiness
Human owner:
Before merge
type(scope): outcome.