Daily edition

Sep 4, 2026

The edition exactly as it was published. Nothing here is re-selected on a later reading.

Sep 5, 20265 reads · 109 merged PRs screened

core implementation

huggingface/transformers · #47975

Files changed →View PR ↗

[generate] stop synchronizing the accelerator on every decode stepPython · 185 + / 3

Introduces 13 new declarations in src/transformers/generation/utils.py.

Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.

src/transformers/generation/utils.py · 5 files

@@ -356,6 +357,127 @@ class GenerateBeamEncoderDecoderOutput(ModelOutput): GenerateOutput = GenerateNonBeamOutput | GenerateBeamOutput  +def _undo_generation_steps(num_steps: int, input_ids: torch.LongTensor, *recorded: "tuple | None") -> tuple:+    """+    Undo the last `num_steps` decoding steps, so that they leave no trace in what `generate` returns.+    Note that the cache entries those steps wrote are dropped by `DeferredStopCheck.finish` instead.+    """+    # `[:-0]` is `[:0]`, which would empty everything rather than leave it alone+    if num_steps == 0:+        return (input_ids, *recorded)+    return (input_ids[..., :-num_steps], *(record[:-num_steps] if record else record for record in recorded))+++class StopCheck:+    """+    Decides when the decoding loop should stop, and hands each new token to a streamer.+    """++    def __init__(self, streamer: "BaseStreamer | None" = None):+        self.streamer = streamer++    def __call__(self, unfinished_sequences: torch.Tensor, tokens: torch.Tensor, length: int) -> bool:+        if self.streamer is not None:+            self.streamer.put(tokens.cpu())+        return bool(unfinished_sequences.max() == 0)++    def finish(self) -> int:+        """Flush whatever is still held back, and report how many decoding steps have to be undone."""+        return 0+++class DeferredStopCheck(StopCheck):

systems design

kubernetes/kubernetes · #141176

Files changed →View PR ↗

Refactor watch event dispatch metric stage breakdownGo · 69 + / 46

Introduces 4 new declarations in staging/src/k8s.io/apiserver/pkg/storage/cacher/metrics/metrics.go.

Adds new systems design rather than adjusting what was there. Tests changed with it, with code of their own.

staging/src/k8s.io/apiserver/pkg/storage/cacher/metrics/metrics.go · 4 files

@@ -33,35 +33,49 @@ const ( 	subsystem = "watch_cache" ) -// DispatchStage identifies a single stage of an event's lifecycle as it moves-// through the watch cache dispatch pipeline. It is used as the "stage" label-// value on the dispatchStageDuration metric.-//-// StageTotal is the end-to-end latency of a successfully delivered event.-// The remaining stages measure individual segments of that path.-type DispatchStage int+// DispatchPoint identifies a point in a watch event's dispatch lifecycle. The+// duration between two points forms a labeled "stage" of the dispatch_duration+// metric.+type DispatchPoint int  const (-	// StageTotal: end-to-end, etcd decode -> written to the result channel.-	StageTotal DispatchStage = iota--	// StageStorageToCache: event decoded from etcd -> event received by cacher.-	// Captures the delay between when an event is decoded from the storage backend-	// and when it is first processed by the cacher's reflector loop.-	StageStorageToCache--	// StageWatcherToClientHandler: watch.Event built -> written to watcher's result channel.-	// Captures time spent blocked handing the event off to the client,-	// i.e. downstream (result channel) backpressure.-	StageWatcherToClientHandler--	numDispatchStages+	// PointStorageDecoded: the event was decoded from the storage backend (etcd).+	PointStorageDecoded DispatchPoint = iota+	// PointCacheReceived: the event was first processed by the cacher's reflector loop.

language design

react/react · #37497

Files changed →View PR ↗

[DevTools] Upgrade chrome-devtools-mcp to 1.8.0 in cdt-mcp e2eJavaScript · 72 + / 6

Introduces 3 new declarations in packages/react-devtools-cdt-mcp/e2e/run.flow.js.

Adds new language design rather than adjusting what was there. Read the linked PR for the surrounding test context.

packages/react-devtools-cdt-mcp/e2e/run.flow.js · 3 files

@@ -628,10 +631,61 @@ async function evaluatePageReadiness(   chrome: Chrome,   fn: string ): Promise<PageReadiness> {-  const output = await chrome.json(['evaluate_script', fn]);+  const output = await chrome.json([+    'evaluate_script',+    fn,+    '--pageId',+    String(chrome.pageId),+  ]);   return parsePageReadiness(parseJsonFromText(unwrapTextResponse(output))); } +function parsePageId(value: mixed): number | null {+  if (typeof value === 'number' && Number.isInteger(value)) {+    return value;+  }+  if (value == null || typeof value !== 'object') {+    return null;+  }+  if (Array.isArray(value)) {+    for (let index = 0; index < value.length; index++) {+      const pageId = parsePageId(value[index]);+      if (pageId != null) {+        return pageId;+      }+    }+    return null;+  }+  const object = value;+  if (object.pages != null) {+    const pageId = parsePageId(object.pages);+    if (pageId != null) {

language design

denoland/deno · #36727

Files changed →View PR ↗

fix(npm): correct the pnpm lockfile import against real-world lockfilesRust · 848 + / 20

Introduces 19 new declarations in libs/resolver/pnpm_lockfile_import.rs.

Adds new language design rather than adjusting what was there. Read the linked PR for the surrounding test context.

libs/resolver/pnpm_lockfile_import.rs · 1 files

@@ -756,6 +972,618 @@ snapshots:     assert_eq!(v["npm"]["lodash@4.17.21"]["integrity"], "sha512-AAA");   } +  #[test]+  fn aliased_snapshot_dependency() {+    // `string-width-cjs: string-width@4.2.3` names a package, not a version,+    // so it must not collapse into `string-width-cjs@string-width@4.2.3`.+    let input = r#"+lockfileVersion: '9.0'++importers:+  .:+    dependencies:+      wrap-ansi:+        specifier: ^8.1.0+        version: 8.1.0++packages:+  wrap-ansi@8.1.0:+    resolution: {integrity: sha512-WRAP}+  ansi-styles@6.2.1:+    resolution: {integrity: sha512-ANSI}+  string-width@4.2.3:+    resolution: {integrity: sha512-WIDTH}+  '@scope/pkg@1.0.0':+    resolution: {integrity: sha512-SCOPED}++snapshots:+  wrap-ansi@8.1.0:+    dependencies:+      ansi-styles: 6.2.1+      string-width-cjs: string-width@4.2.3+      scoped-alias: '@scope/pkg@1.0.0'

core implementation

microsoft/vscode · #334594

Files changed →View PR ↗

chat: fix GitHub context repository selectionTypeScript · 153 + / 43

Introduces 4 new declarations in src/vs/workbench/contrib/chat/browser/actions/chatContext.ts.

Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.

src/vs/workbench/contrib/chat/browser/actions/chatContext.ts · 7 files

@@ -169,23 +174,61 @@ export class GitHubContextValuePick implements IChatContextValueItem { 		}; 	} -	protected async pickRepository(repositories: readonly string[]): Promise<string | undefined> {-		const repository = await this.quickInputService.pick(-			repositories.map((repoId): IGitHubRepositoryQuickPickItem => ({ label: repoId, repoId })),-			{ placeHolder: localize('chatContext.githubRepository.placeholder', "Select a repository") }+	protected async pickRepository(repositories: readonly IGitHubRepositoryPick[]): Promise<IGitHubRepositoryPick | undefined> {+		return this.quickInputService.pick<IGitHubRepositoryPick>(+			[...repositories],+			{+				canPickMany: false,+				placeHolder: localize('chatContext.githubRepository.placeholder', "Select a repository"),+			} 		);-		return repository?.repoId; 	} -	private getRepositories(): readonly string[] {-		const repositories = new Set<string>();-		for (const repository of this.gitService.repositories) {+	private async getRepositoryPicks(): Promise<readonly IGitHubRepositoryPick[]> {+		const knownRepositories = Array.from(this.gitService.repositories);+		const workspaceFolders = this.workspaceContextService.getWorkspace().folders;+		if (workspaceFolders.length > 1) {+			return workspaceFolders.map((folder): IGitHubRepositoryPick => {+				const repository = knownRepositories.find(repository =>+					isEqual(this.workspaceContextService.getWorkspaceFolder(repository.rootUri)?.uri, folder.uri)+				);+				const info = repository && getGitHubRemoteInfo(repository.state.get());+				return info ? {+					label: folder.name,+					description: `${info.owner}/${info.repo}`,

Read today’s edition →