Problem
NfOutput appends formatToParts metadata and translated digit buffers directly to the Context arena. NumberFormat, range formatting, and DurationFormat copy those parts into managed JavaScript strings, but the intermediate allocations remain retained for the Context lifetime. Under the bounded-heap recovery witness this becomes the next deterministic OOM after #638 and #639 remove the outer RelativeTimeFormat and DurationFormat scratch layers.
Required change
- Give structural NumberFormat output explicit invocation-local ownership.
- Keep part values alive through range comparison/list assembly and nested DurationFormat flattening.
- Reclaim all metadata and translated-digit storage immediately after the managed result is materialized.
- Preserve failure atomicity and do not raise heap budgets or weaken the recovery witness.
Acceptance evidence
- Focused normal and TSan bounded-heap recovery witness.
- NumberFormat unit coverage, including formatToParts/range/non-Latin digits and allocation-failure injection.
test/intl402/NumberFormatbefore → after with no regressions.- Full exact unit shard containing the recovery witness.