Selected changesmerged Sep 1, 2026
fix(ext/node): allow repeated child process signalsTypeScript · 68 + / 27 −
Introduces 3 new declarations in ext/node/polyfills/internal/child_process.ts.
Adds new language design rather than adjusting what was there. Tests changed with it, with code of their own.
ext/node/polyfills/internal/child_process.ts ↗ · 2 files
@@ -873,20 +890,19 @@ class ChildProcess extends EventEmitter { } } - /* Cancel any pending IPC I/O */- if (this[kCanDisconnect]) {- this.disconnect?.();+ if (isWindows) {+ // See the `#windowsSignalFallback` use in the status handler above.+ this.#windowsSignalFallback = signalName;+ }+ if (signalName === "SIGKILL") {+ this[kSigkillIssued] = true; }- this.killed = true;- this.signalCode = signalName; return true; } [SymbolDispose]() {- if (!this.killed) {- this.kill();- }+ this.kill(); } ref() {
[Fix] Sparse TikToken tokenizers silently failPython · 113 + / 70 −
Introduces 4 new declarations in src/transformers/tokenization_utils_tokenizers.py.
Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.
src/transformers/tokenization_utils_tokenizers.py ↗ · 3 files
@@ -325,6 +269,102 @@ def _iter_special_tokens(values: Iterable[Any]) -> list[str]: local_kwargs["merges"] = merges return local_kwargs + @classmethod+ def _convert_from_tiktoken(cls, vocab_file: str, local_kwargs: dict[str, Any]) -> dict[str, Any]:+ """Path to a vocab file and a list of extra special tokens."""+ from .convert_slow_tokenizer import TikTokenConverter++ # `added_tokens_decoder` is a (token_id -> token) dict of tokens that may not be contiguous+ added_tokens_decoder: dict[int, str] = {+ int(token_id): token["content"] if isinstance(token, dict) else str(token)+ for token_id, token in (local_kwargs.get("added_tokens_decoder") or {}).items()+ }+ # `extra_special_tokens` is a list of tokens to append to the base vocabulary+ extra_special_tokens: list[str] = local_kwargs.get("extra_special_tokens") or []+ if isinstance(extra_special_tokens, dict):+ extra_special_tokens = list(extra_special_tokens.keys())++ # Retrieve the vocab size from the vocab file+ base_vocab_size = len(TikTokenConverter.load_tiktoken_bpe(vocab_file))++ # If any of the tokens in `added_tokens_decoder` are not in the base vocabulary, they need to be added. To do so+ # we bake them in the `extra_special_tokens` list, with placeholder if `added_tokens_decoder` is not contiguous+ max_added_token_id = max(added_tokens_decoder.keys()) if added_tokens_decoder else 0+ if max_added_token_id >= base_vocab_size:+ new_extras = [+ added_tokens_decoder.get(index, f"<|reserved_token_{index}|>")+ for index in range(base_vocab_size, max_added_token_id + 1)+ ]+ set_new_extras = set(new_extras)+ for special_token in extra_special_tokens:+ if special_token not in set_new_extras:+ new_extras.append(special_token)
turbo-tasks-malloc: report memory from mimallocRust · 313 + / 117 −
Introduces 13 new declarations in turbopack/crates/turbo-tasks-malloc/src/counter.rs.
Adds new framework internals rather than adjusting what was there. Read the linked PR for the surrounding test context.
turbopack/crates/turbo-tasks-malloc/src/counter.rs ↗ · 4 files
@@ -166,42 +212,115 @@ mod tests { use super::*; #[test]- fn counting() {- let mut expected = get();- add(100);- // Initial change should fill up the buffer- expected += TARGET_BUFFER + 100;- assert_eq!(get(), expected);+ fn counts_allocations_and_deallocations() {+ let start = allocation_counters();+ add(100);- // Further changes should use the buffer- assert_eq!(get(), expected);- add(MAX_BUFFER);- // Large changes should require more buffer space- expected += 100 + MAX_BUFFER;- assert_eq!(get(), expected);+ add(250); remove(100);- // Small changes should use the buffer- // buffer size is now TARGET_BUFFER + 100- assert_eq!(get(), expected);- remove(MAX_BUFFER);- // The buffer should not grow over MAX_BUFFER- // buffer size would be TARGET_BUFFER + 100 + MAX_BUFFER- // but it will be reduce to TARGET_BUFFER- // this means the global counter should reduce by 100 + MAX_BUFFER- expected -= MAX_BUFFER + 100;- assert_eq!(get(), expected);-- update(100, 200);
sessions: Preserve background layouts per color schemeTypeScript · 37 + / 12 −
Introduces 2 new declarations in src/vs/sessions/contrib/chat/browser/chat.contribution.ts.
Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.
src/vs/sessions/contrib/chat/browser/chat.contribution.ts ↗ · 4 files
@@ -392,15 +398,23 @@ Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration).regis tags: ['experimental'], ignoreSync: true, },- [AGENT_SESSIONS_CHAT_BACKGROUND_IMAGE_LAYOUT_SETTING]: {+ [AGENT_SESSIONS_PREFERRED_DARK_CHAT_BACKGROUND_IMAGE_LAYOUT_SETTING]: { type: 'string',- enum: [...chatBackgroundImageLayoutValues],- enumItemLabels: chatBackgroundImageLayoutItems.map(item => item.label),- enumDescriptions: chatBackgroundImageLayoutItems.map(item => item.detail),+ ...chatBackgroundImageLayoutEnumConfiguration, default: 'repeat',- scope: ConfigurationScope.APPLICATION,- markdownDescription: localize('chat.agentSessions.backgroundImageLayout', "Controls how the dark and light chat background images are laid out in the Agents Window."),+ scope: ConfigurationScope.MACHINE,+ markdownDescription: localize('chat.agentSessions.preferredDarkBackgroundImageLayout', "Controls how the chat background image is laid out in the Agents Window when using a dark color theme."), tags: ['experimental'],+ ignoreSync: true,+ },+ [AGENT_SESSIONS_PREFERRED_LIGHT_CHAT_BACKGROUND_IMAGE_LAYOUT_SETTING]: {+ type: 'string',+ ...chatBackgroundImageLayoutEnumConfiguration,+ default: 'repeat',+ scope: ConfigurationScope.MACHINE,+ markdownDescription: localize('chat.agentSessions.preferredLightBackgroundImageLayout', "Controls how the chat background image is laid out in the Agents Window when using a light color theme."),+ tags: ['experimental'],+ ignoreSync: true, }, }, });
`alloc` crate: shrink undocumented `unsafe` blocksRust · 133 + / 125 −
Reworks 63 lines of existing logic in library/alloc/src/boxed/thin.rs.
Changes how existing language design behaves. Read the linked PR for the surrounding test context.
library/alloc/src/boxed/thin.rs ↗ · 15 files
@@ -240,34 +240,38 @@ impl<H> WithHeader<H> { alloc::handle_alloc_error(Layout::new::<()>()); }; - // ignore-tidy-undocumented-unsafe- unsafe {- // Note: It's UB to pass a layout with a zero size to `alloc::alloc`, so- // we use `layout.dangling()` for this case, which should have a valid- // alignment for both `T` and `H`.- let ptr = if layout.size() == 0 {- // Some paranoia checking, mostly so that the ThinBox tests are- // more able to catch issues.- debug_assert!(value_offset == 0 && T::IS_ZST && H::IS_ZST);- layout.dangling_ptr()- } else {- let ptr = alloc::alloc(layout);- if ptr.is_null() {- alloc::handle_alloc_error(layout);- }- // Safety:- // - The size is at least `aligned_header_size`.+ // Note: It's UB to pass a layout with a zero size to `alloc::alloc`, so+ // we use `layout.dangling()` for this case, which should have a valid+ // alignment for both `T` and `H`.+ let ptr = if layout.size() == 0 {+ // Some paranoia checking, mostly so that the ThinBox tests are+ // more able to catch issues.+ debug_assert!(value_offset == 0 && T::IS_ZST && H::IS_ZST);+ layout.dangling_ptr()+ } else {+ // ignore-tidy-undocumented-unsafe+ let ptr = unsafe { alloc::alloc(layout) };+ if ptr.is_null() {+ alloc::handle_alloc_error(layout);