Skip to content

build: fix the bridge version constraint and run the packaged suite - #137

Merged
Adel-Ayoub merged 3 commits into
staging/security-containmentfrom
ci/run-integration-tests
Jul 30, 2026
Merged

build: fix the bridge version constraint and run the packaged suite#137
Adel-Ayoub merged 3 commits into
staging/security-containmentfrom
ci/run-integration-tests

Conversation

@Adel-Ayoub

Copy link
Copy Markdown
Collaborator

Installing this package and starting it fails today. RustLib.init() throws, because pubspec.yaml accepted a range of bridge runtimes while the committed bindings are stamped with one exact version, and the bridge compares those two strings and refuses a mismatch. The constraint is exact now, and the Dart runtime, the Rust crate, the generator and the bindings all move to the current release together. The new CI job is what found it, by building a throwaway app outside the repository against the assembled publish payload and running the containment subset against the library that app links.

The pin stays exact. While bindings are committed and the runtime compares versions by string, any range at all ships something a consumer can install and not start, so pub's complaint about a tight constraint is permanent rather than a stopgap.

Assembling the payload also turned up two things it should not have been carrying. /build/ stopped being excluded once .pubignore replaced the root .gitignore instead of extending it, which shipped 44 MB of whatever the last local flutter test left behind, and rust/.gitignore named src/frb_generated.rs, a tracked file, which is what the dry run had been exiting 65 over. The published archive goes from 14 MB to 620 KB.

One line in the regeneration is worth a look. Four sse_decode sites moved from vec![] to Vec::with_capacity(len_ as usize), and len_ is an i32 read off the wire, so a hand-built frame carrying a negative length used to yield an empty vector and now asks the allocator for something absurd. Reaching it needs process access already, and neither outcome reads or writes out of bounds.

@Adel-Ayoub
Adel-Ayoub merged commit ccff449 into staging/security-containment Jul 30, 2026
6 checks passed
@Adel-Ayoub
Adel-Ayoub deleted the ci/run-integration-tests branch July 30, 2026 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant