Repository navigation
Conversation
Verified: python3 scripts/check_panic_unwind.py passes, and fails with panic = "abort" in the release profile; actionlint
Verified: python3 scripts/check_panic_unwind.py passes
Codex Review Summary: ✅ CompletedThis 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. |
talosmachina
left a comment
There was a problem hiding this comment.
No findings. Adds a CI check that fails when an Android or iOS build of the library would use panic = "abort", so UniFFI can still turn Rust panics into Kotlin/Swift errors. Reviewed af19db2, light tier.
What I checked, and 6 candidates I ruled out
Read in full: .github/workflows/panic-unwind.yml, scripts/check_panic_unwind.py, Cargo.toml, build_android.sh, build_ios.sh, .cargo/config.toml
Not run: this is a static review; I did not execute the PR's code. I applied the script's regex literals to the head's build scripts and to hand-written mutations instead.
CI: mobile-builds-unwind green on this head; the other checks are green except usdt-tests, still running and untouched by this diff.
What the patterns classify on this head: the mobile commands are cargo ndk ... build --release in build_android.sh and the two cargo build --release --target=aarch64-apple-ios{,-sim} in build_ios.sh, all profile release; the bare host cargo build / --release lines are skipped as host builds. Cargo.toml has no [profile] table, so release resolves to unwind, which matches the description.
Ruled out
- Abort set outside
Cargo.tomlslips through:ABORTmatchespanic = "abort",panic='abort',-C panic=abortand-Cpanic=abortinRUSTFLAGSor arustflagsarray,CARGO_PROFILE_<ANY>_PANIC,--config 'profile.release.panic="abort"',immediate-abortandpanic_immediate_abort;CARGO_PROFILE_RELEASE_DEBUG=2andpanic = "unwind"do not match. - Custom profile or
inheritschain hides abort:--profile=mobileis parsed, andpanic_strategyfollowsinheritsuntil it finds apanickey. A cycle would loop, but Cargo rejects cyclicinheritsbefore CI gets this far. - A build moves to a form the parser does not see (
CARGO_BUILD_TARGET, a renamed script): no mobile build is found, and the script errors withno mobile build found, so it fails closed. -rfalse match:RELneeds whitespace before it and a word boundary after it, so-rfor a--target=...-r...value does not count as release.- Workflow risk:
pull_request(not_target),contents: read, no secrets, onepython3step.tomllibneeds 3.11, andubuntu-24.04ships 3.12. - Comment-only skip is line-start only: an abort string in a trailing
# ...comment would be flagged. That fails closed, so it can only cause a false alarm.
Merge confidence: 4/5, no findings and CI green, but the script's failing path was exercised here only through its copied patterns, not by running it on an abort profile.
Description
Panic strategyCI check that fails if an Android or iOS build of this library would abort on panic, because UniFFI can turn a Rust panic into a Kotlin or Swift error only when the library unwinds; withpanic = "abort"every panic kills the app.release, which unwinds both before and after this PRPreview
N/A — no user-visible changes.
QA Notes
Manual Tests
N/A
Automated Checks
python3 scripts/check_panic_unwind.py: passes, and fails withpanic = "abort"in the release profile0.8.0-rc15Androidarm64-v8alibrary: it carries unwind tables and nopanic_abortruntimeModels used
Claude Opus 5.5(reasoning:medium)Claude Opus 5.5(reasoning:medium)Gemini 4 Neon(reasoning:high)