7-day edition

Oct 5, 2026 – Oct 11, 2026

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

Oct 12, 202612 reads · 829 merged PRs screened

systems design

kubernetes/kubernetes · #142620

Files changed →View PR ↗

component-base/metrics/testutil: compute quantiles from native histogramsGo · 163 + / 0 −

Introduces 4 new declarations in staging/src/k8s.io/component-base/metrics/testutil/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/component-base/metrics/testutil/metrics.go ↗ · 2 files

@@ -383,6 +413,139 @@ func (hist *Histogram) Quantile(q float64) float64 { 	return bucketQuantile(q, buckets) } +// nativeBuckets decodes the sparse, exponentially sized buckets of a native+// histogram (https://www.kubernetes.dev/resources/keps/5808/)+// into a list of non-cumulative buckets covering the real number line,+// sorted by ascending upper bound. It returns nil if hist doesn't carry any+// native histogram data (e.g. because native histograms are disabled or the+// histogram has no observations).+func (hist *Histogram) nativeBuckets() []bucket {+	h := hist.Histogram+	if len(h.GetPositiveSpan()) == 0 && len(h.GetNegativeSpan()) == 0 &&+		h.GetZeroCount() == 0 && h.GetZeroCountFloat() == 0 {+		return nil+	}++	schema := h.GetSchema()+	var buckets []bucket++	for idx, count := range decodeNativeHistogramSpans(h.GetPositiveSpan(), h.GetPositiveDelta(), h.GetPositiveCount()) {+		if count <= 0 {+			continue+		}+		lower, upper := nativeHistogramBucketBounds(schema, idx)+		buckets = append(buckets, bucket{lowerBound: lower, upperBound: upper, count: count})+	}+	for idx, count := range decodeNativeHistogramSpans(h.GetNegativeSpan(), h.GetNegativeDelta(), h.GetNegativeCount()) {+		if count <= 0 {+			continue+		}+		lower, upper := nativeHistogramBucketBounds(schema, idx)+		buckets = append(buckets, bucket{lowerBound: -upper, upperBound: -lower, count: count})+	}

runtime

kubernetes/kubernetes · #142221

Files changed →View PR ↗

kubectl: separate `attach` flags from runtime optionsGo · 75 + / 48 −

Introduces 5 new declarations in staging/src/k8s.io/kubectl/pkg/cmd/attach/attach.go.

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

staging/src/k8s.io/kubectl/pkg/cmd/attach/attach.go ↗ · 2 files

@@ -94,20 +113,62 @@ type AttachOptions struct { 	Config        *restclient.Config } -// NewAttachOptions creates the options for attach-func NewAttachOptions(streams genericiooptions.IOStreams) *AttachOptions {-	return &AttachOptions{-		StreamOptions: exec.StreamOptions{-			IOStreams: streams,-		},-		Attach:     &DefaultRemoteAttach{},-		AttachFunc: DefaultAttachFunc,+// ToOptions converts from CLI inputs to runtime inputs.+func (flags *AttachFlags) ToOptions(f cmdutil.Factory, cmd *cobra.Command, args []string) (*AttachOptions, error) {+	namespace, _, err := f.ToRawKubeConfigLoader().Namespace()+	if err != nil {+		return nil, err+	}++	getPodTimeout, err := cmdutil.GetPodRunningTimeoutFlag(cmd)+	if err != nil {+		return nil, err 	}++	config, err := f.ToRESTConfig()+	if err != nil {+		return nil, err+	}++	o := &AttachOptions{+		Namespace:     namespace,+		ContainerName: flags.ContainerName,+		Stdin:         flags.Stdin,+		TTY:           flags.TTY,

runtime

nodejs/node · #66476

Files changed →View PR ↗

test_runner: add mock call assertions to t.assertJavaScript · 106 + / 0 −

Introduces 6 new declarations in lib/internal/test_runner/assert.js.

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

lib/internal/test_runner/assert.js ↗ · 4 files

@@ -28,13 +36,110 @@ const methodsToCopy = [ ]; let assertMap; +function getMockContext(fn) {+  const { MockFunctionContext } = require('internal/test_runner/mock/mock');+  const ctx = fn?.mock;++  if (!(ctx instanceof MockFunctionContext)) {+    throw new ERR_INVALID_ARG_TYPE('fn', 'mock function', fn);+  }++  return ctx;+}++function called(fn, message) {+  const count = getMockContext(fn).callCount();++  if (count === 0) {+    throw new AssertionError({+      __proto__: null,+      message: message ?? 'Expected mock function to have been called',+      actual: count,+      operator: 'called',+      stackStartFn: called,+    });+  }+}++function callCount(fn, times, message) {+  validateInteger(times, 'times', 0);+  const count = getMockContext(fn).callCount();++  if (count !== times) {

runtime

nodejs/node · #66235

Files changed →View PR ↗

vfs: add ComposableProvider for layered mountsJavaScript · 418 + / 0 −

Introduces 3 new declarations in lib/internal/vfs/providers/composable.js.

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

lib/internal/vfs/providers/composable.js ↗ · 4 files

@@ -0,0 +1,416 @@+'use strict';++const {+  ArrayIsArray,+  ArrayPrototypePush,+  MapPrototypeHas,+  MapPrototypeSet,+  SafeMap,+  SafeSet,+  SetPrototypeAdd,+  SetPrototypeHas,+} = primordials;++const {+  codes: {+    ERR_INVALID_ARG_TYPE,+    ERR_OUT_OF_RANGE,+  },+} = require('internal/errors');+const { VirtualProvider } = require('internal/vfs/provider');+const { decodeOpenFlags } = require('internal/vfs/file_handle');+const {+  createENOENT,+  createENOTDIR,+  createENOTEMPTY,+  createEISDIR,+  createEROFS,+  createEEXIST,+  createEXDEV,+} = require('internal/vfs/errors');+const { posix: pathPosix } = require('path');+const { Dirent } = require('internal/fs/utils');+const { fs: { COPYFILE_EXCL } } = internalBinding('constants');

core implementation

pandas-dev/pandas · #69786

Files changed →View PR ↗

ENH: sniff sep=None with the C engine in read_csv (GH#9645)Python · 105 + / 9 −

Introduces 5 new declarations in pandas/io/parsers/readers.py.

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

pandas/io/parsers/readers.py ↗ · 7 files

@@ -3643,3 +3689,53 @@ def _validate_skipfooter(kwds: dict[str, Any]) -> None:             raise ValueError("'skipfooter' not supported for iteration")         if kwds.get("nrows"):             raise ValueError("'skipfooter' not supported with 'nrows'")+++def _iter_physical_lines(+    handle: IO[Any], chunks: list[bytes | str], lineterminator: str | None+) -> Iterator[bytes | str]:+    """+    Yield each line of ``handle`` without its terminator, appending every chunk+    read to ``chunks``.+    """+    eol: re.Pattern[Any] | None = None+    partial: list[Any] = []+    skip_lf = False+    while True:+        chunk = handle.read(_SNIFF_CHUNK_SIZE)+        if not chunk:+            tail = partial[0][:0].join(partial) if partial else ""+            if tail:+                yield tail+            return+        chunks.append(chunk)+        if eol is None:+            pattern = re.escape(lineterminator) if lineterminator else r"\r\n|\r|\n"+            eol = re.compile(pattern.encode() if isinstance(chunk, bytes) else pattern)+        start = 0+        if skip_lf and chunk[:1] in (b"\n", "\n"):+            # the second half of a "\r\n" split across chunks+            start = 1+        for match in eol.finditer(chunk, start):+            partial.append(chunk[start : match.start()])+            yield chunk[:0].join(partial)

runtime

nodejs/node · #66229

Files changed →View PR ↗

net: race family autoselection attemptsJavaScript · 189 + / 80 −

Introduces 10 new declarations in lib/net.js.

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

lib/net.js ↗ · 10 files

@@ -1477,107 +1488,205 @@ function internalConnect( }  -function internalConnectMultiple(context, canceled) {+function closeConnectionAttempts(context) {   clearTimeout(context[kTimeout]);+  context[kTimeout] = null;+  context.done = true;+  for (let i = 0; i < context.pending.length; i++) {+    const { handle, req, own } = context.pending[i];+    req.oncomplete = undefined;+    // The socket's own handle is closed by whoever replaces or destroys it.+    if (!own) handle.close();+  }+  context.pending.length = 0;+}++function removePendingAttempt(context, req) {+  const { pending } = context;+  for (let i = 0; i < pending.length; i++) {+    if (pending[i].req === req) {+      const attempt = pending[i];+      ArrayPrototypeSplice(pending, i, 1);+      return attempt;+    }+  }+}++function connectMultipleError(context) {+  // Errors are stored by attempt index to preserve the attempt order.+  const errors = [];+  for (let i = 0; i < context.errors.length; i++) {+    if (context.errors[i] !== undefined) ArrayPrototypePush(errors, context.errors[i]);

language design

rust-lang/rust · #163337

Files changed →View PR ↗

MIR move elimination [3/6]: PreciseLivenessRust · 646 + / 1 −

Introduces 41 new declarations in compiler/rustc_mir_dataflow/src/impls/precise_liveness.rs.

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

compiler/rustc_mir_dataflow/src/impls/precise_liveness.rs ↗ · 21 files

@@ -0,0 +1,596 @@+//! Computes the points where each local must have a distinct allocation.+//!+//! The result is a [`SparseIntervalMatrix`] with one row per local. Two locals+//! may share the same address only if their rows are disjoint. To model MIR+//! statements where a source operand and destination place may share an+//! address, each statement and terminator is split into an early point, where+//! operands are read, and a late point, where destinations are written.+//!+//! A local live range starts at the late point of any statement or terminator+//! that writes to it without a `Deref` projection. It ends at `StorageLive` or+//! `StorageDead`, or at the early point of a whole-local move operand or the+//! last use of that local on a control-flow path (only for locals whose address+//! is never observed). This happens at `StorageLive` because it resets a local+//! to an uninitialized state.+//!+//! `Call` terminators are handled specially: move operands are kept live+//! through the late point of the terminator so they conflict with each other+//! and with the destination place. This matches the runtime behavior where the+//! place is donated to the callee for the duration of the call.+//!+//! The analysis consists of three passes:+//!+//! 1. A backward value-liveness analysis which identifies the last point at+//!    which each local is directly used in each control flow path. This is used+//!    to shorten the lifetime of unborrowed locals to their last use.+//! 2. A forward allocation-liveness analysis which uses that information+//!    together with writes, moves, and storage markers to compute which+//!    allocations may be live on entry to each block.+//! 3. A final walk using those entry states which constructs the matrix and+//!    distinguishes whether each effect happens at the early or late point of a+//!    statement or terminator.++use rustc_index::IndexVec;

framework internals

huggingface/transformers · #48700

Files changed →View PR ↗

Fix quantized cachePython · 45 + / 1 −

Introduces 3 new declarations in src/transformers/cache_utils.py.

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

src/transformers/cache_utils.py ↗ · 3 files

@@ -781,6 +791,37 @@ def _quantize(self, tensor, axis): ...     @abstractmethod     def _dequantize(self, q_tensor): ... +    def reorder_cache(self, beam_idx: torch.LongTensor) -> None:+        """Reorders this layer's cache for beam search."""+        if not self.is_initialized:+            return++        # Deferred to the next `update`, which dequantizes the states anyway. It is cloned as `beam_idx` belongs to+        # the caller, and composed with any pending one to cover several reorders in a row.+        beam_idx = beam_idx.to(self.device)+        self._pending_beam_idx = (+            beam_idx.clone() if self._pending_beam_idx is None else self._pending_beam_idx.index_select(0, beam_idx)+        )++        # Optional, as the residual cache is emptied whenever it is flushed into the quantized states+        if self.keys.numel() > 0:+            self.keys = self.keys.index_select(0, beam_idx.to(self.keys.device))+            self.values = self.values.index_select(0, beam_idx.to(self.values.device))++    def _apply_pending_reorder(self, keys: torch.Tensor, values: torch.Tensor) -> tuple[torch.Tensor, torch.Tensor]:+        """Applies the reordering deferred by `reorder_cache` to freshly dequantized states."""+        if self._pending_beam_idx is None:+            return keys, values+        beam_idx = self._pending_beam_idx.to(keys.device)+        return keys.index_select(0, beam_idx), values.index_select(0, beam_idx)++    def reset(self) -> None:+        """Resets the cache values while preserving the objects."""+        super().reset()+        # The quantized states are dropped instead of zeroed, so that the next `update` quantizes from scratch+        self._quantized_keys = self._quantized_values = None+        self._pending_beam_idx = None

language design

rust-lang/rust · #163721

Files changed →View PR ↗

Annotate MIR with dataflow results for testing purposesRust · 167 + / 2 −

Introduces 14 new declarations in compiler/rustc_mir_dataflow/src/pretty.rs.

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

compiler/rustc_mir_dataflow/src/pretty.rs ↗ · 15 files

@@ -0,0 +1,132 @@+use std::io;++use rustc_attr_ir::{RustcMirKind, find_attr};+use rustc_data_structures::fx::FxIndexMap;+use rustc_middle::mir::{self, Body, Local, MirDumper, PassWhere, traversal};+use rustc_middle::ty::TyCtxt;++use crate::debuginfo::debuginfo_locals;+use crate::framework::Analysis;+use crate::impls::{MaybeLiveLocals, MaybeTransitiveLiveLocals, borrowed_locals};+use crate::{ResultsVisitor, visit_results};++type ExtraDataFn = dyn Fn(PassWhere, &mut dyn io::Write) -> io::Result<()>;++pub(crate) fn mir_pretty_extra_data<'tcx>(+    tcx: TyCtxt<'tcx>,+    body: &Body<'tcx>,+) -> Option<Box<ExtraDataFn>> {+    let def_id = body.source.def_id();+    let Some(kinds) = find_attr!(tcx, def_id, RustcMir(kind) => kind) else {+        return None;+    };+    let mut annotations = Annotations::default();+    for kind in kinds {+        match kind {+            RustcMirKind::PrettyLiveLocals => {+                let results = MaybeLiveLocals.iterate_to_fixpoint(tcx, body, None);+                let blocks = traversal::reachable(body).map(|(bb, _)| bb);+                visit_results(+                    body,+                    blocks,+                    &results,+                    &mut Annotator { annotations: &mut annotations },

framework internals

vercel/next.js · #99887

Files changed →View PR ↗

turbopack: report an actionable error when Node.js child processes cannot connectRust · 168 + / 6 −

Introduces 18 new declarations in turbopack/crates/turbopack-node/src/evaluate.rs.

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

turbopack/crates/turbopack-node/src/evaluate.rs ↗ · 11 files

@@ -769,3 +826,76 @@ impl Issue for EvaluationIssue {         Some(self.source)     } }++/// Node.js child processes could not connect back to the parent process, which+/// makes it impossible to run any Node.js code (webpack loaders, PostCSS, ...).+#[turbo_tasks::value(shared)]+pub struct NodeJsConnectIssue {+    /// The source being transformed when the connection failed. The failure is+    /// unrelated to its contents, but this tells the user which transform hit it.+    pub source: IssueSource,+    /// What was being evaluated, e.g. the loader chain.+    pub crash_context: Option<RcStr>,+    /// Error output of the child process, describing why the connection failed.+    pub stderr: RcStr,+}++#[async_trait]+#[turbo_tasks::value_impl]+impl Issue for NodeJsConnectIssue {+    fn severity(&self) -> IssueSeverity {+        IssueSeverity::Error+    }++    async fn title(&self) -> Result<StyledString> {+        Ok(StyledString::Text(rcstr!(+            "Node.js worker processes could not connect to Turbopack"+        )))+    }++    fn stage(&self) -> IssueStage {+        IssueStage::Transform+    }

language design

rust-lang/rust · #162106

Files changed →View PR ↗

Helpful suggestions for incorrect address-of mutability (2)Rust · 74 + / 11 −

Introduces 3 new declarations in compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs.

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

compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs ↗ · 4 files

@@ -982,23 +982,62 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {         err.emit()     } -    fn suggest_ptr_null_mut(+    fn suggest_mut_addr(         &self,         expected_ty: Ty<'tcx>,         provided_ty: Ty<'tcx>,         arg: &hir::Expr<'tcx>,         err: &mut Diag<'_>,     ) {-        if let ty::RawPtr(_, hir::Mutability::Mut) = expected_ty.kind()-            && let ty::RawPtr(_, hir::Mutability::Not) = provided_ty.kind()-            && let hir::ExprKind::Call(callee, _) = arg.kind-            && let hir::ExprKind::Path(hir::QPath::Resolved(_, path)) = callee.kind-            && let Res::Def(_, def_id) = path.res-            && self.tcx.get_diagnostic_item(sym::ptr_null) == Some(def_id)-        {+        match (expected_ty.kind(), provided_ty.kind(), arg.kind) {             // The user provided `ptr::null()`, but the function expects             // `ptr::null_mut()`.-            err.subdiagnostic(SuggestPtrNullMut { span: arg.span });+            (+                ty::RawPtr(_, hir::Mutability::Mut),+                ty::RawPtr(_, hir::Mutability::Not),+                hir::ExprKind::Call(callee, _),+            ) if let hir::ExprKind::Path(hir::QPath::Resolved(_, path)) = callee.kind+                && let Res::Def(_, def_id) = path.res+                && self.tcx.get_diagnostic_item(sym::ptr_null) == Some(def_id) =>+            {+                err.subdiagnostic(SuggestPtrNullMut { span: arg.span });+            }+            // &mut T expected, &T or *const/mut T found

framework internals

ggml-org/llama.cpp · #29887

Files changed →View PR ↗

llama : add a GPU cache for MoE experts kept in host memoryC++ · 739 + / 13 −

Introduces 14 new declarations in src/llama-moe-cache.cpp.

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

src/llama-moe-cache.cpp ↗ · 14 files

@@ -0,0 +1,550 @@+#include "llama-moe-cache.h"++#include "llama-impl.h"+#include "llama-model.h"++#include "ggml-cpp.h"++#include <algorithm>+#include <stdexcept>+#include <unordered_map>+#include <vector>++namespace {++// LRU of the experts of a group of layers, the slot of each expert is kept in the slot map of its layer+struct moe_cache_lru {+    int32_t n_expert = 0;+    int32_t n_slots  = 0;++    std::vector<int32_t *> slot_map; // [n_layer] data of the slot maps, -1 if the expert is not cached+    std::vector<int32_t>   key_of;   // [n_slots] il*n_expert + expert, -1 if empty++    // doubly linked list of the slots, head is the least recently used+    std::vector<int32_t> prev;+    std::vector<int32_t> next;+    int32_t head = -1;+    int32_t tail = -1;++    std::vector<uint32_t> seen; // [n_expert]+    uint32_t seen_gen = 0;+    std::vector<int32_t> uniq;++    void init(int32_t n_layer, int32_t n_expert, int32_t n_slots) {

Read today’s edition →