Contain a native panic without pretending the process is safe
Malformed options trigger a Rust panic that crosses the C ABI and aborts the Node process.
- Focused work estimate
- 6h + prerequisites
- Priority in the scenario
- High
- Engineering practice
- Panic safety · Isolation boundaries · FFI
Estimated field mix
- Systems programming60%
- Security40%
Field percentages are editorial estimates of the ticket's engineering focus. They total 100%; they are not measured time, proficiency scores, or ownership evidence.
Review it, then add it to your workspace.
The board opens an editable draft; nothing is saved until you confirm it. Sign-in and workspace permissions apply, and Demo boards remain ephemeral.
Project context
A fictional desktop backup tool calls a small Rust compression library from Node.js. The binding leaks buffers on exceptions and treats ABI mismatches as corrupted input. Build against generated byte arrays and a local native library; no production archive format or user files are supplied.
Setup prerequisites
- FFI ownership
- Binary compatibility
- Error handling
Preceding work
Complete these dependencies, or supply their agreed outputs before taking this ticket.
Acceptance criteria
- FFI entry points catch supported unwind cases before the ABI boundary
- Panic maps to an internal fault with operation identity
- Abort-configured builds are identified and isolated out of process
Implementation constraints
- Do not claim catch_unwind protects memory after arbitrary native corruption.
Verification to include
- Trigger a controlled recoverable panic and map its result.
- Select an aborting fixture provider and require process-isolation policy instead of in-process execution.
Deliverables
- Panic-boundary policy and controlled failure fixtures
Rollout and recovery
Keep risky codecs behind an external process provider until their failure mode is qualified.
Value of the work
For the engineer: Practice language-boundary contracts, native resource safety and version negotiation.
For the team: Review a binding that fails safely and can be rolled back before native code enters additional application paths.
Evidence boundaries
Outcome Evidence: Tests, patches, and runbooks are requested deliverables. They become Outcome Evidence only through a qualified Mission and immutable Evidence IDs.
Ownership Evidence: Independent adaptation must be observed under a declared verification policy and cite immutable Evidence IDs. Completing a planning ticket establishes no Ownership Evidence.