Skip to content

Demonstrate bridge-function resolution teardown behavior in Hello World - #184

Open
clholgat wants to merge 2 commits into
mainfrom
cholgate/teardown-repro
Open

Demonstrate bridge-function resolution teardown behavior in Hello World#184
clholgat wants to merge 2 commits into
mainfrom
cholgate/teardown-repro

Conversation

@clholgat

Copy link
Copy Markdown
Collaborator

Add a debug-only teardown repro to the Hello World iOS app: an isolated runtime is torn down mid-resolution, then a probe bridge function is resolved through the raising +functionWithJSRuntime: path. Two buttons show both sides of the resolution-teardown degrade (VALDI_ENABLE_RESOLUTION_TEARDOWN_DEGRADE): degrade on returns a no-op (no crash), degrade off aborts (SIGABRT).

Android/web wire the buttons to no-ops (iOS-specific).

Description

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • Documentation improvement
  • Performance optimization
  • Test improvement
  • Other (please describe)

Testing

  • Tests pass locally (bazel test //...)
  • Added/updated tests for changes (if applicable)
  • Tested on multiple platforms (iOS/Android/Web/macOS as applicable)
  • Manual testing performed (describe below)

Testing Details

Checklist

  • Code follows project style guidelines
  • Documentation updated (if needed)
  • No breaking changes (or documented in description)
  • Commit messages follow conventional format
  • No secrets, API keys, or internal URLs included

Related Issues

Additional Context

Add a debug-only teardown repro to the Hello World iOS app: an isolated
runtime is torn down mid-resolution, then a probe bridge function is resolved
through the raising +functionWithJSRuntime: path. Two buttons show both sides
of the resolution-teardown degrade (VALDI_ENABLE_RESOLUTION_TEARDOWN_DEGRADE):
degrade on returns a no-op (no crash), degrade off aborts (SIGABRT).

Android/web wire the buttons to no-ops (iOS-specific).
@github-actions github-actions Bot added area/build-system Bazel build rules and config size/L labels Aug 31, 2026
@github-actions

Copy link
Copy Markdown

📊 PR Size: size/L

Total changes: 390 lines (12 files)

Top files changed:

  • apps/helloworld/src/ios/SCValdiTeardownRepro.mm: +112 -0
  • apps/helloworld/TEARDOWN_REPRO.md: +57 -0
  • apps/helloworld/src/ios/SCValdiTeardownRepro.h: +45 -0
  • apps/helloworld/src/valdi/hello_world/src/HelloWorldApp.tsx: +42 -1
  • apps/helloworld/src/ios/BUILD.bazel: +31 -3
  • apps/helloworld/src/valdi/teardown_probe/src/TeardownReproProbe.ts: +28 -0
  • apps/helloworld/src/valdi/teardown_probe/BUILD.bazel: +25 -0
  • apps/helloworld/src/ios/SCMyNativeModuleFactory.m: +14 -0
  • apps/helloworld/src/valdi/hello_world/src/NativeModule.d.ts: +11 -0
  • apps/helloworld/src/android/MyNativeModuleFactory.kt: +9 -0

...and 2 more files

Size calculated as additions + deletions. Labels: XS (<10), S (<50), M (<250), L (<1000), XL (1000+)

Third debug button (teardown-invocation-button): after teardown the resolution
degrades to a no-op function, but INVOKING it returns a null value in a
_Nonnull slot. Passing that null to a non-null-requiring API
(+[NSURL fileURLWithPath:]) raises NSInvalidArgumentException and aborts
(SIGABRT) — the invocation-teardown nil-in-nonnull crash, distinct from the
resolution SIGABRT. Adds a string @ExportFunction (getTeardownPath) and an
env-gated debug autorun hook (TEARDOWN_REPRO_AUTORUN=invocation) so it can be
triggered without a tap.
@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown

🎉 Bazel & CI Test Results

Test Suite Result
Snapshot Tests ✅ success
API Surface Check ✅ success
macOS: C++ & Platform Tests ✅ success
Linux: Build & Export ✅ success
valdi_web Integration Test ✅ success
Test Coverage Delta ✅ success
Linux: Hotreload Smoke ✅ success
Valdi Smoke Tests ✅ success
Linux: Module Tests ✅ success
Linux: C++ Tests ✅ success
Linux: Build Compiler ✅ success
Linux: Registry Validation ✅ success

All Bazel configuration and CI tests passed!

The build system and core tooling are working correctly.

🚀 Bazel remote cache is now enabled - future builds will be faster!

Workflow: Valdi CI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build-system Bazel build rules and config size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant